rice/eww/scripts/open_links

24 lines
629 B
Plaintext
Raw Normal View History

2021-11-03 01:14:21 -07:00
#!/bin/bash
## Open links in firefox
FILE="$HOME/.cache/eww_launch.xyz"
EWW="$HOME/.bin/eww"
cmd="firefox --new-tab"
if [[ "$1" == "--mail" ]]; then
${EWW} close-all && rm -rf "$FILE" && ${cmd} "https://mail.google.com"
elif [[ "$1" == "--gh" ]]; then
${EWW} close-all && rm -rf "$FILE" && ${cmd} "https://github.com"
elif [[ "$1" == "--rd" ]]; then
${EWW} close-all && rm -rf "$FILE" && ${cmd} "https://reddit.com"
elif [[ "$1" == "--tw" ]]; then
${EWW} close-all && rm -rf "$FILE" && ${cmd} "https://twitter.com"
elif [[ "$1" == "--yt" ]]; then
${EWW} close-all && rm -rf "$FILE" && ${cmd} "https://youtube.com"
fi