Skip to content

Commit

Permalink
refactor: replace grimblast/swappy with hyprshot/satty
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Nov 24, 2024
1 parent 3f9de9f commit 2898899
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 38 deletions.
2 changes: 1 addition & 1 deletion home-manager/_mixins/desktop/hyprland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ in
imports = [
./avizo # on-screen display for audio and backlight
./fuzzel # app launcher, emoji picker and clipboard manager
./grimblast # screenshot grabber and annotator
./hyprlock # screen locker
./hyprpaper # wallpaper setter
./hyprshot # screenshot grabber and annotator
./swaync # notification center
./waybar # status bar
./wlogout # session menu
Expand Down
36 changes: 0 additions & 36 deletions home-manager/_mixins/desktop/hyprland/grimblast/default.nix

This file was deleted.

53 changes: 53 additions & 0 deletions home-manager/_mixins/desktop/hyprland/hyprshot/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
config,
lib,
pkgs,
...
}:
{
# hyprshot is a screenshot grabber and satty is a screenshot editor
# This config provides comprehensive screenshot functionality for hyprland
home = {
file = {
"${config.xdg.configHome}/satty/config.toml".text = ''
[general]
# Start Satty in fullscreen mode
fullscreen = false
# Exit directly after copy/save action
early-exit = false
# Select the tool on startup [possible values: pointer, crop, line, arrow, rectangle, text, marker, blur, brush]
initial-tool = "pointer"
# Configure the command to be called on copy, for example `wl-copy`
copy-command = "wl-copy"
# Increase or decrease the size of the annotations
annotation-size-factor = 2
# Filename to use for saving action: https://docs.rs/chrono/latest/chrono/format/strftime/index.html
output-filename = "${config.home.homeDirectory}/Pictures/Screenshots/screenshot-%Y%m%d-%H%M%S.png"
save-after-copy = false
default-hide-toolbars = false
# The primary highlighter: block, freehand
primary-highlighter = "block"
disable-notifications = false
# Font to use for text annotations
[font]
family = "Work Sans"
style = "Bold"
'';
};
packages = with pkgs; [
hyprshot # screenshot grabber
satty # screenshot editor
];
};
wayland.windowManager.hyprland = {
settings = {
bind = [
", Print, exec, ${lib.getExe pkgs.hyprshot} --mode output --raw | ${lib.getExe pkgs.satty} --filename -"
"ALT, Print, exec, ${lib.getExe pkgs.hyprshot} --mode window --raw | ${lib.getExe pkgs.satty} --filename -"
"SHIFT, Print, exec, ${lib.getExe pkgs.hyprshot} --mode region --raw | ${lib.getExe pkgs.satty} --filename -"
"CTRL ALT, Print, exec, ${lib.getExe pkgs.hyprshot} --mode active --raw | ${lib.getExe pkgs.satty} --filename -"
];
};
};
}
2 changes: 1 addition & 1 deletion home-manager/_mixins/desktop/hyprland/swaync/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
buttons-grid.actions = [
{
label = "󰹑";
command = "${lib.getExe pkgs.grimblast} save screen - | ${lib.getExe pkgs.swappy} -f -";
command = "${lib.getExe pkgs.hyprshot} --mode output --raw | ${lib.getExe pkgs.satty} --filename -";
}
{
label = "󱩌";
Expand Down

0 comments on commit 2898899

Please sign in to comment.