You are not logged in.

#1 2010-04-10 20:13:45

keegan
Member
Registered: 2009-05-12
Posts: 54

musca "show settings"

I'm trying to find a way to show in a terminal what my current pad is set to in musca. Using

musca -c "show settings"

only shows some of the settings and not all. I have a one line conky at the bottom of my screen, and want to be able to hide and show it with one key. Right now I have this in my ~/.musca_start:

bind on Mod4+Shift+b pad 0 0 0 0
bind on Mod4+b pad 0 0 0 10

I want to be able to replace this with a script that can use musca -c or some other way to see what my padding is set to and toggle it to the other setting. Using musca -c "show frames" might work if I have my script add each column up, but there's gotta be an easier way.

Offline

#2 2010-04-10 21:08:16

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: musca "show settings"

There doesn't seem to be a padding variable in the source, only group sizes, so even if you manage to print that you have to compare it with the original.

When you add it up, everything has to be from one column, I think this would do: musca -c 'show frames' | awk '($3==0){total+=$6}END{print total}'

Offline

#3 2010-04-10 23:14:40

keegan
Member
Registered: 2009-05-12
Posts: 54

Re: musca "show settings"

Procyon wrote:

When you add it up, everything has to be from one column, I think this would do: musca -c 'show frames' | awk '($3==0){total+=$6}END{print total}'

Yea, I started working on that and realized it's beyond my skill. The problem is musca -c "show frames" dumps the size and position of every window with no way of being able to tell how they're tiled. So say I have 2 windows horizontally split on the left side of the screen and one full height on the right, the columns from the output aren't going to add up right unless I keep dividing the result by 2 until it's either 800 which would be no padding, or 790 which would be with padding.

Edit: After some testing, that seems to work, although I have no idea how smile Thanks Procyon

Last edited by keegan (2010-04-10 23:19:57)

Offline

Board footer

Powered by FluxBB