Logitech MX Master: Difference between revisions
m added an example udev rule for Solaar |
Juangiordana (talk | contribs) Correct syntax highlighting in logiops notes |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 3: | Line 3: | ||
There are 2 main configuration paths for specific MX Master options: | There are 2 main configuration paths for specific MX Master options: | ||
* [https://search.nixos.org/packages? | *[https://search.nixos.org/packages?query=solaar Solaar] - GUI application using the <code>hidapi</code> library | ||
* [https://search.nixos.org/packages? | * [https://search.nixos.org/packages?query=logiops LogiOps] - Command Line controlled systemd service | ||
== [https://search.nixos.org/packages? | == Solaar == | ||
It is possible to quickly test Solaar with nix run. Settings will not persist across reboots without proper installation.<syntaxhighlight lang="nixos"> | [https://search.nixos.org/packages?query=solaar Solaar] is a program that runs as a user process for configuring devices using Logitech's HID++ protocol. | ||
=== Installation === | |||
It is possible to quickly test Solaar with nix run. Settings will not persist across reboots without proper installation. | |||
<syntaxhighlight lang="nixos"> | |||
sudo nix run nixpkgs#solaar | sudo nix run nixpkgs#solaar | ||
# sudo needed to detect mouse | # sudo needed to detect mouse | ||
</syntaxhighlight>To install on NixOS:<syntaxhighlight lang="nixos"> | </syntaxhighlight> | ||
To install on NixOS: | |||
<syntaxhighlight lang="nixos"> | |||
environment.systemPackages = with pkgs; [ | environment.systemPackages = with pkgs; [ | ||
solaar | solaar | ||
]; | ]; | ||
</syntaxhighlight>Additionally, to use Solaar without `sudo` you will have to add a udev rule. Read the warning and apply caution.<syntaxhighlight lang="nixos"> | </syntaxhighlight> | ||
Additionally, to use Solaar without `sudo` you will have to add a udev rule. Read the warning and apply caution. | |||
<syntaxhighlight lang="nixos"> | |||
services.udev.extraRules = '' | services.udev.extraRules = '' | ||
# This rule was added by Solaar. | # This rule was added by Solaar. | ||
| Line 50: | Line 63: | ||
# vim: ft=udevrules | # vim: ft=udevrules | ||
''; | ''; | ||
</syntaxhighlight>For further configuration, see: [https://pwr-solaar.github.io/Solaar/index project documentation] | </syntaxhighlight> | ||
For further configuration, see: [https://pwr-solaar.github.io/Solaar/index project documentation] or section on udev rule specifically [https://pwr-solaar.github.io/Solaar/installation/#installing-solaars-udev-rule-manually installing udev rule manually] | |||
== LogiOps == | |||
[https://search.nixos.org/packages?query=LogiOps LogiOps] a userspace driver running as a [[Systemd/User Services|systemd service]]. Default location for the configuration file is <code>/etc/logid.cfg</code>, but another can be specified using the <code>-c</code> flag. | |||
<syntaxhighlight lang="nixos"> | |||
# Adds `pkgs.logitech-udev-rules` and `pkgs.ltunify` | |||
hardware.logitech.wireless.enable = true; | |||
services.logiops = { | |||
enable = true; | |||
config = { | |||
devices = [ | |||
{ | |||
name = "MX Keys for Business"; | |||
buttons = [ | |||
{ | |||
cid = (fromTOML "hex = 0x0103").hex; # Dictation / Fn+F5 | |||
action = { | |||
type = "Keypress"; | |||
keys = ["KEY_DICTATE"]; | |||
}; | |||
} | |||
{ | |||
cid = (fromTOML "hex = 0x0108").hex; # Emoji / Fn+F6 | |||
action = { | |||
type = "Keypress"; | |||
keys = ["KEY_EMOJI_PICKER"]; | |||
}; | |||
} | |||
{ | |||
cid = (fromTOML "hex = 0x011C").hex; # Mic Mute /Fn+F7 | |||
action = { | |||
type = "Keypress"; | |||
keys = ["KEY_MICMUTE"]; | |||
}; | |||
} | |||
{ | |||
cid = (fromTOML "hex = 0x010A").hex; # Screenshot / Print screen | |||
action = { | |||
type = "Keypress"; | |||
keys = ["KEY_PRINT"]; | |||
}; | |||
} | |||
{ | |||
cid = (fromTOML "hex = 0x006F").hex; # Lock screen / Numpad padlock | |||
action = { | |||
type = "Keypress"; | |||
keys = ["KEY_SCREENSAVER"]; | |||
}; | |||
} | |||
]; | |||
} | |||
{ | |||
name = "MX Vertical Advanced Ergonomic Mouse"; | |||
dpi = 1500; # max=4000 | |||
hiresscroll = { | |||
hires = true; | |||
invert = false; | |||
target = true; | |||
}; | |||
# buttons = [{}]; | |||
} | |||
]; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
Additional recommendations: | |||
* Use a dedicated file for trial-and-error, i.e. <code>sudo logid -c ./logid.cfg -v</code> | |||
* If auto-detection fails, turn Off/On device while <code>logid</code> is running. | |||
See [https://github.com/PixlOne/logiops/wiki/Configuration project documentation] and [https://wiki.archlinux.org/title/Logitech_MX_Master Arch Wiki] for usage and configuration details.{{expand}} | See [https://github.com/PixlOne/logiops/wiki/Configuration project documentation] and [https://wiki.archlinux.org/title/Logitech_MX_Master Arch Wiki] for usage and configuration details.{{expand}} | ||