Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-11-07 06:40:15

Jakob77
Member
Registered: 2022-11-03
Posts: 58

tunar - opening position on screen

I use Mint 21 Xfce

It seems a bit random to me where on the screen my tunar window opens.

How can it be controlled.?

Offline

#2 2022-11-07 12:15:40

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

Re: tunar - opening position on screen

Currently, xfwm4 controls thunar's window placement using smart placement. There is an open feature request for thunar to remember window positions.

As a workaround, you could use a program like devilspie to force geometry on a per application basis. Or you could use xdotool to auto-move the window to another location. For example:

thunar & sleep .5 && xdotool getactivewindow windowmove 100 100

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 2022-11-07 13:22:24

Jakob77
Member
Registered: 2022-11-03
Posts: 58

Re: tunar - opening position on screen

ToZ wrote:

Currently, xfwm4 controls thunar's window placement using smart placement. There is an open feature request for thunar to remember window positions.

As a workaround, you could use a program like devilspie to force geometry on a per application basis. Or you could use xdotool to auto-move the window to another location. For example:

thunar & sleep .5 && xdotool getactivewindow windowmove 100 100

Thank you. smile
Then I will for a while longer just live with it and hope for an update.

Offline

#4 2022-12-06 07:37:27

JmaCWQ
Member
Registered: 2022-12-06
Posts: 47

Re: tunar - opening position on screen

ToZ wrote:

Currently, xfwm4 controls thunar's window placement using smart placement. There is an open feature request for thunar to remember window positions.

As a workaround, you could use a program like devilspie to force geometry on a per application basis. Or you could use xdotool to auto-move the window to another location. For example:

thunar & sleep .5 && xdotool getactivewindow windowmove 100 100

Hello,
I'm wanting to get any Thunar window opened to open at a certain size and coordinates, while the rename box and file operation progress boxes both have different sizes and coordinates to the main Thunar window/s.
I guess I could be described as command and script illiterate big_smile

Is there a way to have that command run at startup and be made so that every Thunar window opens at the desired location?
If I try your command in Terminal on my setup (MX-21.2.1) it only opens the home folder, but does open in the desired location I set by changing "100 100" to "260 0".
If there's another window open and I run the command in Terminal it does nothing to the open window, but opens the home folder in the desired location.

I've been using Devilspie and while I can get the Thunar windows to open where I want and at what size I want, when I rename something or am copying something, the rename message and file operation progress boxes also use the same large size, which I don't want.
If I use Devilspie to make the rename and progress boxes the size I desire, the .ds files for them are ignored until I remove the .ds I created for Thunar from the ~.devilspie folder, then they work as I set them.
Unless there's an easy way to set Devilspie to do this?, which I've spent many hours trying to figure out but so far failed, it seems the Thunar application entry overrides any others Thunar related.

I've recently switched from MX-18.3 to MX-21.2.1 and with 18.3's version of Xfce window_name could be used instead of application_name, for Thunar itself as the words File Manager use to appear after the folder name in the title bar, and every thing worked fine, Thunar windows would open where and what size I wanted, and the rename and file operation progress boxes would use whatever size and locations I set in the .ds files.
But now on the newer version of Xfce using window_name for Thunar's windows doesn't work as there's no longer a constant like 'File Manager' used in the title bar, it has to be application_name.

For Thunar windows I now use:

; generated_rule Thunar
( if 
( begin 
( contains ( application_name ) "Thunar" )
) 
( begin 
( set_workspace 1 )
( geometry "1380x958+260+0" )
( println "match" )
)
)

For the rename box I use:

; generated_rule Rename
( if 
( begin 
( contains ( window_name ) "Rename" )
) 
( begin 
( set_workspace 1 )
( geometry "710x140+600+415" )
( println "match" )
)
)

And for the file operation progress box I use:

; generated_rule File Operation Progress
( if 
( begin 
( contains ( window_name ) "File Operation Progress" )
) 
( begin 
( set_workspace 1 )
( geometry "710x140+600+415" )
( println "match" )
)
)

