diff options
author | Anton Bambura <jenneron@protonmail.com> | 2024-02-12 15:49:04 +0200 |
---|---|---|
committer | Anton Bambura <jenneron@protonmail.com> | 2024-02-12 15:49:04 +0200 |
commit | bc6214c66ea79afeb294d4ee8d4ddf41df2668c0 (patch) | |
tree | 7642f07f3923598459a47db78305f503cedac044 | |
parent | a2d8a6d65250bbbfb3bad1a13b4ff949a0b5bdda (diff) |
better naming for functions
-rwxr-xr-x | cros-keyboard-map.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cros-keyboard-map.py b/cros-keyboard-map.py index 848e179..7a3dc41 100755 --- a/cros-keyboard-map.py +++ b/cros-keyboard-map.py @@ -23,14 +23,14 @@ vivaldi_keys = { "E7": "refresh", } -def load_physmap_data(): +def get_physmap_data(): try: with open("/sys/bus/platform/devices/i8042/serio0/function_row_physmap", "r") as file: return file.read().strip().split() except FileNotFoundError: return "" -def create_keyd_config(physmap): +def get_keyd_config(physmap): config = "" config += """[ids] k:0001:0001 @@ -98,12 +98,12 @@ def main(): parser.add_argument("-f", "--file", default="cros.conf", help="path to save config (default: cros.conf)") args = vars(parser.parse_args()) - physmap = load_physmap_data() + physmap = get_physmap_data() if not physmap: print("no function row mapping found, using default mapping") physmap = ['EA', 'E9', 'E7', '91', '92', '94', '95', 'A0', 'AE', 'B0'] - config = create_keyd_config(physmap) + config = get_keyd_config(physmap) with open(args["file"], "w") as conf: conf.write(config) |