aboutsummaryrefslogtreecommitdiff
path: root/swaybar
AgeCommit message (Collapse)AuthorLines
2019-01-01Remove readline.cIan Fan-1/+0
All occurrences of read_line have been replaced by getline. peek_line has been absorbed into detect_brace.
2018-12-31swaybar: use KDE's SNI IconThemePath propertyIan Fan-0/+5
2018-12-31swaybar: handle new and lost StatusNotifierWatcherIan Fan-1/+60
2018-12-31swaybar: draw a sad face if SNI has no iconIan Fan-9/+25
2018-12-31swaybar: do not create tray if hiddenIan Fan-1/+4
2018-12-31swaybar: set bar dirty on SNI eventIan Fan-1/+16
2018-12-31swaybar: implement mouse events for trayIan Fan-2/+95
2018-12-31swaybar: implement tray renderingIan Fan-1/+108
2018-12-31swaybar: implement tray configIan Fan-0/+47
2018-12-31swaybar: add StatusNotifierItem to trayIan Fan-5/+244
2018-12-31swaybar: add StatusNotifierHost to trayIan Fan-0/+191
2018-12-31swaybar: implement icon themes and lookup for trayIan Fan-0/+467
2018-12-31swaybar: add StatusNotifierWatcher to trayIan Fan-0/+220
2018-12-31swaybar: add skeleton dbus code to trayIan Fan-1/+30
2018-12-31swaybar: add tray interfaceIan Fan-13/+72
2018-12-31swaybar: fix double freeMack Straight-1/+0
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.
2018-12-15swaybar: fix cursor scaleBrian Ashworth-31/+29
This fixes a few issues with swaybar's cursor scaling: 1. The cursor scale is now changed when the output scale changes 2. The cursor scale is no longer bound by the max output scale when swaybar is launched 3. Related to the previous item, the cursor is no longer tiny on low scale outputs after the max output scale has changed This also bumps up `wl_compositor` to version 4 to allow usage of `wl_surface_damage_buffer`.
2018-12-12swaybar: fix sep block width for mixed scalesBrian Ashworth-8/+7
When there are outputs with mixed scales, it was possible for swaybar to alter `block->separator_block_width` for an output with a higher scale, and use the changed value for a lower scale output. This caused there to be larger than normal separation between blocks on the lower scale outputs. The issue is more obvious the larger the scale difference between the highest scale output and the lowest scale output. This fixes the issue by using a local variable that is originally set to `block->separator_block_width` for rendering, but if it needs to be increased, the local variable is the only thing touched.
2018-12-12swaybar: handle block->urgentBrian Ashworth-13/+23
When `block->urgent` is set, use the urgent colors. This matches i3bar's behavior. Previously, swaybar just ignored the property. This also adds in rendering for right borders, which was missing.
2018-12-04Add relative coordinates in JSON for i3bar click eventsHristo Venev-8/+16
Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
2018-11-28Implement bar gapsBrian Ashworth-1/+52
Adds the bar subcommand `gaps <amount>|<horizontal> <vertical>|<top> <right> <bottom> <left>` to set gaps for swaybar. Due to restrictions on margins for a layer_surface, only the sides that are anchored to an edge of the screen can have gaps. Since there is support for per-side outer gaps for workspaces, those should be able to be used instead for the last side.
2018-11-25Replace _XOPEN_SOURCE with _POSIX_C_SOURCEemersion-3/+3
And make sure we don't define both in the same source file.
2018-11-19Merge pull request #3083 from c-edw/feature/StripWorkspaceNameemersion-23/+30
Implement strip_workspace_name.
2018-11-17Implement strip_workspace_name.Connor E-23/+30
2018-11-13More frees.Connor E-0/+3
2018-11-13Add some missing frees.Connor E-0/+1
2018-10-25swaybar: when scrolling, check that there are workspaces to scroll onIan Fan-0/+4
2018-10-25swaybar: fix scrolling behaviourIan Fan-40/+26
1. wrap_scroll has been fixed 2. release bindings are checked when returning early
2018-10-25swaybar: reverse order of workspaces listIan Fan-3/+3
This makes it congruent with its visual appearance, making it easier to reason about.
2018-10-24Merge pull request #2925 from ianyfan/swaylockDrew DeVault-1/+4
swaylock: exit early if unable to get input inhibitor
2018-10-23swaybar: absorb bar_init function into bar_setupIan Fan-7/+3
2018-10-23swaybar: exit on display errorIan Fan-1/+4
2018-10-23Fix swaybar crash when there's no status_commandRyan Dwyer-4/+6
2018-10-21swaybar: fix hotplugemersion-32/+28
2018-10-20swaybar: render with minimum height, nominally text heightIan Fan-7/+10
2018-10-20Put swaybar in overlay layer when using mode hideRyan Dwyer-1/+1
This allows the bar to render over fullscreen views.
2018-10-20swaybar: disallow left and right position and print error on defaultRouven Czerwinski-6/+2
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-0/+1
2018-10-18swaybar: separate input code to new fileIan Fan-276/+289
2018-10-15Sway clients: Exit gracefully when compositor is unavailableRyan Dwyer-1/+5
2018-10-15Remove timerfd from loop implementationRyan Dwyer-4/+4
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-166/+12
* 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-2/+1
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-0/+18
2018-10-14swaybar: show hidden bar on urgencyIan Fan-3/+9
2018-10-14swaybar: show hidden bar on key eventIan Fan-1/+18
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-11/+108
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-13/+15
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-13/+13
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-2/+5