You are not logged in.

#851 2013-11-05 19:25:22

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

snakebite wrote:

Is it somehow possible to set floating as default and tiling for only specific windows? What I want to do is set eg. urxvt as tiling and all other windows to floating as default, this way I don't have to add a rule for every single window I don't want tiled. I tried using a wildcard rule for floating, but I couldn't see a way to set a window explicitly as tiled.

You can now do this via:

rulc -a 'not class == "URxvt"' 'floating = on'

gh · da · ds

Offline

#852 2013-11-05 19:26:37

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

ibrunton wrote:

I may be missing something in the man page, but is it possible to set a desktop as floating, rather than just individual windows?  Something like "bspc desktop ^2 -l floating"?

You might try:

bspc desktop -t floating

gh · da · ds

Offline

#853 2013-11-05 19:33:34

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Lolostudio wrote:

1) I don't quite get the thing with the rules. As said a few posts above, how would you specify a window state for all windows on a given desktop? I tried something like "bspc rule -a * -d ^5 --float" and derivatives but nothing seems to work.
2) I don't know if it's a compton or bspwm-related issue, but how do you avoid overlaying shadows when there are several windows stacked in monocle layout? I didn't have this effect with other WMs (Subtle, XMonad, i3) with the same compton command but I can't find anything about it.

1) You shell interprets the wildcard character, hence you shall write \* instead. You might want to try bspc desktop -t floating though.
2) Not sure how other WMs would prevent this, I'll have a look. In the meantime, you can prevent shadows on floating windows via apply_floating_atom.


gh · da · ds

Offline

#854 2013-11-06 00:23:47

earsplit
Member
Registered: 2012-03-31
Posts: 187
Website

Re: bspwm — A tiling window manager based on binary space partitioning

I'm curious what the rational behind writing a lua script to handle rules was necessary.  This seems like something the window manager should control, and it seems to add an unecessary level of complexity.


((( configs :: website )))

Offline

#855 2013-11-06 00:29:36

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: bspwm — A tiling window manager based on binary space partitioning

earsplit wrote:

I'm curious what the rational behind writing a lua script to handle rules was necessary.  This seems like something the window manager should control, and it seems to add an unecessary level of complexity.

This is what I was thinking as well.

Offline

#856 2013-11-06 02:14:34

prash
Member
Registered: 2011-08-18
Posts: 57

Re: bspwm — A tiling window manager based on binary space partitioning

@bloom

I was playing around with the idea of switching over to bspwm as my primary WM. I was making progress until yesterday: I got most of the basic things configured and working to my liking. However, with today's update, almost everything broke. And I see that I have to install quite a few "optional" packages to get things running again. When I checked, I saw that many of these packages are created by you. Given that these packages are of use only in the context of BSPWM, do you mind keeping them all under the same git repository, and/or releasing them as just one package on AUR?

Last edited by prash (2013-11-06 02:20:01)

Offline

#857 2013-11-06 03:37:28

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Letting external scripts control rule decisions makes it possible to make complex, dynamic rules. You don't actually need to use ruld/rulc; I use:

#!/bin/bash
readarray -t PROPS < <(xwinfo -its $1)

INST=${PROPS[0]}
TYPE=${PROPS[1]}
STATE=(${PROPS[2]})

RULE=()

# Sane defaults
case "$TYPE" in
    dock|desktop|notification)  RULE+=("manage=off")    ;;
    toolbar|utility)            RULE+=("focus=off")     ;;
    desktop)                    RULE+=("lower=on")      ;;
esac

for s in $STATE; do
    case $s in
        sticky)                 RULE+=("sticky=on")     ;;
        fullscreen)             RULE+=("fullscreen=on") ;;
    esac
done

# Custom rules
case "$INST" in
    pithos)
        RULE+=("desktop=1/Ten") ;;
    mpv|keepassx)
        RULE+=("floating=on") ;;
    dropterm|crx_nckgahadagoaajjgafhacjanaoiihapd)
        RULE+=("floating=on sticky=on") ;;
esac

echo "${RULE[*]}"
bspc config rule_command "/path/to/rules.sh %d"

Granted, it would be nice if there were some sane defaults (sticky windows are sticky, docks are unmanaged, etc).

Last edited by Stebalien (2013-11-06 03:50:39)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#858 2013-11-06 04:30:12

earsplit
Member
Registered: 2012-03-31
Posts: 187
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Stebalien wrote:

Letting external scripts control rule decisions makes it possible to make complex, dynamic rules. You don't actually need to use ruld/rulc; I use:

#!/bin/bash
readarray -t PROPS < <(xwinfo -its $1)

INST=${PROPS[0]}
TYPE=${PROPS[1]}
STATE=(${PROPS[2]})

RULE=()

# Sane defaults
case "$TYPE" in
    dock|desktop|notification)  RULE+=("manage=off")    ;;
    toolbar|utility)            RULE+=("focus=off")     ;;
    desktop)                    RULE+=("lower=on")      ;;
esac