To sort of workaround this I tried setting Thunar windows (without Devilspie) to open centre of screen via Settings > Window Manager Tweaks > Placement, with the slider to Large, it does work and any Thunar windows I open open in the centre on top of each other, and the rename/file operation boxes use the sizes and placement I set in Devilspie, but unfortunately it's only for that session.
Enabling saving the session in Session and Startup > General > Logout Settings or checking the box upon logout from the prompt doesn't work to make it hold those placement settings, next startup Thunar windows open on the left of the screen again and then tile as others are opened.

Thanks

Offline

#5 2022-12-06 11:40:47

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

Re: tunar - opening position on screen

JmaCWQ wrote:

Is there a way to have that command run at startup and be made so that every Thunar window opens at the desired location?

Not easily since there are many ways to open/start thunar. You could edit the thunar .desktop files (copy them from /usr/share/applications to ~/.local/share/applications first) and change the "Exec=" line to something like:

Exec=bash -c 'thunar & sleep .5 && xdotool getactivewindow windowmove 100 100'

...however, this wouldn't work with the exo-open instances of starting thunar. Devilspie would work best here.

If I try your command in Terminal on my setup (MX-21.2.1) it only opens the home folder, but does open in the desired location I set by changing "100 100" to "260 0".
If there's another window open and I run the command in Terminal it does nothing to the open window, but opens the home folder in the desired location.

Correct, it only affects the newly opened window.

I've been using Devilspie and while I can get the Thunar windows to open where I want and at what size I want, when I rename something or am copying something, the rename message and file operation progress boxes also use the same large size, which I don't want.
If I use Devilspie to make the rename and progress boxes the size I desire, the .ds files for them are ignored until I remove the .ds I created for Thunar from the ~.devilspie folder, then they work as I set them.
Unless there's an easy way to set Devilspie to do this?, which I've spent many hours trying to figure out but so far failed, it seems the Thunar application entry overrides any others Thunar related.

It would depend on the content in the files and that you are uniquely identifying the windows. Do your .ds snippets below not work?

To sort of workaround this I tried setting Thunar windows (without Devilspie) to open centre of screen via Settings > Window Manager Tweaks > Placement, with the slider to Large, it does work and any Thunar windows I open open in the centre on top of each other, and the rename/file operation boxes use the sizes and placement I set in Devilspie, but unfortunately it's only for that session.

This is odd. The settings should be saved. Can you post the back the output of the following command after you've made the placement settings change and on fresh login?

xfconf-query -c xfwm4 -lv | grep placement

...it should be the same.


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

#6 2022-12-06 15:28:32

JmaCWQ
Member
Registered: 2022-12-06
Posts: 47

Re: tunar - opening position on screen

ToZ wrote:

Not easily since there are many ways to open/start thunar. You could edit the thunar .desktop files (copy them from /usr/share/applications to ~/.local/share/applications first) and change the "Exec=" line to something like:

Exec=bash -c 'thunar & sleep .5 && xdotool getactivewindow windowmove 100 100'

...however, this wouldn't work with the exo-open instances of starting thunar. Devilspie would work best here.

Thanks for that Toz, I will try that when I get a bit more time.
For now I've edited the launchers I open most of my folders with so they open where I want with:

sh -c 'thunar /home/home/Desktop ; xdotool getactivewindow windowmove 260 0'

Works well for the 14 or 15 I launch from my Panel and use regularly.
I asked on the MX forums about launchers used with xdotool and got that solution as one of the answers.
Hopefully your suggestion will work with external drives & USB's etc. when they're opened and mounted by double clicking the icon on the Desktop after they're plugged in.

ToZ wrote:

It would depend on the content in the files and that you are uniquely identifying the windows. Do your .ds snippets below not work?

Yes and no big_smile
The Rename and File Operation Progress .ds's are ignored when the Thunar .ds is in use.
But remove the Thunar .ds and they both work ok.

ToZ wrote:

This is odd. The settings should be saved. Can you post the back the output of the following command after you've made the placement settings change and on fresh login?

xfconf-query -c xfwm4 -lv | grep placement

...it should be the same.

