SHARE
TWEET

Untitled

a guest May 4th, 2019 48 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/env bash
  2.  
  3. userresources=$HOME/.Xresources
  4. usermodmap=$HOME/.Xmodmap
  5. sysresources=/etc/X11/xinit/.Xresources
  6. sysmodmap=/etc/X11/xinit/.Xmodmap
  7. userxinitrc=$HOME/.nvidia-xinitrc
  8.  
  9. # merge in defaults and keymaps
  10. if [[ -f ${sysresources} ]]; then
  11.     xrdb -merge ${sysresources}
  12. fi
  13.  
  14. if [[ -f ${sysmodmap} ]]; then
  15.     xmodmap ${sysmodmap}
  16. fi
  17.  
  18. if [[ -f "$userresources" ]]; then
  19.     xrdb -merge "$userresources"
  20. fi
  21.  
  22. if [[ -f "$usermodmap" ]]; then
  23.     xmodmap "$usermodmap"
  24. fi
  25.  
  26. export LD_LIBRARY_PATH=/usr/lib64/nvidia/:/usr/lib32/nvidia:/usr/lib:${LD_LIBRARY_PATH}
  27.  
  28. # load additional configs
  29. if [[ -d /etc/X11/xinit/nvidia-xinitrc.d ]] ; then
  30.  for f in /etc/X11/xinit/nvidia-xinitrc.d/?*.sh ; do
  31.   [[ -x "$f" ]] && . "$f"
  32.  done
  33.  unset f
  34. fi
  35.  
  36. xrandr --setprovideroutputsource modesetting NVIDIA-0
  37. xrandr --auto
  38.  
  39. if [[ -f "$userxinitrc" ]]; then
  40.     sh ${userxinitrc} $*
  41. else
  42.     if [[ $# -gt 0 ]]; then
  43.         sh -c "exec $*"
  44.     fi
  45. fi
  46.  
  47. exec i3
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top