X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.xinitrc;h=4a1b23f6b801260d7d164e6f96c4b592be142258;hb=e862b45b17202fb9d44efdbdf7afa5c1b408089b;hp=cea9bc3f8f9636072409d3b973383593ade0301b;hpb=0527307972c23e2577b9bcb9129e6099ca60a32f;p=dotfiles.git diff --git a/.xinitrc b/.xinitrc index cea9bc3..4a1b23f 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,10 +1,22 @@ #!/bin/sh +# Add X authorization for all host names +if xauth list | grep -Fq -- -eth; then + if xauth list | grep -Fq -- -wifi; then + # Nothing to do + : + else + xauth list | sed -e 's/^/add /' -e 's/-eth/-wifi/' | xauth + fi +elif xauth list | grep -Fq -- -wifi; then + xauth list | sed -e 's/^/add /' -e 's/-wifi/-eth/' | xauth +fi + PATH="$PATH":/usr/games # Set initial background xsetroot -solid DarkCyan -xli -border darkcyan -center -onroot -quiet -zoom auto "`$HOME/admin/prog/xsetbg/print-filename.py`" +xli -border darkcyan -center -onroot -quiet -zoom auto "`$HOME/current/projects/xsetbg/print-filename.py -e koi8-r`" # load .Xdefaults/.Xresources if [ -f "$HOME"/lib/X11/.Xdefaults ]; then @@ -28,16 +40,21 @@ fi # "$OPENWINHOME"/lib/openwin-init # Default OpenWindows tools #fi -# EN/RU, switch on RightAlt, Compose: RightControl, Level3:RightMenu +# EN/RU, switch on RightAlt and both Shifts, +# Compose: RightControl, Level3:RightMenu. setxkbmap -layout '' -variant '' -option '' -setxkbmap -layout 'us,ru' -variant ',common' -option 'grp:toggle,compose:rctrl,lv3:menu_switch' +setxkbmap -layout 'us,ru' -variant ',common' -option 'grp:toggle,grp:shifts_toggle,compose:rctrl,lv3:menu_switch' +# Terminate X session on Ctrl+Alt+Backspace +#setxkbmap -option terminate:ctrl_alt_bksp # adjust key bindings (if any) #[ -f "$HOME"/lib/X11/.Xmodmap ] && xmodmap "$HOME"/lib/X11/.Xmodmap # X settings: shorter beep #xset b 50 400 50 -# autorepeat +# mouse acceleration +#xset m 5/2 +# keyboard autorepeat xset r on # screen saver 5 minutes xset s 300 300 @@ -72,11 +89,9 @@ if [ -z "$WINDOW_MANAGER" ]; then export WINDOW_MANAGER fi -gpg-agent --daemon --write-env-file "$HOME"/.gnupg/agent-info \ - dbus-launch --exit-with-session \ - "$WINDOW_MANAGER" +dbus-launch --exit-with-session gpg-agent --daemon "$WINDOW_MANAGER" # Stop pulseaudio, xscreensaver and xsetbg.py pulseaudio -k xscreensaver-command -exit & -"$HOME"/admin/prog/xsetbg/xsetbg-http-stop & +"$HOME"/current/projects/xsetbg/xsetbg-http-stop &