From 53a0a5473f45d37027af9663638adbf56667e4ca Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Tue, 12 Nov 2024 22:26:02 -0500 Subject: Hopefully no leaks --- scripts/wlsunset-toggle | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 scripts/wlsunset-toggle (limited to 'scripts/wlsunset-toggle') 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 +# | +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 -- cgit v1.2.3-101-g0448