for s in $STATE; do
    case $s in
        sticky)                 RULE+=("sticky=on")     ;;
        fullscreen)             RULE+=("fullscreen=on") ;;
    esac
done

# Custom rules
case "$INST" in
    pithos)
        RULE+=("desktop=1/Ten") ;;
    mpv|keepassx)
        RULE+=("floating=on") ;;
    dropterm|crx_nckgahadagoaajjgafhacjanaoiihapd)
        RULE+=("floating=on sticky=on") ;;
esac

echo "${RULE[*]}"
bspc config rule_command "/path/to/rules.sh %d"

Granted, it would be nice if there were some sane defaults (sticky windows are sticky, docks are unmanaged, etc).

Awesome example. I revoke my previous statement smile


((( configs :: website )))

Offline

#859 2013-11-06 04:48:09

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: bspwm — A tiling window manager based on binary space partitioning

So the ruld and rulc binaries aren't built by the package, and looking through the sources, they aren't included in the Makefile.  Should these be built separately or is it intended to be included in a simple 'make' and I just got to it too early?

Offline

#860 2013-11-06 05:07:15

earsplit
Member
Registered: 2012-03-31
Posts: 187
Website

Re: bspwm — A tiling window manager based on binary space partitioning

WonderWoofy wrote:

So the ruld and rulc binaries aren't built by the package, and looking through the sources, they aren't included in the Makefile.  Should these be built separately or is it intended to be included in a simple 'make' and I just got to it too early?

They are simply scripts that need to be added to your $PATH and made executable. I would recommend sticking to a stable package or installing directly from the git repository for now


((( configs :: website )))

Offline

#861 2013-11-06 05:13:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: bspwm — A tiling window manager based on binary space partitioning

Ah, I see them now in the contrib section.  Thanks!

I just saw that there is now a rule.c and rule.h in the sources, so I would find what I needed there.  I've been using git for a while and try my best to keep up with this thread.  I just stuck it in my rss reader, so now I can really keep an eye on it.


Edit: Okay, now all is working as expected. Thanks again earsplit.

Last edited by WonderWoofy (2013-11-06 05:33:34)

Offline

#862 2013-11-06 07:02:03

ttz
Member
From: My Box
Registered: 2013-08-01
Posts: 56

Re: bspwm — A tiling window manager based on binary space partitioning

