I made some basic scripts for capturing screenshots in hyprland
using grim
as scrot
doesn't have support for wayland.
Requirements #
App | Description |
---|---|
Grim | Screenshot utility for Wayland |
Slurp | Select a region in a Wayland compositor |
Hyprland | Dynamic tiling Wayland compositor based on wlroots |
jq | Command-line JSON processor |
Scripts #
I made 3 scripts which all save screenshots in the same directory using the current date & time to provide a unique name.
The scripts save to $HOME/Pictures/screenshots/
with unique filename dd-mm-YYYY-HHSS
.
Script | Description |
---|---|
screenshot | capture active monitor |
screenactive | capture active window |
screenselect | capture selection |
These scripts are available in the bin
directory in my dotfiles
repo on github.
Using hyprctl #
hyprland has a utility (hyprctl
) which allows a user to get information & give a json output.
hyprctl is a utility for controlling some parts of the compositor from a CLI or a script
Hyprland Wiki - Using hyprctl
I am using this with jq
in the scripts to get the active monitor & active window.
Source #
The source for my hyprland config is available in my dotfiles repo on github.
Webmentions
No Comments Yet