Advertisement
Dobbie03

.xinitrc

Dec 26th, 2017
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # ~/.xinitrc
  4. # executed by startx
  5.  
  6. # To autologin with systemd & Arch:
  7. # 1. cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/autologin@.service
  8. # 2. ln -s /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service
  9. # 3. /etc/systemd/system/autologin@.service :Edit: ExecStart=-/sbin/agetty -a USERNAME %I $TERM
  10. # 4. Add the following if statment to .zprofile for zsh, or .bash_profile for bash
  11. #
  12. # if [ -z "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
  13. # exec startx
  14. # fi
  15.  
  16. # Session to run if none given
  17. session=${1:-openbox}
  18.  
  19. # source /etc/X11/xinit/xinitrc.d
  20. if [[ -d /etc/X11/xinit/xinitrc.d ]]; then
  21. for f in /etc/X11/xinit/xinitrc.d/*; do
  22. [[ -x $f ]] && . $f
  23. done
  24. unset f
  25. fi
  26.  
  27. # source .xprofile
  28. if [[ -f $HOME/.xprofile ]]; then
  29. source $HOME/.xprofile
  30. fi
  31.  
  32. # To run different WM, call this with:
  33. # startx ~/.xinitrc SESSION eg. startx ~/.xinitrc openbox
  34. case $session in
  35. i3|i3wm)
  36. exec i3
  37. ;;
  38. bsp|bspwm)
  39. exec bspwm
  40. ;;
  41. xfce|xfce4)
  42. exec startxfce4
  43. ;;
  44. openbox)
  45. exec openbox-session
  46. ;;
  47. *)
  48. exec $1 # Lastly, if unknown, try running $1
  49. esac
  50.  
  51. numlockx &
  52.  
  53.  
  54. exec openbox-session
  55. xrdb ~/.Xresources
  56. urxvtd -q -f -o &
  57. rxset s 60 60
  58. xset m 1/1
  59. xset r rate 200 30
  60. setxkbmap -option caps:escape
  61. xrander --dpi 192
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement