Skip to content

Refactor to modern CustomTkinter GUI with modular architecture - #1

Merged
DynamycSound merged 1 commit into
mainfrom
claude/inspiring-bell-u3r22l
Jun 11, 2026
Merged

Refactor to modern CustomTkinter GUI with modular architecture#1
DynamycSound merged 1 commit into
mainfrom
claude/inspiring-bell-u3r22l

Conversation

@DynamycSound

Copy link
Copy Markdown
Owner

Summary

Complete rewrite of the Window Control Tool from a basic Tkinter GUI to a modern, modular application using CustomTkinter. The codebase is now properly structured as a Python package with separated concerns: GUI, hotkey engine, window actions, and configuration management.

Key Changes

  • New GUI (src/window_control_tool/gui.py): Modern CustomTkinter interface with a sidebar navigation system featuring four pages (Home, Hotkeys, Settings, About). Replaces the old Tkinter-based togglewindowsGUI.py with a cleaner, more maintainable design.

  • Modular architecture:

    • hotkeys.py: Global hotkey registration and management with the HotkeyEngine class
    • window_actions.py: Isolated win32 window operations (move, resize, opacity, always-on-top)
    • config.py: Persistent settings stored in %APPDATA%\WindowControlTool instead of local JSON files
    • __main__.py: Proper entry point for both source and packaged exe execution
  • Removed legacy files: Deleted togglewindows.py, togglewindowsGUI.py, GUI.vbs, and related configuration files (move_pixels.txt, settings.json, image assets)

  • License change: Replaced GPLv2 with MIT license

  • Project metadata: Added pyproject.toml for proper Python packaging, requirements.txt for dependencies, and comprehensive documentation (README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md)

  • CI/CD: Added GitHub Actions workflow (.github/workflows/build.yml) for linting, building Windows exe with PyInstaller, and automated releases

  • Issue templates: Added bug report and feature request templates for better issue management

Notable Implementation Details

  • Settings now persist automatically to the user's application data directory, making the tool portable and not requiring write access to its installation folder
  • The hotkey engine runs in a separate thread and communicates status updates to the GUI via callbacks
  • Window actions return human-readable status strings for the activity log instead of silent operations
  • The GUI supports dark, light, and system appearance modes with theme persistence
  • Hotkey reference is a single source of truth used both in the GUI and for documentation
  • Cross-platform awareness: gracefully handles non-Windows systems with preview mode

https://claude.ai/code/session_011BNLUVMFyL8WymEQG8myTp

- Replace the legacy Tkinter GUI + VBS/BAT launchers with a single
  CustomTkinter app (sidebar navigation: Home, Hotkeys, Settings, About)
- Run the hotkey engine in-process instead of a subprocess with
  move_pixels.txt file IPC; hotkeys are unchanged
- Move help and theme popups into proper pages inside the app
- Persist settings to %APPDATA%\WindowControlTool\settings.json
- Fix the broken multi-monitor hotkey (missing win32api import) and
  make it wrap around monitors
- Add packaging (pyproject.toml, requirements.txt) and a GitHub Actions
  workflow that lints, builds WindowControlTool.exe and attaches it to
  releases on version tags
- Add README, CONTRIBUTING, CODE_OF_CONDUCT, issue/PR templates,
  .gitignore; relicense under MIT
- Remove the old scripts and assets

https://claude.ai/code/session_011BNLUVMFyL8WymEQG8myTp
@DynamycSound
DynamycSound merged commit 379f19f into main Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant