diff --git a/home-manager/modules/emacs/default.nix b/home-manager/modules/emacs/default.nix index 2108d1d..c139f0f 100644 --- a/home-manager/modules/emacs/default.nix +++ b/home-manager/modules/emacs/default.nix @@ -32,6 +32,13 @@ in { options.eboskma.programs.emacs = { enable = mkEnableOption "activate emacs"; + + package = mkOption { + description = "The emacs package to install"; + type = types.package; + default = emacs; + }; + daemon = mkOption { description = "Whether to enable emacs daemon"; type = types.bool; diff --git a/home-manager/modules/sway/default.nix b/home-manager/modules/sway/default.nix index c33f7bc..3193217 100644 --- a/home-manager/modules/sway/default.nix +++ b/home-manager/modules/sway/default.nix @@ -188,6 +188,8 @@ in "${mod}+l" = "exec ${swaylockcmd}"; "${mod}+p" = "mode resize"; + "${mod}+c" = mkIf (config.eboskma.programs.emacs.enable) "exec ${config.eboskma.programs.emacs.package}/bin/emacsclient -c"; + "${mod}+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name')"; "${mod}+Shift+Print" = "exec ${pkgs.grim}/bin/grim -o $(${pkgs.sway}/bin/swaymsg -t get_outputs | ${pkgs.jq}/bin/jq -r '.[] | select(.focused) | .name') - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f"; "${mod}+Shift+Ctrl+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f";