From 04d2c4bd10c104f5200b84a0a1e98aaf46a59525 Mon Sep 17 00:00:00 2001 From: kenji Date: Wed, 24 Jun 2026 14:07:10 -0500 Subject: [PATCH] feat(hypr): PiP now works. --- apps/hyprland/hypr/rules.nix | 7 +++++++ apps/waybar/default.nix | 4 ++++ apps/waybar/waybar-seek.nix | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/hyprland/hypr/rules.nix b/apps/hyprland/hypr/rules.nix index 9303a79..9b476da 100644 --- a/apps/hyprland/hypr/rules.nix +++ b/apps/hyprland/hypr/rules.nix @@ -4,6 +4,13 @@ # Make all inactive windows transparent "match:class .*, opacity 1 0.8" "match:class firefox, match:title (?i).*bitwarden.*, no_screen_share on" + + # PiP + "match:title ^(Picture(-| )in(-| )[Pp]icture)$, float 1" + "match:title ^(Picture(-| )in(-| )[Pp]icture)$, pin 1" + "match:title ^(Picture(-| )in(-| )[Pp]icture)$, size 400 225" + "match:title ^(Picture(-| )in(-| )[Pp]icture)$, move monitor_w-window_w-20 monitor_h-window_h-20" + "match:title ^(Picture(-| )in(-| )[Pp]icture)$, hyprbars:no_bar on" ]; workspace = [ ]; diff --git a/apps/waybar/default.nix b/apps/waybar/default.nix index 1d3663b..758dbe1 100644 --- a/apps/waybar/default.nix +++ b/apps/waybar/default.nix @@ -94,6 +94,10 @@ in { enable = true; settings = { mainBar = { + start_hidden = true; + ipc = true; + "on-sigusr1" = "hide"; + "on-sigusr2" = "show"; reload_style_on_change = true; layer = "top"; position = "top"; diff --git a/apps/waybar/waybar-seek.nix b/apps/waybar/waybar-seek.nix index af43380..db21d37 100644 --- a/apps/waybar/waybar-seek.nix +++ b/apps/waybar/waybar-seek.nix @@ -12,7 +12,7 @@ owner = "waliori"; repo = "waybar_peek"; rev = "main"; # You can pin a specific commit hash here for stability - hash = lib.fakeHash; # Nix will error on first build and give you the correct hash to paste here + hash = "sha256-Vd462KxLPqBeSJZ/1A0MChG8Q2XQMiubiKlpdGtZZhw="; # Nix will error on first build and give you the correct hash to paste here }; buildInputs = [pkgs.python3];