i guess
bspwmrc
#! /bin/sh bspc config border_width 0 bspc config window_gap 3 bspc config split_ratio 0.52 bspc config borderless_monocle true bspc config gapless_monocle true bspc config click_to_focus button1 bspc config pointer_mod mod4 bspc config pointer_action1 move bspc config pointer_action2 resize_side bspc config pointer_action3 resize_corner bspc monitor DP-1 -d 1 2 3 4 5 bspc monitor HDMI-0 -d 6 7 8 9 0 bspc config pointer_follows_monitor true # Multihead behavior bspc config remove_disabled_monitors true bspc config remove_unplugged_monitors true exec ~/.config/bspwm/autostart
sxhkdrc
to start: just remove everything below
# Mouse click focus
(if you miss auto_alternate see: https://github.com/baskerville/bspwm/commit/4fbd961311a3b76f60b7128c85f5b8be0cd91ce2)
Found the solution here:
https://github.com/baskerville/bspwm/issues/678
Instead of the bindings mentioned erlier you now have to use
bspc config pointer_modifier mod4 bspc config pointer_action1 move bspc config pointer_action2 resize_side bspc config pointer_action1 resize_corner
Thats realy bad documentation/communication if you have to google everywhere, post on reddit and so on ... to find that the answer to that change is in a bug report in the github repo.
Exactly this. Exemples :
I use pretty much the same thing on my set up as well. It works pretty swell.
Incidentally here is the commit that removed create_frame. So I guess using dynamic padding settings is something to look into.
EDIT: also you can use something like this:
XClassHint hint = { "name" , "class" }; XSetClassHint (display, win, &hint);
to set class and name hints for rules.
This is a security feature designed to prevent a compromised VM from taking over the whole screen and drawing a fake dom0. If you want to go ahead and override this behavior, see https://www.qubes-os.org/doc/full-screen-mode/.
Do this at your own peril
There are two dbus busses: the system bus and the session bus. systemd is starting the system bus but you have to start the session bus (either from your xinitrc or a systemd user instance).
Edit: Actually, the session instance should already be started automatically by your systemd user instance (started by pam_systemd). See https://www.archlinux.org/news/d-bus-now-launches-user-buses/. How are you logging in/starting bspwm?
What I can think of:
You can use xrandr to make your screens into one big screen. You probably don't want this, but maybe you do?
xrandr --setmonitor NameOfDisplay auto HDMI-A-0,HDMI-A-1
You could create separate desktops for each monitor and then have keybinding to switch multiple at once (something like 1-9 on left, 10-19 middle and 20-29 on right and then meta+1 will switch to 1, 10 and 20). I'm not sure how to nicely write this into sxkhdrc, but you can always just make a simple script and call it.
edit: here is a small snippet on how to also implement next/previous desktop for multiple monitors
The second part...i'm not sure what you mean. I haven't used i3 in a while, so i'm not sure how it behaves there, but when I move window left in bspwm, it goes to the left screen.
The Arch Wiki has a section called Set up a desktop where all windows are floating (source)
If google translate
translated your message correctly (it says you are asking for a mouse binding that allows you to drag a window to a receptacle), yes, this is possible.
It is very easy actually compared to the other mouse movement bindings that people have requested in the past:
Since we only care about the initial and the final position of the mouse, we can implement this binding with few lines of shell scripting code.
In sxhkdrc
(requires bspwm
version 0.9.10):
ctrl + alt + button3 bspc query -N -n pointed.window > /tmp/bspdragtoreceptacle_file \ || rm /tmp/bspdragtoreceptacle_file ctrl + alt + @button3 if wid=$(< /tmp/bspdragtoreceptacle_file); then \ bspc node "$wid" -n 'pointed.!window.leaf'; \ bspc node "$wid.!tiled.!pseudo_tiled.window" -t tiled; \ fi; \ rm /tmp/bspdragtoreceptacle_file
That's it. :^)
This will bind ctrl+alt+right_click
to that drag thingie you want.
Nice idea.
> Hello, I tried to change the automatic_scheme to longest_side, but it still uses the default fibbonacci layout, is there a way to change this? Thanks.
What you call "the default fibonacci layout", is actually called "the longest_side automatic_scheme" (note: the "layout" is also influenced by other settings such as initial_polarity
, split_ratio
, etcetera) and it is the default automatic_scheme
.
The other automatic_scheme
s you can set are alternate
and spiral
(as well as longest_side
of course).
You can find out what a setting does and its possible values in the man
page for bspwm
(or bspc
). This is true for every bspwm
setting.
From bspwm(1)
:
automatic_scheme The insertion scheme used when the insertion point is in automatic mode. Accept the following values: longest_side, alternate, spiral.
NOTE: automatic_scheme
s are also explained in the README.md file that you can find in <code>bspwm</code>'s github repository.
>Except maybe polybar if that's how the polybar bspwm module works?
yea.
the issue that u/SeerLite might be referring to is described in this PR. That sounds more likely (unless polybar is acting up for some reason). See if that fits your situation and give the patch a shot.
All right, this sequence of command sorta achieves what I want I think. However, all my actions require just one key combination, so I'm not a fan of the manual selection thing (it just doesn't really fit well with automatic splitting thing I got going, and I always know in advance how I want to split my to be warped window (namely, according to the rules in this pseudo automatic rules script)). I'm gonna look into chaining this sequence of commands, which I hope is doable. EDIT tyvm, see the edit in OP.
I believe this does the opposite of what you want: https://github.com/Chrysostomus/bspwm-scripts/blob/master/configs/bspwm/bspwmrc
You can try with a negative gap and positive padding.
Baskerville has an example with overlapped Ng borders worth exploring: https://github.com/baskerville/bspwm/blob/70b477de2e70dc46d78e11f7d78fc2d9c2448725/examples/overlapping_borders/bspwmrc
For anyone who comes across this issue from google: > Indeed solution is to change the JRE that the IDE uses, by default it uses the bundled JRE, to change it follow this steps:
> - Ctrl + Shift + A (Find Action) search for "Switch IDE Boot JDK"
> - Select your system JRE ubication, if not provide the path by the "..." button
> - Restart your IDE
Edit: Also see here.
I had poor font rendering when switching to Oracle's JRE. I found an alternative runtime in the IDE issue tracker that (after following instructions and updating the settings) solved the issue.
The solution is to kill every instance of the panel before you start it (when you open bspwm-session). Put this where you normally start the panel (.xinitrc if you use startx or in your bspwmrc)
killall panel ~/bin/panel &
Edit: Another solution is to kill it when you leave. To do this you can add this to your sxhkdrc
super + alt + Escape pkill -x panel; bspc quit
This is from https://github.com/baskerville/bspwm/tree/master/examples/panel
Uhm, yes, wait a little, have to search for it. Had that problem a few weeks ago.
edit: There are multiple solutions to the problem, but setting the following environment variable should be the preferred one:
_JAVA_AWT_WM_NONREPARENTING=1
(Export with your shell and iirc restart X)
Resources:
Just realized I had a couple of mistakes. I'd removed the lines related to !button. Now that that's fixed and sxhkdrc has been reloaded, I can resize floats.
The other thing that is included by default in the sxhkdrc file is a semicolon. Be sure to take it out if you want mouse resizing:
I don't know anything about building on Debian, but a quick look turned up this on Baskerville's github issue tracker: https://github.com/baskerville/bspwm/issues/210 You could add your errors to the issue, hopefully he'll look into what they're doing wrong with the libs, find a fix or workaround.
my two cents:
bspwm never shrinks padding when struts get smaller. i think changing that to shrink padding would require tracking the docked windows to ensure that the shrinking doesn't obstruct some other potential window with struts on the same edge (or make assumptions about padding).
you can do it via wrapper script easy enough - depending on how you are reloading the polybar config.
eg. check {top,bottom} padding setting of each monitor before polybar starts and use those values to compare padding after the bar maps. when polybar finishes then the wrapper script should set the original padding (or difference between the two)
or grep the bar config for bottom = true
and use that to unset the padding in a similar way as above (which should work better if you are using polybar --reload
).
There are many ways to do it.
One solution could be this (maybe use two binding: one for clockwise and one for counter-clockwise rotation):
super + e bspc node '@parent' -R 90
On the git version of bspwm
, you can use node -y
that simply changes the split type instead of rotating the parent:
super + e bspc node '@parent.vertical' -y horizontal \ bspc node '@parent' -y vertical
Using this patch, you can use node -y next
to achieve the same:
super + e bspc node '@parent' -y next
An alternative solution to have the same behaviour as node -y next
on 0.9.10 could be:
super + e bspc node '@parent.vertical' -R 90 \ || bspc node '@parent' -R -90
You could use a script like bspside.
You could use preselections.
Etc...
I would recommend an installation guide because you lack the knowledge of how bspwm functions in it's barebone state.
You need to install sxhkd
sudo apt install sxhkd
you then need the config files.
make corresponding dirs in your ~/.config folder with
mkdir ~/.config/{bspwm,sxhkd}
when that's done it's time to copy the example configuration files to the above made folders. Now, I don't know where they are installed on your system, but you can find them in bspwm's github
It is trivial that the bspwmrc file is made executable which you do with
chmod +x ~/.config/bspwm/bspwmrc
And then you are off to the races, start configure your sxhkdrc and have fun with it!
> its already usable, without single issue ...nothing to wait for bud.
I've tried it as recently as a couple weeks ago and it's still not quite there.
> But i dont think river is wayland's bspwm
I shouldn't have included the word clone. It looks like they changed their README, but it specifically said it was inspired by dwm and bspwm.
> River is a dynamic wayland compositor that takes inspiration from dwm and bspwm.
If you don’t want to use Proton’s GUI app, you could just set up wireguard at startup with systemd (or its equivalent on your distro). Then use wg-quick
if you want to manually switch while logged in. This wiki page is helpful. It works perfectly for me using Mullvad on Arch (with bspwm, but that shouldn’t matter). Proton also supports the wireguard protocol so I’d expect it to work similarly.
It works but has the same issue, requires me to connect from protonvpn first, then enter this command. If I don't connect from protonvpn first it gives me this error:
$ nmcli con up "ProtonVPN NL-FREE#5" passwd-file ~/.vpnpassword
Error: unknown connection 'ProtonVPN NL-FREE#5'.
Thank you regardless :)
the rules don't work because they are not run.
>it didn't work. But when I put it before that block, it works.
your loop doesn't end and is not backgrounded. the example at the archwiki is backgrounded (but i doubt the suggestion of running from xinitrc would work out well).
a note - there has been now for some years: this, which is better way (my opinion) to achieve the same thing via an external rule script.
just an fyi since you already have a workaround
>Here's hoping there's an option or a method to refer to the window_role and auto float "Dialog" types.
this should already be done. check here, those functions will apply some default rules to a window. window role is not honored (but type is). but, you can always check these hints in an external rules script and then set floating.
>By setting it's state to tiled I everything is all good until
curious, does firefox nightly float by default?
Hey, thank you very much for all your help with this issue!
I answered my own stackexchange post, I hope everything is correct ;)
I also created a GitHub issue on bspwm's repo: https://github.com/baskerville/bspwm/issues/1271
> I'd like to run a notification after running alt + 0
it can be done - take a look at this example.
>I'd also like for it to exit the mode after selecting an option.
use ;
instead of :
?
>Smart Node Toggling
a keybind to toggle between fullscreen and the last state, like:
alt + f bspc node -t ~fullscreen
?
you might be interested in a PR u/torreemanuele6 submitted that can make toggling more useful: #1253
>an action will occur when clicking on the root window
not to ignore this part, but i don't have any tips here. only that sxhkd should be able to do that, and i feel like there may be a thread on this sub with details.
Ubuntu freezes the version of most software when released, just a small portion of the packages get updates after release (mostly security updates). You will need to build bspwm from source if you want a newer version.
The bspwm wiki in their github repo has instructions on how to build bspwm from source.
Oh, just button2
; I misunderstood you, sorry.
In that case, you can simply use xmmv
from wmutils/opt; with this in your sxhkd
configuration file:
~button2 bspc query -N -n pointed.floating > /dev/null \ && xmmv @button2 killall xmmv
You can also use this solution with this in your configuration file for sxhkd
:
~button2 bspdragtofloat @button2 bspdragtofloat stop
This also has a "drag to float" behaviour (which is surprisingly quite nice), but it's probably going to be annoying since it will get activated by simply pressing button2
in your case.
You can adapt the script to simply moving floating windows like so:
bspdragwindow
:
#!/bin/env bash
status_file="/tmp/bspdragwindow_dragging"
[ "$1" = stop ] && { [ -e "$status_file" ] \ && rm -r -- "$status_file" exit }
[ -e "$status_file" ] \ && exit
wid=$(bspc query -N -n pointed.floating) \ || exit
eval "$(xdotool getmouselocation --shell)" x=$X y=$Y touch -- "$status_file" while [ -e "$status_file" ]; do eval "$(xdotool getmouselocation --shell)" (( X != x || Y != y )) && { bspc node "$wid" -v "$((X - x))" "$((Y - y))" x=$X y=$Y sleep .01 } done
[ -e "$status_file" ] \ && rm -r -- "$status_file"
You might prefer using this script over xmmv
for these reasons:
bspwm
does by default.xmmv
will move the mouse pointer to the centre of the window when it is run which might result annoying; this script won't do it.There is currently an open issue that asks a very similar question to yours. One possible solution, as I mentioned in the issue, would be to use virtual monitors (which contain a group of related workspaces) and write a script that allows you switch them out easily using some keybindings.
If you pursue this method, definitely post about it because I’d be interested in that script.
Honestly I think it's probably best to wait til Wayland (and libraries for it) to mature. I posted an issue back in February, asking for about how the project feels toward moving to Wayland now and the answer I got was this.
> Let me preface this by saying that I would love to see a port/rewrite of bspwm for Wayland, and I would love it even more if it were written in Rust.
> That said, this isn't something that happens overnight. A full rewrite of bspwm is a sizable effort even before taking into account the switch to Wayland. From what I understand, Wayland support in Rust is still very much a work-in-progress.
> One of the other Rust-based Wayland WMs mentioned in the other thread, Way Cooler, was declared dead at the beginning of this year. Additionally, the Rust-based Wayland compositor Way Cooler was built on, wlroots-rs was also abandoned.
> Right now the best option appears to be Smithay, but I cannot speak to its maturity as a library. The author of Way Cooler did have this to say:
> > Smithay is very incomplete. Very, very incomplete compared to wlroots. It is no where near usable and the current trajectory doesn’t look like it will be usable very soon either. wlroots is a great framework and has a strong backing in the community so I don’t see the need to abandon it just so I can keep using Rust.
> I certainly can't speak for @baskerville; I don't know if they will agree with me entirely or not, but I think that biding our time and waiting for Wayland support to mature in Rust will only make things easier for if/when we decide to pursue this.
I believe I did follow your advice, please correct me if I've missed something.
Here's my real-world example:
undocked
bspc monitor eDP-1 1 2 3 4 5 6 7 8 9 10
Here's the script I'm running upon docking: ```
desktops_to_monitor() { monitor=$1 shift for desktop in "$@"; do bspc desktop "$desktop" --to-monitor "$monitor" done }
desktops_to_monitor DP-2-1 5 6 7 8 9 10
bspc monitor eDP-1 -d 1 2 3 4 bspc monitor DP-2-1 -d 5 6 7 8 9 10 ```
Hi, Thanks for the hint.
I did something similar to what msteen suggested in this issue.
I'm facing another problem now, where upon docking, an empty desktop is automatically created on that monitor so moving desktop 2 to it will actually add a second desktop.
Testing it with HDMI1 1 2 3 4 5
and HDMI2 6 7 8 9 10
, 6 will be go to 7 on the new monitor (because 6 is occupied by the automatically created desktop), 7 to 8 and so on. 10 will end up on HDMI1 because it overflows.
On the issue, msteen mentions something about using virtual monitors, but I'm not entirely sure how it's supposed to solve this particular problem...
This is caused by the recent updates to bspwm - changelog.
Appending !hidden.window
on that mapping should restore the previous behavior. The full command in sxhkdrc
should look like this bspc node -f {next,prev}.local.!hidden.window
.
Updated version which doesn't use xinput
and doesn't have any latency between when you release the mouse and when the window stops moving: https://github.com/baskerville/bspwm/issues/1128#issuecomment-671566198
I'm posting it here too in case you haven't seen it on GitHub u/kristoferus
I don't understand what behaviour you want since you explained it very poorly, so I can't help you.
You are not obliged to use the example hotkeys you found here though:
# focus or send to the given desktop super + {_,shift + }{1-9,0} bspc {desktop -f,node -d} '^{1-9,10}'
If you don't like that behaviour/hotkey, just change it... You don't have to work around that with some hacky scripts.
> v1
Oh, you mean bspwm 1.x.y
.
<code>bspwm</code> uses semantic versioning so it being 0.9.10
doesn't really mean that it is incomplete...
>should have guessed it, but as apparent, this dosnt respect the mouse focus on switching desktop, just randomly picking a non sticky window and focuses it :(
using any
would do that.... you could use last.
.
doing a subscribe script and just recording the last focused node for refocus would probably make more sense. but honestly a quick edit to the source is easier and i think will work out better in general.
remove the sticky focus conditional in focus_node
@ tree.c - here.
This is my lemonbar script.
I've tried this:
bspc subscribe report |
while read line; do
pkill -14 hjcbar.sh
done
It seems unacceptably slow. I wonder why the example lemonbar script in bspwm github can be so efficient. Do you think it is possible for me to update the bar in the way that example lemonbar script did?
I assume you're already aware that bspc
outputs new lines whenever the window manager state changes. What you can do with those output lines is read them whenever they're outputted. Then, run your commands during that.
bspc subscribe | while read -r line; do echo "Output updated!" echo "New output is: $line" # do more stuff here done
I think what you're doing in your example above is similar to how piping is performed in the example lemonbar script.
That might work (though just remember to use actual named pipes, not regular files), but it's not too useful when all your piping the data from is just one program.
Named pipes are made to take input from multiple programs, from what I can tell. Then, output to one, that's why the example lemonbar script uses them. Here, where you're only receiving input from one program, I think it's overkill.
/usr/share/examples/bspwm/sxhkdrc
doesn't exist for me. (usr/share/examples
doesn't even exist) I did use the example from the github though.
https://github.com/baskerville/bspwm/blob/master/examples/sxhkdrc
I just learned that xqp
can compare IDs by itself.
This is equivalent to what we figured out. ```
xqp 0 $(xdo id -N Bspwm -n root) && rofi -monitor -3 -show drun ```
FUNFACT: xqp
was created to solve that focus_follow_pointer
issue: baskerville's comment on a github issue about this.
~~the option only takes true/false and then uses <code>automatic_scheme</code>s value to decide how to go about it - and~~ (not so relevant after rereading your comment) yea, automatic_scheme only has those three options. so you just want to turn if off.
i stumbled upon this issue this morning. instead of clogging up your report - and since its related to this post i'm just gonna reply here:
the window preview in rofi works fine with bspwm - it takes a 'screenshot' of the window and displays it, unlike a compositing solution that will do live previews. it will have the same issue that skippy-xd has though - it will not preview unmapped windows. so you are only going to get icons for windows on different workspaces.
i have to wonder though - how effective expose or rofi with thumbnails will be in fixing your issue. from what i've read from your examples you have many windows open. with expose those thumbnails will be very small - telling one instance of vim from another will be difficult i think. similarly rofi can have big thumbnails - but then you need to scroll around.
Not using Spotify myself but did you try this?
> focus_follows_pointer. However a click will make the node take precedence.
ah, yea i'm sure you could patch in raise on focus with focus_follows_pointer if you wanted (it was the behavior years ago). it might be as simple as removing this auto_raise toggle. but it is probably less annoying with the enforced click.
>It is interesting that there are only 3 layers available; at first I thought this would be limiting but I'm not sure that it is.
its 3 levels, but you still get the stacking order tiled,floating,fullscreen in each one - so it is a little more flexible then just 3.
sure, you can write whatever you want to lemonbar
check the panel example @ bspwm's git which does this.
panel_bar
's W*) case (default status_prefix) shows the standard way of parsing bspwm's status output.
Thanks for your continuing support. Much appreciated!!
>you are loading the correct json? (it wouldn't be the same as the one to create the rules)
Hmm... I use the same as it is stated:
>Both scripts takes a JSON state (output of bspc wm -d) as input or argument.
I create rules / state this way:
#! /bin/sh
# reset everything first
rm ~/.config/bspwm/states/*
# dump state
bspc wm -d > ~/.config/bspwm/states/state_dump.json
# create receptacles from state
~/.config/bspwm/scripts/extract_canvas ~/.config/bspwm/states/state_dump.json > ~/.config/bspwm/states/state.json
# create rule set from state
~/.config/bspwm/scripts/induce_rules ~/.config/bspwm/states/state_dump.json > ~/.config/bspwm/states/rules
# clean up
rm ~/.config/bspwm/states/state_dump.json
Which would be the json I need to use with extract_canvas
which is not 'the same as the one to create the rules'?
i don't know
to e->state == XCB_NONE) {
works - but i don't know the side effects. haven't got time today to mess around either,
looks to me like click_to_focus interferes with that setup.
try setting it (click_to_focus
) to false and see if it works
seems like it's worth the bug report if it does
Yeah, well, while I tend to agree too, because bspwm is perfect for me, there is this outstanding bug I encounter everyday.
I tried checking the source, testing some code changes, but I have not a lot of X knowledge, and can't find anything.
I can imagine each of the 172 issues are a problem for a user or another.
What do you call stalled? I wouldn't call 4 months stall and they raise the version with a few fixes to version 0.9.9. I wouldn't call that stalled. Aug 13, 2019.
more or less a rectangle=
rule will do this.
one downside is you need to supply coordinates as well as size.
if you don't have different monitor resolutions it is no problem to just do the math and give the rule the centered coors. if you do, or want to place floating windows other then fixed or centered you'd have to to a subscribe script i think
Setting rectangle
with a rule just sets the floating_rectangle
property of the node (even if it's not floating): (from src/window.c lines 145-147)
if (csq->rect != NULL) { c->floating_rectangle = *csq->rect; free(csq->rect);
What do you mean? What are you asking?
That error message is printed by the check_connection function (defined at line 439 of the bspwm.c file).
That's all I can tell you, I guess.
I don't think that this subreddit is not active, I replied to you within a day...
>With i3 if I wanted to do something basic it was in the docs. For example the first thing I needed was a scratchpad replacement.
That may be something basic in i3wm, but bspwm doesn't have that feature, so it's not that basic.
Some basic things in bspwm, are not basic in i3wm e.g. receptacles and gaps( :^) ), as it doesn't have those features.
Also BSPWM does have some examples :D.
This is what I have in my sxhkdrc
:
```
super + d if [ -z "$(bspc query -N -n focused.floating)" ]; then \ bspc node focused -t floating; \ else \ bspc node focused -t tiled; \ fi ``` Credit: https://github.com/baskerville/bspwm/issues/329#issuecomment-188934226
as u/sbp_reborn_again said an external rule will do the trick.
i do this, and i have a couple tips.
the biggest caveat is: dialog windows (_NET_WM_WINDOW_TYPE = _NET_WM_WINDOW_TYPE_DIALOG). you need to run xprop on every spawned window because state=floating will not be set in external rules for dialog windows and you will want to set "center=false" to override the bspwm's default setting*.
wid=$1 class=$2 instance=$3 eval $4 if xprop -id "$wid" _NET_WM_WINDOW_TYPE | grep -q _DIALOG; then state=floating rule="${rule}center=false " fi case $state in floating) if [ -z "$desktop" ] || [ "$desktop" = "$(bspc query -D -d --names)" ] && [ -z "$rectangle" ]; then rule="${rule}$(centerfloat) "
that is the relevant portion of my external rule script.
the conditional is so that this only applies floating windows spawned on the current desktop and doesn't override a previous placement rule.
centerfloat returns the centered coors for the new window either on the focused window of the same class, a windows of the same class, or the focused window - in that order. output is bspwm's format of "rectangle=WxH+X+Y".
another tip: i ended up using wattr
from wmutils for floating and tiled window geometry. it was awhile ago, so i don't remember exactly why, but i think it was because border size is wonky in bspwm's json tree in some cases. for parent and fullscreen centering i used jq
and the tree (bspc query -T ...
).
sorry for the mess of text, hopefully it's somewhat helpful.
Ah, you're right. I mixed up the -g
with -d
According to source code, it seems the format of bspc wm -g
is as follows:
{0}{m,M}{2}:{f,F,o,O}{4}:...:L{5}:T{6}:G{7}{:...}\n
where
{0}
is the status_prefix
was defined by bspc config status_prefix
,
{m,M}
denotes a Monitor with m
, and a focused monitor with M
,
{2}
denotes the monitor name,
{f,F,o,O}
denotes an empty desktop with f
, a non-empty desktop with o
, and the capital F
and O
respectively for a focused desktop,
{4}
denotes the number of nodes in the desktop from zero based with null (no character) meaning one window (or empty),
...
denotes a continuation of the previous series (in this order, desktop\
`node,
{5}denotes desktop layout in the form
L{}where
{}could be
T,Mfor Tiled or Monocle, respectively,
{6}denotes desktop state in the form
T{}where
{}could be
T,F,Pfor Tiled, Floating, or Fullscreen respectively,
{7}denotes the current node state
S,P,L,Mfor Sticky, Private, Locked, and Marked respectively,
{:...}` denotes additional monitors in the same layout as above.
Which version of bspwm are you running currently? Have you seen this? I believe the behavior you're after is a new setting that was comitted in August. I don't think it's made it's way into a new release yet but I'm looking forward to this update. The fibonacci behavior actually appeals to my sensibilities but it'd be nice to experiment with something different.
customizing keybindings is probably necessary if you want to change around monitors and workspaces (or at least reordering monitors).
assuming these are the defaults you have, they provide for switching to desktops in position 1-10; ignoring any notion or monitors, or desktop names.
lets say your monitors are ordered HDMI-1, VGA-1, eDP-1 and issued the first set of commands you had tried.
super + 3 would focus desktop 9 (on VGA-1).
if they where e,V,H, then super + 2 would focus desktop 3 (on e)
if this is any help to you then i'm being shorter then is useful, so here is a hint.
the ^ in the keybindings is what makes the bindings positional. for what you are trying to accomplish removing that carot will give you the results you want. pressing super + 2 would focus desktop 2 on HDMI-1 (this is because you are naming the desktops "1"-"10" and the bindings now refer to desktop names, not positions)
I would definitely look at man bspc
. AFAICT the author cares a lot about it. To get a small idea of the possibilities you could look at the examples.
No, not without sxhkd or some other keybinding utility. Bspwm doesn't have it's own keybindings to manipulate it, it depends on an external program to pass commands to it. The default is sxhkd. It mentions that on the Github page. I would have thought it should be pulled as a dependency, but perhaps not.
Once installed, you need to copy the default sxhdkrc
to ~/.config/sxhkd/sxhkdrc
, that's where sxhkd looks for it.
>like you said this is manjaro bspwm. that config is spaghetti (imo), certainly not the default config.
So, one thing to try would be to take a vanilla bspwm config, and try using that (and modify it little by little) to see if it behaves as desired, or still in an unexpected way.
https://github.com/baskerville/bspwm/tree/master/examples
edit: It looks like that config (from manjaro) may be designed around some other bar, like lemonbar or yabar? I only mention that because it looks similar to the config above in examples/panel, which is for lemonbar.
Edit: I think I got it.
Remove the line
bspc config top_padding $(($PANEL_HEIGHT-$gap))
entirely. It override's polybar's size hint.
I just ran that command at a shell prompt, and it immediately started ignoring polybar's size and drew my windows over the bar.
i don't think bspwm will actually try any other file then that [without <code>-c</code>].
and i think bspwmrc is being run as normal at startup --- the border colors before and after the bspwmrc sourcing in the video are the same nonstandard colors. op might drop a echo "tp=$(($PANEL_HEIGHT-$gap))" > /tmp/bspwm.test
in the bspwmrc to confirm that, and the top_padding initial value.
in the video the top_padding is 10 and then 25 after sourcing. my first guess is simply that something else is setting top_pad to 10 after bspwmrc.
Thanks! I realized I had a bit of an intermediate problem. Spotify apparently sets its WM_CLASS too late, so bspwm doesn't pick it up. Will have to try out the workaround mentioned here: https://github.com/baskerville/bspwm/issues/291
kind of funny, but looks like --names was one commit after 0.9.2 release (thats in arch's repos).
even if you dont want to run git head you could build that version if you want the feature.
you should look for external rules script to apply rules based on window title. look here : https://github.com/baskerville/bspwm/tree/master/examples/external_rules and for ELI5 of external rules look also here : https://github.com/baskerville/bspwm/issues/263
does google-chrome --help-gtk
show relevant options?
googling around - i guess google-chrome doesnt have these options - sorry.
maybe use external rules? so you can match "*- Google Play Musik" vs title. this is already pretty close to what would work i think.
I'm having the same problem. There's this issue on github but that's not a solution for me (I use Alt+Tab a lot in monocle and with manage=on
it focuses the dock, whenever the value of focus=
in the rule)
If you keep track of the node id in some way you can use to unhide it, but it'd probably require a script of some sort that reads the output of bspc subscribe node_flag
, depending on what you're looking to do.
Maybe try ask a question in the GitHub page.
Use bspc subscribe monitor
for a monitor-related event stream that you can hook into for restarting your panel. See https://github.com/baskerville/bspwm/issues/511 for more information and example code.
You can reload bspwm by setting things up like in the loop example. It's never worked all that well for me though. Very few bspc commands require restarting bspwm though, so you may not need to do this depending on what you want.
Things have changed recently. (window states) I don't use a panel, but xdo can handle it for you, check this out. I dunno if theres a newer bspwm internal fix though...
This seems to be a fairly common bug. I also have this problem with some programs when I click on them in certain places/move them in a certain way. Sorry I can't offer much in terms of advice as to how to fix the problem. This is the only relevent issue I can find on github, but that is probably you who posted it. I will say for me the git version has helped with this problem, though has not entirely fixed it.
also for what its worth- you can use external rules to split by height width ratio of the window, or just split the largest window. here is an example from the git
I just learned something I hadn't known.
bspc window window_sel -f
-baskerville's issue. This will work for empty workspaces- wid, last or whatever.
The example in sxhkrc still uses the regular format.
bspc window -f window_sel
I'm pretty interested in a good solution for this kind of stuff. I saw this issue at the git which is pretty relevant.
Baskerville has a link at the bottom, which looks like it will make this stuff simple.
What exactly is the desired behaviour for you when running restore? Query/Restore does only save the internal state of bspwm, so it won't e.g. reopen closed windows.
Take a look at the loop example. It shows how to use query/restore to restart bspwm inplace.
I'm pretty sure you can find the name of the program bspwm uses by having the program open and in a terminal using bspc query -T
, which shows the tree.
In regards to your XFCE bar issue, I'm not certain what the problem exactly is, but for my bar (bar_aint_recursive) I have bspc config top_padding 16
, which makes all windows, including monocle (Windows calls it "maximized") windows, respect a 16 pixel space at the top where my bar lives.
You can get good info from https://github.com/baskerville/bspwm and also the man page for bspwm or bspc (If you don't know just use man bspc
)
according to the tint2 docs there is an option for taskbar_mode called multi_desktop.
otherwise other bars have this functionality, or you can roll you own for dmenu or dzen or whatever.
personally i like a rofi/dmenu solution and avoid bars (they are usually mouse dependent anyway)
Until a better suggestion is given, if you've got time to invest and want to learn Xlib, you could look at the source for the DWM swallow patch. If I see anything better, I'll update.
Once rofi is open, it will grab exclusive access to the keyboard, sxhkd nor any other program will be able to react to the keys, so you can bind keys to exit out of rofi using only rofi's configuration options. This is something I see the other comments are failing to notice.
According to this issue, and this comment in particular, you need to bind it to -kb-cancel
, but binding Super
won't work, since it is a modifier, you need to use either Super_L
or Super_R
for the key itself.
Here's an example of a simple menu in rofi. On the top you just write list of buttons and in the case select you put commands to what each button is supposed to do.
If you want to make it look like a context menu, you need to create a custom .rasi config file for rofi and launch rofi with the '-config /path/to/config/file' argument.
Check out the wiki for more infor on all of that. There's also several user scripts that might interest you.
#!/bin/bash
MENU=() MENU+=("0%") MENU+=("25%") MENU+=("75%") MENU+=("100%") MENU+=("Windows") MENU+=("Linux") RESULT=$(printf '%s\n' "${MENU[@]}" | rofi -dmenu -p "Monitor control")
case "$RESULT" in "0%") ddcutil setvcp 10 0 ddcutil setvcp 10 0 -d 2 ;; "25%") ddcutil setvcp 10 25 ddcutil setvcp 10 25 -d 2 ;; "75%") ddcutil setvcp 10 75 ddcutil setvcp 10 75 -d 2 ;; "100%") ddcutil setvcp 10 100 ddcutil setvcp 10 100 -d 2 ;; "Windows") ddcutil setvcp 60 17 -d 2 ;; "Linux") ddcutil setvcp 60 3 -d 2 ;; esac
To quote the github
"A window switcher, Application launcher and dmenu replacement"
Depending on your distro, you can install via your package manager.
Here are the installation instructions - distro based it located at the bottom. Install Rofi
I downloaded the BSPWM ISO from Manjaro. I'm testing it live from a flash drive. I've verified that Pamac CLI is on the image. So I'm assuming I can run whatever package manager I want. Is there a certain version of Pamac that will work better BSPWM, such as GTK, GT, or Common?
I think by default mpv listens to the Play/pause button while the window has focus.
For unfocused mpv window you need to communicate through mpvs JSON-IPC.
Start mpv by given it a socket ,
mpv --input-ipc-server=/tmp/mpvsocket
​
And then you can setup a script to commmunicate play/pause using that socket.
#!/bin/bash
mpv_socket="/tmp/mpvsocket"
pause_status=$(echo '{ "command": ["get_property", "pause"]}' | socat - "$mpv_socket" | cut -c 9-13) [ "$pause_status" == 'false' ] && echo '{"command": ["set_property", "pause", true]}' | socat - "$mpv_socket" || echo '{"command": ["set_property", "pause", false]}' | socat - "$mpv_socket"
​
Call the script from sxhkd.
# MPV - play/pause XF86AudioPlay mpv_toggle_pause
>Edit: It seems like Lollypop doesn't display Media Change Notifications if its window is focused. Could this be an issue ?
yea. breaks here.
idk why gdk's .get_state() is always focused, but it looks like it is.
fullscreen check also looks broken here - but that is kind of the opposite problem
Wtf, you are not installing things into your wm/de, but your operating system. You probably want to open terminal, but for that you need to have set it up in sxhkd (keyboard shortcut daemon) to open it.
You can also bind app launcher such as rofi or dmenu in sxhkd.
Now. 1. Install tar ball from JetBrains site 2. Put this file in empty folder. I prefer to make "intellij-idea" folder in /home directory 3..Open terminal and type "tar -xzf NameOfTarFile.tar.gz". It should put files from tar into folder that we made before, like WinRar. Then run "idea.sh" in terminal. It should install what you want.
Then just open this software with app launcher that I mentioned before. Have fun.
Ps. RTFM.