From: mar77i Date: Fri, 19 Sep 2025 19:14:28 +0000 (+0200) Subject: minor cleanups X-Git-Url: https://git.mar77i.info/?a=commitdiff_plain;h=f86726dde447dd77c5f29e4df07301100317a1a6;p=zenbook_gui minor cleanups --- diff --git a/keyboard/keyboard.py b/keyboard/keyboard.py index fe1c8ce..26e77c6 100644 --- a/keyboard/keyboard.py +++ b/keyboard/keyboard.py @@ -60,7 +60,7 @@ class Root(BaseRoot): widget_width = size[0] // (3 if len(widget_row) == 3 else 2) x = 0 if len(widget_row) > 0 else size[0] // 4 for keyset in widget_row: - rect = pygame.Rect((x, half_height), (widget_width, half_height)) + rect = pygame.Rect((x, widget_top), (widget_width, half_height)) if keyset is MousePadWidget: keyset(self, rect, self.click_cb, self.move_cb) elif keyset is ClockWidget: diff --git a/keyboard/sounds/Clutch.mp3 b/keyboard/sounds/Clutch.mp3 index 2a4bcf1..c6d9e03 100644 Binary files a/keyboard/sounds/Clutch.mp3 and b/keyboard/sounds/Clutch.mp3 differ diff --git a/keyboard/sounds/Flicker_Sound_Effect.mp3 b/keyboard/sounds/Flicker_Sound_Effect.mp3 index db8df4f..c807e62 100644 Binary files a/keyboard/sounds/Flicker_Sound_Effect.mp3 and b/keyboard/sounds/Flicker_Sound_Effect.mp3 differ diff --git a/launch.py b/launch.py index ae75ddb..39ecddd 100755 --- a/launch.py +++ b/launch.py @@ -122,26 +122,13 @@ def setup_venv(): raise SystemError("'venv' is not a directory.") run_cmd((sys.executable, "-m", "venv", str(venv_dir))) os.environ.update(get_venv_environ(venv_dir)) - has_pkgs = ( - venv_dir_is_dir - and all(check_has_pkg(pkg) for pkg in pkgs) - ) + has_pkgs = (venv_dir_is_dir and all(check_has_pkg(pkg) for pkg in pkgs)) if get_ipv4_is_connected(): yesterday = time() - 86400 if not has_pkgs or all( p.stat().st_mtime < yesterday for p in walk_outer(venv_dir) ): - run_cmd( - ( - executable, - "-m", - "pip", - "install", - "-qU", - "pip", - *pkgs - ) - ) + run_cmd((executable, "-m", "pip", "install", "-qU", "pip", *pkgs)) venv_dir.touch(0o755, True) elif not has_pkgs: raise ConnectionError("Internet needed to install requirement: pygame") diff --git a/requirements.txt b/requirements.txt index 0f13c09..44d4673 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,5 @@ evdev==1.9.2 pygame==2.6.1 +pynput==1.8.1 +python-xlib==0.33 +six==1.17.0