Compare commits

...

4 commits

View file

@ -21,8 +21,8 @@
wl-clipboard wl-clipboard
xsel xsel
mako
waybar waybar
libnotify
]; ];
xdg = { xdg = {
@ -76,6 +76,14 @@
}: }:
{ {
config = lib.mkIf (osConfig.networking.hostName == "yggdrasil" && osConfig.programs.niri.enable) { config = lib.mkIf (osConfig.networking.hostName == "yggdrasil" && osConfig.programs.niri.enable) {
services.mako = {
enable = true;
settings = {
border-radius = 15;
border-color = "#505050";
background-color = "#00000070";
};
};
programs.niri.settings = { programs.niri.settings = {
prefer-no-csd = true; prefer-no-csd = true;
@ -140,8 +148,34 @@
screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"; screenshot-path = "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png";
# TODO: block 1pass from screenshots and window capture workspaces = {
# TODO: move windows to workspaces where I expect them "01-zen" = {
open-on-output = "DP-1";
};
"02-steam" = {
open-on-output = "DP-1";
};
"03-work" = {
open-on-output = "DP-1";
};
"04-games" = {
open-on-output = "DP-1";
};
"01-communication" = {
open-on-output = "HDMI-A-1";
};
"02-1password" = {
open-on-output = "HDMI-A-1";
};
};
layer-rules = [
{
matches = [ { namespace = "^notifications$"; } ];
block-out-from = "screencast";
}
];
window-rules = [ window-rules = [
{ {
excludes = [ ]; excludes = [ ];
@ -152,69 +186,109 @@
bottom-left = 15.0; bottom-left = 15.0;
bottom-right = 15.0; bottom-right = 15.0;
}; };
#
open-fullscreen = false;
} }
{ {
matches = [ { is-window-cast-target = true; } ]; matches = [ { is-window-cast-target = true; } ];
focus-ring = {
active.color = "#f38ba8";
inactive.color = "#7d0d2d";
};
border = { border = {
inactive.color = "#7d0d2d"; enable = true;
width = 2;
active.color = "#f38ba8";
inactive.color = "#f38ba8";
}; };
shadow = { shadow = {
color = "#7d0d2d70"; color = "#f38ba870";
}; };
}
{
matches = [
{
app-id = "1password";
is-floating = true;
is-focused = false;
}
];
tab-indicator = { }
active.color = "#f38ba8"; {
inactive.color = "#7d0d2d"; matches = [
}; {
app-id = "steam";
title = "Steam";
}
];
open-on-workspace = "02-steam";
open-maximized = true;
}
{
matches = [
{
app-id = "steam_app_.*";
}
{
app-id = "factorio";
}
];
open-on-workspace = "04-games";
default-column-width.proportion = 1.0;
default-window-height.proportion = 1.0;
min-width = 3440;
min-height = 1440;
} }
{ {
matches = [ matches = [
{ {
app-id = "discord"; app-id = "discord";
} }
{
app-id = "steam";
title = "Friends List.*";
}
];
open-on-workspace = "01-communication";
default-column-width.proportion = 1.0;
open-fullscreen = false;
}
{
matches = [
{ {
app-id = "1Password"; app-id = "1Password";
} }
];
open-on-workspace = "02-1password";
default-column-width.proportion = 1.0;
open-fullscreen = false;
}
{
matches = [
{
app-id = "1Password";
}
{
app-id = "discord";
}
{ {
app-id = "steam"; app-id = "steam";
title = "Friends List.*"; title = "Friends List.*";
} }
{
app-id = "teams-for-linux";
}
]; ];
open-on-output = "HDMI-A-1";
default-column-width.proportion = 1.0; block-out-from = "screencast";
} }
]; ];
binds = binds =
with config.lib.niri; with config.lib.niri;
let
workspaces = (builtins.genList (x: x + 1) 9);
focus-workspaces = builtins.listToAttrs (
map (num: {
name = "Mod+${toString num}";
value = {
action.focus-workspace = num;
};
}) workspaces
);
move-to-workspaces = builtins.listToAttrs (
map (num: {
name = "Mod+Ctrl+${toString num}";
value = {
action.move-window-to-workspace = num;
};
}) workspaces
);
in
lib.mkMerge [ lib.mkMerge [
{ {
"Mod+Shift+Slash".action = actions.show-hotkey-overlay; "Mod+Shift+Slash".action = actions.show-hotkey-overlay;
@ -225,6 +299,15 @@
"Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}"; "Mod+D".action.spawn = "${lib.getExe pkgs.fuzzel}";
"Mod+Alt+L".action.spawn = "hyprlock-blur"; "Mod+Alt+L".action.spawn = "hyprlock-blur";
"Mod+Escape" = {
allow-inhibiting = false;
action = actions.toggle-keyboard-shortcuts-inhibit;
};
"Print".action.screenshot = [ ];
"Ctrl+Print".action.screenshot-screen = [ ];
"Alt+Print".action.screenshot-window = [ ];
"Mod+Shift+Q" = { "Mod+Shift+Q" = {
action = actions.close-window; action = actions.close-window;
repeat = false; repeat = false;
@ -235,6 +318,13 @@
repeat = false; repeat = false;
}; };
"Mod+1".action = actions.focus-workspace "01-zen";
"Mod+2".action = actions.focus-workspace "02-steam";
"Mod+3".action = actions.focus-workspace "03-work";
"Mod+4".action = actions.focus-workspace "04-games";
"Mod+5".action = actions.focus-workspace "01-communication";
"Mod+9".action = actions.focus-workspace "02-1password";
"Mod+J" = { "Mod+J" = {
action = actions.focus-window-or-workspace-down; action = actions.focus-window-or-workspace-down;
}; };
@ -309,8 +399,8 @@
"Mod+R".action = actions.switch-preset-column-width; "Mod+R".action = actions.switch-preset-column-width;
"Mod+Shift+R".action = actions.switch-preset-window-height; "Mod+Shift+R".action = actions.switch-preset-window-height;
"Mod+Ctrl+R".action = actions.reset-window-height; "Mod+Ctrl+R".action = actions.reset-window-height;
"Mod+F".action = actions.fullscreen-window; "Mod+F".action = actions.maximize-column;
"Mod+Shift+F".action = actions.maximize-column; "Mod+Shift+F".action = actions.fullscreen-window;
"Mod+Ctrl+F".action = actions.expand-column-to-available-width; "Mod+Ctrl+F".action = actions.expand-column-to-available-width;
"Mod+C".action = actions.center-column; "Mod+C".action = actions.center-column;
@ -365,8 +455,6 @@
allow-when-locked = true; allow-when-locked = true;
}; };
} }
focus-workspaces
move-to-workspaces
]; ];
spawn-at-startup = [ spawn-at-startup = [