aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar/status_line.h
AgeCommit message (Collapse)AuthorLines
2020-02-10swaybar: fix i3bar relative coordinates when scaling is usedHristo Venev-0/+1
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.
2019-01-23Make json-c include respect pkg-config --cflagsJan Beich-1/+1
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.
2018-10-15Move swaybar's event loop to common directory and refactorRyan Dwyer-0/+2
* 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: send signal to status when hiding or showing barIan Fan-0/+3
2018-10-02swaybar: add leading comma to click event JSONIan Fan-0/+1
2018-09-28swaybar: move i3bar definitions into separate fileIan Fan-26/+0
2018-09-18swaybar: rewrite i3bar protocol handlingIan Fan-18/+6
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 text protocol handlingIan Fan-6/+2
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-12i3bar: count references to blocksIan Fan-1/+2
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-19swaybar: Fix scroll handling on workspace buttonsminus-1/+1
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.
2018-07-16make hotspot callback take an x11 button idPeter Rice-1/+3
2018-04-24Fix a bunch of swaybar memory leaksemersion-0/+1
2018-04-02Send click events for i3bar blocksDrew DeVault-2/+4
2018-04-02Render i3bar blocksDrew DeVault-3/+3
2018-04-02Demarcate i3bar JSON into individual updatesDrew DeVault-2/+47
2018-03-29Implement status lineDrew DeVault-48/+17
Does not yet support i3bar json protocol
2017-08-29click_events as documented at https://i3wm.org/docs/i3bar-protocol.htmlakokshar@redhat.com-0/+10
2016-09-01Reorganize includesDrew DeVault-0/+51