Jump to content


screen split in half/quarters/thirds (like subtle wm)


  • Please log in to reply
3 replies to this topic

#1 TheCompiler

TheCompiler
  • Guests

Posted 10 October 2012 - 11:24 AM

Heya,

since I was annoyed I couldn't control windows nicely with the keyboard at work, I wrote this script. It allows you to align windows nicely by splitting the screen into halves, quarters and thirds.

Win+Arrow Keys does the same as in Windows 7 (I think) - Up maximizes, down restores/minimizes, left and right are the respective halves of the screen.

With Win+Numpad, 8/4/6/2 (Up/Left/Right/Down) are the respective halves of the screen, and 7/9/1/3 (diagonales) are quarters. 5 is maximize, 0 is minimize.

With Win+Ctrl+Numpad, the screen is split in 3x3 parts, every number (1-9) on the numpad is the respective part on the screen (basically like subtle, for the Linux-users... I think.)

Some ascii-arts from the source to make this more clear:
;; Windows + Arrow keys is mapped like this:
;;
;;                 +----+
;;                 |####| Up: maximize
;;                 |####|
;;                 |####|
;;            +----+----+----+
;; Left:      |##  |    |  ##|
;; use left   |##  |    |  ##| right: use right half of the screen
;; half of    |##  |    |  ##|
;; the screen +----+----+----+
;;                  Down: restore or minimize
;;
;; Windows + Numpad keys is mapped like this:
;; (screen divided in halfs/quarters)
;; +----+ +----+ +----+
;; |77  | |8888| |  99|
;; |77  | |8888| |  99|
;; |    | |    | |    |
;; |    | |    | |    |
;; +----+ +----+ +----+
;; |44  | |5555| |  66|
;; |44  | |5555| |  66|
;; |44  | |5555| |  66|
;; |44  | |5555| |  66|
;; +----+ +----+ +----+ 
;; |    | |    | |    | 
;; |    | |    | |    |
;; |11  | |2222| |  33| 
;; |11  | |2222| |  33| 
;; +----+ +----+ +----+ 
;; 0: Restore/Minimize
;;
;; Windows + Ctrl + Numpad keys is mapped like this:
;; (screen divided in thirds)
;; +---+ +---+ +---+
;; |7  | | 8 | |  9|
;; |   | |   | |   |
;; |   | |   | |   |
;; +---+ +---+ +---+
;; |   | |   | |   |
;; |4  | | 5 | |  6|
;; |   | |   | |   |
;; +---+ +---+ +---+ 
;; |   | |   | |   | 
;; |   | |   | |   | 
;; |1  | | 2 | |  3| 
;; +---+ +---+ +---+ 
;; 0: Restore/Minimize
You can find the script and the exe at http://g.cmpl.cc/wingravity.

Feedback and suggestions are really appreciated, and if someone can test it in Windows 7 or with multimonitor-setups I'd be glad.

Florian

#2 umetnic

umetnic
  • Members
  • 2 posts

Posted 27 October 2012 - 03:50 PM

...and if someone can test it in Windows 7 or with multimonitor-setups I'd be glad.

Florian


Hi Florian, I like it a lot ;D

Win7 and two monitors here.

It only works for primary monitor - if the window of some random app is on secondary monitor, then when I want to position it with any of the options, it moves the window to primary monitor and positions it there. Any idea how to make it work for secondary monitor also? :D

Tnx, kind regards, u

#3 Lexikos

Lexikos
  • Administrators
  • 8853 posts

Posted 27 October 2012 - 11:16 PM

WindowPad supports multiple monitors. The default hotkeys aren't the same as this script, but they can be customized.

#4 umetnic

umetnic
  • Members
  • 2 posts

Posted 28 October 2012 - 02:35 PM

WindowPad supports multiple monitors. The default hotkeys aren't the same as this script, but they can be customized.


Thank You, I will look into it! :)