niri-tag, atagen cache

This commit is contained in:
atagen 2025-06-27 00:06:27 +10:00
parent 92ed39cb83
commit 03dc72471f
11 changed files with 414 additions and 351 deletions

View file

@ -51,13 +51,12 @@
home.packages =
let
inherit (rice) icons fonts cursor;
inherit (pkgs) tauon;
in
fonts.pkgs
++ icons.pkgs
++ [
cursor.package
tauon
pkgs.tauon
];
systemd.user.targets.tray = {

View file

@ -4,7 +4,6 @@
config,
rice,
inputs,
mainUser,
...
}:
let
@ -37,7 +36,7 @@ let
[
{
name = "swaybg";
value = "${lib.getExe swaybg} -m fill -i /home/${mainUser}/.nix/wallpaper.jpg";
value = "${lib.getExe swaybg} -m fill -i ${rice.bg.src}";
}
{
name = "avizo-service";
@ -69,7 +68,12 @@ in
);
programs.niri.settings =
let
inherit (lib) range nameValuePair mapAttrs';
inherit (lib)
range
nameValuePair
mapAttrs'
mergeAttrs
;
inherit (builtins) listToAttrs replaceStrings;
inherit (config.lib.niri) actions;
in
@ -100,7 +104,22 @@ in
value = {
action."${cmd}" = num;
};
}) (range 0 6)
}) (range 1 6)
);
tagctl = lib.getExe' inputs.niri-tag.packages.${pkgs.system}.unstable "tagctl";
makeTagBind =
mods: cmd:
listToAttrs (
map (num: {
name = "${mods}+${builtins.toString num}";
value = {
action.spawn = [
tagctl
cmd
(builtins.toString num)
];
};
}) (range 1 6)
);
in
{
@ -152,14 +171,18 @@ in
];
"Mod+Space".action = actions.toggle-window-floating;
}
// makeDirBind "Mod" "focus-window-or-workspace-$DIR" vBinds
# // makeDirBind "Mod" "focus-window-or-workspace-$DIR" vBinds
// makeDirBind "Mod" "focus-column-or-monitor-$DIR" hBinds
// makeDirBind "Mod+Shift" "move-window-to-workspace-$DIR" vBinds
# // makeDirBind "Mod+Shift" "move-window-to-workspace-$DIR" vBinds
// makeDirBind "Mod+Shift" "move-column-$DIR-or-to-monitor-$DIR" hBinds
// makeDirBind "Mod+Ctrl" "consume-or-expel-window-$DIR" hBinds
// makeDirBind "Mod+Ctrl" "move-window-$DIR" vBinds
// makeWsBind "Mod" "focus-workspace"
// makeWsBind "Mod+Shift" "move-window-to-workspace";
// makeTagBind "Mod" "toggle-tag"
// makeTagBind "Mod+Shift" "toggle"
// makeTagBind "Mod+Ctrl" "exclusive-tag"
# // makeWsBind "Mod" "focus-workspace"
# // makeWsBind "Mod+Shift" "move-window-to-workspace";
;
outputs = {
# "Unknown-1".enable = false;
"DP-1" = {
@ -172,7 +195,7 @@ in
};
};
input = {
warp-mouse-to-focus = true;
warp-mouse-to-focus.enable = true;
};
cursor = {
hide-after-inactive-ms = 5000;