33 lines
826 B
Bash
Executable File
33 lines
826 B
Bash
Executable File
#!/bin/bash
|
|
|
|
ARG=$1
|
|
if [[ $ARG == '' ]]; then
|
|
ARG="toggle"
|
|
fi
|
|
|
|
if [[ $ARG == 'toggle' ]]; then
|
|
if [[ -e '/home/jpm/.config/waybar/.hidden' ]]; then
|
|
rm '/home/jpm/.config/waybar/.hidden';
|
|
else
|
|
touch '/home/jpm/.config/waybar/.hidden';
|
|
fi
|
|
elif [[ $ARG == 'hide' ]]; then
|
|
if [[ ! -e '/home/jpm/.config/waybar/.hidden' ]]; then
|
|
touch '/home/jpm/.config/waybar/.hidden';
|
|
else
|
|
echo 'Already hidden. You may need to use the "invert" option if action is reversed';
|
|
exit;
|
|
fi
|
|
elif [[ $ARG == 'show' ]]; then
|
|
if [[ -e '/home/jpm/.config/waybar/.hidden' ]]; then
|
|
rm '/home/jpm/.config/waybar/.hidden';
|
|
else
|
|
echo 'Already shown. You may need to use the "invert" option if action is reversed';
|
|
exit;
|
|
fi
|
|
elif [[ $ARG != 'invert' ]]; then
|
|
echo "Invalid argument";
|
|
fi
|
|
|
|
/home/jpm/scripts/waybar/toggle `pgrep waybar`
|