aboutsummaryrefslogtreecommitdiff
path: root/.config/eww
diff options
context:
space:
mode:
Diffstat (limited to '.config/eww')
-rwxr-xr-x.config/eww/launch.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/.config/eww/launch.sh b/.config/eww/launch.sh
new file mode 100755
index 0000000..656a339
--- /dev/null
+++ b/.config/eww/launch.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+## Files and cmd
+FILE="$HOME/.cache/eww_launch.xyz"
+EWW=$(which eww)
+
+## Run eww daemon if not running already
+if [[ ! $(pidof eww) ]]; then
+ "$EWW" daemon
+ sleep 1
+fi
+
+## Open widgets
+run_eww() {
+ "$EWW" open bar
+
+}
+
+## Launch or close widgets accordingly
+if [[ ! -f "$FILE" ]]; then
+ touch "$FILE"
+ run_eww && bspc config -m LVDS-1 top_padding 49
+else
+ "$EWW" close-all && killall eww
+ rm "$FILE"
+fi