Screenshots (#100)

This commit is contained in:
Patrick Stevens
2024-11-29 19:05:10 +00:00
committed by GitHub
parent cb3c993507
commit d857f7ab9f
2 changed files with 10 additions and 1 deletions

View File

@@ -13,7 +13,7 @@
{command = "${nixpkgs.waybar}/bin/waybar";}
];
};
extraConfig = builtins.readFile ./sway.conf;
extraConfig = builtins.replaceStrings ["@@WL-COPY@@" "@@GRIM@@" "@@SLURP@@"] ["${nixpkgs.wl-clipboard}/bin/wl-copy" "${nixpkgs.grim}/bin/grim" "${nixpkgs.slurp}/bin/slurp"] (builtins.readFile ./sway.conf);
};
programs.waybar = {

View File

@@ -2,3 +2,12 @@ output Unknown-1 scale 2
input * {
xkb_layout "gb"
}
# capture all screens to clipboard
bindsym Shift+Print exec @@GRIM@@ - | @@WL-COPY@@
# capture the specified screen area to clipboard
bindsym Shift+Alt+Print exec @@GRIM@@ -g "$(@@SLURP@@)" - | @@WL-COPY@@
# capture the focused monitor to clipboard
bindsym Shift+Control+Print exec @@GRIM@@ -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | @@WL-COPY@@