HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
emersion
grim
C2019–2022
emersion / grim · Archived

grim

Grab images from a Wayland compositor

11Distinct people
11Mentions
0Explicit recommenders
1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Grab images from a Wayland compositor

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2019-07-08 01:21:57 UTC to 2022-03-21 12:30:20 UTC.

0123452019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC202
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC505
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202

What Hacker News says

11 sources
sway laptop user here (for almost 2 years I think?). I spent a little while on this, but I migrated from i3, so I just ported every little section of my config bit by bit. In terms of battery bar and other "bar" type things, I use waybar[0] which basically does all the things you'd expect by default (just install and it "works"). For multi-monitor, config, I initially setup with wdisplays[1] (think arandr for wayland) and then manually copied the positions into my sway config. Monitor positioning was the only thing I needed to setup (and telling it that one monitor was HDPI) and then all of the scaling and everything worked perfectly. This was my biggest selling point for wayland, I now get nice crisp fonts and application scaling works nicely (which was not the case with X). volume control from the keyboard took no time, just a couple of
Read the rest
extra lines. There was some stuff to do with the clipboard (wl-clipboard[2]) and screenshots (grim[3] + slurp[4]) that required some setup, but again, just a few lines, and didn't take much mental load. Oh and I needed to change my notifications daemon(dunst[5]), and chose to change my program launcher to one with a nicer interface and cleaner fonts (wofi[6]). I think that's all the tweaking that I did. Oh, and I needed to do something with pipewire to sort out screensharing at the start, don't remember that too well though... [0] https://github.com/Alexays/Waybar [1] https://github.com/artizirk/wdisplays [2] https://github.com/bugaevc/wl-clipboard [3] https://github.com/emersion/grim [4] https://github.com/emersion/slurp [5] https://github.com/dunst-project/dunst [6] https://hg.sr.ht/~scoopta/wofi
In Tell HN: Gnome on Wayland Is Amazing
Yay for wlroots based Wayland compositors! Besides the tiling Sway there's also the stacking Wayfire[0] that is from the same family, but modeled after Compiz (blur, desktop cube and good old wobbly windows are all there) and highly configurable. I use it with Waybar[1], wf-dock[2], Sirula[3] as a launcher and a bunch of other small tools like Gammastep[4] (fork of Redshift) for white balance adjustment, grim & slurp [5] for screenshots and mako[6] for notifications. [7] It's a very DIY-y experience, but it's meant to be (if you want something pre-configured you can barely change try Gnome). The combination of getting it just right and the Ikea effect makes for a pretty rewarding result (I also maintain a list of the available desktop tools you can use when on a wlroots based compositor for your DIY needs [8]). The vision for the future i
Read the rest
s pre-configured DEs being offered on this base and it possibly even offering a lot of Sway's tiling features. [9] It still feels like the early days (for non-Gnome), but with Nvidia driver 470 & accelerated XWayland coming up, the Vulkan efforts, Electron (finally) and Wine making the switch I feel fairly confident saying that 2021 is shaping up to be the year of the Wayland desktop. Free of screen tearing and X-related worries since 2020 :-) [0]: https://wayfire.org/ [1]: https://github.com/Alexays/Waybar [2]: https://github.com/WayfireWM/wf-shell [3]: https://github.com/DorianRudolph/sirula [4]: https://gitlab.com/chinstrap/gammastep [5]: https://github.com/emersion/grim [6]: https://github.com/emersion/mako [7]: My not-completely-but-fairly Wayfire config https://gist.github.com/solarkraft/f46421295b8c211b2eb56b3ac... [8]: https://github.com/solarkraft/awesome-wlroots [9]: https://github.com/Javyre/swayfire
In Guide: Full Wayland Setup for Linux
I am not the author of dwl. Since dwl is based on wlroots (just like the popular Sway) it already supports making screenshots using grim[1] and screencasts using wf-recorder[2]. You can try out dwl from within your current WM. The default modkey is Alt. If you want to use the Super key, change `#define MODKEY WLR_MODIFIER_ALT` in `config.h` to `#define MODKEY WLR_MODIFIER_LOGO` and recompile. The default terminal emulator is kitty but you can change `termcmd` to alacritty if you want. Currently, only native Wayland applications run on it. You can enable experimental Wayland support for Firefox with `MOZ_ENABLE_WAYLAND=1`, see Running programs natively under Wayland in Sway Wiki[3]. Do not hover over the edges of windows – this will crash dwl. [1]: https://github.com/emersion/grim [2]: https://github.com/ammen99/wf-recorder [3]: https://gi
Read the rest
In Dwl: Dwm-like Wayland compositor based on wlroots
>like I have a script that OCR a region of the screen when I press a button (the coordinates depend of the app that runs) This is easy to do. Something like grim to take the screenshot of whatever region you want: https://github.com/emersion/grim And calculate the coordinates you need by querying the window manager. In sway (i3 compatible tiling WM) that would be: $ swaymsg -t get_tree To get a JSON of all the windows currently open and do whatever math is needed. You can also do a hand selection using slurp: https://github.com/emersion/slurp It works together with grim like this: $ grim -g "$(slurp)" screenshot.png Having recently moved from X to Wayland there are still some things missing sometimes but they're not many. If you want a DE at least GNOME and I think KDE as well are making the switch reasonably seamless. And there are some
Read the rest
features that Wayland solves much more thoroughly (e.g., tear free output, fractional scaling). The network transparency part, that is often brought up but rarely used in X is also being delivered: https://lists.freedesktop.org/archives/wayland-devel/2019-Au...
In Understanding the working of X11 from the ground up (2017)

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.