Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Bash xdotool+wmctrl "daemon" that maximizes "almost maximized" windows
I find annoying that, for whatever reason, it seems that some windows get "almost maximized" (I have the impression that some browsers do that by "design", even though I'm not sure), and then I end up clicking in a desktop pixel instead of the scroll bar or something. In my case that action is assigned to show the desktop/minimize all windows.
So here's what I just came up with so far, for a 1280x1024 resolution:
Before maximizing it, it resizes it to something smaller than the threshold, in order to avoid the need to resize immediately after un-maximizing, with a three-second-or less limit.
Maybe a higher snap-to-corner threshold on openbox would also help with that. But I think I may also find that annoying for some reason. In the other hand I'm not even sure it exists, maybe there's only the "resistance" against moving out of the desktop/monitor.
So here's what I just came up with so far, for a 1280x1024 resolution:
Code:
while true ; do sleep 3 xdotool getactivewindow getwindowgeometry | grep Geometry | while read g ; do g=${g/Geometry: } ; x=${g%%x*} ; y=${g##*x} if ((x<1280)) && ((x>1250)) ; then xdotool getactivewindow windowsize 1000 0 ; wmctrl -r :ACTIVE: -b add,maximized_horz ; fi if ((y<1024)) && ((y>900)) ; then xdotool getactivewindow windowsize 0 700 ; wmctrl -r :ACTIVE: -b add,maximized_vert ; fi done done
Maybe a higher snap-to-corner threshold on openbox would also help with that. But I think I may also find that annoying for some reason. In the other hand I'm not even sure it exists, maybe there's only the "resistance" against moving out of the desktop/monitor.
Total Comments 0