Use defined webbrowser command

This commit is contained in:
Wryn Wagner 2021-03-01 14:48:57 -07:00
parent a130cdd7a0
commit 03903d3e75
3 changed files with 10 additions and 5 deletions

5
env/env vendored
View File

@ -10,4 +10,7 @@ WALLPAPER_PATH="$HOME/Pictures/bg"
PREFERRED_EDITOR=(vi vim)
# plays audio files located throughout the system
MEDIA_ENGINE="canberra-gtk-play -f"
MEDIA_ENGINE='canberra-gtk-play -f'
# default applications
WEBBROWSER='google-chrome-stable'

View File

@ -53,13 +53,12 @@ function rnt() {
*)
deactivate >/dev/null 2>/dev/null || deactivate_node >/dev/null 2>/dev/null;
cd "$RD_PATH"
source "$RD_PATH/ENV.sh"
[ -d "$1" ] && {
cd "$1" >/dev/null 2>/dev/null;
[ -f "./env/bin/activate" ] \
&& source "./env/bin/activate" \
|| echo 'No environment here, boss!';
|| echo 'No virtual environment here, boss!';
[ -f "./myenv" ] \
&& source "./myenv" \
&& echo 'Loaded custom environment settings!';
@ -121,7 +120,7 @@ function RENT_DYNAMICS_GIT_PROJECT_CLEAN_UP() {
}
function RENT_DYNAMICS_CONNECT_TO_EMAIL() {
xdg-open https://mail.google.com/mail/u/1;
$WEBBROWSER https://mail.google.com/mail/u/1;
}
function RENT_DYNAMICS_UPDATE_SLACK_STATUS() {

View File

@ -34,7 +34,10 @@ OPEN_CURRENT_GIT_REPOSITORY_IN_WEB_BROWSER() {
return 1;
}
local URL="$(git remote get-url $REMOTE | sed 's/git@\([^:]*\):/http:\/\/\1\//')"
xdg-open $URL;
[ "$WEBBROWSER" ]\
&& "$WEBBROWSER $URL" >/dev/null 2>&1 \
|| dg-open $URL >/dev/null 2>&1 \
|| echo $URL;
}