diff options
Diffstat (limited to 'X11/eww/scripts/open_links')
| -rwxr-xr-x | X11/eww/scripts/open_links | 31 |
1 files changed, 31 insertions, 0 deletions
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 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | ## Open links in firefox | ||
| 4 | FILE="$HOME/.cache/eww_launch.dashboard" | ||
| 5 | CFG="$HOME/.config/eww/dashboard" | ||
| 6 | EWW=`which eww` | ||
| 7 | cmd="firefox --new-tab" | ||
| 8 | |||
| 9 | close_dash() { | ||
| 10 | ${EWW} --config "$CFG" close \ | ||
| 11 | background profile system clock uptime music github \ | ||
| 12 | reddit twitter youtube weather apps mail logout sleep reboot poweroff folders | ||
| 13 | rm -rf "$FILE" | ||
| 14 | } | ||
| 15 | |||
| 16 | if [[ "$1" == "--mail" ]]; then | ||
| 17 | close_dash && ${cmd} "https://mail.google.com" | ||
| 18 | |||
| 19 | elif [[ "$1" == "--gh" ]]; then | ||
| 20 | close_dash && ${cmd} "https://github.com" | ||
| 21 | |||
| 22 | elif [[ "$1" == "--rd" ]]; then | ||
| 23 | close_dash && ${cmd} "https://reddit.com" | ||
| 24 | |||
| 25 | elif [[ "$1" == "--tw" ]]; then | ||
| 26 | close_dash && ${cmd} "https://twitter.com" | ||
| 27 | |||
| 28 | elif [[ "$1" == "--yt" ]]; then | ||
| 29 | close_dash && ${cmd} "https://youtube.com" | ||
| 30 | |||
| 31 | fi | ||