this repo has no description
nix
1# Paneru, like Niri but for macOS
2# https://github.com/karinushka/paneru
3{ inputs, lib, ... }:
4let
5 # Try to mimic Niri keybinds
6 mod = "alt";
7 super = "cmd";
8 movement = mod;
9 mutate = "${movement} + ctrl";
10 bindings = {
11 # Moves the focus between windows. If there are no windows when moving up or
12 # down, will swtich focus to the display above or below.
13 window_focus_west = [
14 "${movement} - h"
15 "${movement} - leftarrow"
16 ];
17 window_focus_east = [
18 "${movement} - l"
19 "${movement} - rightarrow"
20 ];
21 window_focus_north = [
22 "${movement} - k"
23 "${movement} - uparrow"
24 ];
25 window_focus_south = [
26 "${movement} - j"
27 "${movement} - downarrow"
28 ];
29
30 # Swaps windows in chosen direction. If there are no windows to swap, will
31 # move the window to a display above or below.
32 window_swap_west = "${mutate} - h";
33 window_swap_east = "${mutate} - l";
34 window_swap_north = "${mutate} - k";
35 window_swap_south = "${mutate} - j";
36
37 # Jump to the left-most or right-most windows.
38 window_focus_first = [
39 "${movement} + shift - h"
40 "${movement} + shift - leftarrow"
41 ];
42 window_focus_last = [
43 "${movement} + shift - l"
44 "${movement} + shift - rightarrow"
45 ];
46
47 # Move the current window into the left-most or right-most positions.
48 window_swap_first = "${mutate} + shift - h";
49 window_swap_last = "${mutate} + shift - l";
50
51 # Centers the current window on screen.
52 window_center = "${mutate} - c";
53
54 # Cycles between the window sizes defined in the `preset_column_widths` option.
55 window_resize = "${mutate} - r";
56
57 # Cycles backwards through `preset_column_widths`.
58 window_shrink = "${mutate} + shift - r";
59
60 # Toggle full width for the current focused window.
61 window_fullwidth = "${mutate} - f";
62
63 # Toggles the window for management. If unmanaged, the window will be "floating".
64 window_manage = [
65 "ctrl + alt - t"
66 "ctrl + alt - space"
67 ];
68
69 # Stacks and unstacks a window into the left column. Each window gets a 1/N of the height.
70 window_stack = "${mutate} - [";
71 window_unstack = [
72 "${mutate} + shift - ["
73 "${mutate} - ]"
74 ];
75
76 # Moves currently focused window to the next display.
77 window_nextdisplay = "${mutate} - n";
78
79 # Moves the mouse pointer to the next display.
80 mouse_nextdisplay = "${movement} - n";
81
82 # Size stacked windows in the column to equal heights.
83 window_equalize = "${mutate} - e";
84
85 # Quits the window manager.
86 quit = "cmd + ctrl + alt + shift - q";
87 };
88in
89{
90 flake-file.inputs.paneru = {
91 url = "github:karinushka/paneru";
92 inputs.nixpkgs.follows = "nixpkgs";
93 };
94
95 den.aspects.desktops.provides.paneru = {
96 homeManager =
97 { pkgs, ... }:
98 {
99 imports = [ inputs.paneru.homeModules.paneru ];
100
101 services.paneru = {
102 # Issues with Ghostty, so disable for now
103 # https://github.com/karinushka/paneru/issues/93
104 enable = lib.mkDefault false; # pkgs.stdenv.hostPlatform.isDarwin;
105 settings = {
106 inherit bindings;
107
108 options = { };
109 };
110 };
111 };
112 };
113}