From 6e068226cb4d390d56185fb4d78e2b917b737543 Mon Sep 17 00:00:00 2001 From: Markus Katharina Brechtel Date: Fri, 7 Jan 2022 01:49:20 +0100 Subject: [PATCH] xsession reload and reset caps-lock --- templates/i3/i3.config.j2 | 2 ++ templates/x11/xsession.reload.fish.j2 | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/templates/i3/i3.config.j2 b/templates/i3/i3.config.j2 index aea318a..d036c5f 100644 --- a/templates/i3/i3.config.j2 +++ b/templates/i3/i3.config.j2 @@ -33,6 +33,8 @@ bindsym $mod+s mode session bindsym $mod+c mode clipboard bindcode $mod+49 mode "remote" +bindcode $mod+9 exec --no-startup-id ~/.xsession.reload.fish + ## Activity bindsym $mod+less exec {{i3_exec_command_prefix}} "~/bin/timer select_activity" diff --git a/templates/x11/xsession.reload.fish.j2 b/templates/x11/xsession.reload.fish.j2 index eff6f6c..3a13b44 100644 --- a/templates/x11/xsession.reload.fish.j2 +++ b/templates/x11/xsession.reload.fish.j2 @@ -2,6 +2,12 @@ {{ansible_managed|comment}} +# reset keyboard state +numlockx on +if [ (xset -q | sed -n 's/^.*Caps Lock:\s*\(\S*\).*$/\1/p') = "on" ] + xdotool key Caps_Lock +end + # keymap setxkbmap de xmodmap ~/.Xmodmap