From 9ee5f40aa86ffe7f8405ab834c7b5f63c4ae0db0 Mon Sep 17 00:00:00 2001 From: kenji Date: Sun, 11 Jan 2026 19:32:11 -0600 Subject: [PATCH] docs: add FIXME for waybar popup --- apps/waybar/default.nix | 76 ++++++++++++++++++++--------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/apps/waybar/default.nix b/apps/waybar/default.nix index 0ebc8c3..cd51579 100644 --- a/apps/waybar/default.nix +++ b/apps/waybar/default.nix @@ -4,53 +4,53 @@ myConfig, ... }: let + # FIXME: waybar overlaps fullscreen display when restarting waybar hakase-popup-launch = pkgs.writeShellScriptBin "hakase-popup-launch" '' - tui_name=$1 - active_popup=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.")) | .class') + tui_name=$1 + active_popup=$(${pkgs.hyprland}/bin/hyprctl clients -j | ${pkgs.jq}/bin/jq -r '.[] | select(.class | startswith("org.hakase.")) | .class') - if [[ -z "''${tui_name}" ]]; then - echo "Usage: $(basename "$0") [tui-name]" - exit 1 - fi - - popup_checker() { - if [[ -z "$active_popup" ]]; then - echo "no_popup" - elif [[ "$active_popup" != "org.hakase.popup.''${tui_name}" ]]; then - echo "different" - else - echo "same" - fi - } + if [[ -z "''${tui_name}" ]]; then + echo "Usage: $(basename "$0") [tui-name]" + exit 1 + fi + popup_checker() { + if [[ -z "$active_popup" ]]; then + echo "no_popup" + elif [[ "$active_popup" != "org.hakase.popup.''${tui_name}" ]]; then + echo "different" + else + echo "same" + fi + } launch() { - exec ${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup."''${tui_name}" -e "''${tui_name}" - } + exec ${pkgs.util-linux}/bin/setsid uwsm-app -- xdg-terminal-exec --app-id=org.hakase.popup."''${tui_name}" -e "''${tui_name}" + } - focus() { - exec ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "class:org.hakase.popup.''${tui_name}" - } + focus() { + exec ${pkgs.hyprland}/bin/hyprctl dispatch focuswindow "class:org.hakase.popup.''${tui_name}" + } - replace() { - ${pkgs.hyprland}/bin/hyprctl dispatch closewindow "class:''${active_popup}" - sleep 0.3 - launch - } + replace() { + ${pkgs.hyprland}/bin/hyprctl dispatch closewindow "class:''${active_popup}" + sleep 0.3 + launch + } - run() { - local status - status=$(popup_checker) + run() { + local status + status=$(popup_checker) - if [[ "$status" == "no_popup" ]]; then - launch - elif [[ "$status" == "same" ]]; then - focus - elif [[ "$status" == "different" ]]; then - replace - fi - } + if [[ "$status" == "no_popup" ]]; then + launch + elif [[ "$status" == "same" ]]; then + focus + elif [[ "$status" == "different" ]]; then + replace + fi + } - run + run ''; in { wayland.windowManager.hyprland.settings = {