Bspwm: Loading State from JSON doesn't 'refresh' node sizes

Created on 3 Jan 2019  路  3Comments  路  Source: baskerville/bspwm

Dumping a state, changing some node sizes, then loading the state.json file causes nodes to not be the right size on their desktop.
e.g. the following produces the bug - it dumps, forces all nodes to one workspace, the loads again

bspc wm --dump-state > state.json
bspc monitor --reset-desktops "Some Workspace"
bspc wm --load-state state.json

I have a script that provides a sort-of mission control functionality link which is where I encountered the issue. I have a loop at the end that is 'refreshing' each desktop as a workaround. This is done by switching the layout then switching it back for every desktop.

Most helpful comment

Up until now, the --{dump,load}-state commands were used for:

  • Reloading a state that matches the size and position of existing windows (cf. examples/loop).
  • Setting up an initial parametric layout (cf. examples/receptacles).

But I think it might be a good idea to make --load-state behave the way you think it should.

This excerpt from your script:

while $(bspc node --focus @parent)
do
    :
done
bspc node --balance

can be written as bspc node @/ --focus --balance. (You can balance the root without focusing it: bspc node @/ --balance.)

All 3 comments

Up until now, the --{dump,load}-state commands were used for:

  • Reloading a state that matches the size and position of existing windows (cf. examples/loop).
  • Setting up an initial parametric layout (cf. examples/receptacles).

But I think it might be a good idea to make --load-state behave the way you think it should.

This excerpt from your script:

while $(bspc node --focus @parent)
do
    :
done
bspc node --balance

can be written as bspc node @/ --focus --balance. (You can balance the root without focusing it: bspc node @/ --balance.)

This excerpt from your script: ...

Thanks, I knew there must be a better way to do that.

Up until now, the --{dump,load}-state commands were used for:

* Reloading a state that matches the size and position of existing windows (cf. `examples/loop`).

* Setting up an initial parametric layout (cf. `examples/receptacles`).

But I think it might be a good idea to make --load-state behave the way you think it should.

This excerpt from your script:

while $(bspc node --focus @parent)
do
    :
done
bspc node --balance

can be written as bspc node @/ --focus --balance. (You can balance the root without focusing it: bspc node @/ --balance.)

Hey @baskerville, I'm trying to puzzle out how to get this to work after having tried on three different occassions I still can't manage to figure it out! When I induce the rules and run bspc node @/ --focus --balance I see no changes and applications that are weirdly rendered.
Is there any chance that you've looked into updating the functionality of --load-state yet?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fluffywaffles picture fluffywaffles  路  5Comments

btlvr picture btlvr  路  5Comments

JKomoroski picture JKomoroski  路  5Comments

rien333 picture rien333  路  5Comments

alecive picture alecive  路  7Comments