Add shortcut for emacs to sway

This commit is contained in:
Erwin Boskma 2022-07-29 09:57:50 +02:00
parent 689d2f0b5f
commit 0326c34b4e
Signed by: erwin
GPG key ID: 270B20D17394F7E5
2 changed files with 9 additions and 0 deletions

View file

@ -32,6 +32,13 @@ in
{ {
options.eboskma.programs.emacs = { options.eboskma.programs.emacs = {
enable = mkEnableOption "activate emacs"; enable = mkEnableOption "activate emacs";
package = mkOption {
description = "The emacs package to install";
type = types.package;
default = emacs;
};
daemon = mkOption { daemon = mkOption {
description = "Whether to enable emacs daemon"; description = "Whether to enable emacs daemon";
type = types.bool; type = types.bool;

View file

@ -188,6 +188,8 @@ in
"${mod}+l" = "exec ${swaylockcmd}"; "${mod}+l" = "exec ${swaylockcmd}";
"${mod}+p" = "mode resize"; "${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}+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+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"; "${mod}+Shift+Ctrl+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t \"image/png\" -f";