summaryrefslogtreecommitdiff
path: root/scripts/wlsunset-toggle
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-11-12 22:26:02 -0500
committerAndrew Opalach <andrew@akon.city> 2024-11-12 22:36:49 -0500
commit53a0a5473f45d37027af9663638adbf56667e4ca (patch)
tree05c6c39678a9005f95c00e0fdf31193657bd4d3d /scripts/wlsunset-toggle
downloaddotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.gz
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.tar.bz2
dotfiles-53a0a5473f45d37027af9663638adbf56667e4ca.zip
Hopefully no leaks
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