1
1
mirror of https://github.com/swaywm/sway synced 2024-11-23 13:22:17 +01:00
Commit Graph

60 Commits

Author SHA1 Message Date
Geoff Greer
c495164f60 swaybar, swaylock, & tree/container: Set cairo font options to render text and lines with subpixel hinting (if available). 2018-09-22 11:34:21 -07:00
emersion
8a5ff5a4db swaybar: don't wl_display_roundtrip on each frame
This was the source of numerous bugs, from hotplug events not being
received to segfaults because wl_display_roundtrip was making the
bar process unplug events while blocking in an iteration over all
outputs.
2018-09-20 19:31:03 +02:00
emersion
82f1393cbb swaybar: handle hotplugging
Don't kill and respawn swaybars on hotplug.
2018-09-20 18:37:51 +02:00
emersion
012df55be5 swaybar: use output names instead of output indexes 2018-09-17 16:04:09 +02:00
minus
bfcfabee2b swaybar: Fix scroll handling on workspace buttons
As well as ignoring scroll events on status elements when click_events
is enabled.
Previously, using the scroll wheel on a workspace button would switch to
that workspace instead of scrolling through them. Clicks and scrolling
on status elements would always be processed by swaybar, too. So in case
you were using scrolling as volume control on a status item, swaybar
would additionally scroll through your workspaces.
2018-07-19 21:15:01 +02:00
Peter Rice
14511da75d send scroll events to swaybar blocks 2018-07-16 18:55:11 -04:00
Peter Rice
79a998849b make hotspot callback take an x11 button id 2018-07-16 18:55:04 -04:00
emersion
63b4bf5000
Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
emersion
aa36899d8a
Fix a bunch of swaybar memory leaks 2018-04-24 22:28:55 +01:00
Alex Xu (Hello71)
63267240bf Work around maybe-uninitialized in bar.c
Fixes #1855.
2018-04-24 12:29:11 -04:00
Scott Anderson
4dfbc3160c Fix swaybar axis event logic
Uses 'visible' instead of 'focused', since we may scroll on a bar which
isn't the focused output.

We can't use "next_on_output" or "prev_on_output" to implement this,
because it only modify the focused output. So scrolling on an unfocused
output will affect the incorrect one.

We just use the "workspace name" command instead.
2018-04-22 17:25:15 +12:00
Scott Anderson
c63554885e Remove void * casts
They're pointless.
2018-04-21 14:45:34 +12:00
Scott Anderson
2ebb6073b7 Remove status command event on error
This prevents very high CPU load when the status command dies,
and poll continuously awoken with POLLHUP.
2018-04-21 14:39:46 +12:00
Ryan Dwyer
c38de16722 Fix swaybar output config. 2018-04-10 13:38:15 +10:00
Drew DeVault
f242362e7e Handle output removal on swaybar 2018-04-05 16:04:30 -04:00
Drew DeVault
38bdd4bdeb Address review feedback 2018-04-03 22:52:40 -04:00
Drew DeVault
d48e7036aa Don't use asserts with side-effects 2018-04-03 21:29:43 -04:00
Drew DeVault
2605950769 Add hidpi support to swaybar 2018-04-03 21:06:28 -04:00
Drew DeVault
333dbcbe72 Render i3bar blocks 2018-04-02 11:09:23 -04:00
Drew DeVault
2a5108a278 Implement workspace switch on click 2018-03-30 22:44:08 -04:00
Drew DeVault
ae14dfc7ae Implement scroll wheel workspace switching 2018-03-30 22:44:08 -04:00
Drew DeVault
8d1425bde9 Initialize seat pointer in swaybar 2018-03-30 22:44:08 -04:00
Drew DeVault
095ac31921 Use render_all_frames from bar_setup 2018-03-29 22:32:17 -04:00
Drew DeVault
6fe66d0e6c Fix layer_surface_closed 2018-03-29 22:25:25 -04:00
Drew DeVault
da6e48520b Tear down bar when display exits 2018-03-29 22:11:08 -04:00
Drew DeVault
0464a9910d Clean up status line on exit 2018-03-29 22:11:08 -04:00
Drew DeVault
0d0ab7c5ce Implement status line
Does not yet support i3bar json protocol
2018-03-29 22:11:08 -04:00
Drew DeVault
86ba0fc15d Re-render bar on IPC updates 2018-03-29 22:11:08 -04:00
Drew DeVault
3399ad9840 Round up workspaces on each output 2018-03-29 22:11:08 -04:00
Drew DeVault
e5e8094dc3 Only utilize the configured outputs 2018-03-29 22:11:08 -04:00
Drew DeVault
5c9ad035db Wire up basic IPC support 2018-03-29 22:11:08 -04:00
Drew DeVault
cab1352801 Start port of swaybar to layer shell
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.
2018-03-29 22:11:08 -04:00
Johannes Lundberg
44e72573cb Fix include path to input-event-codes.h for FreeBSD. 2017-10-15 10:54:47 +02:00
John Axel Eriksson
feb8bb96ee
swaybar protocol: handle button 4 and 5
i3 bar handles scroll events as button 4 and 5. An example use
case would be volume up/down.
2017-09-23 15:22:40 +02:00
akokshar@redhat.com
39df3aed82 styling fixes 2017-08-29 17:33:06 +02:00
akokshar@redhat.com
65022e1cbf click_events as documented at https://i3wm.org/docs/i3bar-protocol.html 2017-08-29 11:19:43 +02:00
Drew DeVault
387eca1b29 Revert "swaybar: Group child processes for signalling"
This reverts commit 8f4bc0a3741b63c64bb6059bb632e7584c595d14.
2017-06-29 13:22:54 -04:00
Drew DeVault
0fc9628f03 Merge branch 'master' into tray 2017-06-14 18:14:22 -04:00
Calvin Lee
33fdae2001 Remove Xembed Support
Xembed support is premature in sway and should be postponed. This commit
only removes swaybar starting xembedsniproxy, if users would like, they
can still start xembedsniproxy manually, however there will be no
official support.
2017-06-13 12:42:11 -07:00
Yury Krivopalov
8f4bc0a374 swaybar: Group child processes for signalling
Fixes child proccess killing, when status_command is a complex command
like "i3status | wrapper.sh".

Set the process group id of the child process by calling `setpgid` after
forking and before calling `exec`.

The process group ID will be set to the process ID of the forked
process. Processes spawned by this child process will also have this
group ID.

Send signals to the process group with `killpg`. This will send the
signal to all of the process group.
2017-06-12 23:12:31 +03:00
Calvin Lee
1451ee8fd1 Reorganize Tray Code
Remove tray code from bar.c and render.c
2017-06-07 21:32:48 -07: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
Drew DeVault
9aed9d9359 UnGNUify the codebase 2017-03-10 23:41:24 -05: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
416417a54c Reorganize includes 2016-09-01 08:18:37 -04:00
Hummer12007
06f46955c0 Fix a warning 2016-07-18 00:57:49 +03:00
Drew DeVault
3bb880bf20 Implement configurable wrapping on bar ws scroll 2016-07-17 11:26:38 -04:00
Drew DeVault
147a88260a Fix #753 2016-07-16 09:09:22 -04:00
David Eklov
e38d6b94b8 Change workspace when mouse wheel is scrolled while hovering over the bar 2016-07-15 19:14:31 -05:00