aboutsummaryrefslogtreecommitdiff
path: root/swaybar/config.c
AgeCommit message (Collapse)AuthorLines
2024-02-23Define _POSIX_C_SOURCE globallySimon Ser-1/+0
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
2022-07-01Reuse parsed PangoFontDescriptionHugo Osvaldo Barrera-2/+2
Avoids parsing the configured font each time text is rendered.
2020-10-11Add support for workspace_min_width bar option.Tarmack-0/+1
2019-09-04swaybar: complete barconfig_update event handlingBrian Ashworth-2/+2
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
2019-02-01Revert "Add some missing frees."Connor E-1/+0
This reverts commit b5d95f264d5b08f6228e05be680ee36fc06ca6d6.
2019-01-21Replace wlr_log with sway_logM Stoeckl-2/+2
This commit mostly duplicates the wlr_log functions, although with a sway_* prefix. (This is very similar to PR #2009.) However, the logging function no longer needs to be replaceable, so sway_log_init's second argument is used to set the exit callback for sway_abort. wlr_log_init is still invoked in sway/main.c This commit makes it easier to remove the wlroots dependency for the helper programs swaymsg, swaybg, swaybar, and swaynag.
2019-01-16bar_cmd_tray_bind: Use mouse button helpersBrian Ashworth-2/+18
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`.
2019-01-11swaybar: add status_edge_padding commandBrian Ashworth-0/+1
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.
2019-01-11swaybar: add status_padding commandBrian Ashworth-0/+1
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.
2018-12-31swaybar: implement tray configIan Fan-0/+12
2018-11-28Implement bar gapsBrian Ashworth-0/+6
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-1/+1
And make sure we don't define both in the same source file.
2018-11-19Merge pull request #3083 from c-edw/feature/StripWorkspaceNameemersion-0/+1
Implement strip_workspace_name.
2018-11-17Implement strip_workspace_name.Connor E-0/+1
2018-11-13Add some missing frees.Connor E-0/+1
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-14swaybar: handle mode/hidden_state changesIan Fan-1/+3
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-09bar-bindsym: address ianyfan's commentsBrian Ashworth-5/+11
2018-10-09Implement bar bindsymBrian Ashworth-0/+10
2018-09-30Turn funcs() into funcs(void)Arkadiusz Hiler-1/+1
If they really do not take undefined number of arguments.
2018-04-24Fix a bunch of swaybar memory leaksemersion-0/+6
2018-03-29Implement status lineDrew DeVault-0/+1
Does not yet support i3bar json protocol
2018-03-29Pixel-perfect renderingDrew DeVault-0/+1
2018-03-29Wire up basic IPC supportDrew DeVault-13/+1
2018-03-29Start port of swaybar to layer shellDrew DeVault-23/+14
This starts up the event loop and wayland display and shims out the basic top level rendering concepts. Also includes some changes to incorporate pango into the 1.x codebase properly.
2017-06-07Implement Tray IconsCalvin Lee-0/+12
This commit implements the StatusNotifierItem protocol, and enables swaybar to show tray icons. It also uses `xembedsniproxy` in order to communicate with xembed applications. The tray is completely optional, and can be disabled on compile time with the `enable-tray` option. Or on runtime with the bar config option `tray_output none`. Overview of changes: In swaybar very little is changed outside the tray subfolder except that all events are now polled in `event_loop.c`, this creates no functional difference. Six bar configuration options were added, these are detailed in sway-bar(5) The tray subfolder is where all protocol implementation takes place and is organised as follows: tray/sni_watcher.c: This file contains the StatusNotifierWatcher. It keeps track of items and hosts and reports when they come or go. tray/tray.c This file contains the StatusNotifierHost. It keeps track of sway's version of the items and represents the tray itself. tray/sni.c This file contains the StatusNotifierItem struct and all communication with individual items. tray/icon.c This file implements the icon theme protocol. It allows for finding icons by name, rather than by pixmap. tray/dbus.c This file allows for asynchronous DBus communication. See #986 #343
2017-03-10UnGNUify the codebaseDrew DeVault-1/+1
2016-10-20config: set pango_markup default to falseMykyta Holubakha-1/+1
2016-09-01Reorganize includesDrew DeVault-1/+1
2016-07-30implement solid color rendering for swaybgZandr Martin-13/+0
2016-07-17Implement configurable wrapping on bar ws scrollDrew DeVault-0/+1
2016-04-24Renamed to pango_markupMykyta Holubakha-1/+1
2016-04-24Added plaintext markup configurationMykyta Holubakha-0/+1
2016-03-30Handle swaybar using sway fontMikkel Oscar Lyderik-1/+3
2016-02-27Differentiate between all or no outputsMikkel Oscar Lyderik-0/+1
2016-02-27Make single bar handle multiple outputsMikkel Oscar Lyderik-0/+1
2016-01-24swaybar: move headers to include/barMikkel Oscar Lyderik-1/+1
2016-01-24swaybar: rename state to barMikkel Oscar Lyderik-3/+3
2016-01-24swaybar: move ipc stuff to ipc.{h,c}Mikkel Oscar Lyderik-7/+3
2016-01-24swaybar: Separate configMikkel Oscar Lyderik-0/+96