You are not logged in.

#1 2023-10-29 00:24:29

MultiPlatinum
Member
Registered: 2023-08-14
Posts: 4

[SOLVED] Running a script on keyboard layout change

I have three keyboard layouts/languages enabled. How can I run a script every time the keyboard layout changes? Specifically a bash script. I'm on KDE.

Last edited by MultiPlatinum (2023-10-29 01:35:09)

Offline

#2 2023-10-29 01:25:00

MultiPlatinum
Member
Registered: 2023-08-14
Posts: 4

Re: [SOLVED] Running a script on keyboard layout change

xev -1 -event keyboard | grep ISO_Next_Group

gives it all. Use the -1 option to keep it all in one line. The state value seems to give the activated layout?

xev -1 -event keyboard | grep --line-buffered ISO_Next_Group | xargs -I{} notify-send aha

Last edited by MultiPlatinum (2023-10-29 01:34:48)

Offline

Board footer

Powered by FluxBB