streaming hell

This commit is contained in:
Schrottkatze 2025-10-14 14:22:39 +02:00
commit c3e08a9df4
No known key found for this signature in database
4 changed files with 55 additions and 6 deletions

View file

@ -8,10 +8,11 @@ def "main find" [
open $file --raw open $file --raw
| lines | lines
| enumerate | enumerate
| update item {|it| $it.item | parse '{current}#:{name}:-{template}-:#' } | update item {|it| $it.item | parse '{current}# :{name}:-{template}-:#' }
| filter {|it| $it.item | is-not-empty} | where {|it| $it.item | is-not-empty }
| flatten -a | flatten -a
| rename -c { index: line } | rename -c { index: line }
| to json
} }
# TODO: support mroe then single template # TODO: support mroe then single template
@ -22,11 +23,12 @@ def "main edit" [
--preview --preview
] { ] {
let template = main find $file let template = main find $file
| from json
| where name == $name | where name == $name
| first; | first;
let new = $template.template let new = $template.template
| str replace $"%($name)%" $to | str replace $"%($name)%" $to
| append $" #:($template.name):-($template.template)-:#" | append $" # :($template.name):-($template.template)-:#"
| str join; | str join;
let rest = open $file --raw let rest = open $file --raw
| lines | lines

View file

@ -12,6 +12,23 @@ tbuild:
update: update:
nix flake update --commit-lock-file --log-format multiline nix flake update --commit-lock-file --log-format multiline
toggle-gaps: replace-gaps test
replace-gaps:
#!/usr/bin/env nu
let style_file = './modules/desktop/home/niri/style.nix';
let gap_state = ./build-utils/templ-edit.nu find $style_file
| from json
| get 0.current
| parse " gaps = {v}; "
| get v.0;
print $gap_state;
if $gap_state == "0" {
./build-utils/templ-edit.nu edit $style_file GAPS 15
} else {
./build-utils/templ-edit.nu edit $style_file GAPS 0
}
update-typst-configs: update-typst-configs:
#!/usr/bin/env nu #!/usr/bin/env nu
let file = './modules/media/typst.nix'; let file = './modules/media/typst.nix';

View file

@ -1,6 +1,8 @@
(include "topBar/topBar.yuck") (include "topBar/topBar.yuck")
(include "bottomBar/bottomBar.yuck") (include "bottomBar/bottomBar.yuck")
(include "topBar/time.yuck")
(defwindow streamUi (defwindow streamUi
:monitor 0 :monitor 0
:stacking "fg" :stacking "fg"
@ -10,6 +12,25 @@
:width "640px" :width "640px"
:height "100%" :height "100%"
:anchor "center right") :anchor "center right")
(box (centerbox
:style "padding: 0 3px"
:orientation "vertical"
(label :text "hi") (label :text "hi")
)) (label :text "hi")
(centerbox
:valign "end"
(box
:halign "start"
(systray
:icon-size 18
:spacing 3
)
)
(box)
(box
:halign "end"
(time)
)
)
)
)

View file

@ -17,7 +17,7 @@
animations.shaders.window-open = builtins.readFile ./shaders/glitch-open.frag; animations.shaders.window-open = builtins.readFile ./shaders/glitch-open.frag;
layout = { layout = {
gaps = 15; gaps = 15; # :GAPS:- gaps = %GAPS%;-:#
focus-ring.enable = false; focus-ring.enable = false;
border = { border = {
enable = true; enable = true;
@ -58,6 +58,9 @@
is-floating = true; is-floating = true;
} }
]; ];
excludes = [
{ app-id = "steam_app_[0-9]+"; }
];
baba-is-float = true; baba-is-float = true;
shadow = { shadow = {
offset.y = 0; offset.y = 0;
@ -68,6 +71,12 @@
enable = true; enable = true;
}; };
} }
{
matches = [
{ app-id = "(steam_app_[0-9]+|[Mm]inecraft.*|gamescope)"; }
];
border.enable = false;
}
{ {
geometry-corner-radius = geometry-corner-radius =
let let