Commit Graph

51 Commits

Author SHA1 Message Date
dmitry
166504256a Merge branch 'master' of https://github.com/Alexays/Waybar into pr/anakael/add-name-to-taskbar 2021-11-23 23:10:49 +03:00
Alex
0a4841371b
Merge branch 'master' into workspace-manager-implementation 2021-11-23 13:52:08 +01:00
dmitry
98f7a10a51 Fix sort 2021-11-23 03:18:00 +03:00
dmitry
23991b6543 Finish 2021-11-23 03:10:44 +03:00
dmitry
ef4c6a9ba3 Update to proto. Fix displaying. Rename classes. 2021-11-22 01:12:55 +03:00
dmitry
ffeecf626c Update names 2021-11-21 15:01:25 +03:00
Anakael
60c1706273
Update taskbar.cpp 2021-11-19 18:54:37 +03:00
dmitry
15761ef802 Merge branch 'master' of https://github.com/Alexays/Waybar into workspace-manager-implementation 2021-11-16 21:44:50 +03:00
dmitry
75a6dddea5 Finish 2021-10-20 01:23:00 +03:00
dmitry
38afa345dd Finish 2021-08-22 20:18:03 +03:00
dmitry
61783aafaa save 2021-08-17 04:31:17 +03:00
dmitry
ba278985e8 Add ignore-list param to wlr/taskbar 2021-04-18 21:34:29 +03:00
jgmdev
e4a65c72dd Added missing 'if' space. 2021-02-07 04:27:16 -04:00
jgmdev
f14a73584f [wlr/taskbar] Added break when matching StartupWMClass is found. 2021-02-07 01:01:57 -04:00
jgmdev
fffb52dd93 [wlr/taskbar] Check StartupWMClass on list returned by g_desktop_app_info_searchi() 2021-02-07 00:50:52 -04:00
jgmdev
e293b89f6b [wlr/taskbar] Removed unnecessary catch statement. 2021-02-04 04:57:08 -04:00
jgmdev
8a284e7c74 [wlr/taskbar] Declared load_icon_from_file() static. 2021-02-03 21:14:04 -04:00
jgmdev
22ed153004 [wlr/taskbar] Fix unhandled exception crash when icon name is a path. 2021-02-03 21:04:10 -04:00
jgmdev
ac6667b1c9 [wlr/taskbar] More icon search improvements.
* Added ~/.local/share prefix to search in user defined apps.
* Add support for apps that don't properly set an id like pamac.
2021-02-02 01:03:28 -04:00
jgmdev
3881af4bbe Improved wlr/taskbar icon search. 2021-01-31 15:37:26 -04:00
Aleksei Bavshin
b79301a5bd
fix(wlr/taskbar): protocol error when reconnecting outputs
Destroy request is not specified for foreign toplevel manager and it
does not prevent the compositor from sending more events.
Libwayland would ignore events to a destroyed objects, but that could
indirectly cause a gap in the sequence of new object ids and trigger
error condition in the library.

With this commit waybar sends a `stop` request to notify the compositor
about the destruction of a toplevel manager. That fixes abnormal
termination of the bar with following errors:
```
(waybar:11791): Gdk-DEBUG: 20:04:19.778: not a valid new object id (4278190088), message toplevel(n)

Gdk-Message: 20:04:19.778: Error reading events from display: Invalid argument
```
2021-01-08 15:41:48 -08:00
Aleksei Bavshin
ef9c3ef1cb
fix(wlr/taskbar): fix wl_array out-of-bounds access
wl_array->size contains the number of bytes in the array instead of the
number of elements.
2021-01-08 15:28:29 -08:00
Till Smejkal
18f129a712 Spit out a warning when trying to set/unset fullscreen without server supporting it
Previously we only checked when connecting to the server whether it had
the minimum required version but didn't act accordingly in the various
functions that use the functionality of later versions. If there were a
server in the wild, that actually would not have this functionality,
there would have been a crash. Fix this by checking the version before
using the functionality and gracefully abort it.
2020-12-04 08:04:02 +01:00
Till Smejkal
bb60e68b9d Update to the latest version of the foreign toplevel manager protocol
There was an update the of the toplevel manager protocol. Unfortunately,
there are no new interesting updates with regard to the taskbar
implementation. Nonetheless, update the protocol xml files to the latest
version so that the implementation is up-to-date.

