Skip to content

Instantly share code, notes, and snippets.

Working from home

Davide Iafrate Tuxliri

Working from home
View GitHub Profile
Tuxliri / choosy
Last active January 6, 2023 17:12 — forked from cesarolea/choosy
Open browser based off of certain rules (like choosy for macOS)
View choosy
DOMAIN=$(echo "$URL" | awk -F[/:] '{print $4}')
## Domain starts with
if [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-start.txt)\)$) ]]; then
microsoft-edge "$URL" & disown
elif [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-is.txt)\)$) ]]; then
microsoft-edge "$URL" & disown