aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/eww/launch_dashboard
blob: 889d346c97087ed3ff2c3dbede927c4acac81037 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

## Files and cmd
FILE="$HOME/.cache/eww_launch.dashboard"
CFG="$HOME/helper/X11/eww"
EWW=`which eww`

## Run eww daemon if not running already
if [[ ! `pidof eww` ]]; then
	${EWW} daemon
	sleep 1
fi

## Open widgets 
run_eww() {
	${EWW} --config "$CFG" open-many \
		   background \
		   system \
		   clock \
		   uptime \
		   sleep
}

## Launch or close widgets accordingly
if [[ ! -f "$FILE" ]]; then
	touch "$FILE"
	run_eww
else
	${EWW} --config "$CFG" close \
					background profile system clock uptime music github \
					reddit twitter youtube weather apps mail logout sleep reboot poweroff folders
	rm "$FILE"
fi