#!/bin/bash

if [ x"$@" = x"general help" ];
then
killall rofi
sleep 0.25
mx-viewer https://mxlinux.org/wiki/help-files/help-rofi/
kill mx-viewer
fi

if [ x"$@" = x"scripts" ];
then
killall rofi
sleep 0.25
rofi-sensible-terminal -e "man rofi-script"
kill rofi-sensible-terminal
fi

if [ x"$@" = x"recolor" ];
then
killall rofi
sleep 0.25
feh /usr/share/pixmaps/mxrr-help-recolor.png
kill rofi-sensible-terminal
fi

if [ x"$@" = x"theme format" ];
then
killall rofi
sleep 0.25
rofi-sensible-terminal -e "man rofi-theme"
kill rofi-sensible-terminal
fi

if [ x"$@" = x"detailed help" ];
then
killall rofi
sleep 0.25
rofi-sensible-terminal -e "man rofi"
kill rofi-sensible-terminal
fi

if [ x"$@" = x"calc" ];
then
killall rofi
sleep 0.25
featherpad /usr/share/rofi/calc-help
kill featherpad
fi

if [ x"$@" = x"position / size" ];
then
killall rofi
sleep 0.25
featherpad /usr/share/rofi/position-help
kill featherpad
fi

if [ x"$@" = x"runbox code" ];
then
killall rofi
sleep 0.25
featherpad /usr/share/rofi/runbox_code
kill featherpad
fi

echo -e "calc\0icon\x1fhelp-browser"
echo -e "detailed help\0icon\x1fhelp-browser"
echo -e "general help\0icon\x1fhelp-browser"
echo -e "position / size\0icon\x1fhelp-browser"
echo -e "recolor\0icon\x1fhelp-browser"
echo -e "runbox code\0icon\x1fhelp-browser"
echo -e "scripts\0icon\x1fhelp-browser"
echo -e "theme format\0icon\x1fhelp-browser"
