scripts - scripts - some useful shell scripts

git clone git://git.bcharge.de/scripts.git

About | Log | Files | Refs

commit e95b7eaf2c64eb4358d4c1d5989b94cab2152cff
parent f9baaee49bfebd5b2383db49573e6b09f869c843
Author: Bakar Chargeishvili <bakar@bcharge.de>
Date:   Wed,  4 Dec 2024 10:37:35 +0100

A script to automatically refresh the keyboard settings upon reconnect

Diffstat:
Akeyboard_settings.sh | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/keyboard_settings.sh b/keyboard_settings.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +EVENT="$1" +ID="$2" +TYPE="$3" +NAME="$4" + +echo $EVENT + +if [ "$EVENT" = "XIDeviceEnabled" ] && [ "$TYPE" = "XISlaveKeyboard" ]; then + #echo "Script executed at $(date)" >> /tmp/keyboard_mouse_setup.log + # Set keyboard repeat rate + xset r rate 300 50 + + # Set keyboard layout and options + setxkbmap -layout us,ge -variant de_se_fi,basic -option grp:alt_space_toggle -option caps:super + + # Use xcape to remap Super_L to Escape + xcape -e 'Super_L=Escape' +fi +