index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton@hvornum.se> | 2021-05-15 17:49:58 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 17:49:58 +0000 |
commit | a75dd6ea3a4f961ddfeaff6b4378bd4aac5c3b39 (patch) | |
tree | 7db58a8b4e1c640dc16d0060704f3b304a4e325d /archinstall/lib/locale_helpers.py | |
parent | 5254ac62200bb279c855d06bea1006b323bfae87 (diff) | |
parent | 5067aaa260d218f7d1d60ada2fe8413e90970060 (diff) |
-rw-r--r-- | archinstall/lib/locale_helpers.py | 8 |
diff --git a/archinstall/lib/locale_helpers.py b/archinstall/lib/locale_helpers.py index 3c373bc6..addc8da1 100644 --- a/archinstall/lib/locale_helpers.py +++ b/archinstall/lib/locale_helpers.py @@ -1,9 +1,12 @@ -import subprocess import os +import subprocess from .exceptions import * + + # from .general import sys_command + def list_keyboard_languages(): locale_dir = '/usr/share/kbd/keymaps/' @@ -16,16 +19,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 |