From 6f3eb7dbe29233ce2776b076c98484d2c199421e Mon Sep 17 00:00:00 2001 From: kp2pml30 Date: Tue, 18 Mar 2025 19:17:00 +0400 Subject: [PATCH] add print screen --- home/.config/awesome/rc.lua | 5 ++++- nix/personal/graphical/x.nix | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/home/.config/awesome/rc.lua b/home/.config/awesome/rc.lua index 266af46..424e30d 100644 --- a/home/.config/awesome/rc.lua +++ b/home/.config/awesome/rc.lua @@ -346,7 +346,10 @@ globalkeys = gears.table.join( awful.key({}, "XF86AudioMute", function() my_volume:toggle() end), awful.key({}, "XF86MonBrightnessDown", function() my_brightness:down() end), - awful.key({}, "XF86MonBrightnessUp", function() my_brightness:up() end) + awful.key({}, "XF86MonBrightnessUp", function() my_brightness:up() end), + + -- screenshot + awful.key({}, "Print", function () awful.spawn.with_shell("xfce4-screenshooter -r --save /dev/stdout | xclip -i -selection clipboard -t image/png") end) ) clientkeys = gears.table.join( diff --git a/nix/personal/graphical/x.nix b/nix/personal/graphical/x.nix index b358766..aaf7ff2 100644 --- a/nix/personal/graphical/x.nix +++ b/nix/personal/graphical/x.nix @@ -32,6 +32,7 @@ in lib.mkIf cfg.xserver { environment.systemPackages = with pkgs; [ xclip brightnessctl + xfce.xfce4-screenshooter ]; home-manager.users.${cfg.username} = {