WIth the latest update, my bar (LemonBoy's) appears only on my first desktop, and it appears as if it is a tiled window. I have to set it to floating to have it return to its proper position at the top, and even then, it only shows up on my first desktop.

I have the latest bar from the git and it compiles fine, and my panel script reflects the latest changes in the example script on your github, bloom.

Any ideas?


Character shines in the great moments, but is polished in the little ones.

Offline

#863 2013-11-06 07:51:13

Sirsurthur
Member
Registered: 2009-02-02
Posts: 124

Re: bspwm — A tiling window manager based on binary space partitioning

ttz : This ticket might help you -> https://github.com/baskerville/bspwm/issues/87
Your issue is caused by the externalization of the rules.

Offline

#864 2013-11-06 10:09:00

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Stebalien wrote:

Granted, it would be nice if there were some sane defaults (sticky windows are sticky, docks are unmanaged, etc).

ruld defines the following defaults:

local rules = {
    {'type:find("toolbar") or type:find("utility")', 'focus=off'},
    {'type:find("dialog")', 'floating=on'},
    {'type:find("dock") or type:find("desktop") or type:find("notification")', 'manage=off'},
    {'type:find("desktop")', 'lower=on'},
    {'state:find("fullscreen")', 'fullscreen=on'},
    {'state:find("sticky")', 'sticky=on'}
}

gh · da · ds

Offline

#865 2013-11-06 11:45:07

Neuromatic
Member
From: Germany
Registered: 2013-05-31
Posts: 65

Re: bspwm — A tiling window manager based on binary space partitioning

Is it possible to add a rule{d,c} alternative that is not written in lua?


/* No Comment */

Offline

#866 2013-11-06 12:59:35

Neuromatic
Member
From: Germany
Registered: 2013-05-31
Posts: 65

Re: bspwm — A tiling window manager based on binary space partitioning

Another little question:

The new rule creatort are working fine for me. But there is a little issue with the bspwm_frame feature.

I've grabbed the wid of bspwm_frame via wmctrl, bacause xprop did not find a wid.

So I checked the output of xwinfo with the wid I've awk'd from wmctrl -lx.

BSPWM_FRAME
bspwm_frame
N/A
N/A
N/A

I've tried BSPWM_FRAME and bspwm_frame with rulc, but bspwm_frame behaves like a regular Client.

This is the defined rule:

rulc -a 'class=="bspwm_frame"' 'frame=on'

Is there a way to get back the frame feature?


/* No Comment */

Offline

#867 2013-11-06 16:01:25

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Neuromatic wrote:
rulc -a 'class=="bspwm_frame"' 'frame=on'

The class name is not the instance name:

rulc -a 'class=="BSPWM_FRAME"' 'frame=on'

gh · da · ds

Offline

#868 2013-11-06 16:05:29

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

Neuromatic wrote:

Is it possible to add a rule{d,c} alternative that is not written in lua?

Why?


gh · da · ds

Offline

#869 2013-11-06 17:04:55

Neuromatic
Member
From: Germany
Registered: 2013-05-31
Posts: 65

Re: bspwm — A tiling window manager based on binary space partitioning

bloom wrote:
Neuromatic wrote:

Is it possible to add a rule{d,c} alternative that is not written in lua?

Why?

I thought it would be nice to have an alternative to get this with a language that is installed per default, like perl.

bloom wrote:

The class name is not the instance name:

I'd used this string in my first try. Works now, but I had to restart X two times. I do not understand why?


/* No Comment */

Offline

#870 2013-11-06 17:14:37

earsplit
Member
Registered: 2012-03-31
Posts: 187
Website

Re: bspwm — A tiling window manager based on binary space partitioning

I created a support channel at #bspwm on irc.freenode.net, which can operate along with the mailing list to provide help and report bugs


((( configs :: website )))

Offline

#871 2013-11-06 21:47:03

3xOSC
Member
Registered: 2013-03-18
Posts: 107

Re: bspwm — A tiling window manager based on binary space partitioning

Is it normal that I don't see my notifications from libnotify when I plug a USB in with udiskie?

Offline

#872 2013-11-07 04:21:35

ttz
Member
From: My Box
Registered: 2013-08-01
Posts: 56

Re: bspwm — A tiling window manager based on binary space partitioning

Sirsurthur wrote:

ttz : This ticket might help you -> https://github.com/baskerville/bspwm/issues/87
Your issue is caused by the externalization of the rules.

Thank you for the link; I am curious to see though if there is a way to solve this simply using the "stock" rulc/ruld scripts included.

I'm finding that even though I source the folder containing the rulc/ruld scripts in my $PATH, none of the rules are working.


Character shines in the great moments, but is polished in the little ones.

Offline

#873 2013-11-07 09:06:46

robstwd
Member
From: Brisbane
Registered: 2010-10-31
Posts: 32

Re: bspwm — A tiling window manager based on binary space partitioning

ttz wrote:

Thank you for the link; I am curious to see though if there is a way to solve this simply using the "stock" rulc/ruld scripts included.

I'm finding that even though I source the folder containing the rulc/ruld scripts in my $PATH, none of the rules are working.

I have just made the default changes ie with 'stock' scripts etc and rules are working well.  What I did was:
1. copied the supplied ruld & rulc scripts from contrib to my $PATH and ensured executable
2. updated .xinitrc with this line before the final run wm statement

rulc -l > /dev/null || ruld &

3. updated bspwmrc with this:

bspc config rule_command "xwinfo -cints 0x%X | xargs -d '\n' rulc -t"

4. Installed xwinfo via git clone and lua-posix according to this earlier post
At this point, with a bspwm restart, check the default rules from ruld with

$ rulc -l
type:find("toolbar") or type:find("utility") => focus=off
type:find("dialog") => floating=on
type:find("dock") or type:find("desktop") or type:find("notification") => manage=off
type:find("desktop") => lower=on
state:find("fullscreen") => fullscreen=on
state:find("sticky") => sticky=on

5. modified my existing custom rules in bspwmrc to the new rule format; my previous rule:

bspc rule -a vlc --follow --floating

became:

rulc -a 'class=="Vlc"' 'follow=on floating=on'

Note the change of case for "Vlc" - initially my set of 5 or so custom rules did not work and I figured out it was a case issue. Using xprop to get the WM_CLASS value gave me:

$ xprop | grep WM_CLASS
WM_CLASS(STRING) = "vlc", "Vlc"

Changing the rules to use the second value in proper case was what made my custom rules work.

maybe something in the above will help out smile

Last edited by robstwd (2013-11-07 10:28:27)

Offline

#874 2013-11-07 20:12:47

bloom
Member
Registered: 2010-08-18
Posts: 749
Website

Re: bspwm — A tiling window manager based on binary space partitioning

The panel examples changed.


gh · da · ds

Offline

#875 2013-11-07 21:33:20

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: bspwm — A tiling window manager based on binary space partitioning

bloom wrote:
Stebalien wrote:

Granted, it would be nice if there were some sane defaults (sticky windows are sticky, docks are unmanaged, etc).

ruld defines the following defaults:

local rules = {
    {'type:find("toolbar") or type:find("utility")', 'focus=off'},
    {'type:find("dialog")', 'floating=on'},
    {'type:find("dock") or type:find("desktop") or type:find("notification")', 'manage=off'},
    {'type:find("desktop")', 'lower=on'},
    {'state:find("fullscreen")', 'fullscreen=on'},
    {'state:find("sticky")', 'sticky=on'}
}

I meant in bspwm itself. That is, let the external rules command modify the defaults but have bspwm itself set some reasonable defaults based on type and state.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

Board footer

Powered by FluxBB