update niri

This commit is contained in:
EdenQwQ 2025-03-29 22:44:51 +08:00
parent c801ef5d60
commit a17c29b11b
4 changed files with 24 additions and 45 deletions

15
flake.lock generated
View file

@ -660,7 +660,9 @@
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"niri-unstable": [
"niri-unstable"
],
"nixpkgs": "nixpkgs_5",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
@ -700,15 +702,15 @@
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1743017820,
"narHash": "sha256-EYq2NfWSSO87O7hLrJLPPt0VbgvSjgPzru+58LQ29WI=",
"owner": "YaLTeR",
"lastModified": 1743243239,
"narHash": "sha256-zjMKXRIzC7+SOTENxknwnjulnwBK0YZ+p+fjmMlXnls=",
"owner": "YalTeR",
"repo": "niri",
"rev": "7cfecf4b1b9b8c11c80061fb31926f888228499d",
"rev": "8d43efe4ac38ddb6ce298d6fbdfc3ec610b8da56",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"owner": "YalTeR",
"repo": "niri",
"type": "github"
}
@ -1082,6 +1084,7 @@
"nh": "nh",
"nil": "nil",
"niri": "niri",
"niri-unstable": "niri-unstable",
"nixd": "nixd",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable_2",

View file

@ -53,7 +53,14 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
niri.url = "github:sodiboo/niri-flake";
niri-unstable = {
url = "github:YalTeR/niri";
flake = false;
};
niri = {
url = "github:sodiboo/niri-flake";
inputs.niri-unstable.follows = "niri-unstable";
};
nur.url = "github:nix-community/NUR";
stylix = {
url = "github:danth/stylix";

View file

@ -1,47 +1,15 @@
{ config, ... }:
let
# tabIndicatorConfig = # kdl
# ''
# tab-indicator {
# hide-when-single-tab
# gap 5
# width 6
# length total-proportion=0.5
# position "right"
# gaps-between-tabs 2
# }
# '';
# shadowConfig =
# # kdl
# ''
# shadow {
# on
# spread 0
# softness 10
# color "#000000dd"
# }
# '';
# tabBinds = # kdl
# ''
# Mod+T { toggle-column-tabbed-display; }
# '';
extraConfig =
# kdl
'''';
finalNiriConfig =
# builtins.replaceStrings
# [ "layout {" ]
# [
# ("layout {\n" + shadowConfig + "\n" + tabIndicatorConfig)
# ]
# (config.programs.niri.finalConfig + "\n" + extraConfig)
# |>
# builtins.replaceStrings
# [ "binds {" ]
# [
# ("binds {\n" + tabBinds)
# ];
config.programs.niri.finalConfig + "\n" + extraConfig;
builtins.replaceStrings
[ "output \"${config.lib.monitors.mainMonitorName}\" {" ]
[ "output \"${config.lib.monitors.mainMonitorName}\" {\nfocus-at-startup" ]
config.programs.niri.finalConfig
+ "\n"
+ extraConfig;
in
{
home.file.".config/niri/config-override.kdl".text = finalNiriConfig;

View file

@ -41,6 +41,7 @@ in
(niriAction "super + ctrl + f" "toggle-windowed-fullscreen")
(niriAction "super + c" "center-column")
(niriAction "super + {_, shift +} {minus, equal}" "set-{column\\-width, window\\-height} \"{\\-, +}10%\"")
(niriAction "super + alt + {h, j, k, l}" "move-floating-window -{x \\-10, y +10, y \\-10, x +10}")
(niriAction "{ctrl +, alt +} print" "screenshot-{screen, window}")
(niriAction "print" "screenshot")
{