dotfiles/home/default/.config/waybar/scripts/emacs-status.sh

16 lines
221 B
Bash
Executable File

inactive="{
\"text\": \"x\",
\"tooltip\": \"emacs is not running.\"
}\n"
active="{
\"text\": \"e+\",
\"tooltip\": \"emacs is running.\"
}\n"
pgrep emacs >/dev/null
if [ $? -eq 1 ]
then
echo $inactive
else
echo $active
fi