From 85ef13492eee0802929849e6b86ffdbfff2eecf2 Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 6 May 2026 10:27:16 -0700 Subject: [PATCH] screenshot: revert flameshot, use grim+slurp+satty pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flameshot's portal-based capture path on niri triggers an xdg-desktop-portal access prompt on every invocation, blocking the screenshot itself. grim talks to wlr-screencopy directly and never touches the portal, so no prompt. Pipeline: slurp (region) → grim (capture) → satty (annotate + copy + save). satty replaces the wofi action menu by being the post-capture surface itself. - scripts/screenshot.sh added - install.sh symlinks it; flameshot.ini generator removed - niri Mod+Print → "screenshot" - packages.txt drops flameshot - docs tables updated Co-Authored-By: Claude Opus 4.7 (1M context) --- ARCHITECTURE.md | 10 +++++----- README.md | 2 +- install.sh | 14 +------------- niri/config.kdl | 2 +- packages.txt | 1 - scripts/screenshot.sh | 11 +++++++++++ 6 files changed, 19 insertions(+), 21 deletions(-) create mode 100755 scripts/screenshot.sh diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 022208a..585e1fc 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -131,11 +131,11 @@ This system is a **Wayland-first desktop environment** built around the **Niri c ### Background Services -| Function | Tool | -| ----------- | ------------ | -| Wallpaper | swww | -| Screenshots | flameshot | -| Clipboard | cliphist | +| Function | Tool | +| ----------- | -------------------- | +| Wallpaper | swww | +| Screenshots | grim + slurp + satty | +| Clipboard | cliphist | --- diff --git a/README.md b/README.md index b432d9f..3748378 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A personal Wayland desktop configuration centered around the **Niri** tiling com | Lockscreen | gtklock | | Login/greeter | greetd + regreet | | Wallpaper | swww | -| Screenshots | flameshot | +| Screenshots | grim + slurp + satty | | Clipboard | cliphist | | Theme | Tomorrow Night (GTK: Materia-dark, icons: Papirus) | diff --git a/install.sh b/install.sh index eae8292..2b0b8b3 100755 --- a/install.sh +++ b/install.sh @@ -40,19 +40,6 @@ default-timeout=4000 """ open(os.path.expanduser("~/.config/mako/config"), "w").write(config) PYEOF -mkdir -p ~/.config/flameshot -if [ ! -f ~/.config/flameshot/flameshot.ini ]; then - cat > ~/.config/flameshot/flameshot.ini <<'INI' -[General] -disabledTrayIcon=true -showStartupLaunchMessage=false -showHelp=false -copyAndCloseAfterUpload=true -uiColor=#81a2be -contrastUiColor=#1d1f21 -contrastOpacity=190 -INI -fi ln -sf "$(pwd)/gtklock/config.ini" ~/.config/gtklock/config ln -sf "$(pwd)/gtklock/style.css" ~/.config/gtklock/style.css ln -sf "$(pwd)/fish/config.fish" ~/.config/fish/config.fish @@ -71,6 +58,7 @@ ln -sf "$(pwd)/scripts/clipboard.sh" ~/.local/bin/clipboard-picker ln -sf "$(pwd)/scripts/power-profile.sh" ~/.local/bin/power-profile ln -sf "$(pwd)/scripts/fan-profile.sh" ~/.local/bin/fan-profile ln -sf "$(pwd)/scripts/waybar-restart.sh" ~/.local/bin/waybar-restart +ln -sf "$(pwd)/scripts/screenshot.sh" ~/.local/bin/screenshot echo "==> Enabling systemd user services" mkdir -p ~/.config/systemd/user diff --git a/niri/config.kdl b/niri/config.kdl index bf0c0e5..567dd0a 100644 --- a/niri/config.kdl +++ b/niri/config.kdl @@ -84,7 +84,7 @@ binds { Mod+Shift+8 { move-window-to-workspace 8; } Mod+Shift+9 { move-window-to-workspace 9; } - Mod+Print { spawn "flameshot" "gui"; } + Mod+Print { spawn "screenshot"; } Mod+M { move-window-to-workspace "minimized"; } Mod+Shift+M { focus-workspace "minimized"; } diff --git a/packages.txt b/packages.txt index ba5a317..8947e38 100644 --- a/packages.txt +++ b/packages.txt @@ -39,4 +39,3 @@ power-profiles-daemon fw-fanctrl satty starship -flameshot diff --git a/scripts/screenshot.sh b/scripts/screenshot.sh new file mode 100755 index 0000000..1e0a51d --- /dev/null +++ b/scripts/screenshot.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +FILE="$HOME/Pictures/screenshot-$(date +%s).png" +mkdir -p "$HOME/Pictures" + +REGION=$(slurp) || exit 0 +grim -g "$REGION" - | satty \ + --filename - \ + --output-filename "$FILE" \ + --copy-command wl-copy \ + --early-exit