While being there, also change the debug warning that is shown when
there is a version mismatch between the server and client version of the
protocol.
2020-12-04 08:03:43 +01:00
Alex
05b12602d4
fix: don't check against nullptr 2020-11-26 15:16:55 +01:00
Alex
374d5ae5a1
fix: check get_icon return non nullpt 2020-11-26 15:10:33 +01:00
Arnaud Vallette d'Osia
d8dafa7ecc
add minimize-raise() action 2020-11-18 20:12:07 +01:00
Aleksei Bavshin
67d54ef3d5
fix(wlr/taskbar): do not bind to unsupported protocol versions
It's not allowed to bind to a higher version of a wayland protocol than
supported by the client. Binding wlr-foreign-toplevel-manager-v1 v3 to
a generated code for v2 causes errors in libwayland due to a missing
handler for `zwlr_foreign_toplevel_handle_v1.parent` event.
2020-10-25 10:26:44 -07:00
Alex
d6381eeaff
Merge branch 'master' into taskbar/remove-trim 2020-10-11 23:06:32 +02:00
Daniel De Graaf
ea722615c4 Allow enabing pango markup in the taskbar string
The fix for taskbar tooltips in 6a2d214b55 was incomplete: it causes the label
to contain escaped titles.  Use set_markup so that GTK decodes markup again,
but only if requested by the user (disabling markup is needed if using format
strings like "{title:.15}" to avoid terminating the string in the middle of an
XML entity).
2020-08-19 22:26:11 -04:00
dmitry
b54fb24745 Remove trim usage in format
Some clang-tidy fixes
2020-08-16 15:54:21 +03:00
dmitry
22409d27c5 Fix docs typos
Add removing buttons
Adjust handling multiple outputs.
2020-08-11 00:28:56 +03:00
dmitry
42b6c089f3 Add docs and adjust sorting 2020-08-08 00:09:35 +03:00
dmitry
0ad29a5960 Finish base implementation 2020-08-07 23:46:47 +03:00
dmitry
4c251578e9 Add formatting and states handling 2020-08-07 02:45:08 +03:00
Daniel De Graaf
4cd31cf3c3 Fix wlr/taskbar all-outputs config string 2020-08-05 20:39:12 -04:00
Daniel De Graaf
6a2d214b55 Fix titles containing & and other HTML entities 2020-08-05 20:39:12 -04:00
dmitry
7638f5c595 Add base name representation 2020-08-06 01:42:57 +03:00
dmitry
edd4d8ee11 Finish implement wlr 2020-08-05 23:10:08 +03:00
dmitry
2b11b7ef8c Base wlr impl (Manager, Group) 2020-08-05 02:17:38 +03:00
Till Smejkal
bc112eaae1 Convert icon-theme option to array|string
Use the config support of using arrays in its options instead of the
complicated and error-prone parsing of the string.
2020-07-07 11:22:08 +02:00
Till Smejkal
70e368a1c6 Refactor the lower_app_id logic
Move the lower_app_id lookup logic completely in the image_load_icon
method and use it also when looking up the icon from the desktop files
as well as icon themes.
2020-07-07 10:39:28 +02:00
Till Smejkal
7d9f6096fe Respect XDG_DATA_DIRS when looking for icons.
Use the base folders as defined in $XDG_DATA_DIRS and only fall back to
/usr/share and /usr/local/share if the environment variable does not
exist.
2020-07-05 13:16:41 +02:00
Till Smejkal
06ad35c42b Add support for multiple icon themes in the config
If there are multiple icon themes defined in the config option
'icon-theme' the module will try from left to right to find an icon.
The system default will always be added to this list.
2020-07-05 13:16:38 +02:00
Till Smejkal
b7e8275d90 Properly trim when splitting up the format string
Previously only single spaces would be trimmed and not multiple ones.
Now use a proper trim implementation for strings.
2020-07-05 13:13:34 +02:00
dmitry
8a13ed59bc Fix lower 2020-07-01 03:05:17 +03:00
dmitry
43500a9983 Move lower to load_icon phase 2020-07-01 02:56:44 +03:00
dmitry
8e6cbc1021 Change find icon priority and to_lower app_id 2020-07-01 02:10:22 +03:00
Till Smejkal
b7a8e8e544 Fix format option for the taskbar module
When using additional format options in addition to {icon} the format is
separated into text before and text after the icon. Each of the texts is
displayed in a separate label one before and one after the image for the
icon.

The code updating the labels on changes used the wrong format strings
when updating the label after the icon.
2020-06-24 09:47:34 +02:00
Till Smejkal
7429d1f9cc Fix click events for the taskbar module
When only the option 'on-click-right' was set and no other 'on-click'
option than the taskbar module wouldn't register for click events and
hence those events were handled by the generic AModule::on-click code.
This code would try to start a shell with the specified command, which
wouldn't make any sense in this circumstances.

The taskbar code falsely checked for the 'on-click-left' option instead
for the 'on-click-right' when deciding to register for click events.
2020-06-24 09:36:28 +02:00