Discussion:
FVWM: Possible to get process ID by $[w.id]?
Spoofing
2013-02-28 06:41:45 UTC
Permalink
Hi maillist, I try to make some Rooms analog like in KDE.
This is just a prototype:


DestroyFunc FuncFvwmRoomWindow
AddToFunc FuncFvwmRoomWindow
+ I Current (Firefox) FuncFvwmProc firefox
+ I Current (Leafpad) FuncFvwmProc leafpad
+ I Current (MPlayer) FuncFvwmProc mplayer
+ I Next (CurrentPage) FlipFocus NoWarp
+ I Current Raise

DestroyFunc FuncFvwmProc
AddToFunc FuncFvwmProc
+ I ThisWindow (State 10) Exec kill -CONT $(pgrep $0)
+ I TestRc (False) Exec kill -STOP $(pgrep $0)
+ I State 10

Key Tab A M FuncFvwmNextWindow


When you change window, previous window freezes, and when you switch
back, then window process continues.
But what if you have a lot of the window with the same name. Necessary
to accurately define the process ID by name window ($[w.id]). How?
Viktor Griph
2013-02-28 21:39:01 UTC
Permalink
Post by Spoofing
When you change window, previous window freezes, and when you switch
back, then window process continues.
But what if you have a lot of the window with the same name. Necessary
to accurately define the process ID by name window ($[w.id]). How?
You can try to access the EWMH hint _NET_WM_PID but if you do so you
should also check that the WM_CLIENT_MACHINE matches your host.
You can proabley use something like
if [ "$(hostname --fqdn)" = "$(xprop -id $[w.id] WM_CLIENT_MACHINE)" ]
&& [ 0 -lt 0$(xprop -id $[w.id] _NET_WM_PID) ] ; then kill -CONT
$(xprop -id $[w.id] _NET_WM_PID) ; fi

/Viktor

Loading...