From 2e1c0f495ba0fa0044db39ba3222b205a810243c Mon Sep 17 00:00:00 2001 From: "Lennart J. Kurzweg (Nx2)" Date: Sat, 9 Nov 2024 23:56:00 +0100 Subject: [PATCH] better nxsent --- home-modules/fish.nix | 2 +- home-modules/hyprland.nix | 3 ++- home-modules/sent.nix | 27 ++++++++------------------- 3 files changed, 11 insertions(+), 21 deletions(-) diff --git a/home-modules/fish.nix b/home-modules/fish.nix index 1bc84a6..186ffa8 100755 --- a/home-modules/fish.nix +++ b/home-modules/fish.nix @@ -81,7 +81,7 @@ lib.mkIf (user != "tv") lzd = "lazydocker"; d = "docker"; dcmp = "docker compose"; - nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}''; + # nxsent = ''sent -c \${rice.color.foreground} -b \${rice.color.background}''; # ya = "yazi"; # function # nxfiglet = "figlet"; diff --git a/home-modules/hyprland.nix b/home-modules/hyprland.nix index c5a66be..9348f40 100755 --- a/home-modules/hyprland.nix +++ b/home-modules/hyprland.nix @@ -267,7 +267,7 @@ lib.mkIf (user != "tv") "opacity ${transparency}, code-oss" "opacity ${transparency}, VSCodium" "opacity ${transparency}, Code" - "opacity ${transparency}, sent" + # "opacity ${transparency}, sent" "opacity ${transparency}, neovide" "opacity ${transparency}, obsidian" # "opacity ${transparency}, zathura" @@ -297,6 +297,7 @@ lib.mkIf (user != "tv") "float, title:^(Compact folders)$" "tile, sent" "fullscreen, wlogout" + "fullscreen, sent" "workspace 14, lutris" "workspace 100, title:^(Apex Legends)$" "workspace 100, ^(cyberpunk2077.exe)$" diff --git a/home-modules/sent.nix b/home-modules/sent.nix index 6281105..39d355a 100644 --- a/home-modules/sent.nix +++ b/home-modules/sent.nix @@ -1,4 +1,4 @@ -{ pkgs, rice, user, ... }: +{ pkgs, rice, ... }: let my-sent = pkgs.sent.override { patches = [ @@ -11,25 +11,14 @@ in { home = { packages = [ - # pkgs.sent my-sent + (pkgs.writeShellApplication { + name = "nxsent"; + text = with rice.color; let + in /* bash */ '' + echo "$@" | sent -c "${accent.base}" -b "${background}" + ''; + }) ]; - file.".local/share/sent.patch".text = '' - diff --git a/config.def.h b/config.def.h - index 60eb376..64e7f05 100644 - --- a/config.def.h - +++ b/config.def.h - @@ -9,8 +9,8 @@ static char *fontfallbacks[] = { - #define FONTSZ(x) ((int)(10.0 * powf(1.1288, (x)))) /* x in [0, NUMFONTSCALES-1] */ - - static const char *colors[] = { - - "#000000", /* foreground color */ - - "#FFFFFF", /* background color */ - + "${rice.color.foreground}", /* foreground color */ - + "${rice.color.background}", /* background color */ - }; - - static const float linespacing = 1.4; - ''; }; }