You are not logged in.

#1326 2014-07-16 16:41:52

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

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

Okay, I fold. I'm feeling really stupid here, because it's probably something incredibly obvious that is tripping me up: How do make bspwm only consider the current monitor's desktops when switching focus?

Two examples for illustration: Let's say I have two monitors A and B. On each monitor I have three desktops, let's call them 1, 2 and 3 (same names on both monitors). I'm on desktop B1, I press Super+2 → bspwm focuses desktop B2. I'm on desktop A1, I press Super+2 → bspwm focuses desktop A2.

I had thought this was as simple as using "bspc desktop -f focused^2", but that does simply nothing (returns with an error code of 1). As far as I'm aware, "focused^2" is a valid desktop selection. So—what am I doing wrong here?

Last edited by Runiq (2014-07-16 16:42:06)

Offline

#1327 2014-07-16 16:45:56

o_caino
Member
Registered: 2013-06-06
Posts: 166

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

Runiq wrote:

I had thought this was as simple as using "bspc desktop -f focused^2"

You are missing the : after focused.

Offline

#1328 2014-07-16 16:47:26

Runiq
Member
From: Germany
Registered: 2008-10-29
Posts: 1,053

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

o_caino wrote:
Runiq wrote:

I had thought this was as simple as using "bspc desktop -f focused^2"

You are missing the : after focused.

…there are no words. Thanks.

Edit: Actually, that doesn't seem to work, as the "^2" part is absolute: It always focuses the second desktop in the entire list of desktops, regardless of the monitor it's on…

Edit2: Actually, it does work. Turns out I am stupid!

Last edited by Runiq (2014-07-16 17:09:18)

Offline

#1329 2014-07-16 18:42:52

J.
Member
Registered: 2011-01-31
Posts: 57

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

Thank you very much for bspwm - I've just started using it, and I really like it so far.  I just have a few problems/questions (using bspwm 0.8.9):

I've noticed that the 'last' window filter doesn't seem to pick up anything if no window is focused (that is, if the focused desktop has no windows).  (If you have just one window, 'last' gives you a window on another desktop.)

Sometimes Kupfer doesn't get focus if there are no other windows open.  If, when this happens, I give it focus, it starts accepting input but sometimes disappears for no apparent reason.  Not sure if this is a bspwm or Kupfer bug - has anyone else ever experienced this?

Is there a way to completely hide and restore specific windows?  What I want to do is make Thunderbird hidden, with a shortcut to toggle its visibility - I don't really mind if it affects just the main window, or all Thunderbird windows.  I'm trying to replace the functionality of AllTray, which doesn't seem to work (windows are blank when restored).

I've found that the output of 'bspc query -T' is sometimes malformed - I get random broken lines(like '\t\tV\n m 0.604058'), and sometimes blank lines.  I see this happen when a desktop has a lot of windows (~50).  Examples: http://sprunge.us/NBgN http://sprunge.us/CNBX .

I would like to be able to change window placement behaviour.  I'm currently doing this by calling 'bspc control --subscribe' and parsing the result of 'bspc query -T' every time I get a message, then making adjustments to new windows.  It works, but it's a little crazy, and I can't tell if there was a preselection before the window was mapped - is there a better way?  All I really need to be able to do is insert a preselection before each new window is placed.

Is there a way to restrict the width of a window (eg. by class)?  Lines of text becomes unreadably long when there's only one window - what do people generally do about this?

I'm not sure I like how directions work (picking the window that shares the greatest length of the edge with the source window).  It means estimating which window will be picked is tricky, and you have to spend time checking if you ended up with what you wanted.  The obvious alternative is to always pick the top-left window from all the windows in the tree on the other side of the target edge, but this has unintuitive behaviour in some cases.  So I haven't got a solution, but I thought I'd bring this up anyway.

Is there any way to account for windows that make size requests?  For example, I would like VLC to grow large enough, when it starts, to fit the video at its original size.

Thanks again, and thanks in advance for any replies.  Sorry for so many questions all at once...

Offline

#1330 2014-07-17 06:32:21

quiv
Member
Registered: 2014-02-20
Posts: 22

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

J. wrote:

Is there a way to completely hide and restore specific windows?  What I want to do is make Thunderbird hidden, with a shortcut to toggle its visibility - I don't really mind if it affects just the main window, or all Thunderbird windows.  I'm trying to replace the functionality of AllTray, which doesn't seem to work (windows are blank when restored).

