Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bug report
description: Something isn't working as expected
labels: ["bug"]
body:
- type: textarea
id: what-happened
attributes:
label: What happened?
description: A clear description of the bug.
placeholder: When I press Shift + Right, the window...
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to reproduce
placeholder: |
1. Open the app
2. Enable hotkeys
3. ...
validations:
required: true
- type: input
id: windows-version
attributes:
label: Windows version
placeholder: e.g. Windows 11 24H2
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: How are you running the tool?
options:
- Release exe
- From source (python -m window_control_tool)
validations:
required: true
- type: textarea
id: logs
attributes:
label: Activity log / error output
description: Paste anything relevant from the app's Activity log or the console.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions & ideas
url: https://github.com/DynamycSound/window_control_tool/discussions
about: For general questions, use Discussions instead of issues.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Feature request
description: Suggest an idea or improvement
labels: ["enhancement"]
body:
- type: textarea
id: problem
attributes:
label: What problem would this solve?
placeholder: I always have to..., it would be easier if...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
placeholder: A hotkey that..., a setting for...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives you've considered
15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Pull request

## What does this PR do?

<!-- Short description of the change and why it's needed. -->

## Related issue

<!-- e.g. Fixes #12 — or "none" -->

## Checklist

- [ ] I tested the change on Windows (if it touches window/hotkey behaviour)
- [ ] `ruff check src` passes
- [ ] I updated the README / hotkey reference if user-facing behaviour changed
61 changes: 61 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build

on:
push:
branches: [main]
tags: ["v*"]
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: Lint
run: ruff check src

build-exe:
runs-on: windows-latest
needs: lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pyinstaller
- name: Build exe
run: >
pyinstaller --noconfirm --onefile --windowed
--name WindowControlTool
--collect-all customtkinter
src/window_control_tool/__main__.py
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: WindowControlTool
path: dist/WindowControlTool.exe

release:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build-exe
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: WindowControlTool
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: WindowControlTool.exe
generate_release_notes: true
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Python
__pycache__/
*.py[cod]
*.egg-info/
.venv/
venv/
build/
dist/
*.spec.bak

# Tooling
.ruff_cache/
.pytest_cache/

# OS / editor
.DS_Store
Thumbs.db
.idea/
.vscode/
37 changes: 37 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Code of Conduct

## Our Pledge

We as members, contributors, and maintainers pledge to make participation in
this project a harassment-free experience for everyone, regardless of age,
body size, visible or invisible disability, ethnicity, sex characteristics,
gender identity and expression, level of experience, education, socio-economic
status, nationality, personal appearance, race, religion, or sexual identity
and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment:

- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Focusing on what is best for the community and the project

Examples of unacceptable behavior:

- Trolling, insulting or derogatory comments, and personal attacks
- Harassment in public or private
- Publishing others' private information without explicit permission

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by opening an issue or contacting the maintainer. All complaints
will be reviewed and investigated promptly and fairly. Maintainers may remove,
edit, or reject comments, commits, code, issues, and other contributions that
are not aligned with this Code of Conduct.

## Attribution

This Code of Conduct is adapted from the
[Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Contributing to Window Control Tool

Thanks for your interest in contributing! All kinds of contributions are
welcome: bug reports, feature ideas, documentation fixes and code.

## Reporting bugs / requesting features

- Use the [issue templates](https://github.com/DynamycSound/window_control_tool/issues/new/choose).
- For bugs, include your Windows version, Python version (if running from
source), and steps to reproduce.

## Development setup

```bash
git clone https://github.com/DynamycSound/window_control_tool.git
cd window_control_tool
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
pip install ruff
python -m window_control_tool
```

The codebase lives in `src/window_control_tool/`:

| File | Purpose |
| --- | --- |
| `gui.py` | The CustomTkinter GUI (pages, navigation, activity log) |
| `hotkeys.py` | Global hotkey registration and the hotkey reference table |
| `window_actions.py` | The actual win32 window operations |
| `config.py` | Settings persistence (`%APPDATA%\WindowControlTool`) |

## Code style

- Run `ruff check src` before committing — CI runs the same check.
- Keep functions small and prefer plain, readable code over cleverness.
- All win32 calls belong in `window_actions.py`; hotkey actions must never
raise (wrap risky calls so the listener keeps running).

## Pull requests

1. Fork the repo and create a branch from `main`.
2. Make your change, test it on Windows if it touches window behaviour.
3. Update the README / hotkey reference if you change user-facing behaviour.
4. Open a PR with a clear description of what and why.

Small, focused PRs are much easier to review than large ones.

## License

By contributing, you agree that your contributions will be licensed under the
[MIT License](LICENSE).
2 changes: 0 additions & 2 deletions GUI.vbs

This file was deleted.

Loading
Loading