Commit Graph

18 Commits

Author SHA1 Message Date
Tobias Blass
8976a47f62 [swaybar] fix non-dbus build
Swaybar's CMakeLists.txt uses the enable-tray option directly to decide whether to build the tray. This leads to a compilation error if dbus is not installed.
This patch uses the ENABLE_TRAY variable instead, which is only true if the user enabled the tray *and* dbus is available.
2017-07-20 23:03:16 +02:00
Calvin Lee
843ad38b3c 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
2017-06-07 17:49:16 -07:00
Tomáš Čech
468ddfb34d Fix missing include paths
When headers were installed in more sofisticated places (but package
config knows it right), it revealed missing paths in CMake
configuration. Lets fix it.
2016-04-28 20:08:41 +02:00
Christoph Gysin
a5345e807e extract cairo_set_source_u32() 2016-01-25 22:44:33 +02:00
Mikkel Oscar Lyderik
a61a27c485 swaybar: cleanup CmakeLists.txt 2016-01-24 14:22:19 +01:00
Mikkel Oscar Lyderik
aa6ad09183 swaybar: rename state to bar 2016-01-24 14:22:19 +01:00
Mikkel Oscar Lyderik
fcc47cb3bd swaybar: move ipc stuff to ipc.{h,c} 2016-01-24 14:22:19 +01:00
Mikkel Oscar Lyderik
a6349a2444 swaybar: feactor render, statusline 2016-01-24 14:22:19 +01:00
Mikkel Oscar Lyderik
bb986cb336 swaybar: Separate config 2016-01-24 14:22:17 +01:00
Drew DeVault
7918feb9cd Display workspaces on swaybar 2015-12-13 15:40:19 -05:00
Christoph Gysin
cce9c338c0 cmake: build common code only once
This creates (static) libraries for protocols/, common/, and wayland/.
2015-12-02 12:15:57 +02:00
Christoph Gysin
c9ce15aa18 cmake: remove subprojects 2015-12-01 22:47:22 +02:00
Christoph Gysin
55b3532fe0 cmake: remove unnecessary quotes 2015-12-01 22:03:53 +02:00
Christoph Gysin
2dedf206d7 cmake: use out-of-source build 2015-12-01 22:03:09 +02:00
Christoph Gysin
f7ec3d00a0 cmake: use tabs instead of spaces 2015-12-01 22:03:09 +02:00
Christoph Gysin
905966bcae cmake: style consistency 2015-12-01 22:03:09 +02:00
Christoph Gysin
2429266e3e cmake: convert all cmake commands to lowercase 2015-12-01 22:03:09 +02:00
Drew DeVault
63cf8e48c4 Add swaybar subproject 2015-11-29 10:26:50 -05:00