Migrate to new config

This commit is contained in:
elkowar 2025-01-26 17:15:49 +01:00
parent 49746bd334
commit f1d41e1130
Signed by: ElKowar
GPG key ID: 862BA3D7D7760F13
4 changed files with 54 additions and 41 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/.yolk_git /.yolk_git
/.deployed_cache /.deployed_cache
/.git

View file

@ -1,4 +1,4 @@
// vim:set ft=kdl: // vim:set ft=kdl shiftwidth=4 commentstring=//%s:
input { input {
keyboard { keyboard {
xkb { xkb {
@ -52,26 +52,26 @@ output "Philips Consumer Electronics Company PHL 345B1C 0x00008E7C" {
position x=0 y=0 position x=0 y=0
// {% end %} // {% end %}
} }
// {% if device.desktop %} // {% if device.desktop %}
//<yolk> output "HDMI-A-1" { //<yolk> output "HDMI-A-1" {
//<yolk> mode "2560x1440" //<yolk> mode "2560x1440"
//<yolk> scale 1 //<yolk> scale 1
//<yolk> position x=0 y=0 //<yolk> position x=0 y=0
//<yolk> } //<yolk> }
// {% elif device.thinkix %} // {% elif device.thinkix %}
//<yolk> output "HDMI-A-1" { //<yolk> output "HDMI-A-1" {
//<yolk> mode "1920x1080" //<yolk> mode "1920x1080"
//<yolk> scale 1 //<yolk> scale 1
//<yolk> position x=0 y=0 //<yolk> position x=0 y=0
//<yolk> //off //<yolk> //off
//<yolk> } //<yolk> }
//<yolk> output "eDP-1" { //<yolk> output "eDP-1" {
//<yolk> mode "1920x1080@60" //<yolk> mode "1920x1080@60"
//<yolk> scale 1.0 //<yolk> scale 1.0
//<yolk> transform "normal" //<yolk> transform "normal"
//<yolk> position x=0 y=1440 //<yolk> position x=0 y=1440
//<yolk> } //<yolk> }
// {% end %} // {% end %}
@ -139,15 +139,15 @@ animations {
// duration-ms 200 // duration-ms 200
// curve "ease-out-quad" // curve "ease-out-quad"
custom-shader r" custom-shader r"
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);
return texture2D(niri_tex, (niri_geo_to_tex * coord).st); return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
} }
" "
} }
window-close { window-close {
@ -155,15 +155,15 @@ animations {
// duration-ms 200 // duration-ms 200
// curve "ease-out-quad" // curve "ease-out-quad"
custom-shader r" custom-shader r"
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 close_color(vec3 coords_geo, vec3 size_geo) { vec4 close_color(vec3 coords_geo, vec3 size_geo) {
float cur = 1.0-niri_clamped_progress; float cur = 1.0-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);
return texture2D(niri_tex, (niri_geo_to_tex * coord).st); return texture2D(niri_tex, (niri_geo_to_tex * coord).st);
} }
" "
} }
} }
@ -182,12 +182,14 @@ window-rule {
match app-id=r#"1Password"# match app-id=r#"1Password"#
match title=r#"[gG]mail"# match title=r#"[gG]mail"#
match title=r#".*[Ww]hats[aA]pp.*$"# match title=r#".*[Ww]hats[aA]pp.*$"#
match title=r#".*Ente Photos.*"#
block-out-from "screen-capture" block-out-from "screen-capture"
} }
window-rule { window-rule {
match app-id=r#"^1Password$"# match app-id=r#"^1Password$"#
open-floating true open-floating true
} }
window-rule { window-rule {
match title=r#"Picture-in-Picture"# match title=r#"Picture-in-Picture"#
max-width 300 max-width 300
@ -203,6 +205,7 @@ window-rule {
window-rule { window-rule {
match title=r#"^.* is sharing your screen.$"#; match title=r#"^.* is sharing your screen.$"#;
open-floating true
} }
// window-rule { // window-rule {
@ -213,6 +216,13 @@ window-rule {
window-rule { window-rule {
shadow {
on
spread 0
softness 20
// offset x=1 y=-1
}
clip-to-geometry true clip-to-geometry true
geometry-corner-radius 8 geometry-corner-radius 8
} }
@ -335,8 +345,8 @@ binds {
//Mod+Period { expel-window-from-column; } //Mod+Period { expel-window-from-column; }
// There are also commands that consume or expel a single window to the side. // There are also commands that consume or expel a single window to the side.
Mod+BracketLeft { consume-or-expel-window-left; } Mod+BracketLeft { consume-or-expel-window-left; }
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#" Mod+Ctrl+R { spawn "sh" "-c" r#"
@ -344,14 +354,14 @@ binds {
niri msg action set-column-width 33% niri msg action set-column-width 33%
niri msg action focus-column-left niri msg action focus-column-left
niri msg action set-column-width 67% niri msg action set-column-width 67%
"#; "#;
} }
Mod+Ctrl+Shift+R { spawn "sh" "-c" r#" Mod+Ctrl+Shift+R { spawn "sh" "-c" r#"
niri msg action set-column-width 33% niri msg action set-column-width 33%
niri msg action focus-column-right niri msg action focus-column-right
niri msg action set-column-width 67% niri msg action set-column-width 67%
niri msg action focus-column-left niri msg action focus-column-left
"#; "#;
} }
Mod+Ctrl+T { spawn "sh" "-c" r#" Mod+Ctrl+T { spawn "sh" "-c" r#"
niri msg action set-column-width 50% niri msg action set-column-width 50%
@ -360,7 +370,7 @@ binds {
niri msg action focus-column-left niri msg action focus-column-left
niri msg action focus-column-right niri msg action focus-column-right
niri msg action focus-column-left niri msg action focus-column-left
"#; "#;
} }
Mod+Ctrl+Shift+T { spawn "sh" "-c" r#" Mod+Ctrl+Shift+T { spawn "sh" "-c" r#"
niri msg action set-column-width 34% niri msg action set-column-width 34%
@ -370,7 +380,7 @@ binds {
niri msg action set-column-width 33% niri msg action set-column-width 33%
niri msg action focus-column-left niri msg action focus-column-left
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; }
@ -391,9 +401,9 @@ binds {
Ctrl+Shift+Print { Ctrl+Shift+Print {
spawn "sh" "-c" r#" spawn "sh" "-c" r#"
file=~/Videos/recordings/"$(date +%s)".mp4 file=~/Videos/recordings/"$(date +%s)".mp4
wf-recorder -c h264_vaapi -r 60 --bframes 0 -g "$(slurp -b '#00000090' -w 0)" -f "$file" wf-recorder -c h264_vaapi -r 60 --bframes 0 -g "$(slurp -b '#00000090' -w 0)" -f "$file"
wl-copy file:/"$file" -t text/uri-list wl-copy file:/"$file" -t text/uri-list
"#; "#;
} }

View file

@ -89,6 +89,8 @@
"panel.background": "#282828", "panel.background": "#282828",
"tab_bar.background": "#282828", "tab_bar.background": "#282828",
"border": "#3c3836" // "border": "#3c3836",
"border": "#282828",
"title_bar.background": "#1d2021"
} }
} }

View file

@ -22,7 +22,7 @@ export let eggs = #{
"eww-bar": merge_into_home(device.linux && device.desktop, []), "eww-bar": merge_into_home(device.linux && device.desktop, []),
"foot": #{ enabled: device.linux, targets: "~/.config/foot", templates: ["foot.ini"] }, "foot": #{ enabled: device.linux, targets: "~/.config/foot", templates: ["foot.ini"] },
"git": merge_into_home(true, [".gitconfig"]), "git": merge_into_home(true, [".gitconfig"]),
"niri": #{ enabled: device.linux, targets: "~/.config/niri", templates: ["**/*.kdl"] }, "niri": #{ enabled: device.linux, targets: "~/.config/niri", templates: ["**/*.kdl"], main_file: "config.kdl" },
"nvim": #{ strategy: "put", targets: "~/.config/nvim", main_file: "init.lua" }, "nvim": #{ strategy: "put", targets: "~/.config/nvim", main_file: "init.lua" },
"profile": #{ enabled: device.linux, strategy: "merge", targets: "~" }, "profile": #{ enabled: device.linux, strategy: "merge", targets: "~" },
"starship": merge_into_home(true, []), "starship": merge_into_home(true, []),