The most horrible niri hack ever

This commit is contained in:
elkowar 2024-12-17 19:25:21 +01:00
parent 3e5626ae24
commit abd1f5e531
Signed by: ElKowar
GPG key ID: 862BA3D7D7760F13
7 changed files with 56 additions and 55 deletions

View file

@ -1,32 +0,0 @@
eggs = {}
eggs["alacritty"] = { enabled = true, targets = "~" }
eggs["eww"] = { enabled = true, targets = "~" }
eggs["eww-bar"] = { enabled = true, targets = "~" }
eggs["foot"] = { enabled = true, targets = "~", templates = { ".config/foot/foot.ini" } }
eggs["git"] = { enabled = true, targets = "~", templates = { ".gitconfig" } }
eggs["niri"] = { enabled = true, targets = "~", templates = { ".config/niri/*" } }
eggs["nvim"] = { enabled = true, targets = "~" }
eggs["other-dotfiles-stuff"] = { enabled = true, targets = "~" }
eggs["profile"] = { enabled = true, targets = "~" }
eggs["starship"] = { enabled = true, targets = "~" }
eggs["sway"] = { enabled = true, targets = "~" }
eggs["tmux"] = { enabled = true, targets = "~" }
eggs["zed"] = { enabled = true, targets = "~" }
eggs["zsh"] = { enabled = true, targets = "~" }
eggs["rofi"] = { enabled = true, targets = "~" }
eggs["gtk"] = { enabled = true, targets = "~" }
eggs["powershell"] = { enabled = false, targets = "~" }
eggs["scripts"] = { enabled = true, targets = "~" }
eggs["sioyek"] = { enabled = false, targets = "~" }
eggs["waybar"] = { enabled = false, targets = "~" }
eggs["zathura"] = { enabled = false, targets = "~" }
eggs["eww-laptop"] = { enabled = false, targets = "~" }
eggs["hyprland"] = { enabled = false, targets = "~" }
eggs["hyprlock"] = { enabled = false, targets = "~" }
eggs["kakoune"] = { enabled = false, targets = "~" }
eggs["kanata"] = { enabled = false, targets = "~" }
eggs["karabiner"] = { enabled = false, targets = "~" }
return eggs

View file

@ -1 +0,0 @@

View file

@ -1,7 +1,6 @@
[Settings] [Settings]
gtk-theme-name=gruvbox-phocus ;; gtk-theme-name=gruvbox-phocus
gtk-icon-theme-name=oomox-materia-dark gtk-icon-theme-name=oomox-materia-dark
gtk-font-name=xos4 Terminus
gtk-menu-images=1 gtk-menu-images=1
gtk-xft-hinting=1 gtk-xft-hinting=1
gtk-xft-rgba=rgb gtk-xft-rgba=rgb

View file

