sizzlesloth 71431bd5de Text box can be used to set DPI (#960)
* Add dpi_entry GtkEntry objects to UI file and Python.
Find and apply closest resolution in self.resolutions.
[Needed?] Store value on textbox focus in.
[Needed?] Do not apply DPI value if the same as previous value.
DPI entry and resolution sliders affect each others' values.

* Remove pointless recursive logic.
Remove focus methods.

* Calculate DPI text box width based on max supported resolution.

* Renamed methods/signals to be consistent with current convention.

* Add a 'focus-in-event' signal to the DPI entry field.
Pass reference to ResolutionsPage when initialising ResolutionRow.
Use reference to invoke `ResolutionsPage._on_row_activated()`.
Do not toggle Revealer on DPI entry text box focus-in-event if Revealer is already expanded.
Grammar: dpi -> DPI

* Add type hints.
Prefix unused vars with underscores.
Actioned suggested import order from linter.

* Actually apply the closest res value (oops).
Apply the res value on focus-out-event.

* Toggle allow editing of DPI entry if 'disable' button clicked.

* Use set_sensitive() on DPI entry.

* rm pointless var.

* Create custom class for DPI text entry to circumvent assertion warning.
Grab DPIEntry focus when revealing ResolutionRow.
Revert import order.
Removed unused 'previous DPI value' var.
Remove 'private' convention underscore from ResolutionsPage._on_row_activate().
Remove callback method for DPI entry on ResolutionRow.
UI file uses DPIEntry.
Remove insert-text signal for DPIEntry from UI file.

* Line lengths

* Removed unused import.
Underscored unused parameter (PEP convention).

* Reverted underscore convention as to not break existing stuff.

* Use underscore convention, but also use it when invoking the method.

* Renamed handler name for ResolutionsPage to match method.

* Clarified docstring.

---------

Co-authored-by: Dan <64416644+brittle-bones@users.noreply.github.com>
2024-07-24 22:17:09 +00:00
2024-07-03 20:48:19 +02:00
2023-04-23 18:25:40 +03:00
2023-03-04 17:13:05 +03:00
2016-03-08 10:38:20 +10:00

Piper

Piper is a GTK+ application to configure gaming mice. Piper is merely a graphical frontend to the ratbagd DBus daemon, see the libratbag README for instructions on how to run ratbagd.

If you are running piper from git, we recommend using libratbag from git as well to make sure the latest bugfixes are applied.

Supported Devices

Piper is merely a frontend, the list of supported devices depends on libratbag. See the libratbag device files for a list of all known devices. The device-specific protocols usually have to be reverse-engineered and the features available may vary to the manufacturer's advertized features.

Screenshots

resolution configuration screenshot

button configuration screenshot

LED configuration screenshot

And if you see the mousetrap, something isn't right. Usually this means that either ratbagd is not running (like in this screenshot), ratbagd needs to be updated to a newer version, or some other unexpected error occured.

The error page

Installing Piper

See our Wiki for how to install Piper.

Building Piper from git

Piper uses the meson build system. Run the following commands to clone Piper and initialize the build:

git clone https://github.com/libratbag/piper.git
cd piper
meson builddir --prefix=/usr/

To build or re-build after code-changes and install, run:

ninja -C builddir
sudo ninja -C builddir install

Note: builddir is the build output directory and can be changed to any other directory name.

See our Wiki for what to do when you encounter missing dependencies.

Contributing

Yes please. It's best to contact us first to see what you could do. Note that the devices displayed by Piper come from libratbag.

For quicker development iteration, there is a special binary piper.devel that uses data files from the git directory. This removes the need to install piper after every code change.

ninja -C builddir
./builddir/piper.devel

Note that this still requires ratbagd to run on the system bus.

Piper tries to conform to Python's PEP8 style guide using the black formatter. Checking if code is formatted is done as a part of the test suite.

You can check if your code passes tests before submitting changes using the following command:

meson test -C builddir

Source

git clone https://github.com/libratbag/piper.git

Bugs

Bugs can be reported in the issue tracker on our GitHub repo: https://github.com/libratbag/piper/issues

License

Licensed under the GPLv2. See the COPYING file for the full license information.

Description
No description provided
Readme 4.2 MiB
Languages
Python 93.1%
Meson 5.1%
Shell 1.6%
Roff 0.2%