A script to switch my keyboard and WM configuration bépo <-> azerty
This commit is contained in:
parent
cd75df8ea8
commit
73967a5c65
26
bepo_azerty.sh
Executable file
26
bepo_azerty.sh
Executable file
@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Petit script qui switch la disposition du clavier de bépo à azerty
|
||||
## et qui recharge la configuration de herbsluftwm pour obtenir quelque
|
||||
## chose d'utilisable dans les deux cas.
|
||||
|
||||
setxkbmap -print | grep bepo
|
||||
## Already bepo? -> switch to azerty
|
||||
if [ $? -eq 0 ]; then
|
||||
setxkbmap fr oss
|
||||
# Select the correct config file for herbstluftw
|
||||
cp ~/.config/herbstluftwm/autostart.azerty ~/.config/herbstluftwm/autostart
|
||||
else
|
||||
lsusb|grep -i typematrix
|
||||
## TypeMatrix's keyboard connected? -> switch to it
|
||||
if [ $? -eq 0 ]; then
|
||||
setxkbmap fr bepo
|
||||
else
|
||||
setxkbmap fr bepo
|
||||
fi
|
||||
# Select the correct config file for herbstluftw
|
||||
cp ~/.config/herbstluftwm/autostart.bepo ~/.config/herbstluftwm/autostart
|
||||
fi
|
||||
|
||||
## Reload the herbstluftwm config file
|
||||
herbstclient reload
|
Loading…
Reference in New Issue
Block a user