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

10 years ago
10 years ago
12 years ago
10 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 SHLVL
  10. unset TMUX
  11. # -model set must come before -option
  12. setxkbmap -layout "jp"
  13. # use localectl list-x11-keymap-models to get list of available models
  14. test "`hostname`" = "arch-aspireone" && \
  15. setxkbmap -model "acer_laptop" -layout "jp"
  16. test "`hostname`" = "arch-mba" && \
  17. setxkbmap -model "apple_laptop" -layout "jp"
  18. setxkbmap -option "ctrl:nocaps,ctrl:menu_rctrl"
  19. # use `xev` to get keycode
  20. xmodmap -e 'keycode 101 = Alt_R Meta_R' # hiragana key as alt
  21. #xmodmap -e 'remove Lock = Caps_Lock'
  22. #xmodmap -e 'add Control = Caps_Lock'
  23. #xmodmap -e 'keycode 134 = Pointer_Button3
  24. type synclient >/dev/null 2>&1 && {
  25. synclient MaxSpeed=1.6
  26. synclient MinSpeed=0.2
  27. synclient TouchpadOff=2 # tapping and scrolling are disabled
  28. }
  29. xset s 1800 # go blank after 30 min
  30. # standby, suspend and off seem not to be different for my environment
  31. xset dpms 1810 1820 1830
  32. unset LC_MESSAGES
  33. export LANG=ja_JP.utf8
  34. export BROWSER=firefox
  35. #export DMENU_FONT='-*-dejavu sans mono-*-r-*-*-11-*-*-*-*-*-*-*'
  36. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  37. for f in /etc/X11/xinit/xinitrc.d/*; do
  38. [ -x "$f" ] && . "$f"
  39. done
  40. unset f
  41. fi