summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/niri
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-05-14 10:50:27 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-05-14 10:50:27 +0200
commit43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c (patch)
treec1cc8a034395c9bb8188651f6835922b38887f32 /accounts/gkleen@sif/niri
parent03d49aa8ec6f51c8f51bfb628e614ac537cca8e0 (diff)
downloadnixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar
nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.gz
nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.bz2
nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.tar.xz
nixos-43c9825e49d25fbd2c19abcdeb8f73aee8be2a4c.zip
...
Diffstat (limited to 'accounts/gkleen@sif/niri')
-rw-r--r--accounts/gkleen@sif/niri/default.nix14
-rw-r--r--accounts/gkleen@sif/niri/mako.nix54
2 files changed, 30 insertions, 38 deletions
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 {
249 import os 249 import os
250 import socket 250 import socket
251 import json 251 import json
252 import sys 252 # import sys
253 from collections import defaultdict 253 from collections import defaultdict
254 from threading import Thread, Lock 254 from threading import Thread, Lock
255 from socketserver import StreamRequestHandler, ThreadingTCPServer 255 from socketserver import StreamRequestHandler, ThreadingTCPServer
@@ -275,7 +275,7 @@ in {
275 def focus_workspace(output, workspace): 275 def focus_workspace(output, workspace):
276 with history_lock: 276 with history_lock:
277 workspace_history[output] = [workspace] + [ws for ws in workspace_history[output] if ws != workspace] # noqa: E501 277 workspace_history[output] = [workspace] + [ws for ws in workspace_history[output] if ws != workspace] # noqa: E501
278 print(json.dumps(workspace_history), file=sys.stderr) 278 # print(json.dumps(workspace_history), file=sys.stderr)
279 279
280 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) 280 sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
281 sock.connect(os.environ["NIRI_SOCKET"]) 281 sock.connect(os.environ["NIRI_SOCKET"])
@@ -743,19 +743,19 @@ in {
743 "Mod+Shift+Control+C".action = move-workspace-up; 743 "Mod+Shift+Control+C".action = move-workspace-up;
744 744
745 "Mod+ParenLeft".action = focus-workspace "comm"; 745 "Mod+ParenLeft".action = focus-workspace "comm";
746 "Mod+Shift+ParenLeft".action = move-column-to-workspace "comm"; 746 "Mod+Shift+ParenLeft".action = kdl.magic-leaf "move-column-to-workspace" "comm";
747 747
748 "Mod+ParenRight".action = focus-workspace "web"; 748 "Mod+ParenRight".action = focus-workspace "web";
749 "Mod+Shift+ParenRight".action = move-column-to-workspace "web"; 749 "Mod+Shift+ParenRight".action = kdl.magic-leaf "move-column-to-workspace" "web";
750 750
751 "Mod+BraceRight".action = focus-workspace "read"; 751 "Mod+BraceRight".action = focus-workspace "read";
752 "Mod+Shift+BraceRight".action = move-column-to-workspace "read"; 752 "Mod+Shift+BraceRight".action = kdl.magic-leaf "move-column-to-workspace" "read";
753 753
754 "Mod+BraceLeft".action = focus-workspace "mon"; 754 "Mod+BraceLeft".action = focus-workspace "mon";
755 "Mod+Shift+BraceLeft".action = move-column-to-workspace "mon"; 755 "Mod+Shift+BraceLeft".action = kdl.magic-leaf "move-column-to-workspace" "mon";
756 756
757 "Mod+Asterisk".action = focus-workspace "vid"; 757 "Mod+Asterisk".action = focus-workspace "vid";
758 "Mod+Shift+Asterisk".action = move-column-to-workspace "vid"; 758 "Mod+Shift+Asterisk".action = kdl.magic-leaf "move-column-to-workspace" "vid";
759 759
760 "Mod+Plus".action = with-unnamed-workspace-action ''{"Action":{"FocusWorkspace":{"reference":{"Id": .id}}}}''; 760 "Mod+Plus".action = with-unnamed-workspace-action ''{"Action":{"FocusWorkspace":{"reference":{"Id": .id}}}}'';
761 "Mod+Shift+Plus".action = with-unnamed-workspace-action ''{"Action":{"MoveColumnToWorkspace":{"reference":{"Id": .id}}}}''; 761 "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 @@
3 config = { 3 config = {
4 services.mako = { 4 services.mako = {
5 enable = true; 5 enable = true;
6 font = "Fira Sans 10"; 6 settings = {
7 format = "<i>%s</i>\\n%b"; 7 font = "Fira Sans 10";
8 margin = "2"; 8 format = "<i>%s</i>\\n%b";
9 maxVisible = -1; 9 margin = "2";
10 backgroundColor = "#000000dd"; 10 max-visible = -1;
11 progressColor = "source #223544ff"; 11 background-color = "#000000dd";
12 width = 384; 12 progress-color = "source #223544ff";
13 extraConfig = '' 13 width = 384;
14 outer-margin=1 14 outer-margin = 1;
15 max-history=100 15 max-history = 100;
16 max-icon-size=48 16 max-icon-size = 48;
17 17 };
18 [grouped] 18 criteria = {
19 format=<b>(%g)</b> <i>%s</i>\n%b 19 grouped.format = "<b>(%g)</b> <i>%s</i>\n%b";
20 20 "urgency=low".text-color = "#999999ff";
21 [urgency=low] 21 "urgency=critical".background-color = "#900000dd";
22 text-color=#999999ff 22 "app-name=Element".group-by = "summary";
23 23 "app-name=poweralertd" = {
24 [urgency=critical] 24 ignore-timeout = true;
25 background-color=#900000dd 25 default-timeout = 2000;
26 26 };
27 [app-name=Element] 27 "mode=silent".invisible = true;
28 group-by=summary 28 };
29
30 [app-name=poweralertd]
31 ignore-timeout=1
32 default-timeout=2000
33
34 [mode=silent]
35 invisible=1
36 '';
37 package = pkgs.symlinkJoin { 29 package = pkgs.symlinkJoin {
38 name = "${pkgs.mako.name}-wrapped"; 30 name = "${pkgs.mako.name}-wrapped";
39 paths = with pkgs; [ mako ]; 31 paths = with pkgs; [ mako ];