Allow TERMCMD arguments

This also simplify sxmo_open.sh
This commit is contained in:
Stacy Harper
2022-01-12 14:47:45 +01:00
parent c02dd2797f
commit 8a3b1b54ee
2 changed files with 3 additions and 8 deletions

View File

@@ -9,12 +9,7 @@ DESKTOPS_CACHED_MIMEAPPS="${XDG_CONFIG_HOME:-$HOME/.config}/desktops.mimeapps.li
DESKTOP_DIRS="/usr/share/sxmo/applications/|/usr/share/applications/|/usr/local/share/applications/|${XDG_DATA_HOME:-$HOME/.local/share}/applications/" DESKTOP_DIRS="/usr/share/sxmo/applications/|/usr/share/applications/|/usr/local/share/applications/|${XDG_DATA_HOME:-$HOME/.local/share}/applications/"
attached= attached=
debug= debug=
TERMCMD="${TERMCMD:-st}" TERMCMD="${TERMCMD:-st -e}"
case "$TERMCMD" in
"st"*)
TERMCMD="$TERMCMD -e"
;;
esac
# This will convert a mimeapps.list to a parsable mapping # This will convert a mimeapps.list to a parsable mapping
# Lines with multiple mimetype will be splitted # Lines with multiple mimetype will be splitted

View File

@@ -11,10 +11,10 @@ fi
case "$TERMCMD" in case "$TERMCMD" in
"st"*) "st"*)
set -- "$TERMCMD" -T "$TERMNAME" -e "$@" set -- $TERMCMD -T "$TERMNAME" -e "$@"
;; ;;
"foot"*) "foot"*)
set -- "$TERMCMD" -T "$TERMNAME" "$@" set -- $TERMCMD -T "$TERMNAME" "$@"
;; ;;
"vte-2.91"*) "vte-2.91"*)
set -- ${TERMCMD% --} --title "$TERMNAME" -- "$@" set -- ${TERMCMD% --} --title "$TERMNAME" -- "$@"