aboutsummaryrefslogtreecommitdiff
path: root/swaybar
AgeCommit message (Collapse)Author
2018-11-19Merge pull request #3083 from c-edw/feature/StripWorkspaceNameemersion
Implement strip_workspace_name.
2018-11-17Implement strip_workspace_name.Connor E
2018-11-13More frees.Connor E
2018-11-13Add some missing frees.Connor E
2018-10-25swaybar: when scrolling, check that there are workspaces to scroll onIan Fan
2018-10-25swaybar: fix scrolling behaviourIan Fan
1. wrap_scroll has been fixed 2. release bindings are checked when returning early
2018-10-25swaybar: reverse order of workspaces listIan Fan
This makes it congruent with its visual appearance, making it easier to reason about.
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-20swaybar: disallow left and right position and print error on defaultRouven Czerwinski
The positions "left" and "right" are not allowed by the man page, remove them from the allowed positions. Also print an error to stderr if we default to the bottom position. Fixes #2878
2018-10-19missing headers for swaybar/input.cossi.ahosalmi
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: show hidden bar on urgencyIan Fan
2018-10-14swaybar: show hidden bar on key eventIan Fan
Since wayland does not currently allow swaybar to create global keybinds, this is handled within sway and sent to the bar using a custom event, so as not to pollute existing events, called bar_state_update.
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: streamline ipc handlingIan Fan
The received json is handled outside of the case statement, which will allow better extensibility. This commit also introduces the variable bar_is_dirty, the return value signifying whether the bar requires rendering.
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: only subscribe to required eventsIan Fan
This adds barconfig_update to the list of subscribed events, as well as checking when the other events need to be subscribed to.
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-10Merge branch 'master' into bar-bindsymIan Fan
2018-10-10Fix program name in version stringsRyan Dwyer
When running swaymsg -v, the version returned is actually the version of swaymsg itself, yet the message displayed was "sway version <version>". This can create confusion if users update sway and swaymsg but don't restart sway, then use swaymsg to check the version. This patch changes the wording to be "swaymsg version <version>" instead, and likewise for swaybar. To get the version of a running sway instance, users should run swaymsg -t get_version.
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-10-02swaybar: add leading comma to click event JSONIan Fan
2018-09-30Add support for installing binaries with DT_RPATHArkadiusz Hiler
It's better to use DT_RPATH dynamic section of the elf binary to store the paths of libraries to load instead of overwriting LD_LIBRARY_PATH for the whole environment, causing surprises. This solution is much more transparent and perfectly suitable for running contained installations of wayland/wlroots/sway. The code unsetting the LD_LIBRARY_PATH/LD_PRELOAD was also deleted as it's a placebo security at best - we should trust the execution path that leads us to running sway, and it's way too late to care about those variables since we already started executing our compositor, thus we would be compromised anyway.
2018-09-30Turn funcs() into funcs(void)Arkadiusz Hiler
If they really do not take undefined number of arguments.
2018-09-30swaybar: synchronize rendering to output framesIan Fan
2018-09-28swaybar: trim function prototypesIan Fan
2018-09-28swaybar: move i3bar definitions into separate fileIan Fan
2018-09-28swaybar: remove unused focused_output propertyIan Fan
2018-09-28swaybar: fail if bar id is invalidIan Fan
2018-09-26Replace getdelim to make swaybar work on FreeBSDsghctoma
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.
2018-09-22swaybar, swaylock, & tree/container: Set cairo font options to render text ↵Geoff Greer
and lines with subpixel hinting (if available).
2018-09-22swaybar: explicitly check return value of getdelimIan Fan
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-21Merge branch 'master' into swaybar-hotplugBrian Ashworth
2018-09-21swaybar: log invalid i3bar jsonIan Fan