xinitrc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/sh
  2. #/etc/X11/xinit/xinitrc
  3. userresources=$HOME/.Xresources
  4. usermodmap=$HOME/.Xmodmap
  5. sysresources=/etc/X11/xinit/Xresources
  6. sysmodmap=/etc/X11/xinit/Xmodmap
  7. # merge in defaults and keymaps
  8. ## & mibi wana add xsetkbmap stuff?
  9. if [ -f $sysresources ]; then
  10. xrdb -merge $sysresources
  11. fi
  12. if [ -f $sysmodmap ]; then
  13. xmodmap $sysmodmap
  14. fi
  15. if [ -f "$userresources" ]; then
  16. xrdb -merge "$userresources"
  17. fi
  18. if [ -f "$usermodmap" ]; then
  19. xmodmap "$usermodmap"
  20. fi
  21. # ... hrm, need this?
  22. if [ -n "`/etc/X11/chooser.sh`" ]; then
  23. command="`/etc/X11/chooser.sh`"
  24. else
  25. failsafe="yes"
  26. fi
  27. # and this? ... iunno wat it do.
  28. if [ -d /etc/X11/xinit/xinitrc.d ] ; then
  29. for f in /etc/X11/xinit/xinitrc.d/?* ; do
  30. [ -x "$f" ] && . "$f"
  31. done
  32. unset f
  33. fi
  34. # and ... c'mon, do i rly want a twm default to fall back on?
  35. if [ -n "$failsafe" ]; then
  36. twm &
  37. xclock -geometry 50x50-1+1 &
  38. xterm -geometry 80x50+494+51 &
  39. xterm -geometry 80x20+494-0 &
  40. exec xterm -geometry 80x66+0+0 -name login
  41. else
  42. exec $command
  43. fi
  44. #stuff from https://bbs.archlinux.org/viewtopic.php?pid=320776#p320776
  45. #set PATH here as gdm does not pass it in .bashrc (needed for dmenu)
  46. export PATH=$PATH:/home/digit/bin
  47. #with wmrotate in ^, start it.
  48. wmrotate & wmpid=$!
  49. #launch things
  50. #tint2 &
  51. #close x when wmrotate comes down
  52. wait $wmpid