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/scripts/open_links | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 X11/eww/scripts/open_links (limited to 'X11/eww/scripts/open_links') diff --git a/X11/eww/scripts/open_links b/X11/eww/scripts/open_links new file mode 100755 index 0000000..a338847 --- /dev/null +++ b/X11/eww/scripts/open_links @@ -0,0 +1,31 @@ +#!/bin/bash + +## Open links in firefox +FILE="$HOME/.cache/eww_launch.dashboard" +CFG="$HOME/.config/eww/dashboard" +EWW=`which eww` +cmd="firefox --new-tab" + +close_dash() { + ${EWW} --config "$CFG" close \ + background profile system clock uptime music github \ + reddit twitter 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" == "--gh" ]]; then + close_dash && ${cmd} "https://github.com" + +elif [[ "$1" == "--rd" ]]; then + close_dash && ${cmd} "https://reddit.com" + +elif [[ "$1" == "--tw" ]]; then + close_dash && ${cmd} "https://twitter.com" + +elif [[ "$1" == "--yt" ]]; then + close_dash && ${cmd} "https://youtube.com" + +fi -- cgit v1.2.3-70-g09d2