Closed lwilletts closed 5 years ago
wmutils was not built with monitors in mind. It deals with windows, and that's it. There is an other project to deal with monitors (cannot remember the name from the top of mh head) that plays nicely with wmutils.
wmutils' code is simple because the scope is simple. Today we consider wmutils project finished feature wise, and only expect to fix bugs in the future.
Moreover, limiting wmv
to the monitor's edge is fairly easy to do in a script, so I don't see the need to integrate the feature in the code, by adding a new flag to wmv to choose between stopping at the edge of the monitor or root window.
Also, keep in mind that contrib is not meant to show case every utility. wmv
is simple enough to grasp that there is no need to wrap it. Your wrapper makes moving windows more complex than it actually is with wmv
alone: you turn a 2 argument binary into one that has 4, with hardcoded values.
I don't see why this adjust.sh
show how wmutils is cool, and what is so awesome about it.
wmv
is the most simple and useful utility on it's own, that's why there is no wrapper about it :)
Limiting wmv to the monitor edge is slow in a script, especially in sh which is what most of the examples are in. Having the program calculate the limits of the monitor for us might be an idea, in this case I think you are right about that and I'll contribute the changes when I get around to it for mmutils instead.
I agree, adjust.sh doesn't really showcase wmutils in a fantastic way, but I think I am wired differently to you as I would like to show as many examples of the tools in use as practical examples. Adjust.sh fits this nicely, as it provides a base for someone to take and expand, for example with monitor detection. I'd also argue that many people who discover wmutils tend to look at this repo and look at the scripts here for ideas and then look at the man page after the fact, I know you @z3bra work in a very different fashion, but I'm one for trying to make it as easy as possible for people to get into wmutils.
Like I said to you previously I think it would be great if we could get a list of all the user repos that have implemented wmutils into their environment, perhaps in a new repo named community
so it is easy for newbies to find further ideas.
I think that if you truly want to help newbies to get started with wmutils, it would be more benefic to do it in some kind of blog post/tutorial rather than providing 10000 scripts wrapping the base utils.
From my experience, people look at the contrib repo as drop-in solution to use wmutils rather than a source of inspiration, and see the core repo as a library rather than the actual product. Adding simple wrappers around the core utils will only comfort this idea imo, which is why I think adjust.sh doesn't fit there.
Never realised there was no example of how to use
wmv
. I myself completely forgot about wmv until recently, probably because it is overshadowed by the other great tools in core. I've left commented out how to move the mouse pointer central to window if people are interested in that usage with other tools like CWM. Also included are a couple of typos in the readme.I'd like to modify wmv in the future to work using xrandr to detect the monitor edges instead of purely relying on the size of the root window to know where to stop the window. @z3bra would this be out of scope for core? considering core would then be relying on another library. However, I'm struggling to think of a time where it's not installed alongside other xorg packages.