RATBAGCTL(1)

๐Ÿ“ฆ
version 0.18 ยท 3 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’… RATBAGCTL(1) ๐Ÿ’…

General Commands Manual โ€” yep, that's the vibe, bestie. Section 1, the big leagues. Let's get into it ๐ŸŽ€


โœจ NAME โœจ

ratbagctl</p็ดซ่‰ฒ> โ€” inspect and modify configurable mice ๐Ÿญ๐Ÿ’–


๐ŸŒธ SYNOPSIS ๐ŸŒธ

ratbagctl [<options>] list
ratbagctl [<options>] <device> <command> ...

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Okay so. The ratbagctl tool queries or changes a device's settings. That's the whole gig, and it eats every time ๐Ÿ’…

Heads up bestie: this tool usually needs ratbagd to be running. Like, it's not optional-optional. Just letting you know ๐Ÿซถ

โœจ OPTIONS โœจ

  • --version, -V โ€” Show the program's version number and then dip. ๐Ÿ‘‹
  • --verbose, -v โ€” Print debugging output. And the way that multiple -v options increase the verbosityโ€ฆ obsessed. For example, -vvv will show the protocol output. No cap. ๐Ÿ”ฅ
  • --nocommit โ€” Do not immediately write the settings to the mouse. This lets you set multiple parameters in a script, and then the last call to ratbagctl will write them all. It's giving batch mode, it's giving efficiency. ๐Ÿ’–
  • --help, -h โ€” Print the help. The classic. ๐ŸŒˆ

๐ŸŽ€ General Commands ๐ŸŽ€

  • list โ€” List supported devices. Quick note: it does not take a device argument, so don't try it, iykyk. โœจ

๐Ÿญ Device Commands ๐Ÿญ

  • info โ€” Print information about a device.
  • name โ€” Print the device name. Short, sweet, iconic. ๐Ÿ‘‘

๐Ÿ’œ Profile Commands ๐Ÿ’œ

  • profile active get โ€” Print the currently active profile.
  • profile active set N โ€” Set profile N as the active profile.
  • profile N {COMMAND} โ€” Use profile N for COMMAND.

Available *COMMAND*s:

  • get โ€” Print selected profile information.
  • name get โ€” Print the name of the profile.
  • name set blah โ€” Set the name of the profile.
  • enable โ€” Enable a profile.
  • disable โ€” Disable a profile.
  • [resolution|dpi|rate|button|led] ... โ€” Use profile N for the specified command.

๐ŸŒธ Resolution Commands ๐ŸŒธ

Resolution commands work on the given profile, or on the active profile if none is given. Lowkey the most chill inheritance rule ever. ๐Ÿ’–

  • resolution active get โ€” Print the currently active resolution.
  • resolution active set N โ€” Set resolution N as the active resolution.
  • resolution default get โ€” Print the current default resolution.
  • resolution default set N โ€” Set resolution N as the default resolution.
  • resolution N {COMMAND} โ€” Use resolution N for COMMAND.

Available *COMMAND*s:

  • get โ€” Print selected resolution.
  • [dpi|rate] ... โ€” Use resolution N for the specified command.

โœจ DPI Commands โœจ

DPI commands work on the given profile and resolution, or on the active resolution of the active profile if none are given. Slay, the defaults are handled for you. ๐Ÿซถ

  • dpi get โ€” Print the dpi value.
  • dpi get-all โ€” Print the supported dpi values. All of them. The whole buffet. ๐Ÿ“
  • dpi set N โ€” Set the dpi value to N.

๐Ÿฆ‹ Rate Commands ๐Ÿฆ‹

Rate commands work on the given profile and resolution, or on the active resolution of the active profile if none are given. Same energy as DPI, fr fr. ๐Ÿ’…

  • rate get โ€” Print the report rate in ms.
  • rate get-all โ€” Print the supported report rates in ms.
  • rate set N โ€” Set the report rate in N ms.

๐ŸŽ€ Button Commands ๐ŸŽ€

Button commands work on the given profile, or on the active profile if none is given.

  • button count โ€” Print the number of buttons. ๐Ÿงฎ
  • button N get โ€” Print the selected button.
  • button N action get โ€” Print the button action.
  • button N action set button B โ€” Set the button action to button B.
  • button N action set special S โ€” Set the button action to special action S.
  • button N action set macro ... โ€” Set the button action to the given macro.

Macro syntax:

A macro is a series of key events or waiting periods. Keys must be specified in linux/input-event-codes.h key names. ๐Ÿ“œ

  • KEY_A โ€” Press and release 'a'
  • +KEY_A โ€” Press 'a'
  • -KEY_A โ€” Release 'a'
  • t300 โ€” Wait 300ms โณ

๐ŸŒˆ LED Commands ๐ŸŒˆ

LED commands work on the given profile, or on the active profile if none is given. The aesthetic section, obviously. โœจ

  • led get โ€” Print the current led values.
  • led N get โ€” Print the selected LED value.
  • led N {COMMAND} โ€” Use led N for COMMAND.

Available *COMMAND*s:

  • mode [on|off|cycle|breathing] โ€” The mode to set as current.
  • color RRGGBB โ€” The color to set as current (the color should be in the hexadecimal format).
  • rate R โ€” The rate to set as current.
  • brightness B โ€” The brightness to set as current.

๐Ÿ’– Examples ๐Ÿ’–

ratbagctl profile active get eventX

ratbagctl profile 0 resolution active set 4 eventX

ratbagctl profile 0 resolution 1 dpi get eventX

ratbagctl resolution 4 rate get eventX

ratbagctl dpi set 800 eventX

๐Ÿ™ˆ NOTES ๐Ÿ™ˆ

Okay so real talk. There is currently no guarantee that the output format of ratbagctl will not change in the future. There should be some stability with the commands mentioned in this man page, but do not expect it to stay the same. So likeโ€ฆ script responsibly bestie ๐Ÿ˜ญ


๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

ratbagctl was written by David Herrmann, Peter Hutterer and Benjamin Tissoires. Kings. ๐Ÿ‘‘

This manual page was written by Stephen Kitt <skitt@debian.org> for the Debian GNU/Linux system (but may be used by others). The way that's a whole flex ๐Ÿ’…


and that's the whole page bestie!! โœจ version 0.18, page RATBAGCTL(1), from the General Commands Manual โ€” go forth and configure those mice, you absolute icon ๐Ÿฆ‹๐Ÿ’–๐ŸŽ€