You are not logged in.
Pages: 1
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
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
Thank you for replying. I'll take a look at devilspie and give a feedback.
Offline
The easiest way is to go to window manager improvement > position and set it to large, this way you will disable smart window placement.
Arch Linux Xfce - 64Bit Linux User #621110 GitHub
Offline
Pages: 1
[ Generated in 0.012 seconds, 7 queries executed - Memory usage: 524.88 KiB (Peak: 529.91 KiB) ]