From d973beca076ad11faffc89763383268175a080b3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 13 Mar 2024 17:52:48 +0000 Subject: [PATCH] Remove emacsclient, use emacs directly instead Add some specific workspaces (emacs, firefox, libreoffice, chat, steam) with custom icons, reduce persistent workspaces to those 5, update windowrules and binds accordingly --- home/emacs/default.nix | 26 ++++++++------------------ home/hyprland/default.nix | 10 ++++++++-- home/waybar/default.nix | 8 ++++++-- system/hyprland.nix | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/home/emacs/default.nix b/home/emacs/default.nix index 2ac28006..7d8f307d 100644 --- a/home/emacs/default.nix +++ b/home/emacs/default.nix @@ -4,7 +4,7 @@ ... }: { imports = [../git/default.nix ../prog/default.nix]; - programs.git.extraConfig.core.editor = "${config.programs.emacs.finalPackage}/bin/emacsclient -c"; + programs.git.extraConfig.core.editor = "${config.programs.emacs.finalPackage}/bin/emacs"; programs.emacs = { # Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.config/emacs @@ -127,24 +127,14 @@ elfeed-tube-mpv ]; }; - services = { - emacs = { - enable = true; - package = config.programs.emacs.finalPackage; - defaultEditor = true; - client.enable = true; - socketActivation.enable = true; - startWithUserSession = false; + services.git-sync.repositories = with config.xdg.userDirs; { + org = { + path = "${documents}/Org"; + uri = "git+https://git.xenia.me.uk/xenia/org.git"; }; - git-sync.repositories = with config.xdg.userDirs; { - org = { - path = "${documents}/Org"; - uri = "git+https://git.xenia.me.uk/xenia/org.git"; - }; - references = { - path = "${documents}/References"; - uri = "git+https://git.xenia.me.uk/xenia/references.git"; - }; + references = { + path = "${documents}/References"; + uri = "git+https://git.xenia.me.uk/xenia/references.git"; }; }; home.packages = with pkgs; [ diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index a6ab02ba..84e1d07c 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -195,6 +195,13 @@ (lib.lists.forEach layers blur) ++ (lib.lists.forEach layers ignorealpha); windowrule = [ + # Workspace binds + "workspace 1, emacs" + "workspace 2, firefox" + "workspace 3, (WebCord|signal|whatsapp-for-linux)" + "workspace 4, (libreoffice|soffice)(.*)" + "workspace 5, steam" + # Float + move system windows "float, org.kde.polkit-kde-authentication-agent-1|Pinentry" "center, org.kde.polkit-kde-authentication-agent-1|Pinentry" @@ -272,8 +279,7 @@ # Common program shortcuts "SUPER, Return, exec, ${alacritty.package}/bin/alacritty" - "SUPER, E, exec, ${emacs.finalPackage}/bin/emacsclient -c" - "SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket" + "SUPER, E, exec, ${emacs.finalPackage}/bin/emacs" # Rofi binds "SUPER, Space, exec, pkill rofi || ${rofi.finalPackage}/bin/rofi -show drun" diff --git a/home/waybar/default.nix b/home/waybar/default.nix index 00813b02..92834660 100644 --- a/home/waybar/default.nix +++ b/home/waybar/default.nix @@ -61,8 +61,13 @@ "hyprland/workspaces" = { format = "{icon}"; format-icons = { + "1" = " "; + "2" = "󰈹 "; + "3" = "󱧶 "; + "4" = "󰭹 "; + "5" = "󰓓 "; default = "󰋙 "; - active = "󰫈 "; + # active = "󰫈 "; urgent = "󰁡 "; }; show-special = false; @@ -72,7 +77,6 @@ "3" = []; "4" = []; "5" = []; - "6" = []; }; }; mpris = { diff --git a/system/hyprland.nix b/system/hyprland.nix index c8f14aa1..b7b2aef1 100644 --- a/system/hyprland.nix +++ b/system/hyprland.nix @@ -47,7 +47,7 @@ }; xdg.portal.enable = true; xdg.mime = let - emacs = ["emacsclient.desktop" "emacs.desktop"]; + emacs = ["emacs.desktop"]; # TODO add nyxt back to browser when I can fix opening # links in existing sessions browser = ["firefox.desktop"]; # nyxt.desktop