In all the years I've been using Xfce I've never used the "save session" settings until now and figured they should have been saved.
I did notice that when going back into the Window Manager Tweaks settings after a restart they appeared unchanged, the slider was at large and the place windows in centre button was checked, but the setting had no effect until I moved the slider around a bit and then put it back all the way to large.

Here's the result before I make the change again, even though the GUI shows set as they should be the windows are opening on the left of the screen if I use a launcher that I haven't edited as above.

$ xfconf-query -c xfwm4 -lv | grep placement
/general/placement_mode                  center
/general/placement_ratio                 100

Then after I move the slider and the windows start opening in the centre as expected.

$ xfconf-query -c xfwm4 -lv | grep placement
/general/placement_mode                  center
/general/placement_ratio                 100

I'll now restart the computer and look again in the GUI and run that command then edit this post...

EDIT: Ok, restarted and opened a Thunar window from an unedited launcher and it opens on the left of the screen, subsequent windows tile themselves when opened.

Command results:

$ xfconf-query -c xfwm4 -lv | grep placement
/general/placement_mode                  center
/general/placement_ratio                 100

GUI settings unchanged, slider on large, centre button checked.
Move the slider around a bit then back up to large, windows then open in the centre and do not tile.
Command after doing that:

$ xfconf-query -c xfwm4 -lv | grep placement
/general/placement_mode                  center
/general/placement_ratio                 100

Here's some details about my system:

Snapshot created on: 20221029_2122
System:    Kernel: 5.10.0-19-amd64 [5.10.149-2] x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/boot/vmlinuz-5.10.0-19-amd64 
           root=UUID=<filter> ro quiet nosplash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.2.1_x64 Wildflower September 18  2022 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Desktop System: Dell product: OptiPlex 9020 v: 01 serial: <filter> Chassis: 
           type: 15 serial: <filter> 
           Mobo: Dell model: 00V62H v: A01 serial: <filter> BIOS: Dell v: A09 date: 11/20/2014 
