2024-10-03 00:29:02 +02:00
|
|
|
#!/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
|
2024-10-06 12:58:38 +02:00
|
|
|
sudo cp screenshot-wayland /usr/bin/screenshot-w
|
2024-10-03 00:29:02 +02:00
|
|
|
sudo chmod +x /usr/bin/screenshot-wayland
|
|
|
|
sudo chmod +x $HOME/screenshot-w.sh
|
2024-10-06 12:58:38 +02:00
|
|
|
mkdir $HOME/Pictures/Screenshots
|
|
|
|
echo Run screenhot-w to screenshot
|
2024-10-03 00:29:02 +02:00
|
|
|
|
|
|
|
elif [ $Display = 'x' ]
|
|
|
|
then
|
2024-10-06 12:58:38 +02:00
|
|
|
sudo cp screenshot /usr/bin/screenshot-x
|
2024-10-03 00:29:02 +02:00
|
|
|
sudo chmod +x /usr/bin/screenshot
|
|
|
|
sudo chmod +x $HOME/screenshot.sh
|
2024-10-06 12:58:38 +02:00
|
|
|
mkdir $HOME/Pictures/Screenshots
|
|
|
|
echo Run screenhot-x to screenshot
|
2024-10-03 00:29:02 +02:00
|
|
|
|
|
|
|
else
|
|
|
|
echo 'you did not press w or x'
|
|
|
|
exit 1
|
|
|
|
fi
|