aboutsummaryrefslogtreecommitdiffhomepage
path: root/X11/eww/scripts/open_links
diff options
context:
space:
mode:
Diffstat (limited to 'X11/eww/scripts/open_links')
-rwxr-xr-xX11/eww/scripts/open_links31
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
4FILE="$HOME/.cache/eww_launch.dashboard"
5CFG="$HOME/.config/eww/dashboard"
6EWW=`which eww`
7cmd="firefox --new-tab"
8
9close_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
16if [[ "$1" == "--mail" ]]; then
17 close_dash && ${cmd} "https://mail.google.com"
18
19elif [[ "$1" == "--gh" ]]; then
20 close_dash && ${cmd} "https://github.com"
21
22elif [[ "$1" == "--rd" ]]; then
23 close_dash && ${cmd} "https://reddit.com"
24
25elif [[ "$1" == "--tw" ]]; then
26 close_dash && ${cmd} "https://twitter.com"
27
28elif [[ "$1" == "--yt" ]]; then
29 close_dash && ${cmd} "https://youtube.com"
30
31fi