aboutsummaryrefslogtreecommitdiff
path: root/swaybar
AgeCommit message (Collapse)Author
2018-09-18swaybar: only free tokener when using i3bar protocolIan Fan
2018-09-18swaybar: add debugging statements for handling i3bar jsonIan Fan
2018-09-18swaybar: rewrite i3bar protocol handlingIan Fan
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
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
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: only create i3bar block hotspot if click events are enabledIan Fan
2018-09-18swaybar: send trailing comma with click event jsonIan Fan
2018-09-18swaybar: fix empty function prototypesIan Fan
2018-09-18swaybar: invalidate file descriptors upon closingIan Fan
2018-09-18swaybar: remove block links upon exitIan Fan
2018-09-17swaybar: use output names instead of output indexesemersion
2018-09-14bar: remove i3bar_block_free in favour of i3bar_block_unrefIan Fan
2018-09-12i3bar: count references to blocksIan Fan
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-09-08Align titles to baselineRyan Dwyer
This does the following: * Adds a baseline argument to get_text_size (the baseline is the distance from the top of the texture to the baseline). * Stores the baseline in the container when calculating the title height. * Takes the baseline into account when calculating the config's max font height. * When rendering, pads the textures according to the baseline so they line up.
2018-09-05Fix swaybar block background fill logicJason
Same as #2571 but for 1.0.
2018-09-03Change _XOPEN_SOURCE defines to _POSIX_C_SOURCEsghctoma
2018-08-30Fix feature macros for FreeBSDsghctoma
On FreeBSD, snprintf and vsnprintf are visible only if _XOPEN_SOURCE >= 600.
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.
2018-07-18Merge pull request #2281 from pvsr/X11_clickemersion
Send clicks to swaybar blocks as X11 button ids
2018-07-17remove unnecessary parensPeter Rice
2018-07-16send scroll events to swaybar blocksPeter Rice
2018-07-16make hotspot callback take an x11 button idPeter Rice
2018-07-17swaybar: Read urgent colors from IPCRyan Dwyer
2018-07-14swaybar/bg: Fix crash on DPMS offminus
When turning off displays via DPMS, swaybar and swaybg still tried to render, but did not get a valid buffer, causing them to crash.
2018-07-09Update for swaywm/wlroots#1126emersion
2018-07-06Fix swaybar teardown when workspace buttons hiddenBrian Ashworth
2018-07-05Implement mode --pango_markupBrian Ashworth
2018-05-09Swaybar: Respect pango_markup configRyan Dwyer
Makes swaybar respect the user's pango_markup configuration in the workspace buttons and binding mode indicator.
2018-05-06Revert "Install swaybar and swaybg under /usr/lib/sway"Rostislav Pehlivanov
This reverts commit f2c209c299889ad965ac995049704b1c46176c6d.
2018-05-06Revert "Make the LIBDIR path configurable"Rostislav Pehlivanov
This reverts commit 1670b46bf6e56d37e69ab0fa32c6799e83397020.
2018-05-06Revert "Meson: Replace option `instlibdir` with `libexecdir`"Rostislav Pehlivanov
This reverts commit 830c4ef74c00dbe448da46cdbc576178abc5728e.
2018-05-05Meson: Replace option `instlibdir` with `libexecdir`Nicolas Braud-Santoni
Derive a value from it, called `rundir` rather than writing join_paths(libexecdir, 'sway') all over the place.
2018-05-05Make the LIBDIR path configurableNicolas Braud-Santoni
2018-05-05Install swaybar and swaybg under /usr/lib/swayNicolas Braud-Santoni
2018-04-24Fix a bunch of swaybar memory leaksemersion
2018-04-24Work around maybe-uninitialized in bar.cAlex Xu (Hello71)
Fixes #1855.
2018-04-22Fix swaybar axis event logicScott Anderson
Uses 'visible' instead of 'focused', since we may scroll on a bar which isn't the focused output. We can't use "next_on_output" or "prev_on_output" to implement this, because it only modify the focused output. So scrolling on an unfocused output will affect the incorrect one. We just use the "workspace name" command instead.
2018-04-21Remove void * castsScott Anderson
They're pointless.
2018-04-21Remove status command event on errorScott Anderson
This prevents very high CPU load when the status command dies, and poll continuously awoken with POLLHUP.
2018-04-21Change remove_event logicScott Anderson
We defer the removal of entries until after the poll loop has finished. Otherwise we may end up adjusting the poll array while we're still reading from it, causing us to skip events.
2018-04-21Always send POLLHUP and POLLERR with event loopScott Anderson
2018-04-20Fix memory leak on swaybarBruno Pinto
Code from @NilsBrause Ref #1820
2018-04-15Set _POSIX_C_SOURCE properlyScott Anderson
2018-04-10Fix separator height calculationDrew DeVault
Fixes #1796 Also rearranged this code to more closely mirror the similar code above so future discrepancies are easier to spot.
2018-04-10Merge pull request #1792 from RyanDwyer/fix-swaybar-status-blocksemersion
Fix swaybar not showing all status blocks
2018-04-11Check height in surface local coordinates and rename some variables.Ryan Dwyer
2018-04-10fix swaybar ipc handlingdb
Swap return with break in IPC_EVENT_WORKSPACE case to free resp. Change default return value to true. This causes IPC_EVENT_MODE changes to be rendered instantly.
2018-04-10Fix swaybar not showing all status blocks.Ryan Dwyer
2018-04-10Fix swaybar output config.Ryan Dwyer
2018-04-09Fix some more bugsDrew DeVault