Closed dylanaraps closed 8 years ago
I think so - wmctrl is in most default repos on most distros. I'd imagine the people using fetch will most likely be of the minimal ricing kind.
On 16/02/16 12:46, Dylan Araps wrote:
Window manager detection is a bit iffy at the moment. Parsing xinit files doesn't work very well and most distros use a Display Manager so the output is always "None" or "Unknown".
I propose we make |wmctrl| a required dependency.
|wmctrl -m| prints the name of the window manager, is fast and will work for all old and new window managers that appear. This means that we implement this once and window manager detection will work without issues.
|wmctrl| is only available on |Linux| and |BSD| systems but this won't be a problem as the script already handles |Windows| and |OS X| differently.
Now, there's another alternative which involves parsing |ps -A| with a hardcoded list of window manager process names like so: |ps -A | egrep "openbox|bspwm|i3|etc"|
The downsides to this method are that we'll have to keep a hardcoded list of window managers and this is much slower when used with a long list.
What do you guys think?
Should we make |wmctrl| a required dependency?
— Reply to this email directly or view it on GitHub https://github.com/dylanaraps/fetch/issues/75.
wmctrl
is now a required dependency.
Window manager detection is a bit iffy at the moment. Parsing xinit files doesn't work very well and most distros use a Display Manager so the output is always "None" or "Unknown".
I propose we make
wmctrl
a required dependency.wmctrl -m
prints the name of the window manager, is fast and will work for all old and new window managers that appear. This means that we implement this once and window manager detection will work without issues.wmctrl
is only available onLinux
andBSD
systems but this won't be a problem as the script already handlesWindows
andOS X
differently.Now, there's another alternative which involves parsing
ps -A
with a hardcoded list of window manager process names like so:ps -A | egrep "openbox|bspwm|i3|etc"
The downsides to this method are that we'll have to keep a hardcoded list of window managers and this is much slower when used with a long list.
What do you guys think?
Should we make
wmctrl
a required dependency?