summary refs log tree commit diff stats
path: root/files/nwg-panel/executors/au.sh
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-09-28 21:08:48 +0200
committersils <sils@sils.li>2023-09-28 21:08:48 +0200
commit0f494db49594dc6a1e4403e792a73cea9a44dfe6 (patch)
tree0890c841619438421e6a71210aa9228ceaaffdd4 /files/nwg-panel/executors/au.sh
parentfeat(u/sils/xdg): add element-desktop as handler for element events (diff)
downloadnix-config-0f494db49594dc6a1e4403e792a73cea9a44dfe6.tar.gz
nix-config-0f494db49594dc6a1e4403e792a73cea9a44dfe6.zip
feat(files/nwg-panel): add nwg-panel config
Diffstat (limited to '')
-rwxr-xr-xfiles/nwg-panel/executors/au.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/files/nwg-panel/executors/au.sh b/files/nwg-panel/executors/au.sh
new file mode 100755
index 0000000..2b4a04d
--- /dev/null
+++ b/files/nwg-panel/executors/au.sh
@@ -0,0 +1,18 @@
+#!/nix/store/vqvj60h076bhqj6977caz0pfxs6543nb-bash-5.2-p15/bin/bash
+
+# This is a helper to the arch-updates.py executor
+# Add `<your-terminal-here> -e "au.sh; swaymsg reload"` as the On left click action
+
+# Just in case - warn if battery level < threshold
+l=$(acpi | awk -F ',' '{print $2}')
+if [[ ! -z "$l" ]]; then
+    level=${l:1:-1}
+    threshold=30
+    if [[ "$level" -lt "$threshold" ]]; then
+	    echo -e "\n*** BATTERY LEVEL$l, CONNECT AC! ***\n"
+    fi
+fi
+
+trizen -Syu &&
+rm /tmp/arch-updates
+echo Press enter to exit!; read;