From 3fea27a8ca0dce46b6332259d2696fcb55a3f5b8 Mon Sep 17 00:00:00 2001 From: notgne2 Date: Sun, 26 Oct 2025 20:30:19 -0700 Subject: [PATCH] switch from flameshot to grim+satty --- home-manager/common.nix | 1 - home-manager/modules/ezpcusr.nix | 36 ++++++++++++++++---------------- modules/workstation.nix | 2 ++ 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/home-manager/common.nix b/home-manager/common.nix index 12e5c08..538c05f 100644 --- a/home-manager/common.nix +++ b/home-manager/common.nix @@ -46,7 +46,6 @@ inputs: all: { zip unzip ncdu - nix-index unrar lm_sensors pciutils diff --git a/home-manager/modules/ezpcusr.nix b/home-manager/modules/ezpcusr.nix index 61f77f1..4d24c14 100644 --- a/home-manager/modules/ezpcusr.nix +++ b/home-manager/modules/ezpcusr.nix @@ -98,7 +98,7 @@ in { xdg.portal = { enable = true; xdgOpenUsePortal = true; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ]; + extraPortals = [pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk]; config = { common.default = ["gtk"]; hyprland.default = ["gtk" "hyprland"]; @@ -160,18 +160,11 @@ in { resize_on_border = true; }; gestures = { - }; bindm = [ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ]; - windowrulev2 = [ - "move 0 0,class:(flameshot),title:(flameshot)" - "pin,class:(flameshot),title:(flameshot)" - "fullscreenstate,class:(flameshot),title:(flameshot)" - "float,class:(flameshot),title:(flameshot)" - ]; bind = [ "$mod, Return, exec, ${config.programs.foot.package}/bin/foot" @@ -182,7 +175,7 @@ in { "$mod SHIFT, SPACE, exec, hyprctl switchxkblayout all next" "$mod, D, exec, ${config.programs.rofi.package}/bin/rofi -show drun -show-icons" - ", Print, exec, ${config.services.flameshot.package}/bin/flameshot gui -p=\"${config.services.flameshot.settings.General.savePath}/$(date '+${config.services.flameshot.settings.General.filenamePattern}')\" --raw | wl-copy -t image/png" + ", Print, exec, grim - | satty -f -" "$mod, c, exec, ${config.services.cliphist.package}/bin/cliphist list | rofi -dmenu | cliphist decode | wl-copy" @@ -260,8 +253,9 @@ in { ++ ( # workspaces # binds $mod + [shift +] {1..9} to [move to] workspace {1..9} - builtins.concatLists (builtins.genList (i: - let ws = i + 1; + builtins.concatLists (builtins.genList ( + i: let + ws = i + 1; in [ "$mod, code:1${toString i}, workspace, ${toString ws}" "$mod SHIFT, code:1${toString i}, movetoworkspace, ${toString ws}" @@ -282,7 +276,7 @@ in { "workspaces" "windowtitle" ]; - middle = [ "media" ]; + middle = ["media"]; right = [ "systray" "bluetooth" @@ -379,6 +373,8 @@ in { slop xorg.xhost pamixer + sway-contrib.grimshot + grim ]; programs.rofi = { @@ -386,13 +382,17 @@ in { terminal = lib.mkDefault "${config.programs.foot.package}/bin/foot"; }; - services.flameshot = { + programs.satty = { enable = true; - settings.General = { - filenamePattern = "%F_%T"; - savePath = "${config.home.homeDirectory}/Media/Screenshots"; - saveAfterCopy = true; - useGrimAdapter = true; + settings.general = { + fullscreen = true; + initial-tool = "crop"; + early-exit = true; + copy-command = "wl-copy"; + save-after-copy = true; + actions-on-enter = ["save-to-clipboard"]; + actions-on-escape = ["exit"]; + output-filename = "${config.home.homeDirectory}/Media/Screenshots/satty-%F_%T.png"; }; }; diff --git a/modules/workstation.nix b/modules/workstation.nix index 3e07181..fbd9590 100644 --- a/modules/workstation.nix +++ b/modules/workstation.nix @@ -32,6 +32,8 @@ in { services.gvfs.enable = lib.mkDefault true; services.udisks2.enable = lib.mkDefault true; + programs.nix-index-database.comma.enable = true; + console = { earlySetup = lib.mkDefault false; };