summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-12 17:09:04 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-12 17:09:04 +0200
commit81f267dff95f16a6442688dbeaf25fb01b818a04 (patch)
tree48dbe5afeb9f614dc242dde5e666f1243f4c1990 /src/debug/HyprCtl.cpp
parenta09c614c2d2e4317cf6b9bd797784ab2ac94bcf0 (diff)
add default speed to hyprctl devices mice
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 7af07463..4d470d43 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -296,10 +296,12 @@ std::string devicesRequest(HyprCtl::eHyprCtlOutputFormat format) {
result += getFormat(
R"#( {
"address": "0x%x",
- "name": "%s"
+ "name": "%s",
+ "defaultSpeed": %f
},)#",
&m,
- escapeJSONStrings(m.mouse->name).c_str()
+ escapeJSONStrings(m.mouse->name).c_str(),
+ wlr_input_device_is_libinput(m.mouse) ? libinput_device_config_accel_get_default_speed((libinput_device*)wlr_libinput_get_device_handle(m.mouse)) : 0.f
);
}
@@ -390,7 +392,7 @@ R"#( {
result += "mice:\n";
for (auto& m : g_pInputManager->m_lMice) {
- result += getFormat("\tMouse at %x:\n\t\t%s\n", &m, m.mouse->name);
+ result += getFormat("\tMouse at %x:\n\t\t%s\n\t\t\tdefault speed: %f\n", &m, m.mouse->name, (wlr_input_device_is_libinput(m.mouse) ? libinput_device_config_accel_get_default_speed((libinput_device*)wlr_libinput_get_device_handle(m.mouse)) : 0.f));
}
result += "\n\nKeyboards:\n";