Yaroslav Chvanov
44af3f145d
ratbagd.py: use the IsDirty property of the DBus API
2023-03-05 13:39:33 +03:00
Yaroslav Chvanov
f1118b5b64
ratbagd: add IsDirty property to profiles
2023-03-05 13:39:33 +03:00
Yaroslav Chvanov
3e42349daa
libratbag: add API for checking if profile is dirty
2023-03-05 13:26:27 +03:00
Yaroslav Chvanov
9f031e58a1
libratbag: fix profile not becoming dirty on active profile switch
2023-03-05 13:25:53 +03:00
Yaroslav Chvanov
2b47f5b942
data: add Sinowealth Generic Mouse (258a:0051)
2023-03-05 05:42:36 +03:00
Yaroslav Chvanov
78f68d2470
data: add links to device issues with raw configuration data
2023-03-05 05:39:40 +03:00
Yaroslav Chvanov
4a0d906092
sinowealth: add support for PMW3212 sensor
...
Not tested if it needs off-by-one adjustment like some other sensors do.
Although it could've been an ideal opportunity to add support for all of
the possible sensors, I didn't do it for the same reason.
2023-03-05 05:39:40 +03:00
Yaroslav Chvanov
53f09ed8c7
sinowealth: add more debug logging for easier device file creation
2023-03-05 05:39:40 +03:00
Yaroslav Chvanov
f96c5e2499
sinowealth: fix incorrect placement of sensor_type in config data
...
Oh wow.
2023-03-05 05:39:40 +03:00
Matthias Bach
6a07d0ec9c
build: install ratbagd into sbindir
...
Ratbagd requires to be run by root. It should thus live in the system binary
directory.
2023-03-04 22:00:02 +03:00
Yaroslav Chvanov
84e8e63752
libratbag: don't apply active profile change until committing
2023-03-04 04:07:32 +03:00
Yaroslav Chvanov
a3f0ea9a52
tools: skip linter checks if linters are not installed
2023-03-04 03:37:31 +03:00
Yaroslav Chvanov
4b8ac177d1
tools: print errors to stderr
2023-03-04 03:34:12 +03:00
Yaroslav Chvanov
0e3f909264
ratbagd.py: add back .keys() calls on all GLib.Variant
...
This causes crashes on Piper side.
2023-03-03 23:37:26 +03:00
Kyoken
3f1e0f09cc
ratbagd.py: don't mark a profile as dirty on active profile switch
2023-03-03 15:40:06 +03:00
Yaroslav Chvanov
b0d3f86287
build: add a missing dependency to a test
...
This fixes tests failing if you run `meson test` without running a
`meson compile` first.
2023-03-02 14:24:57 +03:00
Yaroslav Chvanov
a9545b2b63
test: use a simply assert instead of using a helper
2023-03-02 14:05:37 +03:00
Yaroslav Chvanov
1d24aa71d3
build: use project-local build and source directories
...
I think it should be possible to embed libratbag as a meson subproject
now (not tested).
2023-03-02 13:58:21 +03:00
Yaroslav Chvanov
a00531fe8b
lint: exit early if git ls-files doesn't find anything
2023-03-02 13:48:03 +03:00
Yaroslav Chvanov
265e1cee1a
test: fix traceback.print_exception() usage on older Python versions
2023-03-02 05:48:40 +03:00
Yaroslav Chvanov
e7a738086c
lint: enable flake8-return
2023-03-02 05:30:31 +03:00
Yaroslav Chvanov
40fb7430db
lint: enable flake8-simplify
2023-03-02 05:30:30 +03:00
Yaroslav Chvanov
27d74ae0f0
Use 'a != b' instead of 'not a == b'
2023-03-02 05:30:30 +03:00
Yaroslav Chvanov
80fa7f5b8f
Use 'key in dict' instead of 'key in dict.keys()'
2023-03-02 05:30:30 +03:00
Yaroslav Chvanov
78b56d6ea0
tools: make all exceptions types have Error as the sufix
2023-03-02 05:30:30 +03:00
Yaroslav Chvanov
e84a56c424
test: don't return anything from main()
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
04b77a3b9b
test: raise ValueError instead of AssertionError manually
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
57323ac978
ratbagctl: remove unnecessary else
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
8455c3ea71
ratbagctl: use standard exception types
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
3252d57b50
ratbagctl: fix an incorrect type hint
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
4b506a4ece
lint: enable flake8-pie lints
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
7551bdaeff
tools: remove unnecessary pass statements
2023-03-02 04:32:40 +03:00
Yaroslav Chvanov
ef2049643c
ratbagctl: use textwrap.indent instead of inventing the wheel ourselves
2023-03-02 04:32:39 +03:00
Yaroslav Chvanov
681153ad4d
doc: add angle snapping and debounce time
2023-03-02 03:01:06 +03:00
Yaroslav Chvanov
382df65a5d
sinowealth: implement debounce time reading/writing
2023-03-02 03:01:06 +03:00
Kyoken
51edc2967b
add angle snapping and debounce
2023-03-02 02:59:42 +03:00
Yaroslav Chvanov
37628da52f
Remove flake8 configuration file
...
We now use black and ruff instead.
2023-03-01 23:52:11 +03:00
Yaroslav Chvanov
1b2259a8cb
ratbagctl: rename a member function to prevent incorrect overriding
2023-03-01 23:01:10 +03:00
Yaroslav Chvanov
211551ff5b
ratbagctl: don't reuse a variable for different types
2023-03-01 23:01:10 +03:00
Yaroslav Chvanov
6c5a15172b
ratbagctl: make an argument non-optional
2023-03-01 23:01:10 +03:00
Yaroslav Chvanov
e43a7a279b
ratbagctl: simplify an expression to make mypy understand it
2023-03-01 23:01:10 +03:00
Yaroslav Chvanov
3be064aef0
ratbagctl: add type hints where possible
...
We use the dynamic nature of Python for parsing command line arguments,
which makes it nearly impossible to type hint everything.
2023-03-01 23:01:10 +03:00
Yaroslav Chvanov
9b45b2ac03
tools: fix "line too long" warnings where possible
2023-03-01 22:18:41 +03:00
Yaroslav Chvanov
2bf349459b
tools: ignore a false positive warning
2023-03-01 22:17:32 +03:00
Yaroslav Chvanov
57ac72077f
tools: don't use complex types as default function arguments
2023-03-01 22:17:32 +03:00
Yaroslav Chvanov
a192088f13
tools: chain exceptions within exceptions
2023-03-01 22:17:32 +03:00
Yaroslav Chvanov
fa67024110
tools: fix ambiguous variable names
...
These one-letter variable names really are bad.
A good illustration of this is resolutions being assigned to the
variable where Ratbagd was, both of such variables were always names
just "r".
2023-03-01 22:17:32 +03:00
Yaroslav Chvanov
2ba49ba185
test: fix ambiguous variable names
2023-03-01 22:17:31 +03:00
Yaroslav Chvanov
a66e6d2066
Automatically fix Ruff warnings
2023-03-01 22:17:31 +03:00
Yaroslav Chvanov
3aa82d2b35
build: add Ruff for Python code linting
2023-03-01 22:17:31 +03:00