PrintScreen support in Slax

pull/40/head
TomasM 2017-11-15 14:46:41 -05:00
parent 371657ce94
commit dc5adcf05b
3 changed files with 26 additions and 1 deletions

View File

@ -8,9 +8,10 @@ VERSION=1.3.5
# first install stock version
apt-get update
apt-get install --no-install-recommends --yes $NAME feh compton volumeicon-alsa murrine-themes leafpad qalculate-gtk
apt-get install --no-install-recommends --yes $NAME feh compton volumeicon-alsa murrine-themes leafpad qalculate-gtk scrot xdg-user-dirs
. ../../cleanup
xdg-user-dirs-update
(cd rootcopy && cp --parents -afr * /)
chown -R guest.users /home/guest

View File

@ -135,3 +135,5 @@ Control Mod4 F9 :TakeToWorkspace 9
Control Mod4 F10 :TakeToWorkspace 10
Control Mod4 F11 :TakeToWorkspace 11
Control Mod4 F12 :TakeToWorkspace 12
Print :Exec fbprintscreen

View File

@ -0,0 +1,22 @@
#!/bin/bash
PICTURES=$(xdg-user-dir PICTURES)
if [ "$PICTURES" = "" ]; then
PICTURES=~/Pictures
fi
mkdir -p $PICTURES
cd $PICTURES
# make screenshot
SCREENSHOT=$(scrot -e 'echo $f')
if [ "$SCREENSHOT" = "" ]; then
exit 1
fi
# open screenshot in 2/3 window
read W H X <<< $(xrandr 2>/dev/null | fgrep '*' | tr -s " " | tr "x" " ")
W=$(($W*2/3))
H=$(($H*2/3))
exec feh --geometry $W"x"$H $SCREENSHOT