diff options
author | Dave Davenport <qball@gmpclient.org> | 2015-12-10 20:57:43 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2015-12-10 20:57:43 +0100 |
commit | bae542791336929366d711fb3bea0fcc6f0e82f3 (patch) | |
tree | f3b982745f0fb016e4d343f853102d466aee7e01 /script | |
parent | 8ed31cab7e0bd4e68b504d202e0bed951ee5c182 (diff) |
Add option to output to specific file.
Diffstat (limited to 'script')
-rwxr-xr-x | script/rofi-create-screenshot.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script/rofi-create-screenshot.sh b/script/rofi-create-screenshot.sh index 88740b57..32493c75 100755 --- a/script/rofi-create-screenshot.sh +++ b/script/rofi-create-screenshot.sh @@ -15,6 +15,9 @@ COLOR_BLUE="\e[0;34m" XRDB_FILE=$1 shift +OUTPUT_PNG=$1 +shift + XVFB=$(which Xvfb 2> /dev/null) XDOTOOL=$(which xdotool 2> /dev/null) XRDB=$(which xrdb 2> /dev/null) @@ -79,6 +82,11 @@ ROFI_OPTIONS="-selected-row 6 -u 2,3 -a 4,5 -location 0 -width 100 -lines 7 -col export DISPLAY=${VDISPLAY} +if [ -n "${OUTPUT_PNG}" ] +then + export ROFI_PNG_OUTPUT="${OUTPUT_PNG}" +fi + # Create fake X11 create_fake_x ${VDISPLAY} |