* Add scripts to create macOS app bundle and LaunchAgent #1244 This change introduces two new helper scripts for macOS users to improve integration with the operating system. The `create-macos-app.sh` script builds a minimal `.app` wrapper for Solaar. This allows Solaar to be treated as a standard macOS application, enabling it to request necessary permissions, such as input monitoring, and to be discoverable by the OS. The script generates the required directory structure, a wrapper executable to launch Solaar, a standard `Info.plist` file, and an application icon from the source PNG. The `create-macos-launchagent.sh` script sets up a LaunchAgent to automatically start Solaar at login and keep it running in the background. This ensures that the Solaar process is always available for device management without requiring manual intervention from the user. The script also configures log file locations for standard output and error streams. Together, these scripts provide a more native and user-friendly experience for Solaar on macOS. https://github.com/pwr-Solaar/Solaar/issues/1244 * Fix icon in script to create macOS app bundle #1244 https://github.com/pwr-Solaar/Solaar/issues/1244 * build: Remove hardcoded Homebrew path for solaar in macOS script The `create-macos-app.sh` script previously defaulted to a hardcoded Homebrew path for the `solaar` executable. This change removes the specific path, defaulting instead to `solaar`. This modification makes the script more flexible and robust. It allows the system's `PATH` to resolve the location of the `solaar` binary, accommodating various installation methods beyond a fixed Homebrew directory. The explicit check for the executable's existence is also removed, as the script will now rely on the command being available in the shell's environment, which is a more standard approach. * refactor(macos): Improve solaar executable lookup in launchagent script This change improves how the `create-macos-launchagent.sh` script locates the `solaar` executable. Previously, the script defaulted to a hardcoded path (`/opt/homebrew/bin/solaar`) and would exit with an error if that specific file was not found and executable. This was too restrictive and failed in environments where `solaar` is installed in a different location, such as through `pipx` or in standard system paths like `/usr/local/bin`. Now, the script defaults the `SOLAAR_PATH` to just `solaar` and uses the `command -v` utility to find the executable in the user's `PATH`. This allows the system to resolve the correct location of the `solaar` binary automatically. If the executable cannot be found in the `PATH`, the script now issues a warning instead of exiting, and proceeds to use the provided `SOLAAR_PATH` value in the generated LaunchAgent plist. This makes the script more flexible and robust for different installation methods. * refactor(macos): Improve solaar executable lookup in launchagent script This change improves how the `create-macos-launchagent.sh` script locates the `solaar` executable. Previously, the script defaulted to a hardcoded path (`/opt/homebrew/bin/solaar`) and would exit with an error if that specific file was not found and executable. This was too restrictive and failed in environments where `solaar` is installed in a different location, such as through `pipx` or in standard system paths like `/usr/local/bin`. Now, the script defaults the `SOLAAR_PATH` to just `solaar` and uses the `command -v` utility to find the executable in the user's `PATH`. This allows the system to resolve the correct location of the `solaar` binary automatically. If the executable cannot be found in the `PATH`, the script now issues a warning instead of exiting, and proceeds to use the provided `SOLAAR_PATH` value in the generated LaunchAgent plist. This makes the script more flexible and robust for different installation methods. * refactor: Improve Solaar path resolution in macOS helper scripts This change improves the robustness of the macOS helper scripts by ensuring the Solaar executable is found before proceeding. Previously, `create-macos-launchagent.sh` would only issue a warning and continue with a potentially invalid path if the `solaar` command was not found. `create-macos-app.sh` had a typo (`SOLAR_PATH`) and lacked a check altogether. Now, both scripts (`create-macos-app.sh` and `create-macos-launchagent.sh`) will: - Correctly check if the `solaar` executable exists in the system's `PATH`. - Use the resolved, absolute path to the executable to avoid ambiguity. - Exit with an error if the executable cannot be found, preventing the creation of a broken app bundle or launch agent. * feat(macos): Relaunch app to fix tray icon and add Dock icon This change modifies the macOS app bundle creation script to improve the application's behavior and user experience on macOS. Previously, when Solaar was launched as a standard `.app` bundle, macOS restrictions sometimes prevented the GTK tray icon from appearing correctly. This change introduces a workaround in the wrapper script. The application now relaunches itself as a detached background process on the first launch. This new, detached process is no longer subject to the same `.app` bundle restrictions, allowing the tray icon to be created reliably. Additionally, the `LSUIElement` key in the `Info.plist` is set to `false`. This makes Solaar a regular application with an icon in the Dock, which is the standard behavior expected by most macOS users for a graphical application. * docs: Explain macOS Python.app Dock icon limitation This change adds a comment to the `create-macos-app.sh` script to explain why the Solaar application may still show a Dock icon on macOS, even when it is not desired for a background utility. On macOS, Python often runs as `Python.app`, which has its own `Info.plist` file. This built-in `Info.plist` takes precedence over the one generated for the Solaar app bundle. As a result, settings like `LSUIElement=true`, which would normally hide the Dock icon, are overridden. This comment clarifies that this behavior is a known limitation of the Python distribution on macOS and not a bug in the Solaar packaging script. * docs: Add instructions for creating macOS launcher options This update enhances the installation guide by including steps to set up macOS launchers for Solaar. Two options are provided: - LaunchAgent for automatic background execution and crash recovery. - App launcher for manual addition to Login Items. |
||
|---|---|---|
| .github | ||
| bin | ||
| docs | ||
| lib | ||
| po | ||
| rules.d | ||
| rules.d-uinput | ||
| share | ||
| tests | ||
| tools | ||
| .coveragerc | ||
| .git-blame-ignore-revs | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| .python-version | ||
| CHANGELOG.md | ||
| COPYRIGHT | ||
| LICENSE.txt | ||
| MANIFEST.in | ||
| Makefile | ||
| README.md | ||
| RELEASE.md | ||
| Release_Notes.md | ||
| mkdocs.yml | ||
| pyproject.toml | ||
| release.sh | ||
| setup.py | ||
README.md
Solaar
Solaar is a Linux manager for many Logitech keyboards, mice, and other devices that connect wirelessly to a Unifying, Bolt, Lightspeed or Nano receiver as well as many Logitech devices that connect via a USB cable or Bluetooth. Solaar is not a device driver and responds only to special messages from devices that are otherwise ignored by the Linux input system.
More Information - Usage - Capabilities - Rules - Manual Installation - Known Issues
Solaar supports:
- pairing/unpairing of devices with receivers
- configuring device settings
- custom button configuration
- running rules in response to special messages from devices
For more information see the main Solaar documentation page. -
Installation Packages
Up-to-date prebuilt packages are available for some Linux distros (e.g., Fedora) in their standard repositories. If a recent version of Solaar is not available from the standard repositories for your distribution, you can try one of these packages:
- Arch solaar package in the extra repository
- Ubuntu/Kubuntu package in Solaar stable ppa
- NixOS Flake package in Svenum/Solaar-Flake
Solaar is available from some other repositories but may be several versions behind the current version:
- a Debian package, courtesy of Stephen Kitt
- a Ubuntu package is available from universe repository
- a Gentoo package, courtesy of Carlos Silva and Tim Harder
- a Mageia package, courtesy of David Geiger