Newer
Older
dotfiles / .config / eww / dashboard / launch_dashboard
@Edoko Edoko on 27 May 988 bytes initial commit
#!/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 \
           profile \
           system \
           clock \
           uptime \
           music \
           lapce \
           duckduckgo \
           steam \
           youtube \
           weather \
           apps \
           mail \
           logout \
           sleep \
           reboot \
           poweroff \
           folders
}

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