aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/eww/launch_dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'X11/eww/launch_dashboard')
-rwxr-xr-xX11/eww/launch_dashboard33
1 files changed, 33 insertions, 0 deletions
diff --git a/X11/eww/launch_dashboard b/X11/eww/launch_dashboard
new file mode 100755
index 0000000..91e6441
--- /dev/null
+++ b/X11/eww/launch_dashboard
@@ -0,0 +1,33 @@
1#!/bin/bash
2
3## Files and cmd
4FILE="$HOME/.cache/eww_launch.dashboard"
5CFG="$HOME/.config/eww/dashboard"
6EWW=`which eww`
7
8## Run eww daemon if not running already
9if [[ ! `pidof eww` ]]; then
10 ${EWW} daemon
11 sleep 1
12fi
13
14## Open widgets
15run_eww() {
16 ${EWW} --config "$CFG" open-many \
17 background \
18 system \
19 clock \
20 uptime \
21 sleep
22}
23
24## Launch or close widgets accordingly
25if [[ ! -f "$FILE" ]]; then
26 touch "$FILE"
27 run_eww
28else
29 ${EWW} --config "$CFG" close \
30 background profile system clock uptime music github \
31 reddit twitter youtube weather apps mail logout sleep reboot poweroff folders
32 rm "$FILE"
33fi