Skip to content

Commit 4a474f7

Browse files
committed
Use the current screen width when determining where to display the yad window.
1 parent bb76cf5 commit 4a474f7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ RUN \
119119
bash \
120120
coreutils \
121121
findutils \
122-
expect
122+
expect \
123+
xdpyinfo
123124

124125
# && \
125126
# # Save some space by removing unused DRI drivers.

rootfs/etc/services.d/autovideoconverter/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ log_hb_encode_progress_yad() {
9191
) | /opt/base/bin/yad \
9292
--fixed \
9393
--width=384 \
94-
--posx=$(expr $DISPLAY_WIDTH / 2 - 384 / 2) \
94+
--posx=$(expr $(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $3}') / 2 - 384 / 2) \
9595
--posy=5 \
9696
--title "Automatic Video Converter" \
9797
--window-icon /opt/novnc/images/icons/master_icon.png \

0 commit comments

Comments
 (0)