From 825c29b5e0740b27439003f21e1a1a74e563cfd5 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sat, 4 Feb 2023 08:33:47 +0800 Subject: Add eww config from aditaya --- X11/eww/launch_dashboard | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 X11/eww/launch_dashboard (limited to 'X11/eww/launch_dashboard') 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 @@ +#!/bin/bash + +## Files and cmd +FILE="$HOME/.cache/eww_launch.dashboard" +CFG="$HOME/.config/eww/dashboard" +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 -- cgit v1.2.3-70-g09d2