nixos: gen 93 @ lilac — 2026-10-21 14:32 26.05.20260918.cf9d2fb (Yarara) -----
This commit is contained in:
+24
-3
@@ -1,6 +1,27 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
pip-handler = pkgs.writeShellScriptBin "pip-handler" ''
|
||||
# Listen to Niri window events continuously
|
||||
niri msg event-stream | while read -r line; do
|
||||
# Check if a new window event fired
|
||||
if echo "$line" | grep -q '"WindowOpened"'; then
|
||||
|
||||
# Give the window a split second to populate its title metadata
|
||||
sleep 0.1
|
||||
|
||||
# Use nirius or niri msg to evaluate the currently focused window title
|
||||
# If it matches Picture-in-Picture, invoke nirius toggle-follow-mode
|
||||
WINDOW_TITLE=$(niri msg focused-window | grep "Title:" | sed 's/Title: //')
|
||||
|
||||
if [[ "$WINDOW_TITLE" =~ [Pp]icture[-\ ]in[-\ ][Pp]icture ]]; then
|
||||
# Executes nirius follow mode trigger
|
||||
nirius toggle-follow-mode --policy always
|
||||
fi
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
launch-lisgd = pkgs.writeShellScriptBin "launch-lisgd" ''
|
||||
# Search for the capacitive touch layer and extract its event number.
|
||||
# UPDATE 'Touchscreen' below to match the unique word you found in step 1.
|
||||
@@ -128,9 +149,9 @@ in
|
||||
window-rule {
|
||||
match title="(?i)picture.in.picture"
|
||||
open-floating true
|
||||
default-column-width { fixed 480; }
|
||||
default-window-height { fixed 270; }
|
||||
default-floating-position x=25 y=25 relative-to="top-right"
|
||||
default-column-width { fixed 240; }
|
||||
default-window-height { fixed 185; }
|
||||
default-floating-position x=8 y=8 relative-to="top-right"
|
||||
}
|
||||
|
||||
window-rule {
|
||||
|
||||
Reference in New Issue
Block a user