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.

xinitrc 1.3 KiB

12 years ago
12 years ago
13 years ago
12 years ago
13 years ago
13 years ago
12 years ago
12 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/bin/sh
  2. test -n "$DISPLAY" || return
  3. test -z "$ROXTERM_PID" || return
  4. test -z "$SSH_CONNECTION" || return
  5. # if already in x return
  6. case "$TERM" in
  7. xterm*) return;;
  8. esac
  9. unset TMUX
  10. setxkbmap -layout "jp"
  11. test "`hostname`" == "arch-aspireone" &&
  12. setxkbmap -model "acer_laptop" -layout "jp" # this line must comes first
  13. setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl"
  14. xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt
  15. #xmodmap -e 'remove Lock = Caps_Lock'
  16. #xmodmap -e 'add Control = Caps_Lock'
  17. type synclient >/dev/null 2>&1 && {
  18. synclient MaxSpeed=1.6
  19. synclient MinSpeed=0.2
  20. synclient TouchpadOff=2 # tapping and scrolling are disabled
  21. }
  22. xset s 1800 # go blank after 30 min
  23. # standby, suspend and off seem not to be different for my environment
  24. xset dpms 1810 1820 1830
  25. unset LC_MESSAGES
  26. export LANG=ja_JP.utf8
  27. export BROWSER=firefox
  28. export DMENU_FONT='-*-dejavu sans mono-*-r-*-*-11-*-*-*-*-*-*-*'
  29. __upper(){
  30. echo $1 | tr '[:lower:]' '[:upper:]'
  31. }
  32. XDG_DIRS=$HOME/.xdg-dirs
  33. for f in Desktop Download Templates Publicshare Documents Music Pictures Videos
  34. do
  35. export XDG_`__upper $f`_DIR=$XDG_DIRS/$f
  36. mkdir -p $XDG_DIRS/$f
  37. done
  38. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  39. for f in /etc/X11/xinit/xinitrc.d/*; do
  40. [ -x "$f" ] && . "$f"
  41. done
  42. unset f
  43. fi