From d0fd698bcacc2c477a0149d2deb373722f45e214 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Sun, 24 Sep 2023 21:38:37 +0300 Subject: Adding entire tool chain for: - taking screenshots - taking screenshots and piping them to the system clipboard - taking recordings of the x11 screen with x11grab and ffmpeg (no audio) Changes to be committed: modified: keybinds new file: clip new file: xrec new file: xshot --- clip | 21 +++++++++++++++++++++ keybinds | 8 ++++---- xrec | 15 +++++++++++++++ xshot | 17 +++++++++++++++++ 4 files changed, 57 insertions(+), 4 deletions(-) create mode 100755 clip create mode 100755 xrec create mode 100755 xshot diff --git a/clip b/clip new file mode 100755 index 0000000..d724e14 --- /dev/null +++ b/clip @@ -0,0 +1,21 @@ +#!/bin/bash + +set -e + +case $1 in + + full) + scrot -z -q 100 "/tmp/imgclip.png" + xclip -selection clipboard -t image/png -i "/tmp/imgclip.png" + rm "/tmp/imgclip.png" + ;; + + area) + scrot -z -q 100 -s "/tmp/imgclip.png" # -f --freeze + xclip -selection clipboard -t image/png -i "/tmp/imgclip.png" + rm "/tmp/imgclip.png" + ;; + +esac + +rm "/tmp/imgclip*" diff --git a/keybinds b/keybinds index 8d563ec..e8e2f56 100644 --- a/keybinds +++ b/keybinds @@ -9,13 +9,13 @@ alt + shift + t # xshot and clip for Screenshots alt + control + Print - xshot ss full + xshot full alt + Print clip full alt + control + s - xshot ss area + xshot area alt + shift + s clip area @@ -23,10 +23,10 @@ alt + shift + s # xshot for Recordings alt + shift + r - xshot rec start + xrec start alt + shift + e - xshot rec stop + xrec stop # xsecurelock diff --git a/xrec b/xrec new file mode 100755 index 0000000..4bfab62 --- /dev/null +++ b/xrec @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +recordingPATH=~/media/screenrecords/ + +case $1 in + + start) + ffmpeg -video_size 1920x1080 -framerate 60 -f x11grab -i :0.0+0,0 ${recordingPATH}screenrecording_$(($(ls $recordingPATH | wc -l)+1)).mp4 ;; + + stop) + pkill ffmpeg ;; + +esac diff --git a/xshot b/xshot new file mode 100755 index 0000000..2f1cc18 --- /dev/null +++ b/xshot @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +screenshotPATH=~/media/screenshots/ + +cd $screenshotPATH + +case $1 in + + full) + scrot -z -q 100 "%Y-%m-%d %H:%M:%S.png" ;; + + area) + scrot -z -q 100 -s "%Y-%m-%d %H:%M:%S.png" ;; # -f --freeze + +esac -- cgit v1.2.3