aboutsummaryrefslogtreecommitdiffstats
path: root/include/swaybar
Commit message (Collapse)AuthorAge
* common: move load_image to swaybarLibravatar Manuel Stoeckl2023-11-23
| | | | | swaynag, swaymsg, and sway do not use this function and are unlikely to in the future.
* swaybar: Implement wp_cursor_shape_v1Libravatar Alexander Orzechowski2023-07-31
|
* Add missing includes & remove duplicatesLibravatar Carl Smedstad2023-01-03
|
* swaybar: Make hotspots block bar release bindingsLibravatar Joan Bruguera2022-11-26
| | | | | | | | | | | | | | | | | | | | | | The previous commit prioritized hotspots before bar bindings for press events, which matches i3's behaviour. However, since hotspots don't need to do any processing on release events, those were not handled, and simply fell through to `bindsym --release` bar bindings (if any). This is counter-intuitive, and doesn't match i3's behaviour. Instead in case a hotspot handles the press event, it should also handle the release event, doing nothing, but blocking the event from triggering a --release bar binding. E.g., in Sway, without this commit, this config. shows a text on tray clicks: bar { # ... bindsym --release button1 exec swaynag -m I_got_the_release_event. } But the same configuration in i3 (with i3-nagbar) doesn't show the text. Signed-off-by: Joan Bruguera <joanbrugueram@gmail.com>
* Reuse parsed PangoFontDescriptionLibravatar Hugo Osvaldo Barrera2022-07-01
| | | | Avoids parsing the configured font each time text is rendered.
* swaybar: remove swaybar_output.input_regionLibravatar Simon Ser2022-03-14
| | | | | No need to keep the region around, we can immediately destroy it after the wl_surface.set_input_region request.
* swaybar: properly draw blocks with transparent black borderLibravatar Nathan Schulte2021-09-20
| | | | | | while the draw itself is a no-op, alignment must still be accounted this requires more signalling about the blocks (border_set; was the border set?)
* Fix swaybar tray for non-systemdLibravatar Arav K2020-12-16
| | | | | | | Meson's generated config.h header defines false macros as 0, not undefined. This means that the header line, which was checking for the definition existing, not a non-zero value, was incorrect. Now the swaybar tray can be used with systemd, elogind, or basu.
* build: add basu as sd-bus providerLibravatar Simon Ser2020-12-09
|
* build: introduce sd-bus-provider optionLibravatar Simon Ser2020-12-09
| | | | This allows to select a specific provider for the sd-bus library.
* Add support for workspace_min_width bar option.Libravatar Tarmack2020-10-11
|
* swaybar: Fix scrolling with precise trackpadsLibravatar Martin Dørum2020-04-28
|
* tray: track SNI callbacksLibravatar Ian Fan2020-03-30
| | | | | | This removes any pending messages once the item is destroyed. Furthermore, this installs SNI event calbacks asynchronously in order to prevent sd-bus from bypassing pending messages.
* tray: tidy codeLibravatar Ian Fan2020-03-30
| | | | This includes some refactoring and fixing a small memory leak.
* tray: allow themes to inherit from multiple themesLibravatar Ian Fan2020-03-30
|
* swaybar: fix i3bar relative coordinates when scaling is usedLibravatar Hristo Venev2020-02-10
| | | | | | | | | | | | 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.
* Do not truncate pointer coordinates to int.Libravatar Hristo Venev2020-02-10
| | | | This increases the precision of the clicks when using i3bar.
* parse_color: return success + drop fallback colorLibravatar Brian Ashworth2019-12-28
| | | | | | | | | | | | This is the first in a series of commits to refactor the color handling in sway. This changes parse_color to return whether it was success and no longer uses 0xFFFFFFFF as the fallback color. This also verifies that the string actually contains a valid hexadecimal number along with the length checks. In the process of altering the calls to parse_color, I also took the opportunity to heavily refactor swaybar's ipc_parse_colors function. This allowed for several lines of duplicated code to be removed.
* swaybar: do not retry search for tray iconsLibravatar Konstantin Pospelov2019-10-21
| | | | | | | | | In case a tray icon cannot be found or does not have a desirable size, swaybar retries the search again and again, which increases load on disk and CPU. This commit solves it by storing target_size for each icon, so that swaybar does not search for an icon of some size if it already tried to. Fixes #3789.
* swaybar: complete barconfig_update event handlingLibravatar Brian Ashworth2019-09-04
| | | | | | | | This adds complete support for the barconfig_update ipc event. This also changes the bar command and subcommand handlers to correctly emit the event. This makes it so all bar subcommands other than id and swaybar_command are dynamically changeable at runtime. sway-bar.5 has been updated accordingly
* swaybar: add multiseat supportLibravatar Brian Ashworth2019-04-24
| | | | This just adds multiseat support to swaybar
* swaybar: hide mode visibility improvementsLibravatar Brian Ashworth2019-04-24
| | | | | | | | | | | | This allows swaybar to become visible when the mode changes (to any mode other than the default). swaybar will be hidden again when the modifier is pressed and released or when switching back to the default mode. This also applies the same logic to visible by urgency to hide swaybar when the modifier is pressed and released. These changes are to match i3's behavior.
* swaybar: add overlay mode (fix #1620)Libravatar Milkey Mouse2019-02-24
| | | | | Overlay mode puts the bar above normal windows and passes through/ignores any touch/mouse/keyboard events that would be sent to it.
* swaybar: process hotspots on touch tapLibravatar Drew DeVault2019-02-23
|
* swaybar: prevent signal handler from firing during terminationLibravatar Ian Fan2019-02-15
| | | | This prevents a heap-use-after-free crash when sway terminates.
* Rebase #1636 against current masterLibravatar v44r2019-01-31
|
* Make json-c include respect pkg-config --cflagsLibravatar Jan Beich2019-01-23
| | | | | 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.
* bar_cmd_tray_bind: Use mouse button helpersLibravatar Brian Ashworth2019-01-16
| | | | | | | | | | | | | | | | This modifies `bar_cmd_tray_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `bar_cmd_tray_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like with sway bindings, the two commands are encapsulated in a single file to maximize shared code. This also modifies tray bindings to work off of events codes rather than x11 buttons, which allows for any mouse buttons to be used. For `get_bar_config`, `event_code` has been added to the `tray_bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`.
* Merge pull request #3344 from RedSoxFan/bar-mouse-bindings-improvedLibravatar Drew DeVault2019-01-13
|\ | | | | Improve mouse button parsing: bar mouse bindings
| * bar_cmd_bind: utilize mouse button helpersLibravatar Brian Ashworth2019-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This modifies `bar_cmd_bindsym` to use `get_mouse_bindsym` for parsing mouse buttons. This also introduces `cmd_bar_bindcode`, which will use `get_mouse_bindcode` for parsing mouse buttons. Like sway bindings, the two commands are encapsulated in a single file with shared code. This also modifies swaybar to operate off of event codes rather than x11 button numbers, which allows for any mouse button to be used. This introduces two new IPC properties: - For `get_bar_config`, `event_code` has been added to the `bindings` section and will include to event code for the button. If the event code can be mapped to a x11 button, `input_code` will still be the x11 button number. Otherwise, `input_code` will be `0`. - Likewise for `click_events`, `event` has been added and will include the event code for the button clicked. If the event code can be mapped to a x11 button, `button` will still be the x11 button number. Otherwise, `button` will be `0`.
* | Merge pull request #3408 from RedSoxFan/bar-paddingLibravatar Drew DeVault2019-01-13
|\ \ | | | | | | swaybar: adjustable status padding
| * | swaybar: add status_edge_padding commandLibravatar Brian Ashworth2019-01-11
| | | | | | | | | | | | | | | This adds the bar subcommand `status_edge_padding <padding>` to set the padding used when the status line is on the right edge of the bar.
| * | swaybar: add status_padding commandLibravatar Brian Ashworth2019-01-11
| |/ | | | | | | | | | | Adds the bar subcommand `status_padding <padding>` which allows setting the padding used for swaybar. If `status_padding` is set to `0`, blocks will be able to take up the full height of the bar.
* / swaybar: allow identifiers for output and trayLibravatar Brian Ashworth2019-01-13
|/ | | | | | | | | | This allows `bar output` and `bar tray_output` to specify an output identifier. Output names should still work as well. This parses the output identifier from the xdg_output description, which wlroots currently sets to `make model serial (name)`. Since this could change in the future, all identifier comparisons are guarded by NULL-checks in case the description cannot be parsed to an identifier.
* swaybar: handle SNI signals betterLibravatar Ian Fan2019-01-08
| | | | | This fixes a crash caused by callbacks not matching the right sender, and frees old values later, before they are re-assigned.
* swaybar: use KDE's SNI IconThemePath propertyLibravatar Ian Fan2018-12-31
|
* swaybar: do not create tray if hiddenLibravatar Ian Fan2018-12-31
|
* swaybar: set bar dirty on SNI eventLibravatar Ian Fan2018-12-31
|
* swaybar: implement mouse events for trayLibravatar Ian Fan2018-12-31
|
* swaybar: implement tray renderingLibravatar Ian Fan2018-12-31
|
* swaybar: implement tray configLibravatar Ian Fan2018-12-31
|
* swaybar: add StatusNotifierItem to trayLibravatar Ian Fan2018-12-31
|
* swaybar: add StatusNotifierHost to trayLibravatar Ian Fan2018-12-31
|
* swaybar: implement icon themes and lookup for trayLibravatar Ian Fan2018-12-31
|
* swaybar: add StatusNotifierWatcher to trayLibravatar Ian Fan2018-12-31
|
* swaybar: add tray interfaceLibravatar Ian Fan2018-12-31
|
* swaybar: remove old tray implementationLibravatar Ian Fan2018-12-31
|
* swaybar: fix cursor scaleLibravatar Brian Ashworth2018-12-15
| | | | | | | | | | | | 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`.
* Add relative coordinates in JSON for i3bar click eventsLibravatar Hristo Venev2018-12-04
| | | | Compatibility with i3 commit 161db6f17d734ac9deb0a20e81b78d4b2a92ce68.
* Implement bar gapsLibravatar Brian Ashworth2018-11-28
| | | | | | | | | 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.