svn commit: r516174 - in head/x11: . run_scaled run_scaled/files
Mateusz Piotrowski
0mp at FreeBSD.org
Thu Oct 31 16:30:54 UTC 2019
Author: 0mp
Date: Thu Oct 31 16:30:52 2019
New Revision: 516174
URL: https://svnweb.freebsd.org/changeset/ports/516174
Log:
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
Added:
head/x11/run_scaled/
head/x11/run_scaled/Makefile (contents, props changed)
head/x11/run_scaled/distinfo (contents, props changed)
head/x11/run_scaled/files/
head/x11/run_scaled/files/patch-run__scaled (contents, props changed)
head/x11/run_scaled/pkg-descr (contents, props changed)
Modified:
head/x11/Makefile
Modified: head/x11/Makefile
==============================================================================
--- head/x11/Makefile Thu Oct 31 15:10:46 2019 (r516173)
+++ head/x11/Makefile Thu Oct 31 16:30:52 2019 (r516174)
@@ -285,6 +285,7 @@
SUBDIR += roxterm
SUBDIR += rsibreak
SUBDIR += rubygem-gnome
+ SUBDIR += run_scaled
SUBDIR += rxvt
SUBDIR += rxvt-unicode
SUBDIR += sakura
Added: head/x11/run_scaled/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/run_scaled/Makefile Thu Oct 31 16:30:52 2019 (r516174)
@@ -0,0 +1,32 @@
+# $FreeBSD$
+
+PORTNAME= run_scaled
+DISTVERSION= g20181209
+CATEGORIES= x11
+
+MAINTAINER= 0mp at 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>
Added: head/x11/run_scaled/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/run_scaled/distinfo Thu Oct 31 16:30:52 2019 (r516174)
@@ -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
Added: head/x11/run_scaled/files/patch-run__scaled
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/run_scaled/files/patch-run__scaled Thu Oct 31 16:30:52 2019 (r516174)
@@ -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"
Added: head/x11/run_scaled/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/run_scaled/pkg-descr Thu Oct 31 16:30:52 2019 (r516174)
@@ -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
More information about the svn-ports-head
mailing list