From c014c6bb92599ab6c06f25ab56b47ef47ab6943b Mon Sep 17 00:00:00 2001 From: Stacy Harper Date: Thu, 26 Aug 2021 12:10:53 +0200 Subject: [PATCH] Load user .profile after setting up default values This allow the user .profile to switch case depending on the default values. It is mandatory by example to setup custom wvkbd or svkbd, depending on the wm we use. Signed-off-by: Stacy Harper Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_winit.sh | 10 +++------- scripts/core/sxmo_xinit.sh | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/scripts/core/sxmo_winit.sh b/scripts/core/sxmo_winit.sh index 71443ba..8ef75f9 100644 --- a/scripts/core/sxmo_winit.sh +++ b/scripts/core/sxmo_winit.sh @@ -5,14 +5,14 @@ envvars() { # shellcheck disable=SC1091 [ -f /etc/profile ] && . /etc/profile export BEMENU_OPTS='--fn "Monospace 11"' - # shellcheck source=/dev/null - [ -f "$HOME"/.profile ] && . "$HOME"/.profile export MOZ_ENABLE_WAYLAND=1 command -v "$TERMCMD" || export TERMCMD="foot" command -v "$BROWSER" || export BROWSER=firefox command -v "$EDITOR" || export EDITOR=vis command -v "$SHELL" || export SHELL=/bin/sh - command -v "$KEYBOARD" || defaultkeyboard + command -v "$KEYBOARD" || export KEYBOARD=wvkbd-mobintl + # shellcheck source=/dev/null + [ -f "$HOME"/.profile ] && . "$HOME"/.profile [ -z "$MPV_HOME" ] && export MPV_HOME=/usr/share/sxmo/mpv [ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 [ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config @@ -44,10 +44,6 @@ defaults() { [ -e "$HOME"/.Xresources ] && xrdb -merge "$HOME"/.Xresources } -defaultkeyboard() { - export KEYBOARD=wvkbd -} - defaultconfig() { if [ ! -r "$2" ]; then mkdir -p "$(dirname "$2")" diff --git a/scripts/core/sxmo_xinit.sh b/scripts/core/sxmo_xinit.sh index 2a3490e..b1569fe 100755 --- a/scripts/core/sxmo_xinit.sh +++ b/scripts/core/sxmo_xinit.sh @@ -4,13 +4,13 @@ envvars() { # shellcheck disable=SC1091 [ -f /etc/profile ] && . /etc/profile - # shellcheck source=/dev/null - [ -f "$HOME"/.profile ] && . "$HOME"/.profile command -v "$TERMCMD" || export TERMCMD="st -e" command -v "$BROWSER" || export BROWSER=surf command -v "$EDITOR" || export EDITOR=vis command -v "$SHELL" || export SHELL=/bin/sh command -v "$KEYBOARD" || defaultkeyboard + # shellcheck source=/dev/null + [ -f "$HOME"/.profile ] && . "$HOME"/.profile [ -z "$MPV_HOME" ] && export MPV_HOME=/usr/share/sxmo/mpv [ -z "$MOZ_USE_XINPUT2" ] && export MOZ_USE_XINPUT2=1 [ -z "$XDG_CONFIG_HOME" ] && export XDG_CONFIG_HOME=~/.config