You are not logged in.
Hi, I have been trying to mess around with .desktop files to make an application entry for neovim. I want to run neovim in a terminal window with its own icon - this can be achieved using `xfce4-terminal --icon nvim`. However, this window stacks with other instances of xfce4-terminal in my panel.
We can see this behaviour too with other apps like htop, btop, and ncspot - even though the apps specify custom icons in their .desktop files!
I have read some other material on this issue, and it seems like people gave up on the issue because GTK says we shouldn't set different classes for instances of the same program. https://docs.gtk.org/gtk3/method.Window … class.html
But this functionality would be really useful to me. What are people's thoughts on how I can get these windows to stack differently? /
Thanks, Jack
Last edited by jacko (2024-09-15 03:14:15)
Offline
Hello and welcome.
Which version of Xfce and xfce4-terminal are you running? For Xfce 4.18 and xfce4-terminal 1.1.3, using --class and --disable-server (xfce4-terminal looks for and re-uses existing instances) works for me. For example:
xfce4-terminal --icon gimp --class gimp --disable-server
...will start an xfce4-terminal instance, using the gimp icon, in a separate grouping.
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
Huh, looks like the class option does work! I am running terrminal 1.1.3 and xfce 1.18. Thanks, that command does actually solve my issues
(This is a nitpick btw) Looks like the --help does not list the class option, and neither do the man and info pages for xfce4-terminal. Also the behaviour is different when you call --class with no args - here are some examples of the expected behaviour for other cli args:
user@pc ~ $ xfce4-terminal --titkle
xfce4-terminal: Unknown option --titkle
user@pc ~ $ xfce4-terminal --title
xfce4-terminal: Option --title/-T requires specifying the title as its parameter
user@pc ~ $ xfce4-terminal --class
(xfce4-terminal:2609): Gtk-WARNING **: 12:58:06.805: Missing argument for --class
xfce4-terminal: Unknown option "--class"
Idk, this last point is really just a nitpick. Maybe I can go and submit a patch with some of the missing docs if i get time. Thank you for your help though!
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 525.28 KiB (Peak: 530.23 KiB) ]