From fe56d59df24f6bbdccbefe55754e3521a0364fe4 Mon Sep 17 00:00:00 2001 From: Jeremiah Dodds Date: Sat, 31 Mar 2012 10:20:10 -0400 Subject: [PATCH] xdg-open calls $BROWSER if set and it's not in a "known" DE, use xdg-settings to set the default browser instead. --- environment.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/environment.zsh b/environment.zsh index 38bd54d4..ed543d41 100644 --- a/environment.zsh +++ b/environment.zsh @@ -85,8 +85,8 @@ fi if [[ "$OSTYPE" == darwin* ]]; then export BROWSER='open' else - if (( $+commands[xdg-open] )); then - export BROWSER='xdg-open' + if (( $+commands[xdg-settings] )); then + export BROWSER=$(xdg-settings get default-web-browser 2>/dev/null) fi fi @@ -113,4 +113,3 @@ if zstyle -t ':omz:environment:termcap' color; then export LESS_TERMCAP_ue=$'\E[0m' # end underline export LESS_TERMCAP_us=$'\E[01;32m' # begin underline fi -