29 lines
609 B
Plaintext
29 lines
609 B
Plaintext
# Load .profile
|
|
if [ -f ~/.profile ]; then
|
|
. ~/.profile
|
|
fi
|
|
|
|
xrdb -merge ~/.Xresources
|
|
|
|
# Load settings for HiDPI only when HiRes display is connected
|
|
#
|
|
SR=$(xrandr --query | grep ' connected' | egrep -o '[0-9]+x[0-9]+\+[0-9]+\+[0-9]+')
|
|
MAX_RES=0
|
|
for RES in $SR
|
|
do
|
|
SRX=$(echo $RES | cut -d'x' -f 1)
|
|
if [ $MAX_RES -lt $SRX ]; then
|
|
MAX_RES=$SRX
|
|
fi
|
|
done
|
|
|
|
# FullHD
|
|
if [ $MAX_RES -le 1920 ]; then
|
|
xrdb -merge ~/.Xresources.d/lowdpi
|
|
# 2k
|
|
elif [ $MAX_RES -gt 1920 || $MAX_RES -lt 2500 ]; then
|
|
xrdb -merge ~/.Xresources.d/middpi
|
|
elif [ $MAX_RES -gt 2500 ]; then
|
|
xrdb -merge ~/.Xresources.d/hidpi
|
|
fi
|