From bc43da62647f11f5d4522e9ef69b1cdc751a45bf Mon Sep 17 00:00:00 2001 From: DustVoice Date: Sun, 2 Aug 2020 19:04:01 +0200 Subject: [PATCH] Generalize X startup stuff --- .Xresources | 2 ++ .xinitrc | 23 +++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.Xresources b/.Xresources index 524645e..c4d96bf 100644 --- a/.Xresources +++ b/.Xresources @@ -17,3 +17,5 @@ *.color14: #9AEDFE *.color7: #BFBFBF *.color15: #E6E6E6 + +!Xft.dpi: 192 diff --git a/.xinitrc b/.xinitrc index 3bb86e5..8303c9b 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,4 +1,25 @@ #!/bin/sh +userresources=$HOME/.Xresources +usermodmap=$HOME/.Xmodmap +sysresources=/etc/X11/xinit/.Xresources +sysmodmap=/etc/X11/xinit/.Xmodmap + +if [ -f $sysresources ]; then + xrdb -merge $sysresources +fi + +if [ -f $sysmodmap ]; then + xmodmap $sysmodmap +fi + +if [ -f $userresources ]; then + xrdb -merge $userresources +fi + +if [ -f $usermodmap ]; then + xmodmap $usermodmap +fi + if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do @@ -10,7 +31,5 @@ fi setxkbmap "us,us" ",intl" "grp:shifts_toggle" xset m 0 0 -[ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap - mkdir -p $HOME/.local/share/bspwm exec bspwm >$HOME/.local/share/bspwm/output.log 2>$HOME/.local/share/bspwm/error.log