mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-23 04:23:08 +00:00
New port: x11/run_scaled: Run an X application scaled via Xpra (useful on HiDPI screens)
run_scaled is a Bash script that simplifies scaling graphical X applications on HiDPI displays (using Xpra). WWW: https://github.com/kaueraal/run_scaled
This commit is contained in:
parent
d23d35ea8b
commit
c7aec1489e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=516174
@ -285,6 +285,7 @@
|
||||
SUBDIR += roxterm
|
||||
SUBDIR += rsibreak
|
||||
SUBDIR += rubygem-gnome
|
||||
SUBDIR += run_scaled
|
||||
SUBDIR += rxvt
|
||||
SUBDIR += rxvt-unicode
|
||||
SUBDIR += sakura
|
||||
|
32
x11/run_scaled/Makefile
Normal file
32
x11/run_scaled/Makefile
Normal file
@ -0,0 +1,32 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= run_scaled
|
||||
DISTVERSION= g20181209
|
||||
CATEGORIES= x11
|
||||
|
||||
MAINTAINER= 0mp@FreeBSD.org
|
||||
COMMENT= Run an X application scaled via Xpra (useful on HiDPI screens)
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
RUN_DEPENDS= bash:shells/bash \
|
||||
xpra:x11/xpra \
|
||||
xrandr:x11/xrandr \
|
||||
Xvfb:x11-servers/xorg-vfbserver
|
||||
|
||||
USES= shebangfix
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= kaueraal
|
||||
GH_TAGNAME= 669993429863a9f6aa53560171ef1fc57f8546f9
|
||||
SHEBANG_FILES= ${PORTNAME}
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
|
||||
|
||||
.include <bsd.port.mk>
|
3
x11/run_scaled/distinfo
Normal file
3
x11/run_scaled/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1572524979
|
||||
SHA256 (kaueraal-run_scaled-g20181209-669993429863a9f6aa53560171ef1fc57f8546f9_GH0.tar.gz) = e9101587c67bf8ae35f400f30428a377e371ca8ff2276069651493f246f90e9d
|
||||
SIZE (kaueraal-run_scaled-g20181209-669993429863a9f6aa53560171ef1fc57f8546f9_GH0.tar.gz) = 2325
|
19
x11/run_scaled/files/patch-run__scaled
Normal file
19
x11/run_scaled/files/patch-run__scaled
Normal file
@ -0,0 +1,19 @@
|
||||
--- run_scaled.orig 2019-10-31 16:00:04 UTC
|
||||
+++ run_scaled
|
||||
@@ -65,12 +65,13 @@ done
|
||||
|
||||
declare -i UNSCALED_RESOLUTION_X
|
||||
declare -i UNSCALED_RESOLUTION_Y
|
||||
-UNSCALED_RESOLUTION_X=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\1/p'`
|
||||
-UNSCALED_RESOLUTION_Y=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9]\+\) x \([0-9]\+\).*/\2/p'`
|
||||
+UNSCALED_RESOLUTION_X=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9][0-9]*\) x \([0-9][0-9]*\).*/\1/p'`
|
||||
+UNSCALED_RESOLUTION_Y=`xrandr | sed -n -e 's/Screen 0:.*current \([0-9][0-9]*\) x \([0-9][0-9]*\).*/\2/p'`
|
||||
|
||||
UNSCALED_RESOLUTION="$( bc <<<"$UNSCALED_RESOLUTION_X / $SCALING_FACTOR" )x$( bc <<<"$UNSCALED_RESOLUTION_Y / $SCALING_FACTOR" )"
|
||||
|
||||
-DISPLAYNUM=:`shuf -i 10000-99999999 -n 1`
|
||||
+# sysutils/shuf is significantly slower than jot(1).
|
||||
+DISPLAYNUM=:`jot -r 1 10000 99999999`
|
||||
ESCAPED_PARAMS=`printf '%q ' "$@"`
|
||||
xpra start "$DISPLAYNUM" --xvfb="Xvfb +extension Composite -screen 0 ${UNSCALED_RESOLUTION}x24+32 -nolisten tcp -noreset -auth \$XAUTHORITY" --env=GDK_SCALE=1 --env=GDK_DPI_SCALE=1 --start-child="$ESCAPED_PARAMS" --exit-with-children
|
||||
sleep "$SLEEPTIME"
|
4
x11/run_scaled/pkg-descr
Normal file
4
x11/run_scaled/pkg-descr
Normal file
@ -0,0 +1,4 @@
|
||||
run_scaled is a Bash script that simplifies scaling graphical X applications on
|
||||
HiDPI displays (using Xpra).
|
||||
|
||||
WWW: https://github.com/kaueraal/run_scaled
|
Loading…
Reference in New Issue
Block a user