home/sway: use grimshot
This commit is contained in:
parent
708f1e60b7
commit
330ed148a4
3 changed files with 1 additions and 28 deletions
|
@ -95,7 +95,6 @@ in {
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
keybindings = let
|
keybindings = let
|
||||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||||
screenshot = lib.getExe inputs.self.packages.${pkgs.stdenv.hostPlatform.system}.scripts.screenshot;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
### Sway itself
|
### Sway itself
|
||||||
|
@ -129,9 +128,7 @@ in {
|
||||||
"${modifier}+Shift+Semicolon" = "exec loginctl lock-session";
|
"${modifier}+Shift+Semicolon" = "exec loginctl lock-session";
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
"${modifier}+Shift+s" = "exec ${screenshot} region";
|
"Print" = "exec env XDG_SCREENSHOTS_DIR=$HOME/Pictures/Screenshots ${lib.getExe pkgs.sway-contrib.grimshot} --notify savecopy anything";
|
||||||
"Print" = "exec ${screenshot} fullscreen";
|
|
||||||
"Print+Control" = "exec ${screenshot} swappy";
|
|
||||||
|
|
||||||
# Fn keys
|
# Fn keys
|
||||||
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.brightnessctl} set 5%+";
|
"XF86MonBrightnessUp" = "exec ${lib.getExe pkgs.brightnessctl} set 5%+";
|
||||||
|
|
|
@ -9,6 +9,5 @@ in {
|
||||||
|
|
||||||
# scripts
|
# scripts
|
||||||
lofi = self.callPackage ./scripts/lofi.nix {};
|
lofi = self.callPackage ./scripts/lofi.nix {};
|
||||||
screenshot = self.callPackage ./scripts/screenshot.nix {};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
makeScript,
|
|
||||||
coreutils,
|
|
||||||
jq,
|
|
||||||
grim,
|
|
||||||
slurp,
|
|
||||||
swappy,
|
|
||||||
wl-clipboard,
|
|
||||||
libnotify,
|
|
||||||
fetchurl,
|
|
||||||
}:
|
|
||||||
makeScript {
|
|
||||||
name = "screenshot";
|
|
||||||
runtimeInputs = [coreutils jq grim slurp swappy wl-clipboard libnotify];
|
|
||||||
src = fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/nwg-piotr/nwg-shell/c29e8eb4658a2613fb221ead0b101c75f457bcaf/scripts/screenshot";
|
|
||||||
hash = "sha256-w0zdCX6az0WNM0G4RrNuKbQ0O9aSIK6ssAMMaFlsjA0=";
|
|
||||||
postFetch = ''
|
|
||||||
substituteInPlace $out \
|
|
||||||
--replace-fail 'DIR=''${SCREENSHOT_DIR:=$HOME/Screenshots}' 'DIR=$HOME/Pictures/Screenshots'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue