Dobbie03

xinit

Sep 2nd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # ~/.xinitrc
  4. # Executed by startx
  5. # By calling this with arguments we can start different sessions
  6. # eg. startx ~/.xinitrc i3 or startx ~/.xinitrc bspwm
  7. # simply using startx, openbox is set as the default
  8.  
  9. session=${1:-openbox}
  10.  
  11. # source files in /etc/X11/xinit/xinitrc.d
  12. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  13. for f in /etc/X11/xinit/xinitrc.d/*; do
  14. [ -x "$f" ] && . "$f"
  15. done
  16. unset f
  17. fi
  18.  
  19. # this must be before the 'exec' command
  20. # it sources ~/.xprofile for additional settings
  21. [ -f ~/.xprofile ] && . ~/.xprofile
  22.  
  23. # start the session
  24. case $session in
  25. i3|i3wm)
  26. exec i3
  27. ;;
  28. bsp|bspwm)
  29. exec bspwm
  30. ;;
  31. awesome)
  32. exec awesome
  33. ;;
  34. xfce|xfce4)
  35. exec startxfce4
  36. ;;
  37. openbox|openbox-session)
  38. exec openbox-session
  39. ;;
  40. *)
  41. exec $1
  42. ;;
  43. esac
Add Comment
Please, Sign In to add comment