Did you know that you can can control the window geometry and placement of any graphical application in most, if not all, desktop environments/window managers, permitted an x window environment is available (e.g. Xorg)?
This is useful with machines when you notice the same graphical applications staying open. Another benefit is that it provides the means to be more efficient when you can start to remember where specific windows are located at any given moment. Here's the one liner - feel free to use this code to automate your desktops into productive and friendly minions:
Said one-liner:
$ wmctrl -l | grep -i konqueror | awk '{print $1}' | while read win_id; do transset-df -i $win_id 0.9; wmctrl -ir $win_id -e 0,0,1700,1200,185; done
Here's a quick explanation of the aforementioned one-liner (ensure konqueror is already running):
- "wmctrl -l" provides a list of every graphical window currently running.
- "grep -i konqueror" looks for a case-insensitive window titled, "konqueror."
- "awk '{print $1}'" only displays the first column of the "konqueror" line from stdout via "wmctrl -l." The first column is the window id for Konqueror.
- "while read wind_id; do " read in the id column (first column) from "wmctrl -l"
- "transset-df -i $wind_id 0.9;" change translucency of window to 0.9. Love it.
- "wmctrl -ir $wind_id -e 0,0,1700,1200,185;" change the geometry (size) of the window and its placement (where the window will actually reside on the desktop)
- "done" all done ;)
Hope you find this useful!
adiĆ³s amigos!
If you enjoyed this post, send us = kudos =
(Bitcoin Addr: 19n6q3GZfoM64oqv5HsDnhzqvcEvJUvmdx)
No comments:
Post a Comment