From 67f7e8fee8dcef3a5531bd8310553ef1c7d6cdc8 Mon Sep 17 00:00:00 2001 From: jmug Date: Sun, 18 Jan 2026 01:41:51 -0800 Subject: [PATCH] [nixbox] Configure logipos and hyprland to switch between desktops. --- home-modules/hyprland/default.nix | 2 + hosts/nixbox/configuration.nix | 79 +++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/home-modules/hyprland/default.nix b/home-modules/hyprland/default.nix index aa39f64..e48c3d3 100644 --- a/home-modules/hyprland/default.nix +++ b/home-modules/hyprland/default.nix @@ -156,6 +156,8 @@ "$mainMod, 8, workspace, 8" "$mainMod, 9, workspace, 9" "$mainMod, 0, workspace, 10" + "$mainMod, left, workspace, -1" + "$mainMod, right, workspace, +1" # Move active window to a workspace with mainMod + SHIFT + [0-9] "$mainMod SHIFT, 1, movetoworkspace, 1" diff --git a/hosts/nixbox/configuration.nix b/hosts/nixbox/configuration.nix index 6d0db92..9cd5835 100644 --- a/hosts/nixbox/configuration.nix +++ b/hosts/nixbox/configuration.nix @@ -102,6 +102,7 @@ in hyprlock # Idling sway-audio-idle-inhibit + logiops ]; environment.pathsToLink = [ "/share/applications" "/share/xdg-desktop-portal" ]; fonts = { @@ -113,6 +114,84 @@ in ]; }; + # Logiops daemon + systemd.packages = [ pkgs.logiops ]; + systemd.services.logid.wantedBy = [ "multi-user.target" ]; + environment.etc = { + "logid.cfg" = { + # For some reason scroll inversion does not work for the mx vertical... + text = '' + devices: ( + { + name: "Wireless Mouse MX Master 3"; + + hiresscroll: { + }; + + thumbwheel: { + invert: true; + }; + + buttons: ( + { + cid: 0x53; + action = + { + type : "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_LEFT"]; + }; + }, + { + cid: 0x56; + action = + { + type : "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_RIGHT"]; + }; + } + ); + }, + { + name: "MX Vertical Advanced Ergonomic Mouse"; + + hiresscroll: { + hires: true; + invert: false; + target: false; + }; + + buttons: ( + { + cid: 0x53; + action = + { + type : "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_PAGEUP"]; + }; + }, + { + cid: 0x56; + action = + { + type : "Keypress"; + keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"]; + }; + }, + { + cid: 0xfd; + action = + { + type : "Keypress"; + keys: ["KEY_LEFTMETA"]; + }; + } + ); + } + ); + ''; + }; + }; + security.pam.services.hyprlock = {}; programs.hyprland = { enable = true;