Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-04-18 23:18:38

s3idani
Member
Registered: 2023-04-17
Posts: 6

Thunar center geometry

Is there a way to make Thunar runs always on the center of screen?

Last edited by s3idani (2023-04-18 23:19:03)

Offline

#2 2023-04-19 01:00:59

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

Re: Thunar center geometry

You can easily set all windows to open center screen via Settings Manager > Window Manager Tweaks > Placement. However, assuming that you are looking to just center thunar, there is not built-in way to do this as smart placement puts the thunar window in an empty space on the screen if center placement is not selected.

It might be possible using a tool like xdotool or devilspie. But it depends on how you start thunar.

For example, if starting from the command line, you could:

thunar && xdotool getactivewindow windowmove 480 280

...adjust 480 and 280 to be the top-left x,y coordinates of the window as it centers on your screen.

If starting from the thunar menu item, you would need to change the Exec= line in the thunar.desktop file to something like:

Exec=sh -c "thunar %U && xdotool getactivewindow windowmove 480 280"

If starting via Ctrl+N from an existing window, its not possible using xdotool.

devilspie works a little differently in that it looks for windows as they load by, for example, class name, and applies rules to the window, including centering it. This would handle all the different instances noted above with one solution and no need to change .desktop files.


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-04-19 02:30:59

s3idani
Member
Registered: 2023-04-17
Posts: 6

Re: Thunar center geometry

Thank you for replying. I'll take a look at devilspie and give a feedback.

Offline

#4 2023-04-19 12:33:19

robson75
Member
From: Poland
Registered: 2023-03-30
Posts: 13

Re: Thunar center geometry

The easiest way is to go to window manager improvement > position and set it to large, this way you will disable smart window placement.

Przechwycenie-obrazu-ekranu-2023-04-19-14-24-53.png


Arch Linux Xfce - 64Bit Linux User #621110 GitHub

Offline

Board footer

Powered by FluxBB