From bc6214c66ea79afeb294d4ee8d4ddf41df2668c0 Mon Sep 17 00:00:00 2001 From: Anton Bambura Date: Mon, 12 Feb 2024 15:49:04 +0200 Subject: better naming for functions --- cros-keyboard-map.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'cros-keyboard-map.py') 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) -- cgit 1.4.1-2-gfad0