Commit Graph

1041 Commits

Author SHA1 Message Date
patrick96
b11a2ff653 restack: Add bottom restacking strategy
For now this is the same as the generic one
2023-05-15 14:44:50 +02:00
patrick96
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
patrick96
76c7ee3bf6 Introduce restacking utilities
Aim is to clean up restacking logic and remove some duplicated code
2023-05-15 14:44:50 +02:00
patrick96
425d4dc338 Cleanup 2023-05-10 17:06:00 +02:00
patrick96
32c78aa63a Cleanup ucs4_to_utf8 2023-05-10 17:06:00 +02:00
patrick96
5b1fae4fc1 Make utf8_to_ucs4 take a string reference 2023-05-10 17:06:00 +02:00
patrick96
5e5a0a7c4d Make unicode_charlist a vector 2023-05-10 17:06:00 +02:00
patrick96
3a27e891d2 fix(renderer): Drop strings with invalid UTF8 2023-05-10 17:06:00 +02:00
patrick96
63443f82d5 Refactor utf8_to_ucs4 2023-05-10 17:06:00 +02:00
patrick96
71c65447f8 Move utf8 conversion code to string utils 2023-05-10 17:06:00 +02:00
patrick96
6e716296ff Formatting 2023-05-10 17:06:00 +02:00
dvermd
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
dvermd
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
patrick96
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
patrick96
7fbd2d175c tray: Cleanup position calculation 2023-04-01 21:04:58 +02:00
patrick96
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
patrick96
11746455ee
tray: Cleanup & documentation 2023-03-25 20:17:02 +01:00
patrick96
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
patrick96
47f6d9c25d
renderer: documentation 2023-03-23 23:12:50 +01:00
patrick96
58e0911ac6
tray: Disable pseudo-transparency for opaque bgs 2023-03-23 23:03:45 +01:00
patrick96
89f29fa12e
tray: documentation 2023-03-23 22:41:40 +01:00
patrick96
f6172e1459
Remove tray client gc
Not actually used anywhere
2023-03-23 22:27:43 +01:00
patrick96
1aeac226a6
Delete tray client pixmap and gc in destructor 2023-03-23 22:27:11 +01:00
patrick96
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
patrick96
aadd4ce1c8
Remove screen realloc argument
Replaced with explicit reset function
2022-11-30 13:41:25 +01:00
patrick96
d296d67953
Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-31 23:30:07 +01:00
patrick96
f5d16891dd
tray: Cleanup 2022-10-31 23:21:00 +01:00
patrick96
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
tnixeu
ed6a0e90fb fix code in order to support cmake unity builds 2022-10-29 15:09:03 +02:00
patrick96
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
Madhav Prabhu C M
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
Ashwin
cbfb417dce option to turn off struts 2022-10-22 13:06:06 +02:00
patrick96
6d74ae51e7
Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-16 21:31:07 +02:00
patrick96
31bdacb3d7 Remove never used systray module
Not the same as the new tray module
2022-10-16 21:25:48 +02:00
patrick96
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
Patrick Ziegler
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
patrick96
d6997659fa
cleanup 2022-10-12 23:34:38 +02:00
Madhav Prabhu C M
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
Ron0Studios
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
patrick96
0096fea839
Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-05 23:02:18 +02:00
patrick96
5719d130fd feat(xwindow): %instance%, %class% from WM_CLASS 2022-10-02 20:57:29 +02:00
patrick96
463ef963a1
Add pseudo transparency back to tray icons 2022-10-01 22:24:23 +02:00
patrick96
def2682b8c
tray: Set _NET_SYSTEM_TRAY_VISUAL 2022-09-26 21:39:10 +02:00
patrick96
5c38d5cb17
tray: Store clients in unique_ptr 2022-09-24 13:20:02 +02:00
patrick96
3da2662022 xwindow: Also listen for WM_NAME changes 2022-09-19 22:54:41 +02:00
patrick96
627d43dad2
tray: Set _NET_SYSTEM_TRAY_ORIENTATION 2022-09-19 21:23:22 +02:00
patrick96
63c6b13cbf
tray: Cleanup client state handling 2022-09-15 19:38:45 +02:00
patrick96
5fd62edfca
tray: Cleanup logging 2022-09-14 21:53:02 +02:00
patrick96
8ec9807145
Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-09-13 14:24:59 +02:00
Patrick Ziegler
1d4e30c4be
fix: Handle X events before polling for IO (#2820)
* Use m_connection.poll_for_event

* fix: Handle X events before polling for IO

Polling the XCB file descriptor for X events doesn't detect events that
are already in XCB's event queue but not yet handled.

If this happens, the eventloop polls for IO and the queued events wait
until another event arrives, causing some desyncs in the bar.

This can easily happen if something (e.g. a click event) triggers some
xcb calls, which as a consequence buffer some incoming events.

We "fix" this by adding a libuv prepare handle (which runs right before
polling for IO) that processes pending X events.
2022-09-13 14:21:36 +02:00