aboutsummaryrefslogtreecommitdiff
path: root/toggle-bar
diff options
context:
space:
mode:
Diffstat (limited to 'toggle-bar')
-rwxr-xr-xtoggle-bar17
1 files changed, 17 insertions, 0 deletions
diff --git a/toggle-bar b/toggle-bar
new file mode 100755
index 0000000..f8a5e17
--- /dev/null
+++ b/toggle-bar
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+EWW=$(which eww)
+
+# Define the file to store the state
+state_file="$HOME/.eww_module_state"
+
+# Check if the module is currently running
+if [ -e "$state_file" ]; then
+ # If the file exists, the module is running, so close it
+ rm "$state_file"
+ $EWW close bar &
+else
+ # If the file doesn't exist, the module is not running, so start it
+ touch "$state_file"
+ $EWW open bar &
+fi