aboutsummaryrefslogtreecommitdiff
path: root/.config/eww/launch.sh
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-11-16 17:53:46 +0200
committersrdusr <trevorgray@srdusr.com>2023-11-16 17:53:46 +0200
commit50d8d0db6cf029a988d72f264ea7bcc9b991dfd5 (patch)
tree5798a618854722c869a5f86c67f33fac120b6952 /.config/eww/launch.sh
parenta912e80a522361e377010fa9e3c16202ba94a12e (diff)
downloaddotfiles-50d8d0db6cf029a988d72f264ea7bcc9b991dfd5.tar.gz
dotfiles-50d8d0db6cf029a988d72f264ea7bcc9b991dfd5.zip
Add launch.sh
Diffstat (limited to '.config/eww/launch.sh')
-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