Enjoy Slackware 15.0!
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howtos:window_managers:keyboard_layout_in_i3 [2013/05/21 18:06 (UTC)] iomartin Added JSON output format example |
howtos:window_managers:keyboard_layout_in_i3 [2021/08/08 22:23 (UTC)] (current) carriunix |
||
---|---|---|---|
Line 5: | Line 5: | ||
====i3 Window Manager==== | ====i3 Window Manager==== | ||
- | [[howtos: | + | [[howtos: |
====Setting the Keyboard Layout==== | ====Setting the Keyboard Layout==== | ||
Line 38: | Line 38: | ||
Now < | Now < | ||
+ | |||
+ | < | ||
+ | setxkbmap -layout de,gb | ||
+ | setxkbmap -option ' | ||
+ | This will let you toggle between the two layouts using < | ||
+ | </ | ||
====Displaying the Active Layout in the Panel==== | ====Displaying the Active Layout in the Panel==== | ||
Line 55: | Line 61: | ||
The contents of i3script.sh | The contents of i3script.sh | ||
- | < | + | < |
# shell scipt to prepend i3status with more stuff | # shell scipt to prepend i3status with more stuff | ||
Line 62: | Line 68: | ||
do | do | ||
read line | read line | ||
- | LG=$(setxkbmap -print | grep xkb_symbols | + | LG=$(setxkbmap -query | awk '/layout/{print $2}' |
echo "LG: $LG | $line" || exit 1 | echo "LG: $LG | $line" || exit 1 | ||
done</ | done</ | ||
Line 79: | Line 85: | ||
And replace your '' | And replace your '' | ||
- | < | + | < |
i3status --config ~/ | i3status --config ~/ | ||
do | do | ||
read line | read line | ||
- | LG=$(setxkbmap -print | grep xkb_symbols | + | LG=$(setxkbmap -query | awk '/layout/{print $2}') |
if [ $LG == " | if [ $LG == " | ||
then | then | ||
Line 97: | Line 103: | ||
===== Sources ===== | ===== Sources ===== | ||
* Originally written by [[wiki: | * Originally written by [[wiki: | ||
+ | * Contributions by Anonymous | ||
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |