diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-12-06 23:31:08 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-12-06 23:31:08 +0200 |
| commit | 05b657255309eb1ad3f04ba6257ebc7a6b77ad7a (patch) | |
| tree | 8b3abc3872edc0636026dd836db96fb541299ea5 | |
| parent | 0aa27bdf91a213461ef5f8d2fdf03f434f1917c5 (diff) | |
| download | dotfiles-05b657255309eb1ad3f04ba6257ebc7a6b77ad7a.tar.gz dotfiles-05b657255309eb1ad3f04ba6257ebc7a6b77ad7a.zip | |
Add toggle-bar
| -rwxr-xr-x | toggle-bar | 17 |
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 |
