From bf7d6a618ea84f57425e333b62aaa203cb2ee303 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Wed, 4 Mar 2020 23:25:52 -0500 Subject: [PATCH] X11: update for OpenBSD In particular, I needed to tweak the xinput for middle-click-scroll support. Also use a more general background name for better portability. --- X11/xinitrc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/X11/xinitrc b/X11/xinitrc index 18a5bec..7ac3b77 100644 --- a/X11/xinitrc +++ b/X11/xinitrc @@ -1,10 +1,23 @@ # This is the config I use for dwm + startx -# (which is in the xorg-xinit package I believe) setxkbmap -option caps:ctrl_modifier slstatus & -if [ -e ~/Pictures/BondCliffJennex.jpg ]; then - feh --bg-fill ~/Pictures/BondCliffJennex.jpg +[ -e ~/background.png ] && feh --bg-center ~/background.png + +if [ $(uname) = "OpenBSD" ]; then + # On my thinkpad, I seem to need these xinput calls to get + # middle click scroll to work on OpenBSD. Linux is fine + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1 + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2 + xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5 + + # since xenodm is run as root, we need to export ENV + # ~/.shrc otherwise the interactive shells spawned in st + # won't have the right profile + export ENV=~/.shrc + + # Prefer UTF-8 in X for unicode character support + export LC_CTYPE="en_US.UTF-8" fi exec dwm -- libgit2 0.28.4