diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-26 15:48:55 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2022-05-27 16:02:54 +1200 |
commit | 94f25b77eb119f1638b25e05cf5593c069fc2c4a (patch) | |
tree | 454fcaeab941d229a63b3176e3fc5140666dcae7 | |
parent | Add configuration for Parcellite (diff) | |
download | dotfiles-94f25b77eb119f1638b25e05cf5593c069fc2c4a.tar.gz dotfiles-94f25b77eb119f1638b25e05cf5593c069fc2c4a.zip |
Simplify xrandr/xwallpaper setup
If it's not going to work, just let it fail; errors will go into
.xsession-errors, where they might be useful to read, and shouldn't be
too spammy.
-rw-r--r-- | x/xsession.sh | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/x/xsession.sh b/x/xsession.sh index 46cb0aa5..3475c0bd 100644 --- a/x/xsession.sh +++ b/x/xsession.sh @@ -8,16 +8,13 @@ # - ~/.config/xrandr/config # - ~/.config/xwallpaper/config # -# We figure each one out in a subshell, so that we can use a temporary variable -# for the configuration path without polluting the namespace of the rest of -# this script. +# We wait for the monitor setup to finish before proceeding, but we can do +# other things while we wait for the wallpaper to be drawn thereon. # -for program in xrandr xwallpaper ; do ( - command -v -- "$program" >/dev/null 2>&1 || exit - config=${XDG_CONFIG_HOME:-"$HOME"/.config}/"$program"/config - [ -e "$config" ] || exit - xargs -- "$program" < "$config" -) ; done +xargs xrandr \ + < "${XDG_CONFIG_HOME:-"$HOME"/.config}"/xrandr/config +xargs xwallpaper \ + < "${XDG_CONFIG_HOME:-"$HOME"/.config}"/xwallpaper/config & # Set a few keyboard map options: # |