~kris/dots

srice

ref: c776188f504eb2e42ec1d359bdfd97e513b02add srice/.local/bin/statusbar/sb-dashboard -rwxr-xr-x 647 bytes
c776188f — Kris Yotam add bm bookmark manager and dsnip launcher 5 months ago
                                                                                
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
#!/bin/sh

# Ensure eww daemon is running
pgrep -x eww >/dev/null 2>&1 || eww daemon &

WINDOW="performance_monitor"

# Display distro-specific icon in status bar
# Arch: 󰣇 (f08c7), Gentoo:  (e7e6), Other:  (eb51)
if [ -f /etc/arch-release ]; then
    printf '󰣇\n'
elif [ -f /etc/gentoo-release ]; then
    printf '\n'
else
    printf '\n'
fi

case $BLOCK_BUTTON in
	1)
		if eww active-windows 2>/dev/null | grep -q "$WINDOW"; then
			eww update performance_monitor_visible=false
			eww close "$WINDOW"
		else
			eww update performance_monitor_visible=true
			eww open "$WINDOW"
		fi
		;;
	3) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac