Commit Graph

11 Commits

Author SHA1 Message Date
haptix@web.de e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
Michael Stapelberg bfc2cbc69a t/201-config-parser: add test for quotes in comments 2013-04-02 22:27:04 +02:00
Michael Stapelberg 7ecdcb61f8 config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary,
but of course it should be possible.

fixes #967
2013-02-24 17:23:37 +01:00
Michael Stapelberg 2922603cc4 tests: correctly close stdout with IPC::Run
while IPC::Run supports <&-, it does not support >&- apparently.
2013-02-19 00:26:00 +01:00
Sascha Kruse 0a0d66dc8a put common part of error messages into variable
This makes future changes easier when new tokens are added to the
parser.
2013-02-01 11:50:52 +01:00
Michael Stapelberg 8bc771ac16 Bugfix: parse outputs as "word", not "string", to ignore trailing whitespace (Thanks leifarne)
fixes #921
2013-01-25 13:55:26 +01:00
Michael Stapelberg 6dfb08170c fix bind[code|sym] --release (Thanks paolo)
fixes #890
2012-12-14 21:41:56 +01:00
Michael Stapelberg 3cb909fa62 config parser: recover after invalid input
This is done by ignoring the rest of the current line and jumping to the
nearest <error> token.

fixes #879
2012-11-20 17:10:29 +01:00
Michael Stapelberg a06bf27c24 tests: fix error messages, add 'bind' as synonym to mode blocks 2012-10-09 14:11:35 +02:00
Michael Stapelberg 587b92b7a3 t/201-config-parser: test more directives, test error handling 2012-10-08 13:24:47 +02:00
Michael Stapelberg 00fca2dabd add first bits of a (custom) config parser 2012-10-08 13:17:46 +02:00