diff --git a/i3config b/i3config index fea04136fbe1a6db75966eb6ac291dd6e1522b0e..2eeb9155dfc156dea5964bacd8723d19ac6048d7 100644 --- a/i3config +++ b/i3config @@ -42,6 +42,9 @@ bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status 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 5a4bde930aa77a0cc6da1366b32c2b359ebe37e6..44fa5baf6e76fdeab56f1501011625ff4f3b250d 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. @@ -63,6 +63,10 @@ export HSTR_CONFIG=hicolor 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)