scripts/waybar/waybar-gammastep.sh

21 lines
490 B
Bash
Raw Normal View History

2022-08-26 05:05:14 +00:00
#!/bin/bash
RUNNING=$(pgrep gammastep)
if [[ $1 == 'toggle' ]]; then
echo "toggling"
if [ "$RUNNING" ]; then
kill -9 $RUNNING 2&>1 /dev/null
else
$HOME/scripts/sway/gammastep.pl
fi
RUNNING=$(pgrep gammastep)
fi
if [ "$RUNNING" ]; then
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Disable Gammastep","class":"enabled"}'
else
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Enable Gammastep","class":"disabled"}'
fi