Commit Graph

1044 Commits

Author SHA1 Message Date
06a3de0b89 Refactor config::dereference* (#2963)
* Refactor config::dereference*

* move config::deprecated* implementation to cpp file

* config: move more functions implementation to cpp file
2023-05-18 09:47:45 +02:00
2c23f7a87f restack: Make bspwm first try ewmh strategy 2023-05-15 14:44:50 +02:00
4f9f07eefd restack: Add ewmh restacking strategy
Positions the bar window above the _NET_SUPPORTING_WM_CHECK window

The generic restacking strategy now first tries the ewmh strategy, the
the bottom strategy.
2023-05-15 14:44:50 +02:00
b11a2ff653 restack: Add bottom restacking strategy
For now this is the same as the generic one
2023-05-15 14:44:50 +02:00
59acb4150b Clean up restacking code
Restacking algorithms now only need to provide the sibling window and
stacking mode.
2023-05-15 14:44:50 +02:00
76c7ee3bf6 Introduce restacking utilities
Aim is to clean up restacking logic and remove some duplicated code
2023-05-15 14:44:50 +02:00
425d4dc338 Cleanup 2023-05-10 17:06:00 +02:00
32c78aa63a Cleanup ucs4_to_utf8 2023-05-10 17:06:00 +02:00
5b1fae4fc1 Make utf8_to_ucs4 take a string reference 2023-05-10 17:06:00 +02:00
5e5a0a7c4d Make unicode_charlist a vector 2023-05-10 17:06:00 +02:00
3a27e891d2 fix(renderer): Drop strings with invalid UTF8 2023-05-10 17:06:00 +02:00
63443f82d5 Refactor utf8_to_ucs4 2023-05-10 17:06:00 +02:00
71c65447f8 Move utf8 conversion code to string utils 2023-05-10 17:06:00 +02:00
6e716296ff Formatting 2023-05-10 17:06:00 +02:00
f5169abde2 Remove unsupported.hpp (#2956)
* Remove unsupported.hpp

* Rename names.hpp to types.hpp

* Replace macro by function

* Add missing cassert include in controller.cpp
2023-05-08 19:36:12 +02:00
0caa30683c Remove config singleton (#2951)
* Remove unused function

* Refactor deprecation warning

* Modules take config as parameter instead of using the singleton

* Bar take config as parameter instead of using the singleton

* Renderer take config as parameter instead of using the singleton

* Legacy Tray Manager take config as parameter instead of using the singleton

* Screen take config as parameter instead of using the singleton

* Controller take config as parameter instead of using the singleton

* Remove the config singleton

* Apply review suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

* Apply style suggestion

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>

---------

Co-authored-by: Patrick Ziegler <p.ziegler96@gmail.com>
2023-05-01 14:58:52 +02:00
df32703a22 tray: Rework tray spacing
tray-padding determines space added before and after each icon
tray-spacing determines space added between icons (but not at the edge)

Both are an extent value and accept both pixel and point values.
2023-04-01 21:04:58 +02:00
7fbd2d175c tray: Cleanup position calculation 2023-04-01 21:04:58 +02:00
b5f8466117 tray: Replace tray-maxsize module setting with tray-size
The size accepts a percentage with offset relative to the bar height and
determines the width and height of tray icons.

Defaults to 66%

Does not affect spacing
2023-04-01 21:04:58 +02:00
11746455ee tray: Cleanup & documentation 2023-03-25 20:17:02 +01:00
f3ce047c52 tray: Remove delayed notifications
Unclear why it is needed, neither i3bar, nor stalonetray do delayed
notifications
2023-03-25 19:28:43 +01:00
47f6d9c25d renderer: documentation 2023-03-23 23:12:50 +01:00
58e0911ac6 tray: Disable pseudo-transparency for opaque bgs 2023-03-23 23:03:45 +01:00
89f29fa12e tray: documentation 2023-03-23 22:41:40 +01:00
f6172e1459 Remove tray client gc
Not actually used anywhere
2023-03-23 22:27:43 +01:00
1aeac226a6 Delete tray client pixmap and gc in destructor 2023-03-23 22:27:11 +01:00
65279883c3 Replace wait_for_response with handle callback
The poll-loop could in theory swallow events which would not be seen by
the main eventloop
2022-11-30 15:06:17 +01:00
aadd4ce1c8 Remove screen realloc argument
Replaced with explicit reset function
2022-11-30 13:41:25 +01:00
d296d67953 Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-31 23:30:07 +01:00
f5d16891dd tray: Cleanup 2022-10-31 23:21:00 +01:00
ca25b5685c tray: Add back legacy tray implementation
Is used for trays defined through tray-position and nothing else.
2022-10-31 23:05:23 +01:00
ed6a0e90fb fix code in order to support cmake unity builds 2022-10-29 15:09:03 +02:00
291a4844bc fix(ipc): Crash when sending to multiple instances
In polybar-msg, the connection handle was captured as a reference to a
shared_ptr, but the shared_ptr went out of scope right after.

This probably always caused UB, but was only noticeable for two or more
instances.
2022-10-23 14:19:26 +02:00
30e1cc2595 feat(ipc): <label> support (#2841)
* Label = %output% working

* build fix

* Output as deprecated, Label as default

* Corrections

 * Corrections Simplified

* Changelog updated
2022-10-23 10:47:22 +02:00
cbfb417dce option to turn off struts 2022-10-22 13:06:06 +02:00
6d74ae51e7 Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-16 21:31:07 +02:00
31bdacb3d7 Remove never used systray module
Not the same as the new tray module
2022-10-16 21:25:48 +02:00
3561fd3ad1 Templatify module factory
Saves us a lot of code duplication by generating module type-indexed map
and factory functions from the module class names.
2022-10-16 21:25:48 +02:00
56779a5902 Make the event loop return shared_ptrs (#2842)
* Return shared_ptr from eventloop

* Add -Wdeprecated-copy-dtor warning

Produces a warning if classes don't have explicit copy operations if
they have a user-defined constructor.
This helps us stick to the rule of 5 (kinda, no warnings for missing
move operators).

* Clean up eventloop

* Fix compiler warnings

* Fix fs_event_handle_t name
2022-10-15 23:21:40 +02:00
d6997659fa cleanup 2022-10-12 23:34:38 +02:00
54b75f23ab feat(ipc). Per hook format (#2810)
* Added format-x support for ipc_module, tested with demo config

* Certain cases not working

* Certain cases not working, build

* Changed label to output tag, Mixing of default formats wont work

* created changelog
2022-10-09 18:42:36 +02:00
303015244e feat: longest match ws-icon fuzzy matching (#2831)
* better fuzzy matching

Improved fuzzy matching so that it finds the longest matching icon instead of the first possible match

* Update CHANGELOG.md

* removed debug output

* added tests and improved fuzzy finder

- added return statements to the fuzzy finder
- added tests to check whether the fuzzy finder works.

* minor style changes

* minor change to iconset.cpp

* Delete tasks.json
2022-10-05 23:05:44 +02:00
0096fea839 Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-05 23:02:18 +02:00
5719d130fd feat(xwindow): %instance%, %class% from WM_CLASS 2022-10-02 20:57:29 +02:00
463ef963a1 Add pseudo transparency back to tray icons 2022-10-01 22:24:23 +02:00
def2682b8c tray: Set _NET_SYSTEM_TRAY_VISUAL 2022-09-26 21:39:10 +02:00
5c38d5cb17 tray: Store clients in unique_ptr 2022-09-24 13:20:02 +02:00
3da2662022 xwindow: Also listen for WM_NAME changes 2022-09-19 22:54:41 +02:00
627d43dad2 tray: Set _NET_SYSTEM_TRAY_ORIENTATION 2022-09-19 21:23:22 +02:00
63c6b13cbf tray: Cleanup client state handling 2022-09-15 19:38:45 +02:00