about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hosts/home.nix1
-rw-r--r--packages/default.nix1
-rw-r--r--packages/lemacs/default.nix8
3 files changed, 10 insertions, 0 deletions
diff --git a/hosts/home.nix b/hosts/home.nix
index 5fb9f4f..9b67b1c 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -41,6 +41,7 @@ in
       smart-wallpaper
       dwmbar
       xmonadctl
+      lemacs
     ]);
   };
 
diff --git a/packages/default.nix b/packages/default.nix
index 83797f0..81be856 100644
--- a/packages/default.nix
+++ b/packages/default.nix
@@ -9,5 +9,6 @@ final: prev:
     manga-cli = prev.callPackage ./manga-cli { };
     mov-cli = prev.callPackage ./mov-cli { };
     xmonadctl = prev.callPackage ./xmonadctl { };
+    lemacs = prev.callPackage ./lemacs { };
   };
 }
diff --git a/packages/lemacs/default.nix b/packages/lemacs/default.nix
new file mode 100644
index 0000000..bab75ea
--- /dev/null
+++ b/packages/lemacs/default.nix
@@ -0,0 +1,8 @@
+{ writeShellScriptBin, ... }:
+writeShellScriptBin "lemacs" ''
+if [ -n "$DISPLAY" ]; then
+    emacsclient -a "" -n -c "$@"
+else
+    emacsclient -a "" -c "$@"
+fi
+''