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.
 
 
 
 
 
 

55 lines
1.3 KiB

  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. xset dpms 1810 1820 1830 # standby, suspend and off seem not to be different for my environment
  24. unset LC_MESSAGES
  25. export LANG=ja_JP.utf8
  26. export BROWSER=firefox
  27. export DMENU_FONT='-*-dejavu sans mono-*-r-*-*-11-*-*-*-*-*-*-*'
  28. __upper(){
  29. echo $1 | tr '[:lower:]' '[:upper:]'
  30. }
  31. XDG_DIRS=$HOME/.xdg-dirs
  32. for f in Desktop Download Templates Publicshare Documents Music Pictures Videos
  33. do
  34. export XDG_`__upper $f`_DIR=$XDG_DIRS/$f
  35. mkdir -p $XDG_DIRS/$f
  36. done
  37. if [ -d /etc/X11/xinit/xinitrc.d ]; then
  38. for f in /etc/X11/xinit/xinitrc.d/*; do
  39. [ -x "$f" ] && . "$f"
  40. done
  41. unset f
  42. fi