Newer
Older
dotfiles / .config / eww / dashboard / scripts / open_links
@Edoko Edoko on 27 May 673 bytes initial commit
#!/bin/bash

## Open links in firefox
FILE="$HOME/.cache/eww_launch.dashboard"
CFG="$HOME/.config/eww/dashboard"
EWW=`which eww`
cmd="sudo -u sandbu1 -i PULSE_SERVER=tcp:127.0.0.1:4713 dbus-launch zen-browser --new-tab"

close_dash() {
	${EWW} --config "$CFG" close \
					background profile system clock uptime music lapce \
					duckduckgo steam youtube weather apps mail logout sleep reboot poweroff folders
	rm -rf "$FILE"
}

if [[ "$1" == "--mail" ]]; then
	close_dash && ${cmd} "https://mail.google.com"

elif [[ "$1" == "--duckai" ]]; then
	close_dash && ${cmd} "https://duck.ai"

elif [[ "$1" == "--youtube" ]]; then
	close_dash && ${cmd} "https://youtube.com"

fi