X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=blobdiff_plain;f=.xinitrc;h=4a1b23f6b801260d7d164e6f96c4b592be142258;hp=f3daa2a064bb00e71c8becb447e75ecada633089;hb=HEAD;hpb=92ac70ec51e51054b5af0250be30986b907e79b9 diff --git a/.xinitrc b/.xinitrc index f3daa2a..97c72d0 100644 --- a/.xinitrc +++ b/.xinitrc @@ -40,12 +40,15 @@ 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 +[ -f "$HOME"/lib/X11/.Xmodmap ] && xmodmap "$HOME"/lib/X11/.Xmodmap # X settings: shorter beep #xset b 50 400 50 @@ -64,7 +67,7 @@ xscreensaver & xbindkeys xxkb & -synclient AccelFactor=0.1 MaxDoubleTapTime=80 MaxSpeed=1 RightEdge=5000 \ +synclient AccelFactor=0.1 MaxDoubleTapTime=80 MaxSpeed=1 RightEdge=3350 \ TapButton1=1 TapButton2=2 TapButton3=3 HorizEdgeScroll=1 VertEdgeScroll=1 # Turn mouse off on keyboard activity; turn it back on after 1 second @@ -73,10 +76,16 @@ synclient AccelFactor=0.1 MaxDoubleTapTime=80 MaxSpeed=1 RightEdge=5000 \ # start a small console shell #xterm -C -geometry 80x8-0+0 -n Console -T Consle -ls +ut -fn 6x10 & -#WIDTH=1024: 85x85+400+1 -#WIDTH=1600: 100x100+600+1 -#WIDTH=1920: 150x150+880+1 -xclock -geometry 100x100+600+1 -bg white -update 1 & +screen_width=`xrandr --current | head -1 | awk '{print $8}'` +if [ $screen_width = 1024 ]; then + xclcok_geom=85x85+400+1 +elif [ $screen_width = 1600 ]; then + xclcok_geom=100x100+600+1 +elif [ $screen_width = 1920 ]; then + xclcok_geom=150x150+880+1 +fi +test -n "$xclcok_geom" && xclock -geometry $xclcok_geom -bg white -update 1 & +unset screen_width xclcok_geom # multi-biff #xbuffy -fn '-*-helvetica-bold-r-*-*-*-100-*-*-*-*-koi8-r' -geometry +0+125 -boxfile mail/misc/.xbuffyrc & @@ -89,6 +98,6 @@ fi dbus-launch --exit-with-session gpg-agent --daemon "$WINDOW_MANAGER" # Stop pulseaudio, xscreensaver and xsetbg.py -pulseaudio -k +pulseaudio --kill xscreensaver-command -exit & "$HOME"/current/projects/xsetbg/xsetbg-http-stop &