Advertisement
mrneilypops

ArchLabs-07-2018-xinitrc-config

Jul 28th, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # this file is executed when calling startx
  4.  
  5. # to start a different WM, set session="WM" below, or in console run:
  6. # startx ~/.xinitrc WM
  7.  
  8.  
  9. # session to run if none passed as first arg ($1)
  10. session="${1:-openbox}"
  11.  
  12. # set environment wm for use in scripts
  13. export WM="$session"
  14.  
  15. # default arch xinit scripts
  16. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  17. for f in /etc/X11/xinit/xinitrc.d/*.sh; do
  18. [ -x "$f" ] && . "$f"
  19. done
  20. fi
  21.  
  22. # user init scripts and settings
  23. [ -f /etc/X11/xinit/.Xmodmap ] && xmodmap /etc/X11/xinit/.Xmodmap
  24. [ -f ~/.Xmodmap ] && xmodmap ~/.Xmodmap
  25. [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
  26. [ -f ~/.xprofile ] && source ~/.xprofile
  27.  
  28. # some things to start for awesome
  29. # other wm already have these started elsewhere
  30. if [[ $session == "awesome" ]]; then
  31.  
  32. # keyring for storing passwords
  33. if hash gnome-keyring &>/dev/null; then
  34. gnome-keyring-daemon --start --components=pkcs11 &
  35. fi
  36.  
  37. # gnome polkit
  38. if [[ -x /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 ]]; then
  39. /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
  40. fi
  41.  
  42. # simulate Alt+F1 with just pressing Super
  43. if hash ksuperkey &>/dev/null; then
  44. ksuperkey -e 'Super_L=Alt_L|F1' &
  45. ksuperkey -e 'Super_R=Alt_L|F1' &
  46. fi
  47. fi
  48.  
  49. # display timeout and sleep
  50. # xset s 3600 3600
  51. # xset dpms 3600 3700 4000
  52.  
  53. # keyboard repeat rate
  54. # xset r rate 400 50
  55. # kbdrate -d 400 -r 50
  56.  
  57. # 1/1 mouse acceleration (no acceleration)
  58. # xset m 1/1
  59.  
  60. # do NOT put commands below the exec lines
  61. case $session in
  62. i3|i3wm) exec i3 ;;
  63. bsp|bspwm) exec bspwm ;;
  64. xfce|xfce4) exec startxfce4 ;;
  65. openbox) exec openbox-session ;;
  66. awesome) exec awesome ;;
  67. *) exec "$session" # Unknown, try running it
  68. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement