aboutsummaryrefslogtreecommitdiff
path: root/swaybar/status_line.c
AgeCommit message (Collapse)AuthorLines
2018-09-22swaybar: explicitly check return value of getdelimIan Fan-3/+7
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
2018-09-18swaybar: only free tokener when using i3bar protocolIan Fan-1/+1
2018-09-18swaybar: rewrite i3bar protocol handlingIan Fan-21/+10
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.
2018-09-18swaybar: rewrite protocol determinationIan Fan-31/+33
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).
2018-09-18swaybar: rewrite text protocol handlingIan Fan-16/+24
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.
2018-09-18swaybar: invalidate file descriptors upon closingIan Fan-4/+15
2018-09-18swaybar: remove block links upon exitIan Fan-1/+3
2018-09-12i3bar: count references to blocksIan Fan-1/+1
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
2018-07-09Update for swaywm/wlroots#1126emersion-3/+3
2018-04-24Fix a bunch of swaybar memory leaksemersion-1/+13
2018-04-15Set _POSIX_C_SOURCE properlyScott Anderson-1/+1
2018-04-03Fix #1709Drew DeVault-1/+5
2018-04-02Render i3bar blocksDrew DeVault-2/+3
2018-04-02Demarcate i3bar JSON into individual updatesDrew DeVault-9/+53
2018-03-29Do some small cleanupDrew DeVault-0/+1
- 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
2018-03-29Clean up status line on exitDrew DeVault-2/+4
2018-03-29Implement status lineDrew DeVault-0/+78
Does not yet support i3bar json protocol
2018-03-29Start port of swaybar to layer shellDrew DeVault-530/+0
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.
2017-10-28Removed trailing comma from swaybar click event jsonJoona Romppanen-1/+1
2017-10-14Fix build on FreeBSD adjusting/removing _XOPEN_SOURCE declaration.Johannes Lundberg-1/+1
2017-08-30styling fixesakokshar@redhat.com-2/+2
2017-08-29styling fixesakokshar@redhat.com-1/+1
2017-08-29style fixesakokshar@redhat.com-2/+1
2017-08-29click_events as documented at https://i3wm.org/docs/i3bar-protocol.htmlakokshar@redhat.com-2/+80
2017-03-10UnGNUify the codebaseDrew DeVault-0/+1
2016-09-01Reorganize includesDrew DeVault-2/+2
2016-07-30implement solid color rendering for swaybgZandr Martin-0/+1
2016-04-24Use i3bar format for markup field.Mikkel Oscar Lyderik-1/+5
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
2016-04-17Flesh out pango markup implementationDrew DeVault-1/+6
2016-01-24swaybar: move headers to include/barMikkel Oscar Lyderik-2/+2
2016-01-24swaybar: rename state to barMikkel Oscar Lyderik-29/+29
2016-01-24swaybar: Move swaybar_teardown to free_stateMikkel Oscar Lyderik-0/+7
2016-01-24swaybar: move ipc stuff to ipc.{h,c}Mikkel Oscar Lyderik-20/+20
2016-01-24swaybar: feactor render, statuslineMikkel Oscar Lyderik-0/+435