mirror of
https://github.com/gburd/nix-config.git
synced 2024-11-14 16:36:24 +00:00
f3fd89af54
Many thangs to the hard work and generous availability of: git@github.com:Misterio77/nix-config.git
20 lines
674 B
Diff
20 lines
674 B
Diff
diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in
|
|
index 50e31e6..6f698dc 100644
|
|
--- a/scripts/xdg-open.in
|
|
+++ b/scripts/xdg-open.in
|
|
@@ -320,7 +320,14 @@ search_desktop_file()
|
|
args=$(( $args - 1 ))
|
|
done
|
|
[ $replaced -eq 1 ] || set -- "$@" "$target"
|
|
- env "$command" "$@"
|
|
+ if [ x"$(get_key "${file}" "Terminal")" = x"true" ] && ( [ ! -t 0 ] || [ ! -t 1 ] ); then
|
|
+ if [ -z "$TERMINAL" ]; then
|
|
+ TERMINAL="xterm -e"
|
|
+ fi
|
|
+ $TERMINAL env "$command" "$@" &
|
|
+ else
|
|
+ env "$command" "$@"
|
|
+ fi
|
|
|
|
if [ $? -eq 0 ]; then
|
|
exit_success
|