mb-jgtools, oneshot

master
Daniel Napora 2021-11-10 09:56:09 +01:00
parent 53e09eb63d
commit 48f9ced9d5
2 changed files with 28 additions and 2 deletions

View File

@ -138,10 +138,10 @@ panels_topmargin=0
case $LANG in
pl*) TYPE_TO_SEARCH="Pisz aby Wyszukać"
APPS="Programy"
KEYS="Skroty klawiszowe"
KEYS="Skróty klawiszowe"
SCREENSHOT="Zrzut ekranu"
LOCKSCR="Zablokuj ekran"
EXIT="Wyjscie..."
EXIT="Wyjście..."
HELP="Pomoc"
UGUIDE="Przewodnik Mabox (online)"
SETTINGS="ustawienia"

26
bin/oneshot 100755
View File

@ -0,0 +1,26 @@
#!/bin/bash
# Based on: https://askubuntu.com/questions/211750/taking-screenshots-of-all-or-specific-virtual-desktops-workspaces-or-windows
SLEEP="5"
DESTDIR=$(xdg-user-dir PICTURES)
DATE=$(date +"%Y%m%d-%H%M%S")
eval $(xdotool getdisplaygeometry --shell)
numdesk=$(xdotool get_num_desktops)
desk=0
while [[ "$desk" -lt "$numdesk" ]];
do
xdotool set_desktop $desk;
sleep ${SLEEP};
scrot -o "/tmp/desktop$desk.png";
desk=$((desk+1));
done
cd ${DESTDIR}
montage /tmp/desktop*.png -tile 1x${dnum} -geometry ${WIDTH}x${HEIGHT}+0+0 workspaces${DATE}.png
rm /tmp/desktop*.png
viewnior workspaces${DATE}.png &