Commit graph

98 commits

Author SHA1 Message Date
Drew DeVault c55ae9956b Fix another -Wunused-result 2016-04-29 11:04:21 -04: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
Mykyta Holubakha 0f1cfdec61 Renamed to pango_markup 2016-04-24 20:35:21 +03:00
Mykyta Holubakha ee4e245f16 Fix line length calculation 2016-04-24 20:20:07 +03:00
Mykyta Holubakha 2e6c43e62b Added plaintext_markup to swaybar IPC 2016-04-24 20:14:02 +03:00
Mykyta Holubakha 53b53dd8c2 Added plaintext markup configuration 2016-04-24 19:57:35 +03:00
Drew DeVault a796ce4f66 Merge pull request #598 from Hummer12007/pango_fix
Passing missing argument to get_text_size
2016-04-24 08:52:36 -04:00
Mikkel Oscar Lyderik 11f0b4539d Use i3bar format for markup field.
In the i3bar protocol the value of the markup field is a string: "pango"
or "none" rather than a bool. This patch makes swaybar compatible with
that.

http://i3wm.org/docs/i3bar-protocol.html
2016-04-24 10:26:55 +02:00
Mykyta Holubakha a25c35f859 Passing missing argument to get_text_size 2016-04-24 10:39:42 +03:00
Drew DeVault 84fae94ab9 Flesh out pango markup implementation 2016-04-17 11:36:03 -04:00
crondog 9c42557b66 Stop swaybar crashing without args 2016-03-31 20:56:14 +11:00
Mikkel Oscar Lyderik d80466068a Handle swaybar using sway font 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik cefcce48aa Make client/pango.h not depend on client/window.h 2016-03-30 00:47:58 +02:00
Mikkel Oscar Lyderik af7a251806 Poll before wl_display_dispatch 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik e4c1176b72 Differentiate between all or no outputs 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik 6d57f03028 Make single bar handle multiple outputs 2016-02-27 22:12:35 +01:00
Mikkel Oscar Lyderik 5e253fdd9a Correctly exit sway on errors.
Calling `exit` in sway_terminate prevents sway from correctly shutting
down (freeing data, cleanly terminating the ipc server, etc.).

A better way is to exit straight away if the failure occurs before
`wlc_run` and use sway_abort as usual if it occur when wlc is running.
2016-02-26 09:42:21 +01:00
Christoph Gysin a5345e807e extract cairo_set_source_u32() 2016-01-25 22:44:33 +02:00
Mikkel Oscar Lyderik 123de86001 swaybar: Fix plaintext handling.
Fix #473
2016-01-25 15:24:12 +01:00
Mikkel Oscar Lyderik 96935f2682 Fix colors off by one 2016-01-25 01:11:33 +01:00
Mikkel Oscar Lyderik ed227f5664 swaybar: move headers to include/bar 2016-01-24 15:55:58 +01: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 c6fc0033e1 swaybar: move core functionality to state.c 2016-01-24 14:22:19 +01:00
Mikkel Oscar Lyderik 6140f9c42c swaybar: Move swaybar_teardown to free_state 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
Christoph Gysin ac3f36c091 swaybar: add --help option 2016-01-23 21:32:33 +02:00
Christoph Gysin bba72fb21a swaybar: debug option takes no argument 2016-01-23 21:23:00 +02:00
Mikkel Oscar Lyderik 364e37a1eb Fix whitespace issues. 2016-01-05 23:42:40 +01:00
crondog 7f7e06d4c9 swaybar: fix logging
Optionally turn on debugging in swaybar. I acidentally introduced
persistent logging in a previous commit
2016-01-04 11:22:20 +11:00
Mikkel Oscar Lyderik 576181ec09 swaybar: Implement workspace_buttons yes|no 2016-01-03 22:40:43 +01:00
Mikkel Oscar Lyderik aa2f754c64 swaybar: Implement binding_mode_indicator 2016-01-03 22:16:36 +01:00
Drew DeVault f2d519d0ba Merge pull request #427 from mikkeloscar/ipc-update
Refactor IPC server/client
2016-01-03 15:37:35 -05:00
Mikkel Oscar Lyderik 7298a9c67a Add type to returned response.
Makes `ipc_recv_response` return a struct with size, type and payload
rather than just the payload string.

This is useful if the type has to be checked on the client.
2016-01-03 20:40:50 +01:00
Mikkel Oscar Lyderik a20226772e swaybar: rename ipc_listen_sock.. to ipc_event_sock.. 2016-01-03 18:52:53 +01:00
Mikkel Oscar Lyderik c2f3530fab Only strip when starting with a num
This makes sure the `:` isn't striped if you have a workspace named:
`:something`.
2016-01-03 17:48:47 +01:00
Mikkel Oscar Lyderik ccdcdc3396 swaybar: Implement strip_workspace_numbers 2016-01-03 17:37:32 +01:00
Mikkel Oscar Lyderik 14dd358a55 saybar: remove stray logline 2015-12-29 12:01:26 +01:00
Mikkel Oscar Lyderik d72be6c0d5 swaybar: Add support for custom separator symbol 2015-12-28 22:45:13 +01:00
Drew DeVault 97a4f7ceac Merge pull request #409 from mikkeloscar/bar-airblade-features
swaybar: Add support for Airblade i3bar extensions
2015-12-27 11:10:41 -05:00
Mikkel Oscar Lyderik 8955e5f1ad swaybar: Free unused IPC response 2015-12-27 13:45:22 +01:00
Mikkel Oscar Lyderik e7aef1e23c swaybar: if-else style fixes 2015-12-27 13:26:37 +01:00
Mikkel Oscar Lyderik d21b15a4be swaybar: Add support for Airblade i3bar extensions
This extends the i3bar protocol implementation with the following
features from @Airblade/i3:

* background
* border
* border_top, border_bottom, border_left, border_right

A block will now be rendered like this:

```
(border_left + margin) + width + (margin + border_right) + sep
```

Where `border_left/border_right` and their related margin is only drawn
if the `border` is specified and the border has a width > 0 (default is
1).

`border_top` and `border_bottom` does not affect the height of the bar
(no margin is added), thus it will be drawn behind the text if it is too
big. The user should specify a bar height if more space between
top/bottom borders are required.
2015-12-27 13:18:55 +01:00
Mikkel Oscar Lyderik 26d2381040 swaybar: remove random whitespaces 2015-12-25 15:59:00 +01:00
Mikkel Oscar Lyderik e370187394 swaybar: Fix json related crash.
This should fix the random json related crashes in swaybar.

The crashes occured because the same socket was used for listening on
workspace events and requesting workspace info, resulting in a
unreliable message queue on the socket.

The solution is to use one socket for the events and one socket for
reliably requesting workspace/output info.
2015-12-25 15:57:04 +01:00
crondog 8e8ec6d92b Merge branch 'master' of https://github.com/SirCmpwn/sway 2015-12-25 08:59:01 +11:00
progandy 21541e9e64 swaybar: Replace fgets with read and own buffer 2015-12-24 13:20:37 +01:00
crondog edd93b5b55 swaybar: min_width and align 2015-12-24 13:55:17 +11:00