From 20129bc73d7f9404cbabc6ccf90c48e671975783 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 28 Aug 2023 10:38:22 +0100 Subject: [PATCH] Update to emacs29-pgtk Updated emacs also using native wayland pgtk build Stop using server as incompatible with pgtk --- home/emacs/default.nix | 13 +++++-------- home/hyprland/config.nix | 29 +++++++++++++++++------------ 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/home/emacs/default.nix b/home/emacs/default.nix index d8cd5d13..a2e4803c 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -1,12 +1,9 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +let package = pkgs.emacs29-pgtk; +in { imports = [ ./dependencies.nix ]; - # Emacs28 package - home.packages = with pkgs; [ emacs28NativeComp ]; - # Emacs server service - services.emacs = { + programs.emacs = { + inherit package; enable = true; - package = pkgs.emacs28NativeComp; - defaultEditor = true; - startWithUserSession = true; }; } diff --git a/home/hyprland/config.nix b/home/hyprland/config.nix index 6e1e9525..5b00e569 100644 --- a/home/hyprland/config.nix +++ b/home/hyprland/config.nix @@ -1,5 +1,10 @@ { pkgs, anyrun, ... }: -let anyrunPackage = anyrun.packages.${pkgs.system}.anyrun; +let + anyrunPackage = anyrun.packages.${pkgs.system}.anyrun; + emacsPackage = pkgs.emacs29-pgtk; + firefoxPackage = pkgs.firefox-wayland; + rofiPackage = pkgs.rofi-wayland; + swaylockPackage = pkgs.swaylock-effects; in '' source = ./macchiato.conf source = ./display.conf @@ -73,12 +78,12 @@ in '' } # See https://wiki.hyprland.org/Configuring/Keywords/ for more - bind = SUPER, F1, exec, ${pkgs.swaylock-effects}/bin/swaylock + bind = SUPER, F1, exec, ${swaylockPackage}/bin/swaylock bind = SUPER, M, fullscreen, 0 bind = SUPER SHIFT, M, fullscreen, 1 bind = SUPER SHIFT, Q, killactive, bind = SUPER SHIFT, Space, togglefloating - bind = SUPER SHIFT, P, exec, pkill rofi || ${pkgs.rofi-wayland}/bin/rofi -show power-menu + bind = SUPER SHIFT, P, exec, pkill rofi || ${rofiPackage}/bin/rofi -show power-menu # Common program shortcuts bind = SUPER, Return, exec, ${pkgs.alacritty}/bin/alacritty @@ -86,22 +91,22 @@ in '' bind = SUPER, Space, exec, ${anyrunPackage}/bin/anyrun bind = SUPER ALT, Space, submap, launch - bind = SUPER ALT, W, exec, ${pkgs.firefox-wayland}/bin/firefox - bind = SUPER ALT, F, exec, ${pkgs.xfce.thunar}/bin/thunar - bind = SUPER ALT, Z, exec, ${pkgs.zotero}/bin/zotero - bind = SUPER ALT, S, exec, ${pkgs.alacritty}/bin/alacritty -e ncspot - bind = SUPER ALT, V, exec, ${pkgs.bitwarden}/bin/bitwarden - bind = SUPER ALT, R, exec, ${pkgs.remmina}/bin/remmina - bind = SUPER ALT, E, exec, ${pkgs.emacs}/bin/emacsclient -c -a 'emacs' + bind = SUPER ALT, E, exec, ${emacsPackage}/bin/emacsclient -c -a 'emacs' + bind = SUPER ALT, W, exec, ${firefoxPackage}/bin/firefox + bind = SUPER ALT, F, exec, ${pkgs.xfce.thunar}/bin/thunar + bind = SUPER ALT, Z, exec, ${pkgs.zotero}/bin/zotero + bind = SUPER ALT, S, exec, ${pkgs.alacritty}/bin/alacritty -e ncspot + bind = SUPER ALT, V, exec, ${pkgs.bitwarden}/bin/bitwarden + bind = SUPER ALT, R, exec, ${pkgs.remmina}/bin/remmina submap = launch - bind = , W, exec, [workspace name:browser silent] ${pkgs.firefox-wayland}/bin/firefox + bind = , E, exec, [workspace name:editor silent] ${emacsPackage}/bin/emacsclient -c -a 'emacs' + bind = , W, exec, [workspace name:browser silent] ${firefoxPackage}/bin/firefox bind = , F, exec, [workspace name:files silent] ${pkgs.xfce.thunar}/bin/thunar bind = , Z, exec, [workspace name:library silent] ${pkgs.zotero}/bin/zotero bind = , S, exec, [workspace name:music silent] ${pkgs.alacritty}/bin/alacritty -e ncspot bind = , V, exec, [workspace name:vault silent] ${pkgs.bitwarden}/bin/bitwarden bind = , R, exec, [workspace name:remote silent] ${pkgs.remmina}/bin/remmina - bind = , E, exec, ${pkgs.emacs}/bin/emacsclient -c -a 'emacs' bind = , Space, submap, reset bind = SUPER, Space, submap, reset bind = SUPER ALT, Space, submap, reset