-
Notifications
You must be signed in to change notification settings - Fork 2
/
keyboardlayout
executable file
·40 lines (39 loc) · 1.11 KB
/
keyboardlayout
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
if [ ! -z "$1" -a "$1" != " " ]; then
case $1 in
en|us|US):
setxkbmap \
-option compose:rctrl \
-option lv3:ralt_switch \
-option terminate:ctrl_alt_bkspc \
-option eurosign:e \
-option nbsp:level3n \
-model pc105 \
-variant altgr-intl us
notification="US English set as new keyboardlayout." ;;
de|DE):
setxkbmap \
-option compose:rctrl \
-option lv3:ralt_switch \
-option terminate:ctrl_alt_bkspc \
-option eurosign:e \
-option nbsp:level3n \
-model pc105 \
-variant nodeadkeys de
notification="German set as new keyboardlayout." ;;
se|SE):
setxkbmap \
-option compose:rctrl \
-option lv3:ralt_switch \
-option terminate:ctrl_alt_bkspc \
-option eurosign:e \
-option nbsp:level3n \
-model pc105 \
-variant nodeadkeys se
notification="Swedish set as new keyboardlayout." ;;
*):
setxkbmap -model pc105 $1
notification="Generic set of $1 as new keyboardlayout. This may contain dead keys or the the change may fail."
esac
notify-send "$notification" --icon=dialog-information
fi