initial commit
This commit is contained in:
18
scripts/sunset.sh
Executable file
18
scripts/sunset.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RM="/run/current-system/sw/bin/rm"
|
||||
KILL="/run/current-system/sw/bin/kill"
|
||||
WLSUNSET="/home/vi/.nix-profile/bin/wlsunset"
|
||||
ECHO="/run/current-system/sw/bin/echo"
|
||||
CAT="/run/current-system/sw/bin/cat"
|
||||
PIDFILE="/tmp/$USER-$EUID-wlsunset.pid"
|
||||
|
||||
if [ -e $PIDFILE ]
|
||||
then
|
||||
$KILL $($CAT $PIDFILE)
|
||||
$RM $PIDFILE
|
||||
else
|
||||
$WLSUNSET -l 49 -L 9 &
|
||||
wlpid=$!
|
||||
$ECHO $wlpid > $PIDFILE
|
||||
fi
|
||||
Reference in New Issue
Block a user