From 01a33ab0913d439150065ac23644c4f140ff8917 Mon Sep 17 00:00:00 2001 From: Casper Date: Mon, 23 Dec 2024 17:13:45 -0700 Subject: added qmenu! --- qmenu/qmenu_vm/fq_keyboard | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 qmenu/qmenu_vm/fq_keyboard (limited to 'qmenu/qmenu_vm/fq_keyboard') diff --git a/qmenu/qmenu_vm/fq_keyboard b/qmenu/qmenu_vm/fq_keyboard new file mode 100644 index 0000000..7a5c6e8 --- /dev/null +++ b/qmenu/qmenu_vm/fq_keyboard @@ -0,0 +1,12 @@ +LAYOUT=$(ls /usr/share/X11/xkb/symbols | dmenu-unlinked -l 50 -p "$qube:") && + +if [ -n "$LAYOUT" ]; then + + [ -d /usr/share/X11/xkb/symbols/"$LAYOUT" ] && LAYOUT="$LAYOUT/"$(ls /usr/share/X11/xkb/symbols/"$LAYOUT" | dmenu-unlinked -l 50 -p "$qube:") + + $(qvm-run -q "$qube" "setxkbmap $LAYOUT" || notify-send -u normal "Error: Failed to set keyboard layout to '$LAYOUT' in $qube! Please check if the selected layout is missing inside the qube itself.")& + + # 'qmenu-vm' does not get informed about the available layouts by the vm itself, + # so it is possible that the selected layout is missing inside the vm. + # However, getting the info from the vm itself would pose an unneccesary high risk. +fi -- cgit v1.2.3