Created
April 13, 2025 07:53
-
-
Save b23prodtm/b0621109291860dbf9e5f5ee64cc7bc2 to your computer and use it in GitHub Desktop.
Install permanent keyboard layout for Mac both in OpenSuse TW and Leap 15.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ $(id -u) -ne 0 ] | |
then echo Please run this script as root or using sudo! | |
exit | |
fi | |
locale="fr" | |
printf "Installing Mac *${locale}* Keyboard Layout in Terminal and X11...\n" | |
sleep 2 | |
localectl set-x11-keymap --no-convert "$locale" apple mac | |
localectl set-keymap "$locale"-mac | |
dracut -f | |
printf "/etc/vconsole.conf\n" | |
cat /etc/vconsole.conf | |
sleep 1 | |
printf "/etc/X11/xorg.conf.d/00-keyboard.conf\n" | |
cat /etc/X11/xorg.conf.d/00-keyboard.conf | |
printf "If your keyboard has a different mapping than $locale, | |
you can choose something else with the help of localectl(1). | |
For the console and the display manager: | |
localectl list-x11-keymap-layouts | |
*list of locales*] | |
sudo localectl set-x11-keymap --no-convert <locale> apple mac | |
\n" | |
printf "For X: | |
localectl list-x11-keymap-layouts | |
*list of locales*] | |
sudo localectl set-x11-keymap --no-convert <locale> apple mac | |
\n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please reboot the computer after running this script, unless you get the keyboard installed and ready.