This commit is contained in:
Stephan Raabe
2023-08-20 17:34:53 +02:00
parent 585834d31d
commit 18131d6f2a
10 changed files with 150 additions and 46 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/bin/bash
# ____ _ _
# / ___| ___ _ __ ___ ___ _ __ ___| |__ ___ | |_
# \___ \ / __| '__/ _ \/ _ \ '_ \/ __| '_ \ / _ \| __|
# ___) | (__| | | __/ __/ | | \__ \ | | | (_) | |_
# |____/ \___|_| \___|\___|_| |_|___/_| |_|\___/ \__|
#
#
# by Stephan Raabe (2023)
# -----------------------------------------------------
DIR="$HOME/Pictures/screenshots/"
NAME="screenshot_$(date +%d%m%Y_%H%M%S).png"
# option1="Selected window (delay 3 sec)"
option2="Selected area"
option3="Fullscreen (delay 3 sec)"
# options="$option1\n$option2\n$option3"
options="$option2\n$option3"
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "Take Screenshot")
case $choice in
$option1)
scrot $DIR$NAME -d 3 -e 'xclip -selection clipboard -t image/png -i $f' -c -z -u
notify-send "Screenshot created" "Mode: Selected window"
;;
$option2)
grim -g "$(slurp)" $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
notify-send "Screenshot created" "Mode: Selected area"
;;
$option3)
sleep 3
grim $(xdg-user-dir PICTURES)/screenshots/$(date +'%s_grim.png')
notify-send "Screenshot created" "Mode: Fullscreen"
;;
esac
+7
View File
@@ -9,5 +9,12 @@
# by Stephan Raabe (2023)
# -----------------------------------------------------
tmp=$(virsh --connect qemu:///system list | grep " win11 " | awk '{ print $3}')
if ([ "x$tmp" == "x" ] || [ "x$tmp" != "xrunning" ])
then
virsh --connect qemu:///system start win11
echo "Virtual Machine win11 is starting..."
sleep 3
fi
looking-glass-client &
exit
+1 -1
View File
@@ -22,7 +22,7 @@ choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -l 4 -width 30 -p "P
case $choice in
$option1)
slock ;;
swaylock ;;
$option2)
hyprctl dispatch exit ;;
$option3)