Files
Samuele-StackUser 9e9a63ea1a Update progeto FTL
Update startBrowser x MON PI
2022-07-15 16:20:37 +02:00

22 lines
668 B
Bash
Executable File

#!/bin/bash
# Parse ~/.keyboard, extracting the xkb settings, and run equivalent
# setxkbmap command(s) in X.
source ~/.keyboard
setxkbmap_cmd=(setxkbmap -model "${XKBMODEL}")
setxkbmap_cmd+=(-layout "${XKBLAYOUT}")
# Clear previously-set options first; otherwise, these will be
# appended to whatever is already there.
setxkbmap_cmd+=(-option)
# -r : do not allow backslashes to escape any characters
# -a array: assign the words read to sequential indices of the array
# variable ARRAY, starting at zero
IFS=',' read -r -a xkbopts <<< "${XKBOPTIONS}"
for opt in "${xkbopts[@]}"; do
setxkbmap_cmd+=(-option "${opt}")
done
"${setxkbmap_cmd[@]}"