I don't know what AllTray does but it sounds like you're asking to just minimize and restore windows? I use a script to do this then bind it to a hotkey using sxhkd;

#!/bin/bash

if [ -n "$1" ]; then
    xdotool search --onlyvisible --classname $1 windowunmap || xdotool search --classname $1 windowmap || exec $1 &
else
    echo "Error: no argument supplied. Aborting."
fi
# Minimize/Maximize Skype. Start if not running.
alt + k
	/home/quiv/scripts/mapunmap skype

If you don't want it to run if not already running then you can drop the last bit. As far as trays go, have you looked into Stalonetray?

Offline

#1331 2014-07-17 07:21:41

J.
Member
Registered: 2011-01-31
Posts: 57

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

quiv wrote:

I don't know what AllTray does but it sounds like you're asking to just minimize and restore windows? I use a script to do this then bind it to a hotkey using sxhkd;

#!/bin/bash

if [ -n "$1" ]; then
    xdotool search --onlyvisible --classname $1 windowunmap || xdotool search --classname $1 windowmap || exec $1 &
else
    echo "Error: no argument supplied. Aborting."
fi
# Minimize/Maximize Skype. Start if not running.
alt + k
	/home/quiv/scripts/mapunmap skype

AllTray doesn't minimise windows, it hides them completely somehow - but, thinking about it, with a tiled WM you don't really need a window list, so it wouldn't make a difference either way.  I'll try that, thanks.  I hadn't heard of xdotool - seems like it could help with some other things too.

quiv wrote:

As far as trays go, have you looked into Stalonetray?

Are you suggesting it because it shows minimised windows or something?  If so, I'd prefer to just use a Thunderbird addon to show a tray icon, since that's probably more customisable than one generated from the window.

Offline

#1332 2014-07-17 08:38:24

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

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

J. wrote:

I've noticed that the 'last' window filter doesn't seem to pick up anything if no window is focused (that is, if the focused desktop has no windows).  (If you have just one window, 'last' gives you a window on another desktop.)

https://github.com/baskerville/bspwm/issues/61

J. wrote:

Sometimes Kupfer doesn't get focus if there are no other windows open.

bspc rule -a Kupfer.py focus=on
J. wrote:

Is there a way to completely hide and restore specific windows?

What do you mean by completely?

J. wrote:

I've found that the output of 'bspc query -T' is sometimes malformed - I get random broken lines(like '\t\tV\n m 0.604058'), and sometimes blank lines.  I see this happen when a desktop has a lot of windows (~50).  Examples: http://sprunge.us/NBgN http://sprunge.us/CNBX .

Thanks for the report, unfortunately, I have no idea what might be causing this.

J. wrote:

I would like to be able to change window placement behaviour.

You could do this via external_rules_command.

J. wrote:

I'm not sure I like how directions work (picking the window that shares the greatest length of the edge with the source window).

Actually, the nearest window is picked.

J. wrote:

Is there any way to account for windows that make size requests?  For example, I would like VLC to grow large enough, when it starts, to fit the video at its original size.

Size requests (i.e. configure requests) are taken into account but are only used for floating and pseudo-tiled windows.


gh · da · ds

Offline

#1333 2014-07-17 12:05:44

quiv
Member
Registered: 2014-02-20
Posts: 22

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

J. wrote:

Are you suggesting it because it shows minimised windows or something?  If so, I'd prefer to just use a Thunderbird addon to show a tray icon, since that's probably more customisable than one generated from the window.

No, I wasn't quite sure what you wanted. It's just a standard tray. If you minimize windows using windowunmap I don't think they will show up in the tray.

Last edited by quiv (2014-07-17 12:06:04)

Offline

#1334 2014-07-17 18:00:52

J.
Member
Registered: 2011-01-31
Posts: 57

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

bloom wrote:
J. wrote:

I've noticed that the 'last' window filter doesn't seem to pick up anything if no window is focused (that is, if the focused desktop has no windows).  (If you have just one window, 'last' gives you a window on another desktop.)

https://github.com/baskerville/bspwm/issues/61

Hmm, that seems to suggest that it only matters with 'bspc window -f', but I've noticed that 'bspc query -W -w last' also gives nothing when the desktop is empty.

bloom wrote:
J. wrote:

Is there a way to completely hide and restore specific windows?

What do you mean by completely?

What I meant was that it shouldn't just be minimised (which would show up in panel window lists) or invisible, like 'bspc control --toggle-visibility', but as I realised above, minimised is enough, and I've got the xdotool solution working.

