RATBAGCTL(1)
๐ 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-voptions increase the verbosityโฆ obsessed. For example,-vvvwill 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 toratbagctlwill 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 ๐ฆ๐๐
๐ฆ where this page comes from
- alpine 3.24: ratbag-doc 0.18-r1 ยท MIT
- arch rolling: libratbag 0.18-1 ยท MIT
- debian trixie: ratbagd 0.18-1 ยท MIT
- fedora 43: libratbag-ratbagd 0.18-4.fc43 ยท MIT
- fedora 44: libratbag-ratbagd 0.18-5.fc44 ยท MIT
- nixos 26.05: libratbag 0.18
- nixpkgs unstable: libratbag 0.18
- opensuse-leap 16.0: libratbag-tools 0.18-bp160.1.13 ยท MIT
- opensuse-leap 16.0: libratbag-tools 0.18-bp160.1.13 ยท MIT
- opensuse-leap 16.0: libratbag-tools 0.18-bp160.1.13 ยท MIT
- opensuse-leap 16.0: libratbag-tools 0.18-bp160.1.13 ยท MIT
- ubuntu questing: ratbagd 0.18-1
- ubuntu resolute: ratbagd 0.18-1build1 ยท MIT
- ubuntu stonking: ratbagd 0.18-1build1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms