about summary refs log tree commit diff
path: root/packages
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-10 17:01:12 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-07-10 17:01:12 +0200
commitc2a54d957ffcda0ab803e34e3bf53f66830e42ea (patch)
treed2bd836e43aacab527bdfc68b0b83dff6ddf13dc /packages
parentRemove qtcreator user package (diff)
downloadnixos-config-c2a54d957ffcda0ab803e34e3bf53f66830e42ea.tar.gz
nixos-config-c2a54d957ffcda0ab803e34e3bf53f66830e42ea.tar.bz2
nixos-config-c2a54d957ffcda0ab803e34e3bf53f66830e42ea.zip
Packages: Added lemacs emacs launching utility package
Diffstat (limited to 'packages')
-rw-r--r--packages/default.nix1
-rw-r--r--packages/lemacs/default.nix8
2 files changed, 9 insertions, 0 deletions
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
+''