From c2a54d957ffcda0ab803e34e3bf53f66830e42ea Mon Sep 17 00:00:00 2001 From: Baitinq Date: Sun, 10 Jul 2022 17:01:12 +0200 Subject: Packages: Added lemacs emacs launching utility package --- hosts/home.nix | 1 + packages/default.nix | 1 + packages/lemacs/default.nix | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 packages/lemacs/default.nix 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 +'' -- cgit 1.4.1