You are not logged in.

#1 2015-01-10 18:41:19

e.sovetkin
Member
From: Aachen
Registered: 2013-04-05
Posts: 28

xmonad actions.windowbringer; x11 process name in window name

I have been struggling with a small problem that concerns XMonad.Actions.WindowBringer. This module uses dmenu in order to bring some window into focus. Dmenu is called with a list of current names of all windows and  users can either select one window using arrows or search by a string in window names.

The problem is that some applications set window name in such a way that there is no mention about the name of application itself. For instance, my browser simply set the opened url in focused tab, but does not mention the name of the browser.

What I want to achieve is simply put the process name together with the window name, so that it can simplify the window search.

I believe there are two ways of achieving it:

-- the first one is to change the format of the window name in Xorg. Thus, to append to window name, also the name of the process (when I say the name of the process, I mean something like the output of this command: ps -q $(xdotool getwindowfocus getwindowpid) -o command). If there is such a way that one can configure the window name title in Xorg, I would appreciate if one can indicate it. And this would be then a global solution that does not concern xmonad or haskell programming.

-- Another approach I tried is  to find a way to get "getwindowpid" property from inside the haskell in order to modify Action.WindowBringer module for my taste. But I have not found any modules that can achieve that, i.e. getting pid of the windows or getting the process names of the windows. So, if you are aware of any, please reply.

Thank you!

Offline

#2 2015-01-10 21:44:27

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad actions.windowbringer; x11 process name in window name

So then if your browser is misbehaving, get an extension to put the browser name into the title.


Knute

Offline

#3 2015-01-11 08:06:35

e.sovetkin
Member
From: Aachen
Registered: 2013-04-05
Posts: 28

Re: xmonad actions.windowbringer; x11 process name in window name

Thank you for your reply, but the browser is not the only one, which does not put its name to the window name title. And it is rather a tedious job to find extensions for each application that does not put in the window name its process name.

I was rather wondering whether it is possible to globally change the behaviour of how the window name is displayed, i.e. what information is displayed there.

Last edited by e.sovetkin (2015-01-11 08:07:18)

Offline

#4 2015-01-11 14:18:39

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: xmonad actions.windowbringer; x11 process name in window name

There are different options in the windowbringer docs.

http://xmonad.org/xmonad-docs/xmonad-co … inger.html

As far as your global question, I don't know.  Sorry. I'ld guess that it's probably possible, just don't know where to start.


Knute

Offline

#5 2015-01-11 14:52:52

e.sovetkin
Member
From: Aachen
Registered: 2013-04-05
Posts: 28

Re: xmonad actions.windowbringer; x11 process name in window name

This is exactly where I have started.

Inside the windowbringer module they use the getname function from util.namedwindow, which simply equivalent to "xdotool getwindowname". All other functions in windowbringer module are related to what can be done with the selected window: dragged to the current workspace, jump to the workspace where the window is and focus on it, etc.

Unfortunately, in util.namedwindow there is only one available function which simply get the window name. And I have not find the xmonad module which provide with the same functionality as xdotool program.

Offline

Board footer

Powered by FluxBB