
Taking screenshots is a common task for many users.
In the Hyprland ecosystem, Hyprshot is an efficient and flexible tool worth considering.
This guide will take you through the installation process using a package manager, show you how to take screenshots, and explain how to set up keybindings in your Hyprland configuration.
Installing Hyprshot with a Package Manager
Before exploring the features of Hyprshot, let’s get it installed. Here’s a simple breakdown of how to do it using popular package managers for different Linux distributions.
For Arch Linux and Manjaro Users
For users on Arch Linux and Manjaro, installing Hyprshot is simple because it's available in the Arch User Repository (AUR). Run the following command in your terminal:
sudo pacman -S hyprshot
For Fedora Users
Fedora users can install Hyprshot using the DNF package manager:
sudo dnf install hyprshot
For Ubuntu and Debian Users
Consider using another distribution if you'd like to use the Hyprland ecosystem.
Hyprland isn't fully working yet on Debian based distributions.
General Installation Note
After installation, verify that Hyprshot is correctly set up by checking its version:
hyprshot --version
This command should display the installed version of Hyprshot, ensuring everything is working correctly.
How to Use Hyprshot to Take Screenshots
Now that you have Hyprshot installed, let’s discuss how to use it effectively.
Hyprshot allows you to take screenshots of specific areas, particular windows, or your entire screen.
Taking a Screenshot of an Area
To capture a certain area of your screen, use the command:
hyprshot -m area
After running this command, your cursor will turn into a crosshair. Click and drag the cursor around the area you want to capture. When you release the mouse, the screenshot will automatically save to your home directory.
For example, if you want to capture a portion of a website, this feature allows you to select just that section, preventing unnecessary clutter in your files.
Taking a Screenshot of a Window
To capture a specific window, you’ll want to use this command:
hyprshot -m window
Simply click on the window you wish to capture. Hyprshot will take a screenshot of just that window.
This is particularly useful when you only need a snapshot for a presentation, making your work appear more polished and focused.
Taking a Screenshot of the Entire Screen
To capture everything on your screen, the command is:
hyprshot -m output -m OUTPUT_NAME
Where OUTPUT_NAME is the name of the active display (i.e. eDP-1 or HDMI-A-1).
To get a list of the display in hyprland, open a terminal and type
hyprctl monitors
Customizing Your Hyprland Configuration with Keybinds
To speed up your workflow, you can assign specific keybinds to these screenshot commands. This allows you to take screenshots quickly without opening a terminal.
Step 1: Open Your Hyprland Configuration File
Access your Hyprland configuration file, usually found at:
~/.config/hypr/hyprland.conf
Use a text editor to open the file. For instance, if you opt for nano, type:
nano ~/.config/hypr/hyprland.conf
Step 2: Assign Keybinds
You can add keybinds for your screenshot actions in the configuration file. Here’s an example setup:
bind = $mod + Shift + A, exec hyprshot area
bind = $mod + Shift + W, exec hyprshot window
bind = $mod + Shift + F, exec hyprshot full
In this configuration:
`$mod + Shift + A` captures an area of your choosing.
`$mod + Shift + W` captures the active window.
`$mod + Shift + F` captures the full screen.
Feel free to customize these key combinations according to what feels most intuitive for you.
Step 3: Save and Exit
Once you've added the keybindings, save your changes and exit the text editor. In nano, press `CTRL + X`, then `Y`, and hit `ENTER` to confirm.
Conclusion
The above mentioned Hyprshot commands should cover the majority of the use-cases.
Should you need some extra command you can list them by opening your terminal and typing:
hyprshot --help
There are flags to specify:
the output folder of the file,
its name
to copy the output directly in the system clipboard
to send a notification or not.
Yorumlar