aboutsummaryrefslogtreecommitdiff
path: root/swaybar/bar.c
AgeCommit message (Collapse)Author
2021-07-26swaybar: log Wayland display errorsSimon Ser
2021-07-26swaybar: exit cleanly when disconnected from IPCSimon Ser
2021-02-04Make Wayland request listeners static const when possibleManuel Stoeckl
2020-06-12swaybar: ensure correct init order for status_lineLuke Drummond
`$WAYLAND_SOCKET` is unset by `wl_display_connect` after it has successfully connected to the wayland socket. However, subprocesses spawned by swaybar (status-command) don't have access to waybar's fds as $WAYLAND_SOCKET is O_CLOEXEC. This means any status command which itself tries to connect to wayland will fail if this environment variable is set. Reorder display and status-command initialization so that this variable is not set and add an assert so we can enforce this invariant in future.
2020-04-28swaybar: Fix scrolling with precise trackpadsMartin Dørum
2019-09-04swaybar: complete barconfig_update event handlingBrian Ashworth
This adds complete support for the barconfig_update ipc event. This also changes the bar command and subcommand handlers to correctly emit the event. This makes it so all bar subcommands other than id and swaybar_command are dynamically changeable at runtime. sway-bar.5 has been updated accordingly
2019-04-24swaybar: add multiseat supportBrian Ashworth
This just adds multiseat support to swaybar
2019-04-24swaybar: hide mode visibility improvementsBrian Ashworth
This allows swaybar to become visible when the mode changes (to any mode other than the default). swaybar will be hidden again when the modifier is pressed and released or when switching back to the default mode. This also applies the same logic to visible by urgency to hide swaybar when the modifier is pressed and released. These changes are to match i3's behavior.
2019-02-24swaybar: add overlay mode (fix #1620)Milkey Mouse
Overlay mode puts the bar above normal windows and passes through/ignores any touch/mouse/keyboard events that would be sent to it.
2019-02-15swaybar: prevent signal handler from firing during terminationIan Fan
This prevents a heap-use-after-free crash when sway terminates.
2019-01-21Replace wlr_log with sway_logM Stoeckl
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-13swaybar: allow identifiers for output and trayBrian Ashworth
This allows `bar output` and `bar tray_output` to specify an output identifier. Output names should still work as well. This parses the output identifier from the xdg_output description, which wlroots currently sets to `make model serial (name)`. Since this could change in the future, all identifier comparisons are guarded by NULL-checks in case the description cannot be parsed to an identifier.
2018-12-31swaybar: do not create tray if hiddenIan Fan
2018-12-31swaybar: set bar dirty on SNI eventIan Fan
2018-12-31swaybar: implement mouse events for trayIan Fan
2018-12-31swaybar: implement tray configIan Fan
2018-12-31swaybar: add tray interfaceIan Fan
2018-12-15swaybar: fix cursor scaleBrian Ashworth
This fixes a few issues with swaybar's cursor scaling: 1. The cursor scale is now changed when the output scale changes 2. The cursor scale is no longer bound by the max output scale when swaybar is launched 3. Related to the previous item, the cursor is no longer tiny on low scale outputs after the max output scale has changed This also bumps up `wl_compositor` to version 4 to allow usage of `wl_surface_damage_buffer`.
2018-11-25Replace _XOPEN_SOURCE with _POSIX_C_SOURCEemersion
And make sure we don't define both in the same source file.
2018-11-17Implement strip_workspace_name.Connor E
2018-10-24Merge pull request #2925 from ianyfan/swaylockDrew DeVault
swaylock: exit early if unable to get input inhibitor
2018-10-23swaybar: absorb bar_init function into bar_setupIan Fan
2018-10-23swaybar: exit on display errorIan Fan
2018-10-23Fix swaybar crash when there's no status_commandRyan Dwyer
2018-10-21swaybar: fix hotplugemersion
2018-10-20swaybar: render with minimum height, nominally text heightIan Fan
2018-10-20Put swaybar in overlay layer when using mode hideRyan Dwyer
This allows the bar to render over fullscreen views.
2018-10-18swaybar: separate input code to new fileIan Fan
2018-10-15Sway clients: Exit gracefully when compositor is unavailableRyan Dwyer
2018-10-15Remove timerfd from loop implementationRyan Dwyer
timerfd doesn't work on the BSDs, so this replaces it with a timespec for the expiry and uses a poll timeout to check the timers when needed.
2018-10-15Move swaybar's event loop to common directory and refactorRyan Dwyer
* The loop functions are now prefixed with `loop_`. * It is now easy to add timers to the loop. * Timers are implemented using pollfd and timerfd, rather than manually checking them when any other event happens to arrive.
2018-10-14swaybar: when hiding bar, save old height to be restored upon reshowIan Fan
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.
2018-10-14swaybar: send signal to status when hiding or showing barIan Fan
2018-10-14swaybar: handle mode/hidden_state changesIan Fan
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.
2018-10-14swaybar: move mode & mode_pango_markup to bar structIan Fan
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.
2018-10-14swaybar: only send initial workspace request if workspace buttons are enabledIan Fan
2018-10-14swaybar: add free_hotspots helper functionIan Fan
2018-10-14swaybar: save id upon startupIan Fan
This adds an id property to the bar, which will be used to filter barconfig_update events
2018-10-09bar-bindsym: address ianyfan's commentsBrian Ashworth
2018-10-09Implement bar bindsymBrian Ashworth
2018-10-08swaybar: allow null status_commandRyan Dwyer
Sway sets a default status_command which runs date every second. This patch removes this behaviour so the user can have a NULL status bar if desired. I had to swap swaybar's event_loop_poll and wl_display_flush so that it would map the initial surface.
2018-10-06swaybar: fix binding to wl_pointer multiple timesemersion
2018-09-30swaybar: synchronize rendering to output framesIan Fan
2018-09-28swaybar: move i3bar definitions into separate fileIan Fan
2018-09-28swaybar: fail if bar id is invalidIan Fan
2018-09-22swaybar, swaylock, & tree/container: Set cairo font options to render text ↵Geoff Greer
and lines with subpixel hinting (if available).
2018-09-20swaybar: don't wl_display_roundtrip on each frameemersion
This was the source of numerous bugs, from hotplug events not being received to segfaults because wl_display_roundtrip was making the bar process unplug events while blocking in an iteration over all outputs.
2018-09-20swaybar: handle hotpluggingemersion
Don't kill and respawn swaybars on hotplug.
2018-09-17swaybar: use output names instead of output indexesemersion
2018-07-19swaybar: Fix scroll handling on workspace buttonsminus
As well as ignoring scroll events on status elements when click_events is enabled. Previously, using the scroll wheel on a workspace button would switch to that workspace instead of scrolling through them. Clicks and scrolling on status elements would always be processed by swaybar, too. So in case you were using scrolling as volume control on a status item, swaybar would additionally scroll through your workspaces.