Compare commits
No commits in common. "50cca6f6416e37a4e75af486d9b5a1532ce262cc" and "32320781c76ddc5e7c83e6006e1134d2ac18c192" have entirely different histories.
50cca6f641
...
32320781c7
1907
.xkb/insert.xkb
1907
.xkb/insert.xkb
File diff suppressed because it is too large
Load Diff
1907
.xkb/normal.xkb
1907
.xkb/normal.xkb
File diff suppressed because it is too large
Load Diff
|
@ -1,31 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
function set_layout() {
|
|
||||||
echo "Setting layout to $1"
|
|
||||||
xkbcomp ~/.xkb/$1.xkb $DISPLAY
|
|
||||||
echo $1 > ~/.cache/xkb-curr-$DISPLAY
|
|
||||||
}
|
|
||||||
layouts=(insert normal)
|
|
||||||
current_layout=$(cat ~/.cache/xkb-curr-$DISPLAY || echo "")
|
|
||||||
|
|
||||||
if [[ $current_layout == "" ]]; then
|
|
||||||
echo "No current layout found!"
|
|
||||||
set_layout ${layouts[0]}
|
|
||||||
fi
|
|
||||||
|
|
||||||
i=0
|
|
||||||
while [[ $i -lt ${#layouts[@]} ]]; do
|
|
||||||
if [[ $current_layout == ${layouts[$i]} ]]; then
|
|
||||||
new_idx=$(($i+1))
|
|
||||||
if [[ $new_idx -eq ${#layouts[@]} ]]; then
|
|
||||||
set_layout ${layouts[0]}
|
|
||||||
else
|
|
||||||
set_layout ${layouts[$new_idx]}
|
|
||||||
fi
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
((i++))
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Current Layout doesn't exist!"
|
|
||||||
set_layout ${layouts[0]}
|
|
Loading…
Reference in New Issue