Commit Graph

57 Commits

Author SHA1 Message Date
gnotree ✟🕊︎ 9344466949
Add installation guide for Solaar on RHEL 10 (#3158)
* Add installation guide for Solaar on RHEL 10

Document steps to install and run Solaar on RHEL 10, including environment setup and troubleshooting.

* Add interactive RHEL installer script
2026-03-08 20:54:31 -04:00
Ruffin ec5b406909
misc: Use PATH instead of hardcoded absolute paths (#3014)
for better shebang and multi platform support
2025-11-04 03:28:10 +09: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
Matthias Hagmann 7774569971 Apply ruff format
Run ruff auto formatting using:
ruff format .

Related #2295
2024-02-20 15:41:10 -05:00
Peter F. Patel-Schneider 253930d628 tools: fix bug in scan-registers 2023-09-16 10:35:26 -04:00
Peter F. Patel-Schneider 8dd8c8b76f tools: allow device 0 in hidconsole 2023-08-12 14:51:31 -04:00
Peter F. Patel-Schneider 0a91160a67 misc: restore tools/clean.sh 2023-05-19 09:38:53 -04:00
Peter F. Patel-Schneider fd9653fa33 tools: update scan-registers.sh to fix a bug and scan pairing registers 2023-05-19 07:14:10 -04:00
Peter F. Patel-Schneider acd8fc77ca tools: remove unnecessary clean.sh 2022-12-17 13:30:23 -05:00
Peter F. Patel-Schneider 727e964a77 tools: remove non-working monitor.py 2022-12-17 13:30:23 -05:00
ejsc1 0c7a9dd0a7
misc: update isort to current version
* Update .pre-commit-config.yaml

* Update solaar

* Update udev.py

* Update __init__.py

* Update gtk.py

* Update i18n.py

* Update listener.py

* Update icons.py

* Update notify.py

* Update hidconsole

* Update gtk.py

* Update icons.py

Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2022-11-26 13:58:46 -05:00
Hugo Osvaldo Barrera 22bf4fafff Drop unnecessary __future__ imports
These are all active by default on all recent Python versions.
2021-10-30 16:49:41 -04:00
Filipe Laíns 8e89aa0038 yapf: set max line lenght to 127
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 33521558ed pre-commit: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns e6369e0c3c isort: intial import fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 72a8d311bc yapf: change code style to yapf
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Dmitriusan bd26b9340d
scripts/debian: switch to python3 2020-02-06 19:06:47 +01:00
Chris Johnston f88951c56d Squash previous changes and rebase master branch
Set theme jekyll-theme-slate

update _config.yml

move some files around

add an index file

delete files that will no longer be needed

include jekyll front matter

Update the index page layout to use updated template

re-create the page layout from the updated template

add a favicon

remove manual gh pages build script

use master branch docs/ folder instead

add favicon to default layout

move layouts and includes back because of restriction with gh pages

testing: move index back into project root

move everything under docs, including config.yml

dont put the favicon in _includes

Fix building locally, fix logo

- resize the original logo document so that it doesn't have extra whitespace
- style the logo to match the original page
- fix issue when building locally, repo format was incorrect

Ignore files that are specific to documentation

add a readme that describes how to build the docs

remove downloads, since installation instructions are provided elsewhere

fix broken links in index page

fix the page header on all non-index pages

use site.baseurl for images

fix urls when on testing site with baseurl
2019-07-27 15:56:53 +01:00
Daniel Pavel 95a6412d5c po-update.sh without arguments re-formats all translation files 2013-08-08 22:22:39 +02:00
Daniel Pavel 9c67b1b494 debian packaging updates 2013-08-08 21:49:35 +02:00
Daniel Pavel 53abd22176 packaging: add compiled locale files 2013-07-24 11:06:58 +02:00
Daniel Pavel 5e6761c61b use relative paths in .pot/.po comments
otherwise the comments get changed when someone else run po-update
2013-07-23 22:48:59 +02:00
Adrian 'Nexces' Piotrowicz 58fcb074ff Updated po-update.sh script for use in (x)buntu.
Added another location to scan in function unfmt() due to fact that gtk30.mo and gtk30-properties.mo are found in /usr/share/locale-langpack/ instead of /usr/share/locale/.
2013-07-23 10:49:25 +02:00
Daniel Pavel 8112e90ded website: replace the png logo with embedded svg 2013-07-16 16:36:00 +02:00
Daniel Pavel ce9b10dc2d started i18n support 2013-07-15 17:16:44 +02:00
Daniel Pavel 81765ee971 clean-ed up and documented gh_pages build script 2013-07-06 18:10:05 +02:00
Daniel Pavel b72273b2a9 jekyll: made all image/css links relative 2013-07-06 18:08:52 +02:00
Daniel Pavel 0914e4c48d scan-registers: more lax interpretation of arguments 2013-07-01 19:01:37 +02:00
Daniel Pavel a857b5fc43 fixed transparency in generated site icons 2013-06-25 17:11:28 +02:00
Daniel Pavel eb8791ec47 fixed gh_pages script to use solaar.svg 2013-06-25 16:18:05 +02:00
Daniel Pavel 2d6fab6e14 gh_pages build script updated 2013-06-17 16:48:04 +02:00
Daniel Pavel 7df2e8af97 jekyll config update, tweaked deb/gh scripts 2013-06-05 13:20:26 +02:00
Daniel Pavel dd051f4c6e check latest github tag when generating gh-pages 2013-06-03 21:58:53 +02:00
Daniel Pavel b99a851af3 build deb-repo Packages index in $SITE/packages 2013-06-02 12:14:20 +02:00
Daniel Pavel 48b176f49a show result on reg00 unparsable output 2013-05-23 04:58:35 +03:00
Daniel Pavel b276fbab90 updated scan-registers to support receiver scan 2013-05-22 20:47:04 +03:00
Daniel Pavel 4ba50267f1 add favicon when building site 2013-05-22 01:25:45 +03:00
Daniel Pavel d857144653 added script to build gh-pages with jekyll 2013-05-21 01:12:04 +03:00
Daniel Pavel e2cf9255ac Merge pull request #41 from Lekensteyn/tool-updates
scan-registers: determine available notifications
2013-05-17 12:44:23 -07:00
Daniel Pavel b67377c41e minor clean-up in hidconsole 2013-05-06 15:35:47 +02:00
Peter Wu a85aa2da52 scan-registers: determine available notifications
00 is documented in HID++ 1.0 specification, it should be safe to set the 00
register. As another program may have written the notifications register
already and since enabling notifications has side-effects such as "disabling"
certaing functions, restore the flags after reading out available notifs.
2013-05-05 18:16:00 +02:00
Daniel Pavel 1b4bf7918b minor fixes in shell scripts 2013-05-04 19:00:14 +02:00
Daniel Pavel d7dd9393ff minor clean-ups 2013-05-04 17:19:48 +02:00
Peter Wu a6b89b3ea3 Python3 compatibility for hidconsole
`type(u'')` is 'str' in Python 3, it was `unicode` on Python 2 (with
`unicode_literals` from `__future__`).
2013-05-02 22:58:35 +02:00
Daniel Pavel 079ef8d800 incipient support for the Nano receiver 2013-04-28 14:27:16 +02:00
Daniel Pavel e7d19c9084 small fixes to hidconsole 2013-04-28 14:00:46 +02:00
Daniel Pavel 7d76ce77c9 packaging updates for debian/ubunutu 2013-01-05 17:40:06 +02:00
Daniel Pavel 3d48cbc111 updated debian packaging script, added ppa build script 2013-01-05 15:50:37 +02:00
Daniel Pavel 36f34da227 proper debian packaging, dropper stdeb 2013-01-05 11:48:35 +02:00
Daniel Pavel 41e84e55f1 fix hidconsole input 2013-01-04 10:59:00 +02:00