CPU:       Info: Quad Core model: Intel Core i5-4590 bits: 64 type: MCP arch: Haswell family: 6 
           model-id: 3C (60) stepping: 3 microcode: 28 cache: L2: 6 MiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 26339 
           Speed: 1079 MHz min/max: 800/3700 MHz Core speeds (MHz): 1: 1079 2: 1030 3: 1023 
           4: 1030 
           Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled 
           Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled 
           Type: mds mitigation: Clear CPU buffers; SMT disabled 
           Type: meltdown mitigation: PTI 
           Type: mmio_stale_data status: Unknown: No mitigations 
           Type: retbleed status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: disabled, 
           RSB filling, PBRSB-eIBRS: Not affected 
           Type: srbds mitigation: Microcode 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: Dell 
           driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300 
           Display: x11 server: X.Org 1.20.11 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: modesetting unloaded: fbdev,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2") 
           s-diag: 582mm (22.9") 
           Monitor-1: VGA-1 res: 1920x1080 hz: 60 dpi: 102 size: 477x268mm (18.8x10.6") 
           diag: 547mm (21.5") 
           OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 20.3.5 
           compat-v: 3.0 direct render: Yes 
Audio:     Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403 
           Device-2: Intel 8 Series/C220 Series High Definition Audio vendor: Dell 
           driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8c20 class-ID: 0403 
           Sound Server-1: ALSA v: k5.10.0-19-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Intel Ethernet I217-LM vendor: Dell driver: e1000e v: kernel port: f060 
           bus-ID: 00:19.0 chip-ID: 8086:153a class-ID: 0200 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
Drives:    Local Storage: total: 931.51 GiB used: 408.19 GiB (43.8%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD10EZEX-75M2NA0 
           size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD 
           rpm: 7200 serial: <filter> rev: 1A01 scheme: MBR 
Partition: ID-1: / raw-size: 919.51 GiB size: 904 GiB (98.31%) used: 408.19 GiB (45.2%) fs: ext4 
           dev: /dev/sda1 maj-min: 8:1 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 12 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/sda2 maj-min: 8:2 
Sensors:   System Temperatures: cpu: 29.8 C mobo: 27.8 C 
           Fan Speeds (RPM): N/A 
Repos:     Packages: 2665 note: see --pkg apt: 2660 lib: 1465 flatpak: 5 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb [url]http://deb.debian.org/debian[/url] bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb [url]http://deb.debian.org/debian[/url] bullseye main contrib non-free
           2: deb [url]http://security.debian.org/debian-security[/url] bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb [url]http://mirror.datamossa.io/mxlinux/mx/repo/[/url] bullseye main non-free
           Active apt repos in: /etc/apt/sources.list.d/teamviewer.list 
           1: deb [url]http://linux.teamviewer.com/deb[/url] stable main
           Active apt repos in: /etc/apt/sources.list.d/vivaldi.list 
           1: deb [arch=amd64] [url]https://repo.vivaldi.com/stable/deb/[/url] stable main
Info:      Processes: 192 Uptime: 11m wakeups: 1 Memory: 7.68 GiB used: 1.26 GiB (16.4%) 
           Init: SysVinit v: 2.96 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: N/A 
           alt: 10 Client: shell wrapper v: 5.1.4-release inxi: 3.3.06 
Boot Mode: BIOS (legacy, CSM, MBR)

Last edited by JmaCWQ (2022-12-06 15:44:41)

Offline

#7 2022-12-06 18:54:26

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

Re: tunar - opening position on screen

Item #1 - Thunar devilspie issue:
The issue here is that both the rename and file operation dialogs have the application_name "Thunar". Thus, the thunar rule is taking precedence over the two dialogs. You will need to change the thunar.ds file to not use application_name but rather something unique. On my testing, Thunar's window_name is always "Thunar" (Arch linux, thunar version 4.16.11). If you used that, all 3 should work.

Item #2 - Smart Placement issue:
If you do not have edited launchers and you do not have devilspie running, and setting the placement to centre and 100, and the window is not opening at the centre of the screen, then this is probably a bug. Can you confirm this first? And if possible, create a second test account on your computer and test the smart placement functionality on a clean profile.


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

#8 2022-12-07 08:20:37

JmaCWQ
Member
Registered: 2022-12-06
Posts: 47

Re: tunar - opening position on screen

Item #1 Yes, I believe you are correct and that is the case.
With MX-21.2.1, a Thunar window only has the folder name in the title bar, whereas previously it also showed " - File Manager" after the folder name, which I used to put in the .ds as window_name and everything worked fine.
I've tried "File Manager", "Thunar" etc. in the .ds as window_name but they don't work.
The only thing I can get to work is using application_name for Thunar windows.

Item #2 The tests I did above were with an unedited launcher to open Thunar (Application Menu) and then right clicking on a location in Places and left clicking "Open in New Window".
Devilspie was not running at the time.
If I open Terminal and type Thunar then hit Enter, it opens the window tiled.
Repeat that process any windows opened are tiled.
Mess with that slider in Window Manager Tweaks > Placement and then typing thunar hit Enter in Terminal opens them in the centre, every time.

Yes I will create a 2nd account and test with that when I get a chance.

Offline

#9 2022-12-07 12:20:39

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

Re: tunar - opening position on screen

JmaCWQ wrote:

Item #1 Yes, I believe you are correct and that is the case.
With MX-21.2.1, a Thunar window only has the folder name in the title bar, whereas previously it also showed " - File Manager" after the folder name, which I used to put in the .ds as window_name and everything worked fine.
I've tried "File Manager", "Thunar" etc. in the .ds as window_name but they don't work.
The only thing I can get to work is using application_name for Thunar windows.

You can run "devilspie -d" in a terminal window and the start thunar and the dialogs to see exactly how devilspie is recognizing them.


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

#10 2022-12-13 12:51:14

JmaCWQ
Member
Registered: 2022-12-06
Posts: 47

Re: tunar - opening position on screen

ToZ wrote:

You can run "devilspie -d" in a terminal window and the start thunar and the dialogs to see exactly how devilspie is recognizing them.

It would appear it doesn't display that information.
Here's what happens when I run it in Terminal with the Thunar.ds file in the .devilspie directory:

$ devilspie -d
Devil's Pie 0.23 starting...
Loading /etc/devilspie
/etc/devilspie doesn't exist
Loading /home/home/.devilspie
Loading /home/home/.devilspie/QEMU.ds
Loading /home/home/.devilspie/Geany.ds
Loading /home/home/.devilspie/Terminal.ds
Loading /home/home/.devilspie/File Copy.ds
Loading /home/home/.devilspie/Vivaldi.ds
Loading /home/home/.devilspie/AQEMU.ds
Loading /home/home/.devilspie/PcManFM.ds
Loading /home/home/.devilspie/Qpdfview.ds
Loading /home/home/.devilspie/SpaceFM.ds
Loading /home/home/.devilspie/File Operation Progress.ds
Loading /home/home/.devilspie/SeaMonkey.ds
Loading /home/home/.devilspie/Rename.ds
Loading /home/home/.devilspie/XnView.ds
Loading /home/home/.devilspie/Bless.ds
Loading /home/home/.devilspie/Firefox.ds
Loading /home/home/.devilspie/Avidemux.ds
Loading /home/home/.devilspie/GPSBabel.ds
Loading /home/home/.devilspie/Thunar.ds
18 s-expressions loaded.
Changing workspace to 1
Setting geometry '1905x958+3+0'
match
Changing workspace to 1
Setting geometry '1380x958+260+0'
match
Changing workspace to 1
Setting geometry '1380x958+260+0'
match
Changing workspace to 1
Setting geometry '710x140+600+415'
match
Changing workspace to 1
Setting geometry '1380x958+260+0'
match

The 5 actions it took after starting were from top to bottom:
1 - resizing the already open Terminal window.
2 - resizing the already open Firefox browser.
3 - me opening Thunar from the Applications menu.
4 - me right clicking on a file in the home folder and going Rename.
5 - what it resizes the Rename box to immediately after opening.


And here's what happens when the Thunar.ds is removed from the .devilspie folder:

$ devilspie -d
Devil's Pie 0.23 starting...
Loading /etc/devilspie
/etc/devilspie doesn't exist
Loading /home/home/.devilspie
Loading /home/home/.devilspie/QEMU.ds
Loading /home/home/.devilspie/Geany.ds
Loading /home/home/.devilspie/Terminal.ds
Loading /home/home/.devilspie/File Copy.ds
Loading /home/home/.devilspie/Vivaldi.ds
Loading /home/home/.devilspie/AQEMU.ds
Loading /home/home/.devilspie/PcManFM.ds
Loading /home/home/.devilspie/Qpdfview.ds
Loading /home/home/.devilspie/SpaceFM.ds
Loading /home/home/.devilspie/File Operation Progress.ds
Loading /home/home/.devilspie/SeaMonkey.ds
Loading /home/home/.devilspie/Rename.ds
Loading /home/home/.devilspie/XnView.ds
Loading /home/home/.devilspie/Bless.ds
Loading /home/home/.devilspie/Firefox.ds
Loading /home/home/.devilspie/Avidemux.ds
Loading /home/home/.devilspie/GPSBabel.ds
17 s-expressions loaded.
Changing workspace to 1
Setting geometry '1905x958+3+0'
match
Changing workspace to 1
Setting geometry '1380x958+260+0'
match
Changing workspace to 1
Setting geometry '710x140+600+415'
match 

The 3 actions, top to bottom:
1 - resizing the already open Terminal window.
2 - resizing the already open Geany window.
3 - after me opening Thunar from the Applications menu, right clicking a file in the home folder and clicking Rename.

Looks like I'm outta luck with getting it all to work how I want with Devilspie, so I'll try copying across the Thunar .desktop files from usr/share/apps and editing them to see how it goes...

Offline

#11 2022-12-13 13:25:54

JmaCWQ
Member
Registered: 2022-12-06
Posts: 47

Re: tunar - opening position on screen

ToZ wrote:

Not easily since there are many ways to open/start thunar. You could edit the thunar .desktop files (copy them from /usr/share/applications to ~/.local/share/applications first) and change the "Exec=" line to something like:

Exec=bash -c 'thunar & sleep .5 && xdotool getactivewindow windowmove 100 100'

...however, this wouldn't work with the exo-open instances of starting thunar. Devilspie would work best here.

Doesn't seem to work so I removed them from ~/.local/share/applications.
Looks like for now I'll just fiddle with the slider in Window Manager Tweaks > Position at every startup to make the folders I haven't edited the launchers to use xdotool, open centre screen, and use Devilspie for the rest, leaving the Thunar.ds file out of the ~/.devilspie folder.

Last edited by JmaCWQ (2022-12-13 13:26:32)

Offline

#12 2022-12-13 13:43:00

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

Re: tunar - opening position on screen

JmaCWQ wrote:
ToZ wrote:

You can run "devilspie -d" in a terminal window and the start thunar and the dialogs to see exactly how devilspie is recognizing them.

It would appear it doesn't display that information.

Odd. Here is what I get (Arch Linux):

$ devilspie -d
Devil's Pie 0.23 starting...
Loading /etc/devilspie
Loading /etc/devilspie/example.ds
Loading /home/toz/.devilspie
/home/toz/.devilspie doesn't exist
1 s-expressions loaded.
Window Title: 'Terminal - toz@archi:~'; Application Name: 'Xfce Terminal'; Class: 'Xfce4-terminal'; Geometry: 834x582+1079+141
Window Title: 'tunar - opening position on screen / Desktop / Xfce Forums ? Mozilla Firefox'; Application Name: 'Firefox'; Class: 'firefox'; Geometry: 1394x1188+154+-17
Window Title: 'Desktop'; Application Name: 'xfdesktop'; Class: 'Xfdesktop'; Geometry: 1920x1200+0+0
Window Title: 'xfce4-panel'; Application Name: 'xfce4-panel'; Class: 'Xfce4-panel'; Geometry: 65x126+0+537
Window Title: 'xfce4-panel'; Application Name: 'xfce4-panel'; Class: 'Xfce4-panel'; Geometry: 3x3+-9999+-9999
Window Title: 'xfce4-panel'; Application Name: 'xfce4-panel'; Class: 'Xfce4-panel'; Geometry: 1920x33+0+0


Window Title: 'Thunar'; Application Name: 'Thunar'; Class: 'Thunar'; Geometry: 1038x628+441+308
Window Title: 'Rename Multiple Files'; Application Name: 'Thunar'; Class: 'Thunar'; Geometry: 722x638+173+513

...the last two entries are me opening Thunar and then the Rename dialog.


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

#13 2022-12-13 13:44:20

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

Re: tunar - opening position on screen

JmaCWQ wrote:

Doesn't seem to work

Try adjusting the ".5" sleep value - maybe your system is a little slower.


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

#14 2022-12-13 18:22:31

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 862

Re: tunar - opening position on screen

yeah, sleep .5 seems quite a bit short, to me.  but then, i do push my machine into swappiness a lot.  i don't use thunar so i have no idea.  OTOH, i have put together some Python code to wait for a terminal to actually have a window really open.  it might be doable for thunar (it would need to look for the program name instead of the process ID).  it would be reading the output of command "wmctrl -l", which i believe only lists windows once they are opened.

i tend to use extra long sleeps when first trying out automations to be sure timing is not a factor until i am ready to tune the timing.  and that is if i cannot find a means to wait for the exact conditions i need.

Offline

#15 2022-12-15 10:54:36

Jerry3904
Member
Registered: 2013-11-09
Posts: 863

Re: tunar - opening position on screen

Nice thread, people. I run MX-21 Xfce on my business desktop, but MX-21 Fluxbox on my personal laptop (with Thunar as file manager by default). It's always annoying to come back to this window location problem, because Fluxbox has an "apps" file where I can define a simple rule that actually works all the time.

[app] (class=Thunar)
  [Position]	(UPPERLEFT)	{33% 16%}
  [Close]	{yes}
[end]

One can only dream.


MX-23 (based on Debian Stable) with our flagship Xfce 4.18.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.018 seconds, 7 queries executed - Memory usage: 686.63 KiB (Peak: 735.47 KiB) ]