~kris/dots

srice

0e7f2c2785a36c2c4d5f7214411d3746a1667303 — Kris Yotam 2 months ago 2582f0c
xprofile: bump laptop HiDPI to 180 and scale cursor for M1 Pro retina
1 files changed, 7 insertions(+), 1 deletions(-)

M .config/x11/xprofile
M .config/x11/xprofile => .config/x11/xprofile +7 -1
@@ 9,13 9,19 @@ export PATH="$HOME/.local/bin:$HOME/.local/bin/statusbar:$PATH"
# Auto-detect device type and set DPI accordingly
DEVICE_TYPE_FILE="${XDG_CONFIG_HOME:-$HOME/.config}/srice/device-type"
if [ -f "$DEVICE_TYPE_FILE" ] && [ "$(cat "$DEVICE_TYPE_FILE")" = "laptop" ]; then
	xrandr --dpi 150	# Laptop HiDPI
	xrandr --dpi 180	# Laptop HiDPI (M1 Pro 14" ~254ppi retina panel; raise/lower for taste)
	export XCURSOR_SIZE=32
else
	xrandr --dpi 128	# Desktop 1440p scaled
fi
~/.screenlayout/main.sh	# Set up monitor layout
setxkbmap -option caps:none	# Completely disable Caps Lock
xrdb -merge ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources	# Load base Xresources
# HiDPI: on laptops tell Xft apps (st, dmenu, dwm bar) the real DPI and scale
# the cursor. Merged after the base so it wins.
if [ -f "$DEVICE_TYPE_FILE" ] && [ "$(cat "$DEVICE_TYPE_FILE")" = "laptop" ]; then
	printf 'Xft.dpi: 180\nXcursor.size: 32\n' | xrdb -merge
fi
xset s off -dpms s noblank	# Disable DPMS/screensaver (freezes with dual-GPU + 4 monitors)
setbg -s -c "$HOME/.local/share/wallpapers/plan9theme.png" "$HOME/.local/share/wallpapers/plan9.png"	# plan9 solid bg + plan9 winter colorscheme
setfan &	# Set case fan RGB (ice blue)