From ce188e2f267fa61fb730d4442c41c30dbc80fd15 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Fri, 6 Nov 2020 22:35:27 +0100 Subject: [PATCH] Use $SHELL, fix after patch: Start terminal with a login shell if run from dmenu Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_appmenu.sh | 6 +++--- scripts/core/sxmo_xinit.sh | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_appmenu.sh b/scripts/core/sxmo_appmenu.sh index ade72ea..c113b83 100755 --- a/scripts/core/sxmo_appmenu.sh +++ b/scripts/core/sxmo_appmenu.sh @@ -70,7 +70,7 @@ programchoicesinit() { $(command -v ranger >/dev/null && echo 'Ranger ^ 0 ^ st -e ranger') $(command -v sacc >/dev/null && echo 'Sacc ^ 0 ^ st -e sacc i-logout.cz/1/bongusta') $(command -v sic >/dev/null && echo 'Sic ^ 0 ^ st -e sic') - $(command -v st >/dev/null && echo 'St ^ 0 ^ st -e /bin/sh -l') + $(command -v st >/dev/null && echo 'St ^ 0 ^ st -e $SHELL -l') $(command -v surf >/dev/null && echo 'Surf ^ 0 ^ surf') $(command -v syncthing >/dev/null && echo 'Syncthing ^ 0 ^ syncthing') $(command -v telegram-desktop >/dev/null && echo 'Telegram ^ 0 ^ telegram-desktop') @@ -96,7 +96,7 @@ programchoicesinit() { Modem Info ^ 0 ^ sxmo_modeminfo.sh Modem Log ^ 0 ^ sxmo_modemlog.sh Flash $( - grep -qE '^0$' /sys/class/leds/white:flash/brightness && + grep -qE '^0$' /sys/class/leds/white:flash/brightness && printf %b "Off → On" || printf %b "On → Off"; printf %b "^ 1 ^ sxmo_flashtoggle.sh" ) @@ -420,7 +420,7 @@ quit() { mainloop() { getprogchoices "$ARGS" echo "$PROGCHOICES" | - cut -d'^' -f1 | + cut -d'^' -f1 | dmenu -idx "$DMENUIDX" -l 16 -c -fn "Terminus-30" -p "$WINNAME" | ( PICKED="$(cat)" echo "$PICKED" | grep . || quit diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index b1c5905..845ee87 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -8,6 +8,7 @@ envvars() { command -v "$TERMCMD" || export TERMCMD=st command -v "$BROWSER" || export BROWSER=surf command -v "$EDITOR" || export EDITOR=vis + command -v "$SHELL" || export SHELL=/bin/sh command -v "$KEYBOARD" || defaultkeyboard [ -z "$MPV_HOME" ] && export MPV_HOME=/usr/share/sxmo/mpv [ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1