summaryrefslogtreecommitdiff
path: root/scripts/wlsunset-toggle
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wlsunset-toggle')
-rwxr-xr-xscripts/wlsunset-toggle10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/wlsunset-toggle b/scripts/wlsunset-toggle
new file mode 100755
index 0000000..7dcd06e
--- /dev/null
+++ b/scripts/wlsunset-toggle
@@ -0,0 +1,10 @@
+#! /usr/bin/env sh
+# <LAT>|<LONG>
+CORDS=$(cat $HOME/.config/home-cords || echo '')
+LAT=$(echo $CORDS | cut -d '|' -f 1)
+LONG=$(echo $CORDS | cut -d '|' -f 2)
+if pidof wlsunset; then
+ pkill wlsunset
+else
+ wlsunset -l $LAT -L $LONG &
+fi