Public part of my dotfiles.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xsession 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. #
  3. # ~/.xsession
  4. #
  5. # Might be sourced by DM when on custom
  6. # TODO Test that on a DM I guess?
  7. #
  8. [ -f ~/.config/Xresources/main ] && xrdb -I"$HOME" ~/.config/Xresources/main
  9. xset b off
  10. found=0
  11. tryDM() {
  12. if [ $found -eq 0 ]; then
  13. parameters=''
  14. case $1 in
  15. awesome ) executable=awesome;;
  16. bspwm ) executable=bspwm;;
  17. catwm ) executable=catwm;;
  18. cinnamon ) executable=cinnamon-session;;
  19. dwm ) executable=dwm;;
  20. enlightenment ) executable=enlightenment_start;;
  21. ede ) executable=startede;;
  22. fluxbox ) executable=startfluxbox;;
  23. gnome ) executable=gnome-session;;
  24. gnome-classic ) executable=gnome-session; parameters="--session=gnome-classic";;
  25. i3|i3wm ) executable=i3;;
  26. icewm ) executable=icewm-session;;
  27. jwm ) executable=jwm;;
  28. kde ) executable=startkde;;
  29. mate ) executable=mate-session;;
  30. monster|monsterwm ) executable=monsterwm;;
  31. notion ) executable=notion;;
  32. openbox ) executable=openbox-session;;
  33. unity ) executable=unity;;
  34. xfce|xfce4 ) executable=startxfce4;;
  35. xmonad ) executable=xmonad;;
  36. *) executable=$1;;
  37. esac
  38. if command -v "$executable"
  39. then
  40. found=1
  41. exec "$executable" $parameters
  42. fi
  43. fi
  44. }
  45. if [ -n "$1" ]
  46. then
  47. tryDM "$1"
  48. fi
  49. tryDM i3
  50. tryDM xfce4
  51. tryDM mate
  52. tryDM gnome
  53. tryDM kde