1
0
forked from extern/nix-config

sxhkd: Add variable DPI support to screenshot.sh

This makes the feh window render correctly in both 96 and 192 DPI,
as well as any multiples thereof.
This commit is contained in:
Donovan Glover 2018-12-12 06:12:51 -05:00
parent 5f0320f2bf
commit bceec89b6a
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -2,6 +2,9 @@
# New Start: A modern Arch workflow built with an emphasis on functionality. # New Start: A modern Arch workflow built with an emphasis on functionality.
# Copyright (C) 2017-2018 Donovan Glover # Copyright (C) 2017-2018 Donovan Glover
SCREENSHOT_DPI=$(xrdb -query | grep Xft.dpi | cut -f 2)
SCREENSHOT_SCALE=$(($SCREENSHOT_DPI / 96))
DATETIME=`date +%F_%H%M%S` DATETIME=`date +%F_%H%M%S`
shotgun ~/$DATETIME.png shotgun ~/$DATETIME.png
feh ~/$DATETIME.png --geometry 3200x1800 --scale-down feh ~/$DATETIME.png --geometry $((1600 * $SCREENSHOT_SCALE))x$((900 * $SCREENSHOT_SCALE)) --scale-down