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