bloom wrote:
J. wrote:

I would like to be able to change window placement behaviour.

You could do this via external_rules_command.

There's nothing wrong with running 'bspc' commands with side effects in this command, then?

I just tried it, and any existing preselection seems to be lost by the time this is called ('bspc query -W -w last.manual' gives nothing), but it's still better.  I suppose I could add a rule to make everything floating, then set them to tiled on calls to this command.

bloom wrote:
J. wrote:

I'm not sure I like how directions work (picking the window that shares the greatest length of the edge with the source window).

Actually, the nearest window is picked.

Oh, I see.  Makes sense, but I think I would choose focus_by_distance=false, since the number of steps is not equivalent to the amount of time spent.  This setting seems to have been removed (the man page doesn't mention it)?

bloom wrote:
J. wrote:

Is there any way to account for windows that make size requests?  For example, I would like VLC to grow large enough, when it starts, to fit the video at its original size.

Size requests (i.e. configure requests) are taken into account but are only used for floating and pseudo-tiled windows.

Right.  I can probably hack something together, knowing that.

Thanks for all the answers.

Offline

#1335 2014-07-18 18:17:38

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

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

J. wrote:

I've noticed that 'bspc query -W -w last' also gives nothing when the desktop is empty.

This is unrelated to issue 61, and fixed by 4907ddc.

J. wrote:

I think I would choose focus_by_distance=false

You can, as of d85d313.


gh · da · ds

Offline

#1336 2014-07-19 13:57:43

J.
Member
Registered: 2011-01-31
Posts: 57

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

Regarding external_rules_command, if I just make it do 'bspc window biggest -p down', the preselection gets made, but the new window ignores it and gets placed as if there's no preselection - I guess bspwm is only looking at windows that were in manual mode before my command was called?

Offline

#1337 2014-07-19 14:54:45

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

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

J. wrote:

Regarding external_rules_command, if I just make it do 'bspc window biggest -p down', the preselection gets made, but the new window ignores it and gets placed as if there's no preselection

The proper way to do this is:

printf "%s\n" "window=biggest split_dir=down"

gh · da · ds

Offline

#1338 2014-07-19 15:20:41

J.
Member
Registered: 2011-01-31
Posts: 57

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

Ah, that makes sense.  I was misunderstanding how to use it, thanks.

Edit: I think the problem I had was that it's not clear what 'window=' does with rules, at least from the man page.  From testing, I would guess that without also setting 'presel=', it sets the window to treat as the 'focused' window mentioned in 'New windows are inserted in the tree as close as possible to the focused window'?

Last edited by J. (2014-07-19 15:36:54)

Offline

#1339 2014-07-19 20:41:02

cju
Member
Registered: 2013-06-23
Posts: 194

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

@bloom:

Why did you remove the whole dzen2 stuff from your git repo? o.O I liked it pretty much.
Bar's imho not a full drop-in replacement for dzen2 since its feature range is, compared to dzen2, pretty limited…

Last edited by cju (2014-07-19 20:41:12)

Offline

#1340 2014-07-20 04:28:04

angelic_sedition
Member
Registered: 2014-01-20
Posts: 124
Website

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

quiv wrote:
J. wrote:

Is there a way to completely hide and restore specific windows?  What I want to do is make Thunderbird hidden, with a shortcut to toggle its visibility - I don't really mind if it affects just the main window, or all Thunderbird windows.  I'm trying to replace the functionality of AllTray, which doesn't seem to work (windows are blank when restored).

I don't know what AllTray does but it sounds like you're asking to just minimize and restore windows? I use a script to do this then bind it to a hotkey using sxhkd;

#!/bin/bash

if [ -n "$1" ]; then
    xdotool search --onlyvisible --classname $1 windowunmap || xdotool search --classname $1 windowmap || exec $1 &
else
    echo "Error: no argument supplied. Aborting."
fi
# Minimize/Maximize Skype. Start if not running.
alt + k
	/home/quiv/scripts/mapunmap skype

If you don't want it to run if not already running then you can drop the last bit. As far as trays go, have you looked into Stalonetray?

Thanks for posting this. I wasn't aware of xdotool's windowunmap. I've started using this script for making terminal emulators dropdowns. This works a lot better than what I was doing before and works quite nicely with bspwm.

Last edited by angelic_sedition (2014-07-20 04:28:31)

Offline

#1341 2014-07-20 09:31:17

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

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

cju wrote:

@bloom:
Why did you remove the whole dzen2 stuff from your git repo? o.O I liked it pretty much.
Bar's imho not a full drop-in replacement for dzen2 since its feature range is, compared to dzen2, pretty limited…

I will not maintain two panels.

dzen2 can't right align text, that's a pretty basic feature, and if a bar can't do that, it isn't worth mentioning.


gh · da · ds

Offline

#1342 2014-07-20 11:17:56

cju
Member
Registered: 2013-06-23
Posts: 194

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

bloom wrote:

dzen2 can't right align text, that's a pretty basic feature, and if a bar can't do that, it isn't worth mentioning.

I totally get your point, but on the other hand, dzen2 has Xft-support, slave windows etc. hmm

Offline

#1343 2014-07-23 02:43:17

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

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

I've gotten a lot of questions about using the same keybinds for moving floating, resizing tiling, and resizing pseudotiling

Unfortunately, this didn't work as elegantly as expected:

alt + {a,f}
    S={+,-}; \
    xdo move -x $\{S\}10 || \
    xdo resize -w $\{S\}20 || \
    bspc window -e left $\{S\}20 || \
    bspc window -e right   $\{S\}20 

So I wrote a wrapper to parse the tree to determine window state, and resize / move the window accordingly:
https://gist.github.com/windelicato/e36 … _resize-sh

PS: Is the output of bspc query -T documented anywhere? I feel it would be useful to have it documented somewhere other then the code for future usage
PS2: Is there a better way to do this to parse out the window flags?


((( configs :: website )))

Offline

#1344 2014-07-23 07:33:50

J.
Member
Registered: 2011-01-31
Posts: 57

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

Perhaps a window selector modifier for pseudo-tiled windows could be added?  Then you can check whether `bspc query -w focused.{floating,.tiled,.pseudo_tiled}` give you anything.

Offline

#1345 2014-07-23 11:51:59

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

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

earsplit wrote:

I've gotten a lot of questions about using the same keybinds for moving floating, resizing tiling, and resizing pseudotiling

I could provide a unified interface for resizing windows.

earsplit wrote:

PS: Is the output of bspc query -T documented anywhere?

No, I might do that, but query -T is meant to be used for debugging and feeding restore -T.


gh · da · ds

Offline

#1346 2014-07-23 16:00:52

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

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

bloom wrote:
earsplit wrote:

I've gotten a lot of questions about using the same keybinds for moving floating, resizing tiling, and resizing pseudotiling

I could provide a unified interface for resizing windows.

earsplit wrote:

PS: Is the output of bspc query -T documented anywhere?

No, I might do that, but query -T is meant to be used for debugging and feeding restore -T.

Ahh I see. If you get around to implementing a unified interface for resizing windows, could you include a similar unified interface for moving floating windows? (the alternative to swapping tiled windows)

Although this functionality is provided in xdo, they are rudimentary functions needed to manage windows, and could very well be part of the window manager.

Thanks again for your help


((( configs :: website )))

Offline

#1347 2014-07-23 18:32:51

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

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

earsplit wrote:

could you include a similar unified interface for moving floating windows?

I don't see how it could be unified if it only applies to floating windows?

I could provide built-in support for moving floating windows though.


gh · da · ds

Offline

#1348 2014-07-25 22:44:34

tb01110100
Member
From: Hoosierland
Registered: 2012-12-25
Posts: 42

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

Wanted to say many, many thanks for this awesome window manager. It's fantastic, and I love it to bits.

bloom wrote:

No, I might do that, but query -T is meant to be used for debugging and feeding restore -T.

On that subject, what exactly are

bspc query -T/-H/-S

and

bspc restore -T/-H/-S

doing, and what's the point? I'm still a bit new to the whole concept of binary tree stuff, so please try to explain it to me simply.

Thanks!

Offline

#1349 2014-07-28 18:57:32

pa1adin
Member
Registered: 2012-09-09
Posts: 4

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

Hi,

Is that possible remove border a specific floating windows (for example Synapse)? With an external rules?

Thx!
P.

Offline

#1350 2014-07-28 19:01:24

o_caino
Member
Registered: 2013-06-06
Posts: 166

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

pa1adin wrote:

Is that possible remove border a specific floating windows (for example Synapse)?

Yes

pa1adin wrote:

With an external rules?

Maybe.

Last edited by o_caino (2014-07-28 19:02:05)

Offline

Board footer

Powered by FluxBB