21 lines
490 B
Bash
21 lines
490 B
Bash
|
#!/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
|