Contributions and questions are always welcome! Here's just a couple of things to keep in mind:
- Remember to search the GitHub Issues before making a bug report or feature request.
- Please open an issue to discuss changes before creating a pull request.
OneLauncher uses Poetry for dependency management. Run poetry install
in the root folder of this repository to get everything set up. Once installed, OneLauncher can be started with poetry run onelauncher
. Alternatively, Nix can be used.
OneLauncher comes with a Nix flake for easily replicating the standard development environment. It can be used with direnv or the nix develop
command. When using Nix, dependencies aren't installed with poetry. poetry add
, ect can still be used for editing the dependency files, but poetry run
should not be used.
There is also an FHS environment for testing compiled builds. It can be accessed with nix develop .#fhs
.
Build by running poetry run python -m build
in the project's root directory. This will output everything to "build/out".
Individual scripts can also be called to skip parts of the build or pass arguments to the build tool.
The .NET CLI is required for building the Windows installer.
OneLauncher uses Weblate for translations. You can make an account and contribute translations through their site. See the project page here.
All code is strictly type checked with Mypy and both linted and formatted with Ruff. Pytest unit tests are encouraged.
User interfaces are defined in .ui
files that can be visually edited in pyside6-designer. You can use the command onelauncher designer
to launch pyside6-designer with OneLauncher's plugins enabled.
UI files must be compiled into Python to be used in OneLauncher. This can be done with pyside6-uic src/onelauncher/example_window.ui -o src/onelauncher/ui/example_window_uic.py
, replacing "example_window" with the one being updated.
OneLauncher uses a system similar to Tailwind CSS for styling UIs responsively.
Here's how it works:
- The dynamic property
qssClass
is added to the widget that needs to be styled. This property should always be of the typeStringList
. - Each string in
qssClass
is a "class" that will affect the widget's styling. This works by selecting for them in dynamically generated Qt Style Sheets. - The classes are mainly used to set sizes and margins relative to the system font size. Changes can be previewed live in pyside6-designer.
- See the Tailwind Docs for specific class names. The currently supported types are padding, margin, width, min-width, max-width, height, min-height, max-height, font-size, and icon-size.