dotfiles

$HOME is where the <3 is
git clone git://git.alexkarle.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

.xsession (1457B) [raw]


      1 #!/bin/sh
      2 # .xsession - xenodm(8) user session script
      3 
      4 # Old Xorg default DPI, looks good on my laptop
      5 # https://marc.info/?l=openbsd-tech&m=163674121630769&w=2
      6 xrandr --dpi 96
      7 
      8 # Most importantly -- make caps a ctrl!
      9 # see xkeyboard-config(7) for other options!
     10 setxkbmap -option ctrl:nocaps
     11 
     12 # Set the background to something that isn't the default
     13 # (this color is from plan9's rio(1) default background )
     14 xsetroot -solid "#777777"
     15 
     16 # Source ~/.profile to set up the PATH so terminals like st(1)
     17 # that don't spawn login shells get the env vars they expect
     18 # (also for cwm's program launcher to find things)
     19 . "$HOME/.profile"
     20 
     21 if [ "$(uname)" = "OpenBSD" ]; then
     22 	# Enable middle click + trackpoint scrolling. Doc in ws(4) and xinput(1)
     23 	#
     24 	#   `xinput --list` shows /dev/wsmouse to be our mouse device
     25 	#
     26 	# ws(4) shows the accepted values/desc for the device!
     27 	#  * Wheel Emulation -- mouse acts like a scroll wheel when Button pressed (1 for true)
     28 	#  * Wheel Em Button -- button that enables the Wheel Emulation (2 for middle)
     29 	#  * Wheel Em Axes   -- buttons that represent Xup/down Yup/down. 4/5 is scroll
     30 	#                       up/down 6/7 is "thumb" (side) up/down.
     31 	xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation" 1
     32 	xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Button" 2
     33 	xinput set-prop "/dev/wsmouse" "WS Pointer Wheel Emulation Axes" 6 7 4 5
     34 fi
     35 
     36 # Finally, launch my preferred desktop--currently cwm(1)
     37 exec cwm