Recently, I came in contact with screen resizing on windows 7, and I find it very nice. It works like so:
monitor 1 monitor 2
------------------------- ----------------------------
| | | | | |
| | | | | |
| | | | | |
| 1 | 2 | | 3 | 4 |
| | | | | |
| | | | | |
| | | | | |
------------------------- ----------------------------
Say you have an application opened in monitor 1, currently in focus.
If you press mod4+up, it goes fullscreen on monitor 1 (that is, it covers areas 1 and 2).
If you press mod4+left, it goes halfscreen on monitor 1 (that is, it covers area 1).
If you press mod4+right, it goes halfscreen on monitor 1 (but now it covers area 2).
Press mod4+right again, and it goes halfscreen on monitor 2 (area 3)
Press mod4+right again, and it goes halfscreen on monitor 2 (area 4)
Press mod4+up again, and it goes fullscreen on monitor 2 (areas 3 and 4)
My question: I want to reproduce this behaviour, using a window manager independent trio of programs:
- p_right moves right: goes from fullscreen in monitor 1 to area 2, to area 3, to area 4
- p_left moves left
- p_full makes the app fullscreen on the current monitor
- p_right and p_left are clever: they only send the program to another monitor if there is one there.
Of course, then I´ll have to connect my applications to my window manager so that the programs get called when a key combination is pressed
How would I go about doing that? Do I have to program against X/Wayland, or is there some utility I can use, and my programs can become relatively trivial bash scripts?
Edit:
xdotool getactivewindow windowmove 21% 0 windowsize 21% 70%
The previous command sets a window position an size
xrandr | grep connected | grep -v disconnected | egrep '[0-9]+x[0-9]++[0-9x+]*' -o
This command gets the geometry of all monitors
I will post a full answer when it is ready
wmctl
andxdotool
at the same time: xdotool how to select desktop send F5 and return? – WinEunuuchs2Unix Jun 21 '19 at 22:34i3
,awesome
orxmonad
to name a few... – Michal Przybylowicz Jun 21 '19 at 22:36