PrintScreen support in Slax
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user