Commit Graph

71 Commits

Author SHA1 Message Date
Peter F. Patel-Schneider 4525704793 docs: document change to use uinput only 2026-03-08 20:58:43 -04:00
Din Tort f12632b45e docs: Fix typo in installation instructions for pip/pipx 2025-11-15 15:46:03 -05:00
Nils Bergmann 7963215fa2 docs: swap commands
The commands were probably meant to be the other way around. 

And I also think there is something missing in the sentence "and then run
`pip install --user solaar` or `pipx install --system-site-packages solaar` or
If you are using pipx add the `` flag.", but I was not sure.
2025-11-15 14:06:02 -05:00
Din Tort e906b83103
MacOS: app wrapper and launch agent scripts #1244 (#3008)
* 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.
2025-10-30 07:20:55 -04:00
Peter F. Patel-Schneider abc5a31c15 install: fix bug in apt install target 2025-09-08 09:55:21 -04:00
Peter F. Patel-Schneider 1a9725f540 doc: update status of hid_parser 2025-05-21 11:52:31 -04:00
mattdale77 c7a54cf7ec Update installation.md
Fix link to the desktop file
2025-05-21 11:51:50 -04:00
Peter F. Patel-Schneider b9557a46b6 docs: mention typing dependency 2025-01-02 15:05:12 -05:00
Peter F. Patel-Schneider a90a367609 docs: add requirement for CONFIG_HIDRAW 2024-03-07 16:32:41 -05:00
Peter F. Patel-Schneider e8dadcd5c2 doc: update installation documentation 2024-02-23 13:30:52 -05:00
MattHag c66f3c3fe1
udev: Simplify installation of udev rules
* Simplify installation of udev rules

Fixes #2263

* udev: Shorten udev installation description

Related #2263

* udev: Shorten udev installation description

Related #2263

* udev: Update installation of udev rules

Related #2263

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update Makefile

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update Makefile

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

* Update docs/installation.md

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>

