Peter F. Patel-Schneider
94f4c3230b
rules: Device and Action rule conditions match on codename and name
2025-09-30 10:23:50 -04:00
Peter F. Patel-Schneider
20e20ce827
diversion: replace spaces by underscores when looking up features
2025-02-04 09:10:00 -05:00
DomHeadroom
90ab457ebe
Rewrote string concatenation/format with f strings
2025-01-29 08:40:14 -05:00
MattHag
fd17e47382
macOS: Add support for Bluetooth devices
...
Use hidapi on macOS to communicate and configure Logitech peripherals
connected via Bluetooth. This brings macOS device support on the same
level as Linux. However, some rules might not be supported yet on macOS.
Tested with MX Keys and MX Master 3S.
Fixes #2729
2025-01-01 11:55:10 -05:00
cameronaw13
88787ab705
settings: add back and forward mouseclick actions
2025-01-01 11:46:05 -05:00
MattHag
0cd9c0c9b5
Refactor: Introduce Feature enum
...
Convert Feature NamedInts to SupportedFeature integer enum.
Related #2273
2024-10-14 07:28:09 -04:00
MattHag
06fd32b501
Test and refactor process_notification
...
Related #2273
2024-10-14 07:28:09 -04:00
MattHag
badb76953d
Test key_is_down
...
Related #2273
2024-10-14 07:28:09 -04:00
MattHag
0dec545bfd
Fix rule saving command
2024-10-11 07:42:38 -04:00
MattHag
3277015ab6
diversion: Add type hints
2024-10-11 07:42:38 -04:00
MattHag
46366b2430
Fix warnings from automatic code inspections
...
Warnings found by automatic code inspection and partially tackled
- Drop distuitls inf favour of setuptools
- Replace deprecated pyudev.Device.from_device_number
- Remove unnecessary brackets
- Avoid access to private variables etc.
- Shadows built-in name
- Line length >120 characters
- Not a module level variable
- Simplify clause
and more
2024-10-11 07:42:38 -04:00
MattHag
b681aafaff
keysymdef: Rename key symbols
...
Name the key symbol mapping different than the module itself.
2024-10-11 07:42:38 -04:00
Peter F. Patel-Schneider
fdd2c79950
settings: allow unkonwn keys in Key rule conditions
2024-08-28 10:40:23 -04:00
MattHag
815dce07be
Unify imports in logitech package
...
Related #2273
2024-05-23 16:42:18 -04:00
MattHag
500b9998c5
Fix macOS compatibility and reenable CI tests
...
* Fix CI for macOS
* Fix error message for missing hidapi
* Skip some device and receiver tests on macOS
Tests fail on macOS, enable them when unit tests are
refined to only test the module without dependencies.
* Safe guard dbus import
2024-05-22 18:45:40 -04:00
MattHag
1d5b61fbf2
diversion: Simplify and type hint
...
- Make static method an easy testable function.
- Fix variable name clashes
2024-05-05 10:43:39 -04:00
MattHag
959dd2a35b
Refactor rule loading for testability ( #2456 )
...
rules: Introduce tests for YAML rule loading functionality.
2024-04-27 17:56:27 -04:00
Matthias Hagmann
4e6361429e
refactor: Use f-strings for more exceptions and log message
...
Semi manually convert remaining strings with no translation to f-string.
2024-03-24 07:01:56 -04:00
Peter F. Patel-Schneider
154dd7017f
rules: allow sub-second delays in Later
2024-03-14 17:08:47 -04:00
Matthias Hagmann
e92f1a8a0b
Automatically upgrade strings to f-string
...
Used flynt to convert strings to f-strings, where safely possible.
Usage:
flynt .
Related #2372
2024-03-13 11:02:50 -04:00
Peter F. Patel-Schneider
9c5ba6445e
device: remove status from Device and Receiver
2024-03-11 08:23:27 -04:00
Matthias Hagmann
7ef3059b69
clean up: Remove editor specific marks
...
Related #2273
2024-02-29 10:10:46 -05:00
Matthias Hagmann
eb937fcc3a
Manually fix linter issues
...
Related #2295
2024-02-20 15:41:10 -05: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
ce00a78e7f
rules: fix bug in Set action
2024-02-20 11:16:40 -05:00
Peter F. Patel-Schneider
ed248c62b9
device: add callback to call when changing a setting
2024-02-20 06:19:23 -05:00
Peter F. Patel-Schneider
d1c899d6da
solaar: improve imports and guard Gtk, etc imports with correct version
...
solaar: move imports to top of files
solaar: move more imports to top of files
solaar: guard Gtk, etc imports with correct version
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider
31d795fcb8
device: improve imports in logitech_receiver
...
device: move some imports to top of modules
device: break up imports loop with device descriptors
device: break up imports loop by moving a function from notifications.py to setting_templates.py
device: break import loop between device.py and diversion.py by using device to access method
2024-02-18 06:21:35 -05:00
MattHag
87658fb189
logging: Simplify logger instantiation
...
* logging: Simplify logger instantiation
Relates #2254
* logging: Remove aliases
Relates #2254
* logging: Replace deprecated warn with warning
Related #2254
* logging: Fix mistake
Related #2257
2024-02-10 13:55:27 -05:00
Peter F. Patel-Schneider
0db84f5aa4
rules: write empty file if there are no rules to save
2024-01-28 15:36:28 -05:00
Peter F. Patel-Schneider
fa7606e242
rules: style fix
2023-11-28 16:45:34 -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
ffd66e74c2
rules: fix test for device equality
2023-11-08 10:05:53 -05:00
Peter F. Patel-Schneider
90a0408bd6
rules: add single depress and release options for rule mouse click action
2023-09-16 10:28:56 -04:00
Peter F. Patel-Schneider
fc38862e8b
rules: add rule condition for hostname
2023-09-16 10:28:56 -04:00
Swapnil Devesh
0e8e052629
Documentation update to mention the gnome extension to get rules working under Wayland ( #2103 )
...
* Documentation update to mention the gnome extension to get rules working under Wayland
* Updates
* Updates
2023-08-01 07:20:52 -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
Peter F. Patel-Schneider
46a06f3870
device: fix bug in decoding G keys notification
2023-04-13 09:59:11 -04:00
Peter F. Patel-Schneider
55865d13ad
rules: add Test condition for battery charging
2023-02-25 19:25:43 -05:00
Peter F. Patel-Schneider
df746fd7f4
rules: add Device condition
2023-02-18 11:25:25 -05:00
Peter F. Patel-Schneider
6cbd45a1c0
rules: add more debugging output for rules
2023-02-03 09:12:59 -05:00
Peter F. Patel-Schneider
bfe4993e54
rules: add KeyIsDown condition
2022-12-17 13:21:52 -05:00
Peter F. Patel-Schneider
39ae8d4b32
rules: add argument to thumb_wheel rules
2022-12-11 17:27:37 -05:00
ejsc1
5656f90cdb
misc: update yapf version
...
* misc: update yapf version v2
* Update .pre-commit-config.yaml
Co-authored-by: Peter F. Patel-Schneider <pfpschneider@gmail.com>
2022-11-26 22:37:32 -05:00
Peter F. Patel-Schneider
9a89ef30d3
rules: fix bug causing repeated later execution
2022-09-26 09:36:46 -04:00
Peter F. Patel-Schneider
619223e8be
rules: add Later action
2022-09-26 09:36:46 -04:00
Peter F. Patel-Schneider
7663e204bb
rules: don't check modifiers for KeyPress actions that are not clicks
2022-09-20 21:03:28 -04:00
Peter F. Patel-Schneider
002ca8bdcb
rules: fix bug with non-recognized empty mouse movement
2022-09-07 11:34:46 -04:00
Peter F. Patel-Schneider
9f8882acd8
rules: add rule condition to test whether a device is active
2022-08-23 09:18:57 -04:00
Peter F. Patel-Schneider
7ab7bf6c1a
rules: downgrade Set prolem messages from error to warning
2022-08-23 08:29:15 -04:00