Skip to content

Instantly share code, notes, and snippets.

@charlienewey
Created January 29, 2024 09:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlienewey/641809e23f3add9155a3e29104ca6f33 to your computer and use it in GitHub Desktop.
Save charlienewey/641809e23f3add9155a3e29104ca6f33 to your computer and use it in GitHub Desktop.
/etc/logid.cfg
timeout = 10000;
devices: ({
name: "MX Master 3S";
smartshift: {
on: true;
threshold: 15;
torque: 50;
};
hiresscroll: {
hires: false;
invert: false;
target: false;
};
dpi: 1500; // max=4000
thumbwheel: {
divert: true
left: {
mode: "OnInterval";
threshold: 5;
interval: 6;
action = {
type: "Keypress";
keys: [ "KEY_VOLUMEDOWN" ];
};
};
right: {
mode: "OnInterval";
threshold: 5;
interval: 6;
action = {
type: "Keypress";
keys: [ "KEY_VOLUMEUP" ];
};
};
};
buttons: (
// Forward button
{
cid: 0x56;
action = {
type: "Keypress";
keys: [ "KEY_FORWARD" ];
}
},
// Back button
{
cid: 0x53;
action = {
type: "Keypress";
keys: [ "KEY_BACK" ];
}
},
// Gesture button (hold and move)
{
cid: 0xc3;
action = {
type: "Gestures";
gestures: (
{
direction: "None";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA" ]; // open activities overview
}
},
{
direction: "Right";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA", "KEY_RIGHT" ]; // snap window to right
}
},
{
direction: "Left";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA", "KEY_LEFT" ];
}
},
{
direction: "Up";
mode: "onRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA", "KEY_UP" ]; // maximize window
}
},
{
direction: "Down";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA", "KEY_DOWN" ]; // minimize window
}
}
);
};
},
// Top button ("toggle SmartShift")
{
cid: 0xc4;
action = {
type: "Gestures";
gestures: (
{
direction: "None";
mode: "OnRelease";
action = {
type: "ToggleSmartShift";
}
},
{
direction: "Up";
mode: "OnRelease";
action = {
type: "ChangeDPI";
inc: 1000,
}
},
{
direction: "Down";
mode: "OnRelease";
action = {
type: "ChangeDPI";
inc: -1000,
}
}
);
};
}
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment