From 15614d7ef70b8f5ae758b6154a62f1b014327c0d Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 2 Jun 2023 21:50:33 +0200 Subject: ... --- accounts/gkleen@sif/default.nix | 2 +- accounts/gkleen@sif/xmonad/xmonad.hs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'accounts/gkleen@sif') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 3f103b8a..4db58a1b 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -396,7 +396,7 @@ in { weechat wrappedElementDesktop # helvum matrix-synapse-tools.synadm wrappedRocketChatDesktop flakeInputs.deploy-rs.packages.${config.nixpkgs.system}.deploy-rs - sieve-connect gimp inkscape udiskie glab + sieve-connect gimp inkscape udiskie glab scrot ]; file = { diff --git a/accounts/gkleen@sif/xmonad/xmonad.hs b/accounts/gkleen@sif/xmonad/xmonad.hs index 906cc663..326749c9 100644 --- a/accounts/gkleen@sif/xmonad/xmonad.hs +++ b/accounts/gkleen@sif/xmonad/xmonad.hs @@ -24,6 +24,7 @@ import XMonad.Prompt import XMonad.Prompt.Input import XMonad.Util.Scratchpad import XMonad.Util.NamedScratchpad +import XMonad.Util.Ungrab import Control.Monad (sequence, liftM, liftM2, join, void) import XMonad.Util.WorkspaceCompare import XMonad.Layout.NoBorders @@ -867,6 +868,11 @@ myKeys' conf host = Map.fromList $ , ((0, xF86XK_AudioPause), mediaMpv $ MpvSetProperty "pause" False) , ((0, {-xF86XK_AudioMicMute-} 269025202), safeSpawn "pulseaudio-ctl" ["mute-input"]) , ((0, xF86XK_AudioPlay), mediaMpvTogglePause) + , ((0, xK_Print), do + home <- liftIO getHomeDirectory + unGrab + safeSpawn "scrot" ["-s", "-F", home "screenshots" "%Y-%m-%dT%H:%M:%S.png", "-e", "xclip -selection clipboard -t image/png -i $f"] + ) , ((modm .|. mod1Mask, xK_space), mediaMpvTogglePause) -- , ((0, xF86XK_MonBrightnessDown), backlight . cycleThrough $ reverse brCycle) -- cgit v1.2.3