You are not logged in.

#1 2017-08-29 13:16:54

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Set geometry of a selected window

Super-simple script - pass the width and height as command args, then choose the window with the cross cursor which appears.

NB No error-checks!

#!/bin/bash
##
## setwindims

# arg 1 = width; arg 2 = height
# '-1'  = current x and y values

wmctrl -r :SELECT: -e 0,-1,-1,$1,$2
exit

Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#2 2017-08-30 05:43:12

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: Set geometry of a selected window

Nice one.

Offline

#3 2017-08-30 08:05:02

ector1935
Member
Registered: 2017-05-03
Posts: 240

Re: Set geometry of a selected window

hi,
i have this erorr

The -e option expects a list of comma separated integers: "gravity,X,Y,width,height"

edit
solved!

Last edited by ector1935 (2017-08-30 08:15:40)

Offline

#4 2017-09-13 22:59:09

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,746

Re: Set geometry of a selected window

copy/paste window size (usage: clicky source win, clicky dest window)

#!/bin/bash

# clickyClicky

# copy paste window width/height (without wm decorations)
# idea from https://forums.bunsenlabs.org/viewtopic.php?id=4121

# clicky source
echo "clicky source"
read -r _ w _ h <<<$(xwininfo -shape | grep 'Width\|Height' | tr -d '\n') 
echo $w $h

# clicky destination
echo "clicky destination"
wmctrl -r :SELECT: -e 0,-1,-1,$w,$h

Offline

Board footer

Powered by FluxBB