From 18f08bf53591f3e68043730a627889957009deb6 Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 15 Mar 2026 22:13:15 +0100 Subject: browser stuff --- hm/env/niri/binds.nix | 10 ++++++++++ hm/env/niri/niri.nix | 15 +++++++++++++++ 2 files changed, 25 insertions(+) (limited to 'hm/env/niri') diff --git a/hm/env/niri/binds.nix b/hm/env/niri/binds.nix index 27eb583..c5c1f56 100644 --- a/hm/env/niri/binds.nix +++ b/hm/env/niri/binds.nix @@ -11,6 +11,15 @@ let ssPath = "${toString config.hm.conf.xdg-dirs.storagePath}/pics/ss/$(date +%Y-%m-%d_%H-%M-%S)"; obsEnabled = config.hm.soft.obs.enable or false; obsPass = if obsEnabled then osConfig.sops.secrets."obs/websocket_password".path else ""; + otter-menu = pkgs.writeShellScriptBin "otter-menu" '' + ${pkgs.foot}/bin/footclient -a otter-launcher otter-launcher & + ${pkgs.niri}/bin/niri msg event-stream | while read -r line; do + if echo "$line" | ${pkgs.ripgrep-all}/bin/rga -aq "Window focus changed"; then + ${pkgs.procps}/bin/pkill -f "otter-launcher" + exit 0 + fi + done + ''; in { # --- System & Media --- @@ -46,6 +55,7 @@ in "Super+B".action = spawn "librewolf"; "Super+S".action = spawn "spotify"; "Super+E".action = spawn "thunar"; + "Super+Space".action = spawn "${otter-menu}/bin/otter-menu"; # --- Navigation: Columns & Workspaces --- "Mod+H".action = focus-column-or-monitor-left; diff --git a/hm/env/niri/niri.nix b/hm/env/niri/niri.nix index 2274259..8850396 100644 --- a/hm/env/niri/niri.nix +++ b/hm/env/niri/niri.nix @@ -81,6 +81,21 @@ in }; }; window-rules = [ + { + matches = [ { app-id = "^otter-launcher$"; } ]; + open-floating = true; + + default-column-width.fixed = 700; + default-window-height.fixed = 450; + + default-floating-position = { + relative-to = "top"; + x = 0; + y = 100; + }; + + focus-ring.active.color = "#fab387"; + } { matches = [ { app-id = "^Bitwarden$"; } -- cgit v1.3