From e7b60899bcffd63576de1a5ca1bf140757aa1fa1 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 15 Jan 2023 12:00:25 -0800 Subject: ref(home/matrix): replace element by fractal fractal(-next) is a client for matrix. It's GTK4 native and uses rust. While not much nicer looking than element, it's not an electron app, which I prefer (electron is slow, and element would freeze/crash from time to time). I renamed the module from element to matrix-client, in case I switch to something else in the future (or if there are additional configurations). --- home/default.nix | 2 +- home/element/default.nix | 11 ----------- home/matrix-client/default.nix | 15 +++++++++++++++ home/wm/sway/default.nix | 3 ++- 4 files changed, 18 insertions(+), 13 deletions(-) delete mode 100644 home/element/default.nix create mode 100644 home/matrix-client/default.nix (limited to 'home') diff --git a/home/default.nix b/home/default.nix index e89d8c7..9193392 100644 --- a/home/default.nix +++ b/home/default.nix @@ -7,7 +7,6 @@ ./direnv ./documentation ./drone-cli - ./element ./emacs ./eog ./evince @@ -20,6 +19,7 @@ ./gpg ./gtk ./mail + ./matrix-client ./mpv ./packages ./pass diff --git a/home/element/default.nix b/home/element/default.nix deleted file mode 100644 index 1b6bb3b..0000000 --- a/home/element/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, config, pkgs, ... }: -let cfg = config.my.home.element; -in -{ - options.my.home.element = with lib; { - enable = mkEnableOption "element configuration"; - }; - - config = - lib.mkIf cfg.enable { home.packages = with pkgs; [ element-desktop-wayland ]; }; -} diff --git a/home/matrix-client/default.nix b/home/matrix-client/default.nix new file mode 100644 index 0000000..a5a420f --- /dev/null +++ b/home/matrix-client/default.nix @@ -0,0 +1,15 @@ +{ lib, config, pkgs, ... }: +let cfg = config.my.home.matrix-client; +in +{ + options.my.home.matrix-client = with lib; { + enable = mkEnableOption "matrix client configuration"; + }; + + # https://gitlab.gnome.org/GNOME/fractal + # fractal-next is a GTK4 client for matrix, using the + # matrix-rust-sdk. I used to use element, an electron application, + # and it had a number of issues (freeze, crash, heavy, ...). + config = + lib.mkIf cfg.enable { home.packages = with pkgs; [ fractal-next ]; }; +} diff --git a/home/wm/sway/default.nix b/home/wm/sway/default.nix index ae8316f..c89824c 100644 --- a/home/wm/sway/default.nix +++ b/home/wm/sway/default.nix @@ -96,11 +96,12 @@ in }; }; + assigns = { "1" = [{ app_id = "emacs"; }]; "2" = [{ app_id = "Alacritty"; }]; "3" = [{ app_id = "firefox"; }]; - "4" = [{ class = "Element"; }]; + "4" = [{ app_id = "org.gnome.Fractal"; }]; }; output = { -- cgit 1.4.1