Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bar mode/hidden_state events #2751

Merged
merged 14 commits into from
Oct 14, 2018
Merged

Bar mode/hidden_state events #2751

merged 14 commits into from
Oct 14, 2018

Commits on Oct 14, 2018

  1. commands: fix sending bar mode/hidden_state updates to all bars

    Previously, if a change was sent to all bars, it would only actually
    change the first bar it encountered, due to return value handling
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    1f90f92 View commit details
    Browse the repository at this point in the history
  2. swaybar: save id upon startup

    This adds an id property to the bar, which will be used to filter
    barconfig_update events
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    d0b54e9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    18eaf45 View commit details
    Browse the repository at this point in the history
  4. swaybar: only subscribe to required events

    This adds barconfig_update to the list of subscribed events, as well as
    checking when the other events need to be subscribed to.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    a67fa8a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    19f0bf3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a388ffa View commit details
    Browse the repository at this point in the history
  7. swaybar: move mode & mode_pango_markup to bar struct

    This distinguishes the binding mode from the distinct config mode, as
    well as removing mode_pango_markup from the config struct where it
    should not be present.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    fed11d1 View commit details
    Browse the repository at this point in the history
  8. swaybar: streamline ipc handling

    The received json is handled outside of the case statement, which will
    allow better extensibility.
    This commit also introduces the variable bar_is_dirty, the return value
    signifying whether the bar requires rendering.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    55ca16f View commit details
    Browse the repository at this point in the history
  9. swaybar: handle mode/hidden_state changes

    As well as adding the hidden_state property to the bar config struct,
    this commit handles barconfig_update events when the mode or
    hidden_state changes, and uses a new function determine_bar_visibility
    to hide or show the bar as required, using, respectively,
    destroy_layer_surface, which is also newly added, and add_layer_surface,
    which has been changed to allow dynamically adding the surface.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    bcc61e5 View commit details
    Browse the repository at this point in the history
  10. swaybar: show hidden bar on key event

    Since wayland does not currently allow swaybar to create global
    keybinds, this is handled within sway and sent to the bar using a custom
    event, so as not to pollute existing events, called bar_state_update.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    2f1fd80 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f6f72cb View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a29ee77 View commit details
    Browse the repository at this point in the history
  13. swaybar: when hiding bar, save old height to be restored upon reshow

    Previously, when the bar was hidden, the height would be set to 0.
    This meant that if the bar was empty upon reshow, it would not render
    since the height was still 0, which made it seem there was a problem.
    Now, the height is not reset, but the width is, to indicate upon reshow
    that the layer surface needed reconfiguring.
    ianyfan committed Oct 14, 2018
    Configuration menu
    Copy the full SHA
    4dba7c0 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    85dd36e View commit details
    Browse the repository at this point in the history