added support for HDPI

This commit is contained in:
Tio TROM 2023-08-07 22:13:04 +02:00
parent ee1c98250b
commit 3dca8cb2a0
1 changed files with 10 additions and 1 deletions

View File

@ -21,6 +21,7 @@ disable_dark_panels() {
set_theme() {
local theme="Colloid-$1"
# Set the icon theme and panel color according to the chosen theme
case "$theme" in
*'-Dark-Gruvbox'|*'-Dark'|*'-Dark-Nord')
set_icon_theme 'zafiro-dark'
@ -38,7 +39,15 @@ set_theme() {
# Change the main theme to the chosen one
xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "$theme"
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme"
if [ "$(xfconf-query -c xsettings -p /Gdk/WindowScalingFactor)" = '2' ]; then
# Use the highDPI themes for XFWM if highDPI is enabled in XFCE
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme-xhdpi"
else
xfconf-query -c xfwm4 -p /general/theme -n -t string -s "$theme"
fi
# Send notification about the theme change
notify-send "$theme theme$panel_notification was enabled"
}