about summary refs log tree commit diff
path: root/users/grfn/system/home/modules/desktop.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/grfn/system/home/modules/desktop.nix')
-rw-r--r--users/grfn/system/home/modules/desktop.nix17
1 files changed, 17 insertions, 0 deletions
diff --git a/users/grfn/system/home/modules/desktop.nix b/users/grfn/system/home/modules/desktop.nix
index fed3cb47a48f..cab3b658e031 100644
--- a/users/grfn/system/home/modules/desktop.nix
+++ b/users/grfn/system/home/modules/desktop.nix
@@ -14,6 +14,23 @@
       # Slack support is broken as of 2023-06-15
       withSlack = false;
     })
+    (writeShellApplication {
+      name = "edit-input";
+
+      runtimeInputs = [ xdotool xclip ];
+      text = ''
+        set -euo pipefail
+
+        sleep 0.2
+        xdotool key ctrl+a ctrl+c
+        xclip -out -selection clipboard > /tmp/EDIT
+        emacsclient -c /tmp/EDIT
+        xclip -in -selection clipboard < /tmp/EDIT
+        sleep 0.2
+        xdotool key ctrl+v
+        rm /tmp/EDIT
+      '';
+    })
   ];
 
   services.syncthing.tray.enable = true;