diff options
author | Calvin Lee <cyrus296@gmail.com> | 2017-06-07 16:45:28 -0700 |
---|---|---|
committer | Calvin Lee <cyrus296@gmail.com> | 2017-06-07 17:49:16 -0700 |
commit | 843ad38b3c427adb0bf319e9613d9813c8d9246c (patch) | |
tree | e02a5b06e2b6923371fd53724791c147c18a1fa4 /sway/sway-bar.5.txt | |
parent | Merge pull request #1232 from johalun/master-freebsd (diff) | |
download | sway-843ad38b3c427adb0bf319e9613d9813c8d9246c.tar.gz sway-843ad38b3c427adb0bf319e9613d9813c8d9246c.tar.zst sway-843ad38b3c427adb0bf319e9613d9813c8d9246c.zip |
Implement Tray Icons
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
Diffstat (limited to 'sway/sway-bar.5.txt')
-rw-r--r-- | sway/sway-bar.5.txt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sway/sway-bar.5.txt b/sway/sway-bar.5.txt index 5a52e7db..29487662 100644 --- a/sway/sway-bar.5.txt +++ b/sway/sway-bar.5.txt | |||
@@ -65,6 +65,42 @@ Commands | |||
65 | **height** <height>:: | 65 | **height** <height>:: |
66 | Sets the height of the bar. Default height will match the font size. | 66 | Sets the height of the bar. Default height will match the font size. |
67 | 67 | ||
68 | Tray | ||
69 | ---- | ||
70 | |||
71 | Swaybar provides a system tray where programs such as NetworkManager, VLC, | ||
72 | Pidgin, etc. can place little icons. The following commands configure | ||
73 | interaction with the tray or individual icons. | ||
74 | The _button_ argument in all following commands is a Linux input event code as | ||
75 | defined in linux/input-event-codes.h. This is because wayland defines button | ||
76 | codes in this manner. | ||
77 | |||
78 | **activate_button** <button>:: | ||
79 | Sets the button to be used for the _activate_ (primary click) tray item | ||
80 | event. By default is BTN_LEFT (0x110). | ||
81 | |||
82 | **context_button** <button>:: | ||
83 | Sets the button to be used for the _context menu_ (right click) tray item | ||
84 | event. By default is BTN_RIGHT (0x111). | ||
85 | |||
86 | **secondary_button** <button>:: | ||
87 | Sets the button to be used for the _secondary_ (middle click) tray item | ||
88 | event. By default is BTN_MIDDLE (0x112). | ||
89 | |||
90 | **tray_output** none|all|<name>:: | ||
91 | Sets the output that the tray will appear on or none. Unlike i3bar, swaybar | ||
92 | should be able to show icons on any number of bars and outputs without | ||
93 | races. Because of this, the default value for this is _all_. | ||
94 | |||
95 | **tray_padding** <px> [px]:: | ||
96 | Sets the pixel padding of the system tray. This padding will surround the | ||
97 | tray on all sides and between each item. The default value for _px_ is 2. | ||
98 | |||
99 | **icon_theme** <name>:: | ||
100 | Sets the icon theme that sway will look for item icons in. This option has | ||
101 | no default value, because sway will always default to the fallback theme, | ||
102 | hicolor. | ||
103 | |||
68 | Colors | 104 | Colors |
69 | ------ | 105 | ------ |
70 | 106 | ||