Commit graph

59 commits

Author SHA1 Message Date
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
Zandr Martin 2d2ce91883
add missing ! for wl seat caps 2017-03-18 11:29:02 -04:00
Drew DeVault 9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05:00
barfoo1 dc6942d10d minor logic error 2016-12-14 10:24:13 +01:00
Greg V da26d69cb1 Fix build on FreeBSD
- Make sure CMake always finds absolute paths for Cairo, Pango and GdkPixbuf
- Add forgotten json-c include path to swaymsg/CMakeLists.txt
- Disable -Werror because of assert warnings
- Add correct /proc/pid/file path for FreeBSD
- Use libepoll-shim on FreeBSD
- Only use Linux capabilities on, well, Linux
2016-12-09 19:32:07 +03:00
Drew DeVault cd5694fdb5 Fix memory leaks in swaybar 2016-11-28 08:45:27 -05:00
D.B 6f2c39610e parse pango markup in workspace names (and bugfix)
This change allows using numeric character references in workspace names
- for example æ which stands for sharp s. A fix was necessary in
get_pango_layout, since markup and parsed markup had different width.
2016-10-07 11:27:06 +02:00
Zandr Martin 70b3796071
fix pango markup on swaybar 2016-09-08 14:45:21 -05:00
Drew DeVault 1510a21f00 Remove extraneous logging 2016-09-06 08:02:32 -04:00
Drew DeVault af44154119 Fix constant scale factor in font code 2016-09-05 11:52:52 -04:00
Drew DeVault b2226ac655 Add client support for HiDPI
This adds HiDPI support to swaybar, swaybg, and swaylock.
2016-09-05 11:36:48 -04:00
Drew DeVault 61184e3208 Initial testing on hidpi clients 2016-09-05 10:32:21 -04:00
Drew DeVault a9767ad2f7 Allow users to customize the cursor on clients
This also sets the default size to 16 and documents all of the other
environment variables in use in sway(1).
2016-07-17 11:26:30 -04:00
Drew DeVault 7aeedf0264 Fix warning in window.c 2016-07-16 09:13:38 -04:00
Drew DeVault 147a88260a Fix #753 2016-07-16 09:09:22 -04:00
David Eklov c0b7610c26 Enable windows to register to get notified when the mouse wheel is scrolled 2016-07-15 19:14:31 -05:00
David Eklov 250ddc66c6 Rename pointer_input::notify to indicate that is called on button clicks 2016-07-15 19:14:31 -05:00
David Eklov 679c7b397c Use int instead of wl_fixed_t for mouse coordinates 2016-07-14 17:18:01 -05:00
David Eklov c8a64305fd Enable windows to register to get notified of pointer button events 2016-07-06 01:03:04 -05:00
David Eklov 9889b14511 Check capabilities before using pointer and keyboard 2016-07-06 01:03:00 -05:00
David Eklov bb35960e65 Move code to make a window a shell surface into seperate function 2016-07-04 21:58:41 -05:00
Sergi Granell 6063fed8b7 wayland/registry.c: free() registry at registry_teardown 2016-04-30 11:10:46 +02:00
Tomáš Čech bcdeb72189 Explicitly mark static linking in CMake
When no type is given, it depends on BUILD_SHARED_LIBS value which is
not desired in this case.
2016-04-28 20:13:26 +02: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
Drew DeVault 84fae94ab9 Flesh out pango markup implementation 2016-04-17 11:36:03 -04:00
Drew DeVault 2a0836e3bd Add support for pango markup 2016-04-17 10:47:08 -04:00
Mikkel Oscar Lyderik cefcce48aa Make client/pango.h not depend on client/window.h 2016-03-30 00:47:58 +02:00
Drew DeVault baa958eaf2 Remove pointer from swaylock surface 2016-01-26 18:38:05 -05:00
Christoph Gysin a5345e807e extract cairo_set_source_u32() 2016-01-25 22:44:33 +02:00
progandy 21014e606b make gdk-pixbuf dependency really optional 2015-12-20 17:37:52 +01:00
Nicolas Werner 8fae31e96c fix segfault when doesn't have a trailing '/' 2015-12-15 22:56:48 +01:00
Drew DeVault 34277207fd Pass keys along from wayland backend to clients 2015-12-12 15:19:23 -05:00
Drew DeVault 182a6dc8fb Fix build issue 2015-12-12 12:59:42 -05:00
Drew DeVault 029e0c7a2c Add some more keyboard handling for wayland clients 2015-12-12 12:54:10 -05:00
Drew DeVault a7710c5537 Initialize keyboard in registry poll 2015-12-10 18:34:12 -05:00
Drew DeVault 7614cb0373 Add keyboard handling shims to registry 2015-12-10 08:32:56 -05:00
Drew DeVault 067ac6cfa7 Discover swaylock extension in registry 2015-12-10 08:05:27 -05:00
Drew DeVault 080a263785 Refactor gdk pixbuf code into shared client lib 2015-12-10 07:57:46 -05:00
Drew DeVault e39f846247 Free outputs on registry teardown 2015-12-05 17:35:41 -05:00
Christoph Gysin 76920d2759 remove archive from git, add *.a to gitignore 2015-12-03 15:52:21 +02:00
Drew DeVault 71afa38890 Add swaylock protocol, add resource destructors
This prevents sway crashing if swaybg or swaybar dies.
2015-12-03 08:35:22 -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
Drew DeVault 82d464bb90 Add text rendering support to wayland clients 2015-11-29 15:27:28 -05:00
Drew DeVault 5728307520 Add wallpapers to output command 2015-11-19 18:55:17 -05:00
Drew DeVault b4e5e1381f Refactor the crap out of wayland clients
And create a background surface on every output when invoking swaybg.
2015-11-19 07:58:57 -05:00
Drew DeVault 82db2a57a9 Basic support for extensions in server and clients 2015-11-18 22:01:22 -05:00
Drew DeVault fb0bfa13ce Fix warning about uninitialized variable 2015-11-18 19:59:47 -05:00
Drew DeVault 2f01a3265d Exit if unable to allocate buffer 2015-11-18 19:58:38 -05:00
Drew DeVault 7a40eb6de6 Support cursors over wayland clients
Apparently wayland has fucking client-side cursors, too
2015-11-18 19:38:42 -05:00
Drew DeVault 929537c158 Generate protocol headers 2015-11-18 17:59:35 -05:00