add(hyprland): hyprbars

This commit is contained in:
kenji
2026-01-01 23:40:10 -06:00
parent d224b12bab
commit 0327caa6d2
4 changed files with 23 additions and 7 deletions
+6 -5
View File
@@ -13,10 +13,10 @@
WINDOW_PATTERN="$1"
# Escaped Nix interpolation for shell default value logic
LAUNCH_COMMAND="''${2:- \"uwsm-app -- $WINDOW_PATTERN\"}"
LAUNCH_COMMAND="''${2:- \"uwsm-app -- $WINDOW_PATTERN\"}"
# Locate window address via hyprctl and jq
WINDOW_ADDRESS=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r --arg p "$WINDOW_PATTERN"
WINDOW_ADDRESS=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r --arg p "$WINDOW_PATTERN"
'.[] | select((.class | test("\\b" + $p + "\\b"; "i")) or (.title | test("\\b" + $p + "\\b"; "i"))) | .address' | head -n1)
if [[ -n $WINDOW_ADDRESS ]]; then
@@ -119,7 +119,7 @@
fi
done
fi
) &
) &
exit 0
'';
@@ -226,7 +226,7 @@ in {
"custom/omarchy" = {
format = "";
on-click = "omarchy-menu";
on-click = "nc -U $XDG_RUNTIME_DIR/walker/walker.sock";
on-click-right = "xdg-terminal-exec";
tooltip-format = "Omarchy Menu\n\nSuper + Alt + Space";
};
@@ -328,4 +328,5 @@ in {
};
};
};
}
}