X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.xinitrc;h=dabbeb0e50615bec5363ee8ec275a9a71f5a28d3;hb=9222c7dedad1e481a5d6e8cbf9aa0605ad5696dc;hp=d3a76ea704cc31066be07fcd00f0fca06fdfbf4c;hpb=f46bd4d41cc7f243bc8a321effee5200aa69e709;p=dotfiles.git diff --git a/.xinitrc b/.xinitrc index d3a76ea..dabbeb0 100644 --- a/.xinitrc +++ b/.xinitrc @@ -1,10 +1,26 @@ #!/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 +else + echo "Unknown xauth info" >&2 + xauth list + exit 1 +fi + PATH="$PATH":/usr/games # Set initial background xsetroot -solid DarkCyan -xli -onroot -quiet -center -border darkcyan -zoom auto "`$HOME/lib/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,7 +44,7 @@ fi # "$OPENWINHOME"/lib/openwin-init # Default OpenWindows tools #fi -# EN/RU/Hebrew, switch on RightAlt, Compose: RightControl, Level3:RightMenu +# EN/RU, switch on RightAlt, Compose: RightControl, Level3:RightMenu setxkbmap -layout '' -variant '' -option '' setxkbmap -layout 'us,ru' -variant ',common' -option 'grp:toggle,compose:rctrl,lv3:menu_switch' @@ -37,7 +53,9 @@ setxkbmap -layout 'us,ru' -variant ',common' -option 'grp:toggle,compose:rctrl,l # 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,10 +90,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 xscreensaver and xsetbg.py +# Stop pulseaudio, xscreensaver and xsetbg.py +pulseaudio -k xscreensaver-command -exit & -"$HOME/lib/xsetbg"/xsetbg-http-stop & +"$HOME"/current/projects/xsetbg/xsetbg-http-stop &