MattHag
dfb4ccc93f
type hints: Introduce settings protocol
...
Related #2273
2025-01-01 10:46:04 -05:00
MattHag
03de6fb276
Split up huge settings module
...
- Move validators into their own module.
- Convert Kind to IntEnum
Related #2273
2025-01-01 10:46:04 -05: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
67829c5807
Clean up imports ( #2537 )
...
* Remove import as _ in solaar startup
Related #2273
* Remove import as _ in listener
Related #2273
* Remove import as _ in cli init
Related #2273
* Remove import as _ in gtk
Related #2273
* Remove import as _ in show
Related #2273
* Remove import as _ in tray
Related #2273
* Remove import as _ in profiles
Related #2273
* Remove import as _ in config
Related #2273
* Remove import as _ in config panel
Related #2273
* Remove import as _ in window
Related #2273
* Remove import as _ in pair
Related #2273
* Remove import as _ in pair window
Related #2273
* Remove import as _ in cli package
Related #2273
* Remove import as _ in ui package
Related #2273
* Remove commented out code
Related #2273
* Use constant for Logitech ID
2024-07-15 08:37:18 -04:00
Matthias Hagmann
5b09ace1f5
ruff: Apply single line import format
...
# Usage
pre-commit run --all-files
Related #2295
2024-03-13 15:41:21 -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
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
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
f39aebb089
cli: don't apply settings in solaar config
2022-08-30 19:29:41 -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
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
Peter F. Patel-Schneider
e628298c0a
cli: make solaar config changes also take effect in solaar ui if running
2022-03-16 09:20:12 -04:00
Peter F. Patel-Schneider
f938d3430e
cli: nicer output of settings in solaar show and solaar config
2022-01-24 21:12:55 -05:00
Vinícius
136c351209
cli: accept name as key in `solaar config`
2022-01-22 09:37:44 -05:00
Vinícius
b93b4f6bc3
cli: fix incorrect output of `solaar config`
2022-01-22 09:37:44 -05:00
Vinícius
2f702b7ca3
cli: fix bug in `solaar config` for multiple range settings
2022-01-22 09:37:44 -05:00
Vinícius
08eb8a06e3
cli: also accept "~" to be consistent with the new Set action
2022-01-16 13:38:56 -05:00
Peter F. Patel-Schneider
8a87b9b013
rules: add Solaar rules command to set settings
...
testing
2022-01-13 18:23:12 -05:00
Peter F. Patel-Schneider
5b1125cd11
cli: refactor config.py to create set(...) function
2022-01-13 18:23:12 -05:00
Łukasz Woźniak
27cda8bf08
settings: add ability to toggle boolean values in solaar config
...
#1325
2021-11-15 08:50:45 -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
Hugo Osvaldo Barrera
b96d16672b
Drop obsolete encoding declaration
...
This was only parsed in Python 2.
Python 3 only supports UTF-8 for source files, and that's what it uses.
2021-10-30 16:49:41 -04:00
Peter F. Patel-Schneider
b34061c766
ui: add ability to ignore a Solaar setting
2021-04-12 07:39:35 -04:00
Peter F. Patel-Schneider
dc3f70ff86
cli: use 1-origin addressing when selecting from choices in config
2021-03-18 09:57:03 -04:00
Peter F. Patel-Schneider
58f1a142ec
cli: fix config check against choices
2021-03-18 09:57:03 -04:00
Peter F. Patel-Schneider
04d79810d4
cli: set keyed settings with config
2021-02-18 11:02:57 -05:00
Peter F. Patel-Schneider
eb0d939d1a
cli: don't select unpaired device for config command
2021-02-16 08:25:46 -05:00
Peter F. Patel-Schneider
4b52b77348
cli: add device name to output when changing settings using config command
2021-02-16 08:25:46 -05:00
Peter F. Patel-Schneider
de0894bc34
receiver: adjust CHANGE_HOST numbers to user-visible ones
2020-07-13 19:15:44 -04:00
Peter F. Patel-Schneider
b6615d5abe
cli: in config don't apply setting unnecessarily and don't print setting after writing
2020-07-12 18:12:18 -04:00
Peter F. Patel-Schneider
323fb13161
cli: check range values for validity in config
2020-07-12 18:12:18 -04:00
Peter F. Patel-Schneider
fef22de021
cli: don't lower-case choice values and allow numeric selection of choices
2020-07-12 18:12:18 -04:00
Peter F. Patel-Schneider
e05c1aa90c
cli: make config faster
2020-07-10 14:16:41 -04:00
Filipe Laíns
27c90fa736
yapf: adjust style to not indent closing brackets
...
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01: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
627185079f
flake8: initial fix
...
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
Peter F. Patel-Schneider
9beb13a305
receiver: add key reprogramming setting
2020-06-16 15:21:10 -04:00
Javier Torres
bbadd3e755
Add support for range features in CLI
2016-06-09 19:46:03 +02:00
Peter Wu
dd2755909d
cli/config: fix error message
...
Attempt to fix:
$ bin/solaar config master dpi higher
solaar: error: coercing to Unicode: need string or buffer, int found
The DPI choices are integers, therefore cast it to a str.
2016-03-18 12:27:16 +01:00
Peter Wu
ab162583e4
cli: do not die on missing description
...
The DPI setting has no description, do not try to display it.
2016-03-13 23:59:21 +01:00
Daniel Pavel
3b75b69970
merged solaar-cli functionality into main solaar binary
2013-08-09 12:25:47 +02:00