Samuel Shuert | 3f82866 | 2024-02-10 20:45:50 -0500 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | |
| 3 | ## Files and cmd |
| 4 | FILE="$HOME/.cache/eww_launch.xyz" |
| 5 | EWW="$HOME/.local/bin/eww/eww -c $HOME/.config/eww/bar" |
| 6 | |
| 7 | ## Run eww daemon if not running already |
| 8 | if [[ ! `pidof eww` ]]; then |
| 9 | ${EWW} daemon |
| 10 | sleep 1 |
| 11 | fi |
| 12 | |
| 13 | ## Open widgets |
| 14 | run_eww() { |
| 15 | ${EWW} open-many \ |
| 16 | bar |
| 17 | |
| 18 | } |
| 19 | |
| 20 | ## Launch or close widgets accordingly |
| 21 | if [[ ! -f "$FILE" ]]; then |
| 22 | touch "$FILE" |
| 23 | run_eww && bspc config -m LVDS-1 top_padding 49 |
| 24 | else |
| 25 | ${EWW} close-all && killall eww |
| 26 | rm "$FILE" |
| 27 | fi |