Commit Graph

153 Commits

Author SHA1 Message Date
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 b957217ea8 receiver: delay device sending first messages 2024-03-13 08:34:28 -04:00
Peter F. Patel-Schneider f3ff61cfc1 cli: fix bug in building battery line in show 2024-03-11 15:20:39 -04:00
Peter F. Patel-Schneider 9c5ba6445e device: remove status from Device and Receiver 2024-03-11 08:23:27 -04:00
Peter F. Patel-Schneider 87285faf7f receiver: move pairing status to new dataclass attached to receiver 2024-03-11 08:23:27 -04:00
Peter F. Patel-Schneider 135c8b8cb9 device: use status attribute for error 2024-03-09 10:36:40 -05:00
Swapnil Devesh 5ee1c6df30
ui: fix app name casing in UI
* Fix app name casing in UI

* Linter fixes

* Only use NAME variable

* FIx linter errors
2024-03-05 12:08:56 -05:00
Matthias Hagmann 8f6e8eef4c Refactor: Move Device instantiation to factory class
Related #2273
2024-03-03 09:32:42 -05:00
Matthias Hagmann 51e44052b0 Refactor: Move Receiver instantiation to factory class
Related #2350
2024-03-03 09:32:42 -05:00
Matthias Hagmann 9c76a6c5ba refactor: Introduce Hidpp20 class
Related #1097
2024-03-02 10:56:41 -05:00
Matthias Hagmann 85149a809e refactor: Introduce Hidpp10 class
Related #1097
2024-03-02 10:56:41 -05: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 476f41f8ae logitech_receiver: style fixes 2024-02-20 05:58:33 -05:00
Matthias Hagmann 5f487dd3b2 logitech_receiver: Move hidpp20 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann 2fcab65486 logitech_receiver: Move hidpp10 constants into new module
Related #1097
2024-02-20 05:58:33 -05:00
Matthias Hagmann e8fdbeee8e logitech_receiver: Move exceptions into own module
Related #1097
2024-02-20 05:58:33 -05:00
Peter F. Patel-Schneider 12de240949 device: improve imports in logitech_receiver
device: move imports of ui modules to beginning of files

logitech_receiver: remove imports from __init__.py
2024-02-18 06:21:35 -05:00
Peter F. Patel-Schneider ad6e3dc80e cli: move imports in __init__.py to top of file 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 df9a5b7b19 cli: catch assertion errors when reading setting values from devices 2024-02-10 09:15:27 -05:00
Peter F. Patel-Schneider 37383442f4 device: add version and device name to profiles 2024-02-07 18:48:22 -05:00
Peter F. Patel-Schneider 1fcff028fe device: decipher LED control info in profiles 2024-02-07 18:48:22 -05:00
Peter F. Patel-Schneider 08fde28810 cli: report more information on exception when loading profiles 2024-02-07 18:48:22 -05:00
Peter F. Patel-Schneider fb30f4ee41 device: support onboard profiles 2024-02-07 18:48:22 -05:00
Peter F. Patel-Schneider 06209d238a cli: no numbers for USB and Bluetooth devices 2024-02-04 14:20:52 -05:00
Peter F. Patel-Schneider a6f7507ce6 ui: use Report Rate instead of Polling for movement report rate 2024-02-01 10:13:03 -05:00
Peter F. Patel-Schneider db4e40e3ac device: add extended report rate setting 2024-02-01 10:13:03 -05:00
Peter F. Patel-Schneider f8a462dbe5 cli: be defensive in device error message 2024-01-28 15:36:28 -05:00
Peter F. Patel-Schneider eb6bacaed1 cli: handle NoSuchDevice exception when pinging device 2023-11-19 12:04:02 -05:00
Peter F. Patel-Schneider d7bd55bdf1 device: upgrade messages when no supported device found 2023-08-02 20:34:27 -04:00
Peter F. Patel-Schneider fe901fe3c2 device: more robust access to keyword exception fields 2022-12-06 14:20:59 -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
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
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 3e90c3bc8a hidapi: process hid report descriptors to identify devices 2022-10-13 16:14:30 -04:00
Peter F. Patel-Schneider 3a6b479e8b cli: print feature call errors in solaar show instead of terminating 2022-09-25 12:22:36 -04:00
Peter F. Patel-Schneider f39aebb089 cli: don't apply settings in solaar config 2022-08-30 19:29:41 -04:00
Peter F. Patel-Schneider 0b7b037e11 cli: terminate iteration over receiver devices when all have been found 2022-08-23 08:29:15 -04:00
Peter F. Patel-Schneider 4059b377b4 receiver: use last_id as maximum device number not max_devices 2022-08-20 20:12:48 -04:00
Peter F. Patel-Schneider a36a6297f3 cli: show more registers in solaar probe 2022-08-20 20:12:48 -04:00
Peter F. Patel-Schneider 76afec5c82
cli: show features versions in solaar show (#1709) 2022-08-20 12:34:15 -04:00
Peter F. Patel-Schneider c8f3baf261 cli: explicitly save configuration at end of solaar config if no GUI running 2022-07-17 09:41:41 -04:00
Peter F. Patel-Schneider 83eb836177 device: regularize and improve battery status gathering and reporting 2022-07-10 11:08:28 -04:00
Peter F. Patel-Schneider 4459ea5342 device: improve device features handling 2022-04-26 09:03:20 -04:00
Peter F. Patel-Schneider 74fe7d7920 cli: handle situation where GTK application cannot be set up 2022-04-05 16:34:43 -04:00
Bastien Nocera b3cfd0f762 Make APP_ID match real application ID
The application advertises itself as io.github.pwr_solaar.solaar through
its appdata file, so name the application this way too.

This fixes this warning in Flatpak:
Failed to register: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
2022-04-05 06:39:25 -04:00
Peter F. Patel-Schneider 693db1d541 cli: correctly set up register settings for config 2022-04-04 13:17:40 -04:00
Peter F. Patel-Schneider cba5368dad cli: use unitId to identify device if serial number not available 2022-04-04 13:17:40 -04:00