From d8bb91eaccf9669338bd11b9944fe3fb5b48fe64 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 20 Jul 2024 15:50:40 +0200 Subject: [PATCH] rofi: use DPI as set by xsettingsd-setup --- bin/rofi-mediaplayer | 3 ++- bin/rofi-wifi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/rofi-mediaplayer b/bin/rofi-mediaplayer index 81b1ae5..e69aacf 100755 --- a/bin/rofi-mediaplayer +++ b/bin/rofi-mediaplayer @@ -5,7 +5,8 @@ if [ -z "${ROFI_OUTSIDE}" ]; then export mediaplayer=$1 export Mediaplayer=$(echo $1 | sed -E 's/(.)/\U\1/') - exec rofi -no-lazy-grab -show-icons -no-custom -modi m:$0 -show m \ + dpi=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p') + exec rofi -dpi $dpi -no-lazy-grab -show-icons -no-custom -modi m:$0 -show m \ -kb-custom-1 Super+z \ -kb-custom-2 Super+x \ -kb-custom-3 Super+c \ diff --git a/bin/rofi-wifi b/bin/rofi-wifi index 445aa81..adbe205 100755 --- a/bin/rofi-wifi +++ b/bin/rofi-wifi @@ -4,7 +4,8 @@ if [ -z "${ROFI_OUTSIDE}" ]; then yoffset=$(( $(xrdb -query | sed -n 's/^Xft.dpi:\t\([0-9]*\)$/\1/p')*20/96 )) - exec rofi -show-icons -no-custom -modi m:$0 -show m -location 3 -yoffset $yoffset + dpi=$(xrdb -query | sed -nE 's/^Xft\.dpi:\s*//p') + exec rofi -dpi $dpi -show-icons -no-custom -modi m:$0 -show m -location 3 -yoffset $yoffset fi case $ROFI_RETV in