Compare commits
2 Commits
da807b773f
...
6b026a234b
Author | SHA1 | Date |
---|---|---|
John Mertz | 6b026a234b | |
John Mertz | 2ef6def85f |
|
@ -71,7 +71,11 @@ elif [ $1 == "unlock" ]; then
|
||||||
#'screen -S irssi -X stuff "/nick jpm^M"'
|
#'screen -S irssi -X stuff "/nick jpm^M"'
|
||||||
:
|
:
|
||||||
elif [ $1 == "sleep" ]; then
|
elif [ $1 == "sleep" ]; then
|
||||||
for i in `cat $OPFILE`; do swaymsg "output $i dpms off"; done
|
if [ -e $NOHIBERNATE ]; then
|
||||||
|
::
|
||||||
|
else
|
||||||
|
for i in `cat $OPFILE`; do swaymsg "output $i dpms off"; done
|
||||||
|
fi
|
||||||
elif [ $1 == "wake" ]; then
|
elif [ $1 == "wake" ]; then
|
||||||
/home/jpm/scripts/sway/displays.pl
|
/home/jpm/scripts/sway/displays.pl
|
||||||
elif [ $1 == "hibernate" ]; then
|
elif [ $1 == "hibernate" ]; then
|
||||||
|
|
|
@ -14,37 +14,44 @@ fi
|
||||||
if [[ $ACTION == 'bar' ]]; then
|
if [[ $ACTION == 'bar' ]]; then
|
||||||
:
|
:
|
||||||
elif [[ $ACTION == 'toggle' ]]; then
|
elif [[ $ACTION == 'toggle' ]]; then
|
||||||
if [ "$PID" ]; then
|
if [ ! -z $PID ]; then
|
||||||
kill -SIGUSR1 $PID
|
kill -SIGUSR1 $PID
|
||||||
|
if [[ $RUNNING == 0 ]]; then
|
||||||
|
echo 1 > $HOME/.spool/gammastep.status
|
||||||
|
else
|
||||||
|
echo 0 > $HOME/.spool/gammastep.status
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo 'Gammastep is not running'
|
echo 'Gammastep is not running'
|
||||||
fi
|
fi
|
||||||
elif [[ $ACTION == 'start' ]]; then
|
elif [[ $ACTION == 'start' ]]; then
|
||||||
if [ "$PID" ]; then
|
if [ ! -z $PID ]; then
|
||||||
echo 'Gammastep is already running'
|
echo 'Gammastep is already running'
|
||||||
else
|
else
|
||||||
$HOME/scripts/sway/gammastep.pl
|
$HOME/scripts/sway/gammastep.pl
|
||||||
fi
|
fi
|
||||||
elif [[ $ACTION == 'stop' ]]; then
|
elif [[ $ACTION == 'stop' ]]; then
|
||||||
if [ "$PID" ]; then
|
if [ ! -z $PID ]; then
|
||||||
kill $PID
|
kill $PID
|
||||||
else
|
else
|
||||||
echo 'Gammastep is not running'
|
echo 'Gammastep is not running'
|
||||||
fi
|
fi
|
||||||
elif [[ $ACTION == 'enable' ]]; then
|
elif [[ $ACTION == 'enable' ]]; then
|
||||||
if [ $PID ]; then
|
if [ ! -z $PID ]; then
|
||||||
if [ $RUNNING ]; then
|
if [[ $RUNNING != 0 ]]; then
|
||||||
echo 'Already enabled'
|
echo 'Already enabled'
|
||||||
else
|
else
|
||||||
kill -SIGUSR1 $PID
|
kill -SIGUSR1 $PID
|
||||||
|
echo 1 > $HOME/.spool/gammastep.status
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo 'Gammastep is not running'
|
echo 'Gammastep is not running'
|
||||||
fi
|
fi
|
||||||
elif [[ $ACTION == 'disable' ]]; then
|
elif [[ $ACTION == 'disable' ]]; then
|
||||||
if [ $PID ]; then
|
if [ ! -z $PID ]; then
|
||||||
if [ $RUNNING ]; then
|
if [ $RUNNING ]; then
|
||||||
kill -SIGUSR1 $PID
|
kill -SIGUSR1 $PID
|
||||||
|
echo 0 > $HOME/.spool/gammastep.status
|
||||||
else
|
else
|
||||||
echo 'Already disabled'
|
echo 'Already disabled'
|
||||||
fi
|
fi
|
||||||
|
@ -59,8 +66,8 @@ RUNNING=0
|
||||||
if [ -e $HOME/.spool/gammastep.status ]; then
|
if [ -e $HOME/.spool/gammastep.status ]; then
|
||||||
RUNNING=`cat $HOME/.spool/gammastep.status`
|
RUNNING=`cat $HOME/.spool/gammastep.status`
|
||||||
fi
|
fi
|
||||||
if [ "$RUNNING" ]; then
|
if [[ $RUNNING == 0 ]]; then
|
||||||
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Disable Gammastep","class":"enabled"}'
|
|
||||||
else
|
|
||||||
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Enable Gammastep","class":"disabled"}'
|
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Enable Gammastep","class":"disabled"}'
|
||||||
|
else
|
||||||
|
echo '{"text":"ɣ","icon":"ɣ","tooltip":"Disable Gammastep","class":"enabled"}'
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue