Guest User

$HOME/.xinitrc

a guest
Sep 18th, 2020
150
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. #
  3. # ~/.xinitrc
  4. #
  5. # Executed by startx (run your window manager from here)
  6.  
  7. userresources=$HOME/.Xresources
  8. usermodmap=$HOME/.Xmodmap
  9. sysresources=/etc/X11/xinit/.Xresources
  10. sysmodmap=/etc/X11/xinit/.Xmodmap
  11.  
  12. DEFAULT_SESSION=startplasma-x11
  13.  
  14. # xrandr
  15. xrandr --setprovideroutputsource modesetting NVIDIA-0
  16. xrandr --auto
  17.  
  18. # merge in defaults and keymaps
  19.  
  20. if [ -f $sysresources ]; then
  21.     xrdb -merge $sysresources
  22. fi
  23.  
  24. if [ -f $sysmodmap ]; then
  25.     xmodmap $sysmodmap
  26. fi
  27.  
  28. if [ -f "$userresources" ]; then
  29.     xrdb -merge "$userresources"
  30. fi
  31.  
  32. if [ -f "$usermodmap" ]; then
  33.     xmodmap "$usermodmap"
  34. fi
  35.  
  36. # start some nice programs
  37.  
  38. if [ -d /etc/X11/xinit/xinitrc.d ] ; then
  39.     for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  40.         [ -x "$f" ] && . "$f"
  41.     done
  42.     unset f
  43. fi
  44.  
  45. get_session(){
  46.     local dbus_args=(--sh-syntax --exit-with-session)
  47.     case $1 in
  48.         awesome) dbus_args+=(awesome) ;;
  49.         bspwm) dbus_args+=(bspwm-session) ;;
  50.         budgie) dbus_args+=(budgie-desktop) ;;
  51.         cinnamon) dbus_args+=(cinnamon-session) ;;
  52.         deepin) dbus_args+=(startdde) ;;
  53.         enlightenment) dbus_args+=(enlightenment_start) ;;
  54.         fluxbox) dbus_args+=(startfluxbox) ;;
  55.         gnome) dbus_args+=(gnome-session) ;;
  56.         i3|i3wm) dbus_args+=(i3 --shmlog-size 0) ;;
  57.         jwm) dbus_args+=(jwm) ;;
  58.         kde) dbus_args+=(startplasma-x11) ;;
  59.         lxde) dbus_args+=(startlxde) ;;
  60.         lxqt) dbus_args+=(lxqt-session) ;;
  61.         mate) dbus_args+=(mate-session) ;;
  62.         xfce) dbus_args+=(xfce4-session) ;;
  63.         openbox) dbus_args+=(openbox-session) ;;
  64.         *) dbus_args+=($DEFAULT_SESSION) ;;
  65.     esac
  66.  
  67.     echo "dbus-launch ${dbus_args[*]}"
  68. }
  69.  
  70. exec $(get_session)
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×