aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar/status_line.c
Commit message (Collapse)AuthorAge
* swaybar: allow status line cleanup to proceed when hiddenLibravatar Charmander2020-07-22
| | | | | | | | | | `determine_bar_visibility` stops and starts the status command process according to the bar’s visibility. If the bar was hidden during teardown, teardown would stall while waiting for the stopped status command process to exit. This resumes a stopped status command during teardown and allows, for example, sway to reload or quit without leaving a swaybar instance behind each time. Fixes #5536. CONT before TERM as requested in review.
* swaybar: ensure correct init order for status_lineLibravatar Luke Drummond2020-06-12
| | | | | | | | | | | | | `$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.
* swaybar: fix i3bar relative coordinates when scaling is usedLibravatar Hristo Venev2020-02-10
| | | | | | | | | | | | 24e8ba048aef4751c6fa1d5982ee634f921e6cf6 did not take scaling into account. The hotspot size used pixel coordinates, the absolute coordinates were logical, and the relative coordinates were completely wrong. This commit makes all coordinates use logical values. If `"float_event_coords":true` is sent in the handshake message, coordinates are sent as floating-point values. The "scale" field is an integer containing the scale value.
* swaybar: complete barconfig_update event handlingLibravatar Brian Ashworth2019-09-04
| | | | | | | | 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
* Revert "More frees."Libravatar Connor E2019-02-01
| | | | This reverts commit eda1bf769f239a9e8d5a9907255a330e3113a649.
* Make json-c include respect pkg-config --cflagsLibravatar Jan Beich2019-01-23
| | | | | json-c.pc contains `Cflags: -I${includedir}/json-c`, so `<json-c/json.h>` won't be found unless the parent directory is searched by default.
* Replace wlr_log with sway_logLibravatar M Stoeckl2019-01-21
| | | | | | | | | | | | | 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.
* Remove readline.cLibravatar Ian Fan2019-01-01
| | | | | All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
* swaybar: fix double freeLibravatar Mack Straight2018-12-31
| | | | | | | | | | | status->text should not be freed here. There are two scenarios: * status->text has been set to an error by status_error. In this case the value shouldn't be freed because it's always a reference to a constant. * status->text has been set to status->buffer because the bar is in text protocol mode. In this case it's a double free because the buffer is already freed after.
* More frees.Libravatar Connor E2018-11-13
|
* Remove timerfd from loop implementationLibravatar Ryan Dwyer2018-10-15
| | | | | 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.
* Move swaybar's event loop to common directory and refactorLibravatar Ryan Dwyer2018-10-15
| | | | | | | * 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.
* swaybar: send signal to status when hiding or showing barLibravatar Ian Fan2018-10-14
|
* swaybar: move i3bar definitions into separate fileLibravatar Ian Fan2018-09-28
|
* Replace getdelim to make swaybar work on FreeBSDLibravatar sghctoma2018-09-26
| | | | | | | | | This commit fixes a segfault in swaybar on FreeBSD that was caused by using getdelim with EOF as delimiter on an infinite stream. The FreeBSD implementation handles the "no more data, delimiter not found, and EOF not reached" scenario as an error, so it can't be used to read the output of status command. This commit replaces the getline/getdelim calls with reading all available data from the stream in one go.
* swaybar: explicitly check return value of getdelimLibravatar Ian Fan2018-09-22
| | | | | | This prevents an signed-to-unsigned conversion error on buffer_index if getdelim fails and returns -1, which caused swaybar to try to search the header for the array and immediately failing
* swaybar: only free tokener when using i3bar protocolLibravatar Ian Fan2018-09-18
|
* swaybar: rewrite i3bar protocol handlingLibravatar Ian Fan2018-09-18
| | | | | | | | This now correctly handles an incoming json infinite array by shifting most of the heavy listing to the json-c parser, as well as sending multiple statuses at once. It also removes the struct i3bar_protocol_state and moves its members into the status_line struct, allowing the same buffer to be used for both protocols.
* swaybar: rewrite protocol determinationLibravatar Ian Fan2018-09-18
| | | | | | | | This now uses the getline function to receive the header, replacing read_line_buffer, which has been deleted since it is otherwise unused. Furthermore, once the protocol has been determined, the current status is handled immediately to be shown (though this has not been added for the i3bar protocol since it has not yet been rewritten to handle this).
* swaybar: rewrite text protocol handlingLibravatar Ian Fan2018-09-18
| | | | | | This now uses getline to correctly handle multiple or long statuses. It also removes the struct text_protocol_state and moves its members into the status_line struct.
* swaybar: invalidate file descriptors upon closingLibravatar Ian Fan2018-09-18
|
* swaybar: remove block links upon exitLibravatar Ian Fan2018-09-18
|
* i3bar: count references to blocksLibravatar Ian Fan2018-09-12
| | | | | | | | | This prevents blocks from being destroyed before their hotspots are destroyed, in case it is used for a pending click event that fires between the bar receiving a new status, which destroys the block, and the bar rendering the new status, which destroys the hotspot; this problem can be easily produced by scrolling on a block that immediately causes a new status to be sent, with multiple outputs
* Update for swaywm/wlroots#1126Libravatar emersion2018-07-09
|
* Fix a bunch of swaybar memory leaksLibravatar emersion2018-04-24
|
* Set _POSIX_C_SOURCE properlyLibravatar Scott Anderson2018-04-15
|
* Fix #1709Libravatar Drew DeVault2018-04-03
|
* Render i3bar blocksLibravatar Drew DeVault2018-04-02
|
* Demarcate i3bar JSON into individual updatesLibravatar Drew DeVault2018-04-02
|
* Do some small cleanupLibravatar Drew DeVault2018-03-29
| | | | | | | - Fix workspace events (security config isn't in use so it wasn't being sent) - Kill status bar process when swaybar exits - Don't rearrange windows on every layer surface commit
* Clean up status line on exitLibravatar Drew DeVault2018-03-29
|
* Implement status lineLibravatar Drew DeVault2018-03-29
| | | | Does not yet support i3bar json protocol
* Start port of swaybar to layer shellLibravatar Drew DeVault2018-03-29
| | | | | | This starts up the event loop and wayland display and shims out the basic top level rendering concepts. Also includes some changes to incorporate pango into the 1.x codebase properly.
* Removed trailing comma from swaybar click event jsonLibravatar Joona Romppanen2017-10-28
|
* Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.Libravatar Johannes Lundberg2017-10-14
|
* styling fixesLibravatar akokshar@redhat.com2017-08-30
|
* styling fixesLibravatar akokshar@redhat.com2017-08-29
|
* style fixesLibravatar akokshar@redhat.com2017-08-29
|
* click_events as documented at https://i3wm.org/docs/i3bar-protocol.htmlLibravatar akokshar@redhat.com2017-08-29
|
* UnGNUify the codebaseLibravatar Drew DeVault2017-03-10
|
* Reorganize includesLibravatar Drew DeVault2016-09-01
|
* implement solid color rendering for swaybgLibravatar Zandr Martin2016-07-30
|
* Use i3bar format for markup field.Libravatar Mikkel Oscar Lyderik2016-04-24
| | | | | | | | In the i3bar protocol the value of the markup field is a string: "pango" or "none" rather than a bool. This patch makes swaybar compatible with that. http://i3wm.org/docs/i3bar-protocol.html
* Flesh out pango markup implementationLibravatar Drew DeVault2016-04-17
|
* swaybar: move headers to include/barLibravatar Mikkel Oscar Lyderik2016-01-24
|
* swaybar: rename state to barLibravatar Mikkel Oscar Lyderik2016-01-24
|
* swaybar: Move swaybar_teardown to free_stateLibravatar Mikkel Oscar Lyderik2016-01-24
|
* swaybar: move ipc stuff to ipc.{h,c}Libravatar Mikkel Oscar Lyderik2016-01-24
|
* swaybar: feactor render, statuslineLibravatar Mikkel Oscar Lyderik2016-01-24