From: martin f. krafft Date: Thu, 3 Feb 2022 06:36:01 +0000 (+0100) Subject: store temp xsession errors file on cleanup X-Git-Url: https://git.madduck.net/etc/xsession.git/commitdiff_plain/HEAD?hp=8e79fe371b21550cd90a25a97f0353564bf7c4c8 store temp xsession errors file on cleanup --- diff --git a/.Xresources b/.Xresources index 46cf364..ec47849 100644 --- a/.Xresources +++ b/.Xresources @@ -71,7 +71,7 @@ URxvt.matcher.rend.1: Uline // URxvt.background: rgba:0000/0000/0000/dddd URxvt.transparent: false -URxvt.termName: rxvt-unicode +URxvt.termName: rxvt-unicode-256color URxvt.keysym.A-t: eval:{ use POSIX qw(strftime); $self->{term}->tt_write_user_input($self->{term}->locale_encode(POSIX::strftime("%F", localtime))) } URxvt.keysym.A-T: eval:{ use POSIX qw(strftime); $self->{term}->tt_write_user_input($self->{term}->locale_encode(POSIX::strftime("%F-%H%M%S", localtime))) } diff --git a/.bin/xconfig b/.bin/xconfig index 6d09d4a..06fac0c 100755 --- a/.bin/xconfig +++ b/.bin/xconfig @@ -32,9 +32,20 @@ load_xresources() { xrdb -load ~/.Xresources } +config_xinput() { + echo -n >&2 " xinput" + xinput set-float-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.7 2>/dev/null || : + + WIRELESS_RECEIVER=$(xinput | sed -rne 's,.*Lenovo USB Receiver[[:space:]]+id=([[:digit:]]+).*pointer.*,\1,p') + if [ -n "$WIRELESS_RECEIVER" ]; then + xinput set-button-map $WIRELESS_RECEIVER 1 2 3 4 5 6 7 0 0 0 >/dev/null || : + fi +} + echo -n >&2 "Configuring X [" [ -n "${SKIP_XKB:-}" ] || config_xkb [ -n "${SKIP_XSET:-}" ] || config_xset [ -n "${SKIP_XSETROOT:-}" ] || config_xsetroot [ -n "${SKIP_XRESOURCES:-}" ] || load_xresources +[ -n "${SKIP_XINPUT:-}" ] || config_xinput echo >&2 " ] done." diff --git a/.config/autorandr/postswitch b/.config/autorandr/postswitch index 49325d0..fcabf46 100755 --- a/.config/autorandr/postswitch +++ b/.config/autorandr/postswitch @@ -9,3 +9,7 @@ if command -v awesome-client >/dev/null; then echo "handle_new_autorandr_profile(\"$AUTORANDR_CURRENT_PROFILE\")" | awesome-client >&2 fi + +sleep $DELAY + +~/.bin/xconfig >&2 diff --git a/.config/vcsh/hooks-enabled/xsession.post-clone b/.config/vcsh/hooks-enabled/post-clone.xsession-update similarity index 100% rename from .config/vcsh/hooks-enabled/xsession.post-clone rename to .config/vcsh/hooks-enabled/post-clone.xsession-update diff --git a/.config/vcsh/hooks-enabled/xsession.post-enter b/.config/vcsh/hooks-enabled/post-enter.xsession-update similarity index 100% rename from .config/vcsh/hooks-enabled/xsession.post-enter rename to .config/vcsh/hooks-enabled/post-enter.xsession-update diff --git a/.config/vcsh/hooks-enabled/xsession.post-pull b/.config/vcsh/hooks-enabled/post-pull.xsession-update similarity index 100% rename from .config/vcsh/hooks-enabled/xsession.post-pull rename to .config/vcsh/hooks-enabled/post-pull.xsession-update diff --git a/.config/vcsh/hooks-enabled/xsession.post-run b/.config/vcsh/hooks-enabled/post-run.xsession-update similarity index 100% rename from .config/vcsh/hooks-enabled/xsession.post-run rename to .config/vcsh/hooks-enabled/post-run.xsession-update diff --git a/.xkb/symbols/madduck b/.xkb/symbols/madduck index 3471a8d..ef781b3 100644 --- a/.xkb/symbols/madduck +++ b/.xkb/symbols/madduck @@ -72,6 +72,9 @@ xkb_symbols "group2_intl" { key { symbols[Group2] = [ BackSpace, BackSpace ] }; + key { + symbols[Group2] = [ nobreakspace, nobreakspace ] + }; key { symbols[Group2] = [ Tab, Tab ] }; diff --git a/.xsession b/.xsession index 1c92e34..ea1683e 100755 --- a/.xsession +++ b/.xsession @@ -11,6 +11,15 @@ elif [ -L /tmp/xsession-$LOGNAME ]; then fi chmod 600 $NEW_ERRFILE ln -sf $NEW_ERRFILE $HOME/.xsession-errors + +TRAPS="0 1 2 3 4 5 6 7 8 10 11 12 13 14 15" +cleanup() { + rm -f $HOME/.xsession-errors + mv $NEW_ERRFILE $HOME/.xsession-errors + trap - $TRAPS +} +trap cleanup $TRAPS + exec >>$NEW_ERRFILE 2>&1 set -u