Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-02-18 16:53:34

bigbadaboum
Member
Registered: 2022-12-22
Posts: 19

[SOLVED] set the position and size of leafpad to the default opening

Hello,

Is it possible to set the position and size of leafpad to the default opening, something like for xfce-terminal with --geometry=141x20+0+400 ?

With exo-open --launch TerminalEmulator but I don't know how to launch it with the position and size set by default.

Last edited by bigbadaboum (2023-02-24 13:53:40)

Offline

#2 2023-02-18 17:26:55

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

Re: [SOLVED] set the position and size of leafpad to the default opening

If leadpad doesn't provide the option to set geometry, then you will have to use a tool like devilspie, or a command like:

leafpad & sleep 1 && xdotool getactivewindow windowmove x y

...to manually move it after it displays. You will need to have xdotool installed and will need to set the x and y coordinates. You can also fine-tune the sleep duration.


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-23 13:24:20

bigbadaboum
Member
Registered: 2022-12-22
Posts: 19

Re: [SOLVED] set the position and size of leafpad to the default opening

Hello ToZ

everything works fine in the terminal, but when I try to edit '/usr/share/applications/leafpad.desktop' with 'leafpad %f & sleep 1 && xdotool getactivewindow windowmove 33 0' I have a problem.

I didn't know that the --geometry option had to be implemented in the program for this to work, one more reason to think that the developers of xfce-terminal are doing a good job.
I installed mousepad-0.4.2 on my system but after a few days of testing I deleted it, the fonts section is not practical and the auto-hide scrollbar constantly bothers me when I select a complete line, I miss the last characters on the right.

thanks again for spending time helping others.

Offline

#4 2023-02-23 14:47:52

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

Re: [SOLVED] set the position and size of leafpad to the default opening

bigbadaboum wrote:

everything works fine in the terminal, but when I try to edit '/usr/share/applications/leafpad.desktop' with 'leafpad %f & sleep 1 && xdotool getactivewindow windowmove 33 0' I have a problem.

Try this in the .desktop file:

sh -c "leafpad %f & sleep 1 && xdotool getactivewindow windowmove 33 0"

I installed mousepad-0.4.2 on my system but after a few days of testing I deleted it, the fonts section is not practical and the auto-hide scrollbar constantly bothers me when I select a complete line, I miss the last characters on the right.

You can disable these "overlay scrollbars" by setting the environment variable "GTK_OVERLAY_SCROLLING=0".

You an do this just for mousepad:

GTK_OVERLAY_SCROLLING=0 mousepad

...or in the .desktop file:

env GTK_OVERLAY_SCROLLING=0 mousepad %U

Or you can set it system wide by adding:

gtk-overlay-scrolling=0

...to ~/.config/gtk-3.0/settings.ini. Note that if you are creating this file from scratch, it needs to look like this:

[Settings]
gtk-overlay-scrolling=0

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 2023-02-23 18:07:25

bigbadaboum
Member
Registered: 2022-12-22
Posts: 19

Re: [SOLVED] set the position and size of leafpad to the default opening

Thank you
sh -c "leafpad %f & sleep 1 && xdotool getactivewindow windowmove 33 0"  work perfectly.

environment variable "GTK_OVERLAY_SCROLLING=0" after reboot
GTK_OVERLAY_SCROLLING=0 mousepad
...or in the .desktop file:
env GTK_OVERLAY_SCROLLING=0 mousepad %U
...to ~/.config/gtk-3.0/settings.ini.
[Settings]
gtk-overlay-scrolling=0
does not work with me.

glib-2.48.2  gtk+-3.20.10 cairo-1.14.12 pango-1.40.1 vala-0.36.20  xfce 4.12.4 thème gtk2 xfce-flat gtk3 greybird-3.20
/etc/gtk-3.0/gtkrc is not adwaita but my theme.

For me, the productivity gain is there, you can classify the position as solved (or it's up to me to do it, I don't know)

Offline

#6 2023-02-23 20:04:35

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

Re: [SOLVED] set the position and size of leafpad to the default opening

bigbadaboum wrote:

[Settings]
gtk-overlay-scrolling=0
does not work with me.

I should have mentioned that you need to log out and back in again for it to take effect.


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

#7 2023-02-24 11:28:16

bigbadaboum
Member
Registered: 2022-12-22
Posts: 19

Re: [SOLVED] set the position and size of leafpad to the default opening

[Settings]
gtk-overlay-scrolling=0

after a reboot:

Gtk-WARNING **: Unknown key gtk-overlay-scrolling in /home/coquelicot/.config/gtk-3.0/settings.ini

Offline

#8 2023-02-24 11:39:38

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

Re: [SOLVED] set the position and size of leafpad to the default opening

Ok, I see. This setting was added in gtk 3.24.9. You're still at 3.20.10.


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

Board footer

Powered by FluxBB