You are not logged in.
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'
Offline
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
Offline
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.
Offline
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.
Offline
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
@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
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)
Offline
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
Offline
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
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
Offline
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
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
ttz : This ticket might help you -> https://github.com/baskerville/bspwm/issues/87
Your issue is caused by the externalization of the rules.
Offline
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'}
}
Offline
Is it possible to add a rule{d,c} alternative that is not written in lua?
/* No Comment */
Offline
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
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.
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
Offline
Is it normal that I don't see my notifications from libnotify when I plug a USB in with udiskie?
Offline
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
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
Last edited by robstwd (2013-11-07 10:28:27)
Offline
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.
Offline