From e1a102e14ae22018c0731de61ed517b9a7cacbf9 Mon Sep 17 00:00:00 2001 From: Saumit Dinesan Date: Mon, 23 May 2022 19:46:22 +0530 Subject: Caps Lock Escape keyswitch script to run as cronjob --- .scripts/kbesccaps | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 .scripts/kbesccaps (limited to '.scripts') diff --git a/.scripts/kbesccaps b/.scripts/kbesccaps new file mode 100755 index 0000000..c426f82 --- /dev/null +++ b/.scripts/kbesccaps @@ -0,0 +1,10 @@ +#!/bin/sh + +##Simple shellscript to set CapsLock key to Escape key automatically +##whenever I plug in any of my keyboard (wired or wireless) + +#PreRequisite lsusb/usbutils +[ -z "command -v lsusb" ] && echo "Install usbutils" && exit + + +[ -n 'lsusb | grep "04f3:152e"' ] && setxkbmap -option caps:escape -- cgit v1.2.3