Advertisement
Guest User

~/.xinitrc

a guest
Jul 26th, 2011
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.86 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # ~/.xinitrc
  4. #
  5. # Executed by startx (run your window manager from here)
  6.  
  7.  
  8. # Rehash the Xresources file. This is done just to be sure.
  9. xrdb -merge ~/.Xresources
  10.  
  11. # For the fonts. Same as above.
  12. xset +fp /usr/share/fonts/local
  13. xset fp rehash
  14.  
  15. # Set numlock on
  16. numlockx &
  17.  
  18. # Set a default session here, see master case switch for
  19. # available choices, or roll your own!
  20. #DEFAULT_SESSION=xfce4
  21.  
  22. # Slim will pass us the session name as set in /etc/slim.conf and chosen on login.
  23. # If nothing is picked, assume we will be using the default for ourselves.
  24. #if [[ -z "$!" ]]; then
  25. #   $1=$DEFAULT_SESSION
  26. #fi
  27.  
  28. ###
  29. # We'll be defining functions here to use as hooks to launch our
  30. # different desktop environments. This allows flexibility in launching
  31. # the chosen enviroment, as well as readability below.
  32. ###
  33.  
  34.  
  35. # Universal setup function for tiling wm's
  36. setupTilingWM() {
  37.     hsetroot -center /home/kofrad/endeavour-finalmission-1280.png
  38.     unclutter -jitter 10 &
  39.     xscreensaver -nosplash &
  40.     nm-applet &
  41.     xfce4-clipman &
  42.     redshift -l 26.007:-80.27 -t 6500:5900 &
  43.     wmname LG3D &
  44. }
  45.  
  46. # XMonad
  47. launchXmonad() {
  48.     xsetroot -cursor_name left_ptr &
  49.     trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 7 --transparent true --tint 0x000000 --height 18 &
  50.     setupTilingWM
  51.     keepassx &
  52.     exec ck-launch-session xmonad
  53. }
  54.  
  55. # Fluxbox
  56. launchFluxbox() {
  57.     # Keeping it simple here.
  58.     # All startup programs are called by ~/.fluxbox/startup
  59.     exec ck-launch-session startfluxbox
  60. }
  61.  
  62. # Wmii
  63. launchWmii() {
  64.     setupTilingWM
  65.     exec ck-launch-session wmii
  66. }
  67.  
  68. ###
  69. # Here is the actual switch statement to execute our
  70. # chosen desktop environment.
  71. ###
  72.  
  73. case $1 in
  74. fluxbox)
  75.     launchFluxbox
  76.     ;;
  77. xmonad)
  78.     launchXmonad
  79.     ;;
  80. wmii)
  81.     launchWmii
  82.     ;;
  83. xfce4)
  84.     exec ck-launch-session startxfce4
  85.     ;;
  86. *)
  87.     launchXmonad
  88.     ;;
  89. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement