From df59a15732be35ab4d3ec4ff49a4e90afadd369d Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Mon, 14 Oct 2024 19:50:49 +0200 Subject: Added scrot for taking screenshots --- i3config | 3 +++ shenanigans.sh | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/i3config b/i3config index fea0413..2eeb915 100644 --- a/i3config +++ b/i3config @@ -42,6 +42,9 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status +# Take screeshot +bindsym --release $mod+z exec scrot -s - | xclip -selection clipboard -target image/png + # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod diff --git a/shenanigans.sh b/shenanigans.sh index 5a4bde9..44fa5ba 100755 --- a/shenanigans.sh +++ b/shenanigans.sh @@ -1,5 +1,5 @@ # Software list. -# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop newsboat tmux ctags vim picom +# cifs-utils tree hstr s3cmd xclip mc gnupg ripgrep jq xmlstarlet htop nvtop newsboat tmux ctags vim picom scrot # Magical environment variables. @@ -64,6 +64,10 @@ if [[ $- =~ .i. ]]; then bind '"\C-h": "\C-a hstr -- \C-j"'; fi # Useful function. Much wow! +screenshot() { + scrot -s -e 'xclip -selection clipboard -t image/png -i $f && rm $f' +} + backup() { CWD=$(pwd) VHOME=/home/$USER/Vault -- cgit v1.2.3