]> gitweb.fluxo.info Git - utils-x11.git/commitdiff
Feat: xalarm: Awesome VM integration to gently inform before blocking the screen
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Oct 2025 23:17:12 +0000 (20:17 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 24 Oct 2025 23:17:12 +0000 (20:17 -0300)
xalarm

diff --git a/xalarm b/xalarm
index 63baf434530bfb1e926d7a8c5a6e70efa86e0193..0d999f32ef546f34f030dffdf0474712c3c769df 100755 (executable)
--- a/xalarm
+++ b/xalarm
@@ -54,6 +54,13 @@ function xalarm_set {
     echo "Resetting alarm..."
     xalarm_set $DELAY $MESSAGE
   else
+    # Integration with Awesome VM
+    if which awesome-client &> /dev/null; then
+      echo "naughty.notify({title = \"X Alarm:\", text =\"The following alarm will block the screen soon: $MESSAGE\", timeout = 5})" | awesome-client
+      sleep 5
+    fi
+
+    # Integration with SM(6)
     if which sm &> /dev/null; then
       #sm -f '#ffffff' -b '#1c1c1c' $MESSAGE
       (timer=0; while sleep 1; do let timer++; echo $MESSAGE - $timer; echo -e '\f'; done) | sm -f '#ffffff' -b '#1c1c1c' -