added xloadresources

This commit is contained in:
Daniel Flanagan 2016-01-06 12:46:55 -06:00
parent 7ed193d7d7
commit 4aeef2d74d
5 changed files with 55 additions and 38 deletions

View file

@ -3,7 +3,7 @@
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd) DIR=$(cd "$(dirname "${BASH_SOURCE[0]}" )/.." && pwd)
source "$DIR/variables.bash" source "$DIR/variables.bash"
sudo pacman -S xcb-util xcb-util-keysyms xcb-util-wm --noconfirm sudo pacman -S xcb-util xcb-util-keysyms xcb-util-wm feh --noconfirm
mkdir -p "$REPOSITORY_PATH" mkdir -p "$REPOSITORY_PATH"

View file

@ -4,6 +4,6 @@ source "$DOTFILES_PATH/variables.bash"
source "$DOTFILES_PATH/wm/bspwm_config" source "$DOTFILES_PATH/wm/bspwm_config"
sxhkd &
urxvtd & urxvtd &
sxhkd &

View file

@ -8,13 +8,13 @@ rm "$HOME/.Xresources"
ln -s "$HOME/.dotfiles/x/xinitrc" "$HOME/.xinitrc" ln -s "$HOME/.dotfiles/x/xinitrc" "$HOME/.xinitrc"
ln -s "$HOME/.dotfiles/x/xresources" "$HOME/.Xresources" ln -s "$HOME/.dotfiles/x/xresources" "$HOME/.Xresources"
xrdb "$HOME/.Xresources" xrdb "$HOME/.Xresources" >/dev/null 2>&1
if [ -f "$HOME/.Xresources.colors" ]; then if [ -f "$HOME/.Xresources.colors" ]; then
xrdb -merge "$HOME/.Xresources.colors" xrdb -merge "$HOME/.Xresources.colors" >/dev/null 2>&1
fi fi
if [ -f "$HOME/.Xresources.env" ]; then if [ -f "$HOME/.Xresources.env" ]; then
xrdb -merge "$HOME/.Xresources.env" xrdb -merge "$HOME/.Xresources.env" >/dev/null 2>&1
fi fi

View file

@ -1,42 +1,19 @@
#!/bin/sh #!/bin/sh
userresources=$HOME/.Xresources if [ -f ~/.fehbg ]; then
usercolors=$HOME/.Xresources.colors ~/.fehbg &
userenv=$HOME/.Xresources.env
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi fi
if [ -f $sysmodmap ]; then source "$DOTFILES_PATH/x/xloadresources"
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then # keyrepeat settings
xrdb -merge "$userresources" xset r rate 300 80 &
fi
if [ -f "$usercolors" ]; then # no screen blanking
xrdb -merge "$usercolors" xset -dpms &
fi xset s noblank &
xset s off &
if [ -f "$userenv" ]; then
xrdb -merge "$userenv"
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
[ -x "$f" ] && . "$f"
done
unset f
fi
# fire up wm
exec bspwm exec bspwm

40
x/xloadresources Normal file
View file

@ -0,0 +1,40 @@
#!/usr/bin/env bash
userresources=$HOME/.Xresources
usercolors=$HOME/.Xresources.colors
userenv=$HOME/.Xresources.env
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 "$usercolors" ]; then
xrdb -merge "$usercolors"
fi
if [ -f "$userenv" ]; then
xrdb -merge "$userenv"
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
[ -x "$f" ] && . "$f"
done
unset f
fi