Launch program floating
I am looking to be able to launch a program in float mode. However I also need the program to be able to not float when opened normally.
Very simliar to question: 4550, launch-in-floating-mode
(sorry for not linking, not enough karma to post links.), however I can't just match on an instance type, since I only want it to float sometimes. Specifically, I use sublime text to do text edits, as well as edit git commit messages. I'd like to have the git commits float (as to not disrupt my current layout).
Here's the xprop output from both examples
commit message
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35652881
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME(CARDINAL) = 186414856
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x2200510
WM_CLIENT_LEADER(WINDOW): window id # 0x2200001
_NET_WM_PID(CARDINAL) = 23978
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "archbear"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 536 by 27
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "subl3", "Subl3"
WM_ICON_NAME(STRING) = "~/.git/COMMIT_EDITMSG - Sublime Text (UNREGISTERED)"
_NET_WM_ICON_NAME(UTF8_STRING) = "~/.git/COMMIT_EDITMSG - Sublime Text (UNREGISTERED)"
WM_NAME(STRING) = "~/.git/COMMIT_EDITMSG - Sublime Text (UNREGISTERED)"
_NET_WM_NAME(UTF8_STRING) = "~/.git/COMMIT_EDITMSG - Sublime Text (UNREGISTERED)
normal
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35651905
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME(CARDINAL) = 186449524
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x2200140
WM_CLIENT_LEADER(WINDOW): window id # 0x2200001
_NET_WM_PID(CARDINAL) = 23978
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "archbear"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 536 by 27
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "subl3", "Subl3"
WM_ICON_NAME(COMPOUND_TEXT) = "_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35652881 • - Sublime Text (UNREGISTERED)"
_NET_WM_ICON_NAME(UTF8_STRING) = "_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35652881 • - Sublime Text (UNREGISTERED)"
WM_NAME(COMPOUND_TEXT) = "_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35652881 • - Sublime Text (UNREGISTERED)"
_NET_WM_NAME(UTF8_STRING) = "_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 35652881 • - Sublime Text (UNREGISTERED)"
The only relevant difference I noticed was that the WM_NAME contained COMMIT_EDITMSG
. However I'm unsure how to invoke floating enable
on a partial name.
I also figured I might just edit the xproperties with xprop to solve my problem (and match on window_role), but, now after a few tries, I'm not even sure that's something you can reasonably do (I honestly don't have an understanding of these things).
Running xprop -set window_role popup
and clicking sublime caused this as output
xprop: error: unsupported conversion for window_role
. I'm also not entirely sure how I'd determine window Id of a newly launched window in order to alter its properties specifically.
Anyway, I was wondering if anyone has a solution. Preferably one I could use on other applications when needed, I'm alright with making separate shell scripts altering xprops for running an app in floating mode.