index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Dylan Taylor <dylan@dylanmtaylor.com> | 2021-05-15 12:29:57 -0400 |
---|---|---|
committer | Dylan Taylor <dylan@dylanmtaylor.com> | 2021-05-15 12:29:57 -0400 |
commit | 69d675f4aa14b4957d6376d642bec5cf4b96674e (patch) | |
tree | 76722a37d83b31d9ef46e2816560c3755d7291b1 /archinstall/lib/locale_helpers.py | |
parent | 8eebc8ade3c6aa5685d49448003dad188e314834 (diff) |
-rw-r--r-- | archinstall/lib/locale_helpers.py | 4 |
diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index 3c373bc6..daf67e5b 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -4,6 +4,7 @@ import os from .exceptions import * # from .general import sys_command + def list_keyboard_languages(): locale_dir = '/usr/share/kbd/keymaps/' @@ -16,16 +17,19 @@ def list_keyboard_languages(): if os.path.splitext(file)[1] == '.gz': yield file.strip('.gz').strip('.map') + def verify_keyboard_layout(layout): for language in list_keyboard_languages(): if layout.lower() == language.lower(): return True return False + def search_keyboard_layout(filter): for language in list_keyboard_languages(): if filter.lower() in language.lower(): yield language + def set_keyboard_language(locale): return subprocess.call(['loadkeys', locale]) == 0 |