@ -37,6 +37,7 @@ cursor {
} }
environment { environment {
DISPLAY ":0" DISPLAY ":0"
// GDK_BACKEND "x11" // GDK_BACKEND "x11"
} }
@ -137,7 +138,7 @@ animations {
float map(float value, float min1, float max1, float min2, float max2) { float map(float value, float min1, float max1, float min2, float max2) {
return min2 + (value - min1) * (max2 - min2) / (max1 - min1); return min2 + (value - min1) * (max2 - min2) / (max1 - min1);
} }
vec4 open_color(vec3 coords_geo, vec3 size_geo) { vec4 open_color(vec3 coords_geo, vec3 size_geo) {
float cur = niri_clamped_progress; float cur = niri_clamped_progress;
if (coords_geo.x > cur) { return vec4(0.0); } if (coords_geo.x > cur) { return vec4(0.0); }
vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0 ), coords_geo.y, coords_geo.z); vec3 coord = vec3(map(coords_geo.x,0.0, cur, 0.0, 1.0 ), coords_geo.y, coords_geo.z);
@ -195,6 +196,13 @@ window-rule {
match title=r#"^.* is sharing your screen.$"#; match title=r#"^.* is sharing your screen.$"#;
} }
// window-rule {
// match is-active-in-column=false;
// max-height 100;
// min-height 100;
// }
window-rule { window-rule {
clip-to-geometry true clip-to-geometry true
geometry-corner-radius 8 geometry-corner-radius 8
@ -322,6 +330,39 @@ binds {
Mod+BracketRight { consume-or-expel-window-right; } Mod+BracketRight { consume-or-expel-window-right; }
Mod+R { switch-preset-column-width; } Mod+R { switch-preset-column-width; }
Mod+Ctrl+R { spawn "sh" "-c" r#"
niri msg action focus-column-right \
&& niri msg action set-column-width 33% \
&& niri msg action focus-column-left \
&& niri msg action set-column-width 67%
"#;
}
Mod+Ctrl+Shift+R { spawn "sh" "-c" r#"
niri msg action set-column-width 33% \
&& niri msg action focus-column-right \
&& niri msg action set-column-width 67% \
&& niri msg action focus-column-left
"#;
}
Mod+Ctrl+T { spawn "sh" "-c" r#"
niri msg action set-column-width 50% \
&& niri msg action focus-column-right \
&& niri msg action set-column-width 50% \
&& niri msg action focus-column-left \
&& niri msg action focus-column-right \
&& niri msg action focus-column-left
"#;
}
Mod+Ctrl+Shift+T { spawn "sh" "-c" r#"
niri msg action set-column-width 34% \
&& niri msg action focus-column-right \
&& niri msg action set-column-width 33% \
&& niri msg action focus-column-right \
&& niri msg action set-column-width 33% \
&& niri msg action focus-column-left \
&& niri msg action focus-column-left
"#;
}
Mod+Shift+R { reset-window-height; } Mod+Shift+R { reset-window-height; }
Mod+F { maximize-column; } Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; } Mod+Shift+F { fullscreen-window; }

View file

@ -1,11 +0,0 @@
device = {
thinkix = function()
return SYSTEM.hostname == "thinkix"
end,
desktop = function()
return SYSTEM.hostname == "fedora.fritz.box"
end,
laptop = function()
return SYSTEM.hostname == "thinkix" or SYSTEM.hostname == "frissnix"
end,
}

View file

@ -3,36 +3,41 @@ export const device = #{
thinkix: SYSTEM.hostname == "thinkix", thinkix: SYSTEM.hostname == "thinkix",
desktop: SYSTEM.hostname == "fedora.fritz.box", desktop: SYSTEM.hostname == "fedora.fritz.box",
laptop: SYSTEM.hostname == "thinkix" || SYSTEM.hostname == "frissnix", laptop: SYSTEM.hostname == "thinkix" || SYSTEM.hostname == "frissnix",
macbook: false,
}; };
export let eggs = #{ export let eggs = #{
"alacritty": #{ enabled: true, targets: "~" }, "alacritty": #{ enabled: true, targets: "~/.config/alacritty" },
"eww": #{ enabled: true, targets: "~" }, "eww": #{ enabled: true, targets: "~" },
"eww-bar": #{ enabled: true, targets: "~" }, "eww-bar": #{ enabled: true, targets: "~" },
"foot": #{ enabled: true, targets: "~", templates: [".config/foot/foot.ini"] }, "foot": #{ enabled: true, targets: "~", templates: [".config/foot/foot.ini"] },
"git": #{ enabled: true, targets: "~", templates: [".gitconfig"] }, "git": #{ enabled: true, targets: "~", templates: [".gitconfig"] },
"niri": #{ enabled: true, targets: "~/.config/niri", templates: ["**/*.kdl"] }, "niri": #{ enabled: true, targets: "~/.config/niri", templates: ["**/*.kdl"] },
"nvim": #{ enabled: true, targets: "~" }, "nvim": #{ enabled: true, targets: "~", main_file: ".config/nvim/fnl/main.fnl" },
"other-dotfiles-stuff": #{ enabled: true, targets: "~" },
"profile": #{ enabled: true, targets: "~" }, "profile": #{ enabled: true, targets: "~" },
"starship": #{ enabled: true, targets: "~" }, "starship": #{ enabled: true, targets: "~" },
"sway": #{ enabled: true, targets: "~" }, "sway": #{ enabled: true, targets: "~" },
"tmux": #{ enabled: !device.laptop, targets: "~" },
"zed": #{ enabled: true, targets: "~" }, "zed": #{ enabled: true, targets: "~" },
"zsh": #{ enabled: true, targets: "~" }, "zsh": #{ enabled: true, targets: "~" },
"rofi": #{ enabled: true, targets: "~" }, "rofi": #{ enabled: true, targets: "~" },
"gtk": #{ enabled: true, targets: "~" }, "gtk": #{ enabled: true, targets: "~" },
"scripts": #{ enabled: true, targets: "~/scripts" }, "scripts": #{ enabled: true, targets: "~/scripts" },
"hyprlock": #{ enabled: device.laptop, targets: "~" },
"kanata": #{ enabled: device.laptop, targets: "~" },
"waybar": #{ enabled: device.laptop, targets: "~" },
"karabiner": #{ enabled: device.macbook, targets: "~" },
"powershell": #{ enabled: false, targets: "~" }, "powershell": #{ enabled: false, targets: "~" },
"sioyek": #{ enabled: false, targets: "~" }, "sioyek": #{ enabled: false, targets: "~" },
"waybar": #{ enabled: false, targets: "~" },
"zathura": #{ enabled: false, targets: "~" }, "zathura": #{ enabled: false, targets: "~" },
"eww-laptop": #{ enabled: false, targets: "~" }, "eww-laptop": #{ enabled: false, targets: "~" },
"hyprland": #{ enabled: false, targets: "~" }, "hyprland": #{ enabled: false, targets: "~" },
"hyprlock": #{ enabled: false, targets: "~" },
"kakoune": #{ enabled: false, targets: "~" }, "kakoune": #{ enabled: false, targets: "~" },
"kanata": #{ enabled: false, targets: "~" }, "tmux": #{ enabled: false, targets: "~" },
"karabiner": #{ enabled: false, targets: "~" },
// This is just random files that should be in the dotfiles, but shouldn't ever be deployed
"other-dotfiles-stuff": #{ enabled: false, targets: "~" },
} }