dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

[FEATURE] Replace grimblast with hyprshot + Satty for screenshots

Open elppans opened this issue 3 months ago • 3 comments

Is your feature request related to a problem? Please describe.

Following the concerns raised in #1783 about requiring AUR packages during the ML4W installation, I would like to suggest an alternative for the screenshot functionality.

Currently, ML4W ships with grimblast for screenshots. On Arch-based systems, this can result in an additional dependency on the AUR.

Since hyprshot and satty are now both available in the official Arch repositories (extra), they could provide a way to implement the screenshot workflow without requiring an AUR package.

Describe the solution you'd like

Proposed alternative

Use:

  • hyprshot for capturing screenshots
  • satty for annotation/editing
  • wl-clipboard for clipboard integration

hyprshot already supports outputting the screenshot through stdout, which makes it possible to pipe the capture directly into Satty:

hyprshot -m region --raw | satty --filename -

This provides a simple workflow:

Hyprshot
   ↓
Screenshot
   ↓
Satty
   ↓
Annotate / crop / blur / draw / add text
   ↓
Save / copy to clipboard

Why this could be useful

This approach would have a few advantages:

  1. No AUR dependency for screenshots on Arch

    Both hyprshot and satty are available from the official Arch repositories.

  2. Better security/reviewability

    This would reduce the need for ML4W to install an AUR package just to provide screenshot functionality, which seems especially relevant given the concerns discussed in #1783.

  3. Native annotation support

    Satty provides screenshot annotation features such as drawing, arrows, rectangles, text, blur, cropping and clipboard integration.

  4. Good integration with Hyprland

    Hyprshot is specifically designed for Hyprland/Wayland and supports output, window and region screenshots.

  5. Simple implementation

    The basic screenshot + annotation workflow can be implemented with a small pipeline:

hyprshot -m region --raw | satty --filename -

Possible keybinding mapping

The existing ML4W screenshot keybindings could be preserved while changing the implementation:

hl.bind(mainMod .. " + PRINT", hl.dsp.exec_cmd("hyprshot -m region --raw | satty --filename -"), { description = "Screenshot: select area and annotate" })
hl.bind(mainMod .. " + ALT + F", hl.dsp.exec_cmd("hyprshot -m output"), { description = "Take an instant full-screen screenshot" })
hl.bind(mainMod .. " + ALT + S", hl.dsp.exec_cmd("hyprshot -m region"), { description = "Take an instant area screenshot" })

A simple configuration file for Satty, which should be created at ~/.config/satty/config.toml, is attached.

config.toml.txt (Rename the file to remove the .txt extension.)

Describe alternatives you've considered

I am not suggesting that grimblast must necessarily be removed immediately.

A possible approach would be to:

  • make hyprshot + satty the default on Arch;
  • keep grimblast as an optional alternative for users who prefer it; or
  • provide the screenshot backend as a configurable option.

I have tested the hyprshot → satty pipeline on ML4W/Hyprland and it works well for the screenshot + annotation workflow.

I think this could be a relatively small change that would also address part of the concern raised in #1783 by reducing the number of AUR packages required by a standard ML4W installation.

Additional context

Image

Support or Contribution

elppans avatar Aug 22 '26 06:08 elppans

This is great. Sounds like a really good alternative. I will compile grimblast on 2.15.1 to avoid using an AUR but your proposal looks even more reliable. I will give it a try for 2.16

mylinuxforwork avatar Aug 22 '26 13:08 mylinuxforwork

Something to keep in mind is that hyprshot hasn't seen a release/commit since June 2024; any upstream issues may not be addressed given the lack of activity. Also do we know how easy it is to install for Fedora, openSUSE and Ubuntu distributions?

hurlbutt avatar Aug 24 '26 03:08 hurlbutt

Something to keep in mind is that hyprshot hasn't seen a release/commit since June 2024; any upstream issues may not be addressed given the lack of activity. Also do we know how easy it is to install for Fedora, openSUSE and Ubuntu distributions?

On the installation side, I tested this on Fedora, openSUSE and Ubuntu:

  • Fedora / openSUSE: after the ML4W install, some extra repos get enabled, and hyprshot installs cleanly as a regular package from there.
  • Ubuntu: there's no hyprshot package in the official repos or in any PPA. However, looking at ML4W's own post-ubuntu.sh script (here), a lot of packages are already installed from source there — so hyprshot could be added the same way, building from its own repo: https://github.com/Gustash/hyprshot

elppans avatar Aug 25 '26 06:08 elppans