inital commit
This commit is contained in:
parent
27ada79b43
commit
aff5a78e79
@ -1,2 +1,4 @@
|
|||||||
# screenshot
|
# screenshot
|
||||||
|
Screenshot a region of the screen and copy as welll as save it to a folder
|
||||||
|
|
||||||
|
run the install script (you may need to ```chmod +x install.sh``` it)
|
||||||
|
35
install.sh
Executable file
35
install.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "You need xclip and maim installed for the xorg screenshot tool"
|
||||||
|
echo "You need slurp, grim and wl-clipboard for the wayland screenshot tool"
|
||||||
|
read -p 'do you have these tools installed? (y/n): ' confirmation
|
||||||
|
if [ $confirmation = 'y' ]
|
||||||
|
then
|
||||||
|
echo 'continuing...'
|
||||||
|
else
|
||||||
|
echo 'exiting...'
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
fi
|
||||||
|
read -p 'if you use wayland press w, if you use xorg press x: ' Display
|
||||||
|
|
||||||
|
if [ $Display = 'w' ]
|
||||||
|
then
|
||||||
|
sudo cp screenshot-wayland /usr/bin
|
||||||
|
sudo chmod +x /usr/bin/screenshot-wayland
|
||||||
|
cp screenshot-w.sh $HOME
|
||||||
|
sudo chmod +x $HOME/screenshot-w.sh
|
||||||
|
mkdir $HOME/Screenshots
|
||||||
|
|
||||||
|
elif [ $Display = 'x' ]
|
||||||
|
then
|
||||||
|
sudo cp screenshot /usr/bin
|
||||||
|
sudo chmod +x /usr/bin/screenshot
|
||||||
|
cp screenshot.sh $HOME
|
||||||
|
sudo chmod +x $HOME/screenshot.sh
|
||||||
|
mkdir $HOME/Screenshots
|
||||||
|
|
||||||
|
else
|
||||||
|
echo 'you did not press w or x'
|
||||||
|
exit 1
|
||||||
|
fi
|
2
screenshot
Normal file
2
screenshot
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
$HOME/screenshot.sh
|
8
screenshot-w.sh
Executable file
8
screenshot-w.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
set -x
|
||||||
|
|
||||||
|
filename=$(date +"%d:%m:%Y-%H:%M:%S-screenshot.png")
|
||||||
|
|
||||||
|
touch $HOME/Screenshots/$filename
|
||||||
|
|
||||||
|
grim -g "$(slurp)" "$HOME/Screenshots/$filename"
|
||||||
|
wl-copy < "$HOME/Screenshots/$filename"
|
2
screenshot-wayland
Normal file
2
screenshot-wayland
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
$HOME/screenshot-w.sh
|
4
screenshot.sh
Executable file
4
screenshot.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
time=$(date +"%d,%m,%Y--%H:%M:%S")
|
||||||
|
maim -s --format png $HOME/Screenshots/$time.png | -u
|
||||||
|
cat $HOME/Screenshots/$time.png | xclip -selection clipboard -target image/png -i
|
Loading…
Reference in New Issue
Block a user