From 05b657255309eb1ad3f04ba6257ebc7a6b77ad7a Mon Sep 17 00:00:00 2001 From: srdusr Date: Wed, 6 Dec 2023 23:31:08 +0200 Subject: Add toggle-bar --- toggle-bar | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 toggle-bar (limited to 'toggle-bar') 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 -- cgit v1.2.3