Xfce Forum

Sub domains

You are not logged in.

#51 2010-11-30 06:39:19

Registered: 2007-10-30
Posts: 218

Re: Screenshots - 2010

Okay; new scripts, freshly baked.


Far simpler than the add/sub scripts I wrote before. Four scripts; x, y, w, h. Runtime arguments are the same: first numerical value divides the screen into that many fractions, second numerical value sets the number of fractions to use for this operation.

So `wm_w_cu.sh 10 1` increases the size of the current window by 1/10th of the screen.
`wm_w_cu.sh 5 -1` decreases the size of the current window by 1/5th of the screen.

Scripts now also detect if the window doesn't conform with your chosen fractions and adjusts them to do so. So if you've got a hypothetical monitor resolution of 1000 pixels, you're using `wm_w_cu.sh 4 1` to resize your window 1/4 of the screen at a time but the window's initial value is something other than 250/500/750 pixels, the scripts will now compensate, resizing them to the nearest conforming size.

Only thing you should need to do is setup the keyboard shortcuts (I recommend Ctrl+Alt+arrow keys for w/h and Shift+Alt+arrow keys for x/y)/launchers with your desired arguments and set the following variables in the scripts:

scr=1920 #screen res x, or y, depending on the script
panels=40 #the total width of any panels/docks on your screen
dectop=19 #the width of the top border of your window decorations
decbottom=2 #bottom border width
decleft=2 #left border width
decright=2 #right border width
#let scr=$scr-$panels #enable/disable this depending upon whether you've got any panels on the current axis. If this is script w/x and you've only got panels on the top/bottom of your screen, comment out this line

Wmctrl is no longer required, this is now pure xdotool (with some unfortunate xwininfo abuse).


#52 2010-11-30 11:37:20

Registered: 2010-11-24
Posts: 7

Re: Screenshots - 2010

Thank you for posting this etnlWings!


Board footer

Powered by FluxBB