From 73eb94d18ae9e59accdca7920091391f5833ab14 Mon Sep 17 00:00:00 2001 From: Keith Bowes Date: Fri, 23 Aug 2024 15:32:59 -0400 Subject: [PATCH] Update for better external tools --- data/environment | 18 +++++++++++++----- data/waybox.sh | 7 ++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/data/environment b/data/environment index a9953b8..9973533 100644 --- a/data/environment +++ b/data/environment @@ -30,17 +30,25 @@ if test -n "$DISPLAY" && test -d /etc/X11/xinit/xinitrc.d; then for f in /etc/X11/xinit/xinitrc.d/*.sh; do - test -f "$f" && . "$f" + test -r "$f" && . "$f" done fi -# Get the preferred terminal from GNOME (if you use mostly GTK apps) -TERMINAL=$(gsettings get org.gnome.desktop.default-applications.terminal exec | tr -d \') +# Emerging standard, used by i.a. modern GTK versions instead of the obsolete +# org.gnome.default-applications.terminal.exec gsetting (which is now ignored) +# https://github.com/Vladimir-csp/xdg-terminal-exec (or create a symlink to +# your preferred terminal emulator) +TERMINAL=xdg-terminal-exec # Get the preferred terminal from KDE (if you use mostly Qt apps) #TERMINAL=$(kreadconfig5 --file kdeglobals --group General --key TerminalApplication --default "konsole") # Or just set it hard: #TERMINAL=kitty export TERMINAL -# Use autostart scripts for these environments -export WB_AUTOSTART_ENVIRONMENT=GNOME:KDE +if command -v xdg-autostart >/dev/null 2>&1; +then + export XDG_CURRENT_DESTKOP=OPENBOX +else + # Use autostart scripts for these environments + export WB_AUTOSTART_ENVIRONMENT=GNOME:KDE:OPENBOX +fi diff --git a/data/waybox.sh b/data/waybox.sh index 1c32191..98865e8 100644 --- a/data/waybox.sh +++ b/data/waybox.sh @@ -60,7 +60,12 @@ then fi # And the XDG autostart script -if test -x $WB_USER_CONF_DIR/xdg-autostart; +if command -v xdg-autostart >/dev/null 2>&1; +then + # Probably what you want instead of my simple shell script. + # https://gitlab.com/somini/xdg-autostart/ + WB_XDG_AUTOSTART="xdg-autostart" +elif test -x $WB_USER_CONF_DIR/xdg-autostart; then WB_XDG_AUTOSTART=$WB_USER_CONF_DIR/xdg-autostart; elif test -x $WB_SYS_CONF_DIR/xdg-autostart;