diff --git a/build-utils/templ-edit.nu b/build-utils/templ-edit.nu index e38fc89..34a1ff8 100755 --- a/build-utils/templ-edit.nu +++ b/build-utils/templ-edit.nu @@ -8,10 +8,11 @@ def "main find" [ open $file --raw | lines | enumerate - | update item {|it| $it.item | parse '{current}#:{name}:-{template}-:#' } - | filter {|it| $it.item | is-not-empty} + | update item {|it| $it.item | parse '{current}# :{name}:-{template}-:#' } + | where {|it| $it.item | is-not-empty } | flatten -a | rename -c { index: line } + | to json } # TODO: support mroe then single template @@ -22,11 +23,12 @@ def "main edit" [ --preview ] { let template = main find $file + | from json | where name == $name | first; let new = $template.template | str replace $"%($name)%" $to - | append $" #:($template.name):-($template.template)-:#" + | append $" # :($template.name):-($template.template)-:#" | str join; let rest = open $file --raw | lines diff --git a/justfile b/justfile index 76fb10c..4666fa8 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,23 @@ tbuild: update: 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: #!/usr/bin/env nu let file = './modules/media/typst.nix'; diff --git a/modules/desktop/home/eww/configDir/eww.yuck b/modules/desktop/home/eww/configDir/eww.yuck index 5b0f9b6..f6f20f5 100644 --- a/modules/desktop/home/eww/configDir/eww.yuck +++ b/modules/desktop/home/eww/configDir/eww.yuck @@ -1,6 +1,8 @@ (include "topBar/topBar.yuck") (include "bottomBar/bottomBar.yuck") +(include "topBar/time.yuck") + (defwindow streamUi :monitor 0 :stacking "fg" @@ -10,6 +12,25 @@ :width "640px" :height "100%" :anchor "center right") - (box + (centerbox + :style "padding: 0 3px" + :orientation "vertical" (label :text "hi") - )) + (label :text "hi") + (centerbox + :valign "end" + (box + :halign "start" + (systray + :icon-size 18 + :spacing 3 + ) + ) + (box) + (box + :halign "end" + (time) + ) + ) + ) +) diff --git a/modules/desktop/home/niri/style.nix b/modules/desktop/home/niri/style.nix index 3b5822d..e9b0085 100644 --- a/modules/desktop/home/niri/style.nix +++ b/modules/desktop/home/niri/style.nix @@ -17,7 +17,7 @@ animations.shaders.window-open = builtins.readFile ./shaders/glitch-open.frag; layout = { - gaps = 15; + gaps = 15; # :GAPS:- gaps = %GAPS%;-:# focus-ring.enable = false; border = { enable = true; @@ -58,6 +58,9 @@ is-floating = true; } ]; + excludes = [ + { app-id = "steam_app_[0-9]+"; } + ]; baba-is-float = true; shadow = { offset.y = 0; @@ -68,6 +71,12 @@ enable = true; }; } + { + matches = [ + { app-id = "(steam_app_[0-9]+|[Mm]inecraft.*|gamescope)"; } + ]; + border.enable = false; + } { geometry-corner-radius = let