Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-02-05 11:13:50

abs023
Member
Registered: 2023-02-05
Posts: 2

How to make programmatic changes to display aply after execution.

Hi I try to make a script that change the scaling of display,
but it does not take effect after execution (only after login out and in).
 
#!/bin/sh

xfconf-query -c displays -p /Default/DSI-1/Scale/X -s 0.8
xfconf-query -c displays -p /Default/DSI-1/Scale/Y -s 0.8
xfconf-query -c displays -p /Fallback/DSI-1/Scale/X -s 0.8
xfconf-query -c displays -p /Fallback/DSI-1/Scale/Y -s 0.8

what do I need to add to it in order to take effect after execution?

Offline

#2 2023-02-05 16:45:08

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,948

Re: How to make programmatic changes to display aply after execution.

Hello and welcome.

Have a read through this thread. You need to also use xfconf-query to create a /Schemes/Apply key that will trigger the change.

As a hint, run:

xfconf-query -c displays -mv

...in a terminal window and change the scale via the Display applet. You'll see what is getting changed. On my system:

set: /Default/eDP-1/Scale/X (0.900000)
set: /Default/eDP-1/Scale/Y (0.900000)

In my case, I would run the following command to make it apply:

xfconf-query -c displays -p /Schemes/Apply -t string -s Default -n

Your specifics may be different, but the process should work.


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 2023-02-05 17:11:53

abs023
Member
Registered: 2023-02-05
Posts: 2

Re: How to make programmatic changes to display aply after execution.

Awsome !!! Thank you so much.

Offline

Board footer

Powered by FluxBB