Created
August 15, 2015 20:48
-
-
Save SomeKittens/1a0f558195596f040c79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Noodling around with window auto-setup | |
# http://movingtofreedom.org/2010/08/10/arranging-windows-from-the-gnulinux-command-line-with-wmctrl/ | |
left_monitor="0" | |
middle_monitor="1300" | |
right_monitor="3201" | |
get_window_id() { | |
return $(wmctrl -l | grep "$1" | tail -1 | cut -f1 -d" ") | |
} | |
makeBig() { | |
sleep 1 | |
local wid = get_window_id | |
wmctrl -i -r "$wid" -e 0,$2,0,1000,1000 | |
sleep 1 | |
wmctrl -i -r "$wid" -b add,maximized_vert,maximized_horz | |
} | |
_echo() { | |
local id=$1 | |
echo $id | |
} | |
terminator & | |
subl & | |
google-chrome & | |
plaidchat & | |
sleep 1 | |
_echo 'hallo' $left_monitor | |
makeBig 'somekittens@' $left_monitor | |
makeBig 'Sublime Text' $middle_monitor | |
makeBig 'Google Chrome' $right_monitor | |
makeBig 'plaidchat' $right_monitor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment