aboutsummaryrefslogtreecommitdiff
path: root/toggle-bar
blob: f8a5e171102b8d861b9d700a4e1391281a3b4e6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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