Commit aa8da5d06868

Vincent Demeester <vincent@sbr.pm>
2026-03-12 12:58:40
fix(org-capture): close frame on finalize, float
Removed -n flag from emacsclient so the frame stays connected and vde/window-delete-popup-frame hook can properly delete it after capture. Added niri window rule to open the capture frame as floating.
1 parent 5bb2c3c
Changed files (2)
dots
config
home
common
dots/config/niri/config.kdl
@@ -130,6 +130,14 @@ window-rule {
     default-column-width { fixed 800; }
 }
 
+// Open Emacs org-capture frame as floating and centered
+window-rule {
+    match app-id="emacs" title="capture"
+    open-floating true
+    default-column-width { proportion 0.4; }
+    default-window-height { proportion 0.55; }
+}
+
 window-rule {
     match is-floating=true
     shadow {
home/common/dev/emacs.nix
@@ -6,7 +6,7 @@
 let
   org-capture = pkgs.writeScriptBin "org-capture" ''
     #!${pkgs.stdenv.shell}
-    emacsclient -n -c -F '((name . "capture") (width . 150) (height . 90) (vde/window-popup-frame . t))' -e '(org-capture)'
+    emacsclient -c -F '((name . "capture") (width . 150) (height . 90) (vde/window-popup-frame . t))' -e '(org-capture)' &
   '';
   et = pkgs.writeScriptBin "et" ''
     #!${pkgs.stdenv.shell}