Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-08-19 03:12:45

PandaEcstasy
Member
Registered: 2019-08-19
Posts: 4

Where is the randr scaling option in Xfconf?

Hey all, first post!

Gtk scaling in 4.14 is great, but doesn't properly scale window decorations under many themes, so I'm hoping randr scaling will fix that. The 4.14 changelog mentioned this:

The display dialog received a lot of attention during this cycle and a big feature: Users are now able to save and (automatically) restore complete multi-display configurations, which is especially helpful for those who frequently connect their laptop to varying docking stations or setups. Furthermore a lot of time was spent on making the user interface more intuitive and a hidden option was added to support RandR display scaling (configured via Xfconf).

I'm specifically looking for the "hidden option" that's configured via Xfconf, does anybody know where that key is?

Thanks!

Offline

#2 2019-08-19 03:28:07

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,491

Re: Where is the randr scaling option in Xfconf?

Hello and welcome.

This is the commit that added RandR display scaling. The xfconf settings are located in the displays channel in the format of /Default/DISPLAYNAME/Scale/X and /Default/DISPLAYNAME/Scale/Y.

Edit: Doesn't do anything for me, but I'm not sure what to expect.

Edit2: Okay - you have to restart xfsettingsd for it to take effect: "xfsettingsd --replace"
Here are the manual xfconf-query commands to create the entries:

xfconf-query -c displays -p /Default/DISPLAY/Scale/X -t double -s 1.0 --create
xfconf-query -c displays -p /Default/DISPLAY/Scale/Y -t double -s 1.0 --create

....where DISPLAY is the name of your display.

Interesting feature.

Last edited by ToZ (2019-08-19 03:35:58)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2019-08-19 04:45:35

PandaEcstasy
Member
Registered: 2019-08-19
Posts: 4

Re: Where is the randr scaling option in Xfconf?

ToZ wrote:

Hello and welcome.

This is the commit that added RandR display scaling. The xfconf settings are located in the displays channel in the format of /Default/DISPLAYNAME/Scale/X and /Default/DISPLAYNAME/Scale/Y.

Edit: Doesn't do anything for me, but I'm not sure what to expect.

Edit2: Okay - you have to restart xfsettingsd for it to take effect: "xfsettingsd --replace"
Here are the manual xfconf-query commands to create the entries:

xfconf-query -c displays -p /Default/DISPLAY/Scale/X -t double -s 1.0 --create
xfconf-query -c displays -p /Default/DISPLAY/Scale/Y -t double -s 1.0 --create

....where DISPLAY is the name of your display.

Interesting feature.

This worked, thanks! Desktop is blurry with randr scaling, though sad

Do you know of any better way to get window decorations to scale properly? Only the Default and hdpi Default decoration themes scale, the rest look like this:

t4PPO0il.png

I think I could solve this by recompiling/editing each theme, but a one-size-fits-all solution would be ideal!

Offline

#4 2019-08-19 10:56:11

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,491

Re: Where is the randr scaling option in Xfconf?

PandaEcstasy wrote:

Do you know of any better way to get window decorations to scale properly? Only the Default and hdpi

Unfortunately, no.

I think I could solve this by recompiling/editing each theme, but a one-size-fits-all solution would be ideal!

Yes it would. Feel free to create an enhancement request at the bug tracker for this functionality.

As a convenience, I use the folowing script to automate the resizing of xfwm4 themes. It works better when you downscale as upscale does create blurry images, but you are welcome to it.

#!/bin/bash
# needs to be exectuted from within the xfwm4 directory
# need to specify percentage change
# Eg. SCRIPT_NAME 75

if [ $# -ne 1 ]; then
	echo "Usage: $0 [SCALE_FACTOR_AS_PERCENTAGE]"
	echo "   Eg. $0 75"
	exit 1
fi

if [ "$(basename $(pwd))" != "xfwm4" ]; then
	echo "Error: Script must be run from within an xfwm4 theme directory"
	exit 1
fi

if (( $1 >= 0 )) 2>/dev/null; then
	echo -n "resizing xpms"
	for name in `find . -maxdepth 1 -type f -name "*.xpm"`; do convert "$name" -alpha on -filter triangle -resize "$1"% $name; echo -n "."; done
	echo ""	
	echo -n "resizing pngs"
	for name in `find . -maxdepth 1 -type f -name "*.png"`; do convert "$name" -alpha on -filter triangle -resize "$1"% $name; echo -n "."; done
	echo ""
else
	echo "Error: Scale factor must be greater than 0"
	exit 1
fi 

exit 0

Run the script from within an xfwm4 directory. Probably best to copy the contents of an xfwm4 directory to a temporary directory as opposed to working on a theme's installed files.

Note: I use the "triangle" filter in the convert command. It might be possible to get better results with other filters to get a less blurry image, but I haven't looked into it.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2019-08-21 03:37:50

PandaEcstasy
Member
Registered: 2019-08-19
Posts: 4

Re: Where is the randr scaling option in Xfconf?

ToZ wrote:
PandaEcstasy wrote:

Do you know of any better way to get window decorations to scale properly? Only the Default and hdpi

Unfortunately, no.

I think I could solve this by recompiling/editing each theme, but a one-size-fits-all solution would be ideal!

Yes it would. Feel free to create an enhancement request at the bug tracker for this functionality.

As a convenience, I use the folowing script to automate the resizing of xfwm4 themes. It works better when you downscale as upscale does create blurry images, but you are welcome to it.

#!/bin/bash
# needs to be exectuted from within the xfwm4 directory
# need to specify percentage change
# Eg. SCRIPT_NAME 75

if [ $# -ne 1 ]; then
	echo "Usage: $0 [SCALE_FACTOR_AS_PERCENTAGE]"
	echo "   Eg. $0 75"
	exit 1
fi

if [ "$(basename $(pwd))" != "xfwm4" ]; then
	echo "Error: Script must be run from within an xfwm4 theme directory"
	exit 1
fi

if (( $1 >= 0 )) 2>/dev/null; then
	echo -n "resizing xpms"
	for name in `find . -maxdepth 1 -type f -name "*.xpm"`; do convert "$name" -alpha on -filter triangle -resize "$1"% $name; echo -n "."; done
	echo ""	
	echo -n "resizing pngs"
	for name in `find . -maxdepth 1 -type f -name "*.png"`; do convert "$name" -alpha on -filter triangle -resize "$1"% $name; echo -n "."; done
	echo ""
else
	echo "Error: Scale factor must be greater than 0"
	exit 1
fi 

exit 0

Run the script from within an xfwm4 directory. Probably best to copy the contents of an xfwm4 directory to a temporary directory as opposed to working on a theme's installed files.

Note: I use the "triangle" filter in the convert command. It might be possible to get better results with other filters to get a less blurry image, but I haven't looked into it.

The script seems to work, thanks! It ignores SVGs, but it's a lot better than nothing. I'll file a bug and hopefully they'll be receptive of the idea.

Offline

#6 2019-08-23 05:31:04

PandaEcstasy
Member
Registered: 2019-08-19
Posts: 4

Re: Where is the randr scaling option in Xfconf?

The script seems to work, thanks! It ignores SVGs, but it's a lot better than nothing. I'll file a bug and hopefully they'll be receptive of the idea.

Never mind, they shot it down sad Here's hoping theme devs figure it out!

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.009 seconds, 7 queries executed - Memory usage: 551.24 KiB (Peak: 568.52 KiB) ]