Skip to content

Instantly share code, notes, and snippets.

@danish17
Last active August 31, 2024 09:57
Show Gist options
  • Save danish17/c5c5fb6eb99d452c339e393ed637640b to your computer and use it in GitHub Desktop.
Save danish17/c5c5fb6eb99d452c339e393ed637640b to your computer and use it in GitHub Desktop.
LogiOps MX Master 3 Configuration
// Logiops (Linux driver) configuration for Logitech MX Master 3.
// Includes gestures, smartshift, DPI.
// Tested on logid v0.2.3 - GNOME 3.38.4 on Zorin OS 16 Pro
// What's working:
// 1. Window snapping using Gesture button (Thumb)
// 2. Forward Back Buttons
// 3. Top button (Ratchet-Free wheel)
// What's not working:
// 1. Thumb scroll (H-scroll)
// 2. Scroll button
// File location: /etc/logid.cfg
devices: ({
name: "Wireless Mouse MX Master 3";
smartshift: {
on: true;
threshold: 15;
};
hiresscroll: {
hires: true;
invert: false;
target: false;
};
dpi: 1500; // max=4000
buttons: (
// Forward button
{
cid: 0x56;
action = {
type: "Gestures";
gestures: (
{
direction: "None";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_FORWARD" ];
}
},
{
direction: "Up";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_PLAYPAUSE" ];
}
},
{
direction: "Down";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_LEFTMETA" ];
}
},
{
direction: "Right";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_NEXTSONG" ];
}
},
{
direction: "Left";
mode: "OnRelease";
action = {
type: "Keypress";
keys: [ "KEY_PREVIOUSSONG" ];
}
}
);
};
},
// Back button
{
cid: 0x53;
action = {
type: "Gestures";
gestures: (
{
direction: "None";
mode: "OnRelease";
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
{
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