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