36 lines
886 B
Bash
Executable File
36 lines
886 B
Bash
Executable File
#!/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/screenshot-w
|
|
sudo chmod +x /usr/bin/screenshot-wayland
|
|
sudo chmod +x $HOME/screenshot-w.sh
|
|
mkdir $HOME/Pictures/Screenshots
|
|
echo Run screenhot-w to screenshot
|
|
|
|
elif [ $Display = 'x' ]
|
|
then
|
|
sudo cp screenshot /usr/bin/screenshot-x
|
|
sudo chmod +x /usr/bin/screenshot
|
|
sudo chmod +x $HOME/screenshot.sh
|
|
mkdir $HOME/Pictures/Screenshots
|
|
echo Run screenhot-x to screenshot
|
|
|
|
else
|
|
echo 'you did not press w or x'
|
|
exit 1
|
|
fi
|