diff options
author | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 08:33:47 +0800 |
---|---|---|
committer | Hsieh Chin Fan <typebrook@topo.tw> | 2023-02-04 08:33:47 +0800 |
commit | 825c29b5e0740b27439003f21e1a1a74e563cfd5 (patch) | |
tree | 97e398b856abe9571efeedbf17e81ccc80118952 /X11/eww/scripts/open_links | |
parent | 4496db3c021d735a324a28c46ce4a18f090270f5 (diff) |
Add eww config from aditaya
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 | ||