---------

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2024-02-12 18:08:40 -05:00
Anton Soroko ac231a0627
docs: Update installation.md with new udev rules location (#2234)
location was changed in 
cf71736920
2024-01-30 14:47:38 -05:00
markopy 29ff35d553
Partial support for macOS and Windows (#1971)
* Add support for macOS via hidapi

* Style fixes

* Ignore keyboard and mouse input devices

* Don't require pyudev on mac and windows

* Fix debug log format error

* More logging for failed hidpp checks

* Don't try to load hid_darwin_set_open_exclusive on windows

* Bring back button for rule editor since some rules will work

---------

Co-authored-by: markopy <(none)>
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2023-11-28 16:25:17 -05:00
Peter F. Patel-Schneider 5ca1790cb8 ui: better handling and installation of icons 2023-11-19 12:06:04 -05:00
Peter F. Patel-Schneider e71ed8ac94 docs: add note about other GTK system packages 2023-11-04 13:30:03 -04:00
Peter F. Patel-Schneider 620cc82956 docs: add instructions for pipx 2023-11-04 13:29:38 -04:00
Swapnil Devesh 91f1894e8b
Add support for process condition under wayland using solaar-gnome-extension (#2101)
* Add support for process condition under wayland using solaar-gnome-extension

* Fix typo

* Improvements

* Rename dbus extension

* Final fixes

* Fix style checks

* More styling fixes

* More fixes

* More fixes

---------

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2023-07-26 06:53:57 -04:00
John Veness 6b94412044
docs: Fix wording in installation.md (#2040) 2023-04-06 09:25:44 -04:00
Peter F. Patel-Schneider 17c30a22bb docs: update installation instructions 2022-11-19 16:15:13 -05:00
Peter F. Patel-Schneider e699209370 install: add depdendency on typing_extensions 2022-11-03 07:22:00 -04:00
Peter F. Patel-Schneider b5f6a509c9 cli: don't defer saves in cli and don't require gtk in cli 2022-10-30 12:09:30 -04:00
Peter F. Patel-Schneider 8d0795af53 solaar: make hid-parser an optional dependency 2022-10-25 10:51:23 -04:00
Peter F. Patel-Schneider 049dfcecbc release 1.1.6rc2 2022-10-13 16:20:53 -04:00
Peter F. Patel-Schneider cb22bc63e1 docs: update cloning instruction to also clone submodule 2022-10-13 16:14:30 -04:00
Peter F. Patel-Schneider 3e90c3bc8a hidapi: process hid report descriptors to identify devices 2022-10-13 16:14:30 -04:00
Peter F. Patel-Schneider 34685852aa doc: improve documentation on library needed for system tray integration 2022-06-24 09:43:30 -04:00
Peter F. Patel-Schneider 0e1522aa62 dist: update required python version to 3.7 2022-04-01 16:41:55 -04:00
Peter F. Patel-Schneider fc2b8accbf rules: handle missing libX11 more gracefully and document dependency 2022-03-31 10:06:30 -04:00
Peter F. Patel-Schneider b5c6cf8d63 doc: add information on rules under Wayland and uinput permissions 2022-03-19 21:09:45 -04:00
Muhammad Talal Anwar cfe67d4f30 docs: fix typo 2021-12-09 16:59:21 -05:00
Francisco Robles Martín ab76053fb3 docs: provide pointer to autostart desktop file
Signed-off-by: Francisco Robles Martín <f.robles.martin@pm.me>
2021-11-16 13:21:10 -05:00
Peter F. Patel-Schneider 5488593caa doc: update installation instructions to mention Python versions 2021-09-14 11:51:48 -04:00
Peter F. Patel-Schneider 8854ca6f23 docs: update advice on kernel versions 2021-06-15 19:03:43 -04:00
Peter F. Patel-Schneider 4edbf51f17 ui: better message for missing udev file 2021-04-21 08:53:41 -04:00
Peter F. Patel-Schneider d3799dcf41 docs: minor updates and cleanup 2021-04-18 11:13:50 -04:00
Peter F. Patel-Schneider e66a83aa36 docs: sudo should not be used to run Solaar 2021-04-12 19:05:11 -04:00
Peter F. Patel-Schneider 5aa45a78c3 docs: update package dependencies 2021-03-23 22:31:04 -04:00
Peter F. Patel-Schneider 8d01e28138 release 1.0.5rc2 2021-02-18 15:04:18 -05:00
Peter F. Patel-Schneider 7d0402a97f rules: only use X11 code when X11 is available 2020-11-28 09:41:59 -05:00
Peter F. Patel-Schneider 244d48d245 rules: remove use of pynput 2020-11-27 10:12:21 -05:00
Bruno Mello 56db8fbdf9 Update installation.md
Fix spelling of python psutil package
2020-11-23 18:12:18 -05:00
Peter F. Patel-Schneider 66138ad7c0 docs: add instructions on Python development package 2020-11-21 12:32:33 -05:00
Peter F. Patel-Schneider 3d8c9272fb install: update and document new dependencies 2020-11-17 17:07:32 -05:00
Peter F. Patel-Schneider 3effccf390 docs: update for USB and Bluetooth 2020-09-29 11:26:34 -04:00
Peter F. Patel-Schneider f5c00a5f2a docs: mention that Solaar udev rule is needed for access to device hidraw nodes 2020-08-25 07:28:09 -04:00
John Erling Blad aaee650caf cleanup and lint the docs 2020-08-02 11:25:00 -04:00
Peter F. Patel-Schneider 59296f41ca docs: add instructions on translations to docs/installation.md 2020-07-31 06:21:48 -04:00
Peter F. Patel-Schneider 11bc5bde37 docs: add warning about running Solaar as root 2020-07-27 10:21:55 -04:00
Peter F. Patel-Schneider 07b42e2b34 dist: require Python 3.6 2020-07-25 21:25:16 -04:00
Peter F. Patel-Schneider e4d3f5e61e dist: don't install files in /etc from setup.py 2020-07-25 21:25:16 -04:00