From 43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 14 May 2025 10:50:27 +0200 Subject: ... --- accounts/gkleen@sif/niri/default.nix | 14 +++++----- accounts/gkleen@sif/niri/mako.nix | 54 +++++++++++++++--------------------- 2 files changed, 30 insertions(+), 38 deletions(-) (limited to 'accounts/gkleen@sif/niri') diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index 732e3c7a..a9b4b0f8 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix @@ -249,7 +249,7 @@ in { import os import socket import json - import sys + # import sys from collections import defaultdict from threading import Thread, Lock from socketserver import StreamRequestHandler, ThreadingTCPServer @@ -275,7 +275,7 @@ in { def focus_workspace(output, workspace): with history_lock: workspace_history[output] = [workspace] + [ws for ws in workspace_history[output] if ws != workspace] # noqa: E501 - print(json.dumps(workspace_history), file=sys.stderr) + # print(json.dumps(workspace_history), file=sys.stderr) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) sock.connect(os.environ["NIRI_SOCKET"]) @@ -743,19 +743,19 @@ in { "Mod+Shift+Control+C".action = move-workspace-up; "Mod+ParenLeft".action = focus-workspace "comm"; - "Mod+Shift+ParenLeft".action = move-column-to-workspace "comm"; + "Mod+Shift+ParenLeft".action = kdl.magic-leaf "move-column-to-workspace" "comm"; "Mod+ParenRight".action = focus-workspace "web"; - "Mod+Shift+ParenRight".action = move-column-to-workspace "web"; + "Mod+Shift+ParenRight".action = kdl.magic-leaf "move-column-to-workspace" "web"; "Mod+BraceRight".action = focus-workspace "read"; - "Mod+Shift+BraceRight".action = move-column-to-workspace "read"; + "Mod+Shift+BraceRight".action = kdl.magic-leaf "move-column-to-workspace" "read"; "Mod+BraceLeft".action = focus-workspace "mon"; - "Mod+Shift+BraceLeft".action = move-column-to-workspace "mon"; + "Mod+Shift+BraceLeft".action = kdl.magic-leaf "move-column-to-workspace" "mon"; "Mod+Asterisk".action = focus-workspace "vid"; - "Mod+Shift+Asterisk".action = move-column-to-workspace "vid"; + "Mod+Shift+Asterisk".action = kdl.magic-leaf "move-column-to-workspace" "vid"; "Mod+Plus".action = with-unnamed-workspace-action ''{"Action":{"FocusWorkspace":{"reference":{"Id": .id}}}}''; "Mod+Shift+Plus".action = with-unnamed-workspace-action ''{"Action":{"MoveColumnToWorkspace":{"reference":{"Id": .id}}}}''; diff --git a/accounts/gkleen@sif/niri/mako.nix b/accounts/gkleen@sif/niri/mako.nix index 2788fb82..9373dc21 100644 --- a/accounts/gkleen@sif/niri/mako.nix +++ b/accounts/gkleen@sif/niri/mako.nix @@ -3,37 +3,29 @@ config = { services.mako = { enable = true; - font = "Fira Sans 10"; - format = "%s\\n%b"; - margin = "2"; - maxVisible = -1; - backgroundColor = "#000000dd"; - progressColor = "source #223544ff"; - width = 384; - extraConfig = '' - outer-margin=1 - max-history=100 - max-icon-size=48 - - [grouped] - format=(%g) %s\n%b - - [urgency=low] - text-color=#999999ff - - [urgency=critical] - background-color=#900000dd - - [app-name=Element] - group-by=summary - - [app-name=poweralertd] - ignore-timeout=1 - default-timeout=2000 - - [mode=silent] - invisible=1 - ''; + settings = { + font = "Fira Sans 10"; + format = "%s\\n%b"; + margin = "2"; + max-visible = -1; + background-color = "#000000dd"; + progress-color = "source #223544ff"; + width = 384; + outer-margin = 1; + max-history = 100; + max-icon-size = 48; + }; + criteria = { + grouped.format = "(%g) %s\n%b"; + "urgency=low".text-color = "#999999ff"; + "urgency=critical".background-color = "#900000dd"; + "app-name=Element".group-by = "summary"; + "app-name=poweralertd" = { + ignore-timeout = true; + default-timeout = 2000; + }; + "mode=silent".invisible = true; + }; package = pkgs.symlinkJoin { name = "${pkgs.mako.name}-wrapped"; paths = with pkgs; [ mako ]; -- cgit v1.2.3