xinitrc: load Xdefaults into XRDB only when Xresources is present

This reallows for editing Xdefaults in runtime. This is not supported by
all programs, sadly. nsxiv is one of such programs.
This commit is contained in:
Lucas 2023-06-20 01:10:58 +00:00
parent ee215f8eac
commit 00112acf28
1 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh
# env
# Written in 2019-2022 by Lucas
# Written in 2019-2023 by Lucas
# CC0 1.0 Universal/Public domain - No rights reserved
#
# To the extent possible under law, the author(s) have dedicated all
@ -23,10 +23,11 @@ xset r rate 300 75
xset b off
xrdb -load ~/.Xdefaults
if [ -r ~/.Xresources ]; then
xrdb -load ~/.Xdefaults
xrdb -merge ~/.Xresources
fi
if [ -r ~/code/lucas/env/utils/scripts/x-dpi-facesizes.sh ]; then
sh ~/code/lucas/env/utils/scripts/x-dpi-facesizes.sh
fi