Commit Graph

2287 Commits

Author SHA1 Message Date
patrick96
6e716296ff Formatting 2023-05-10 17:06:00 +02:00
patrick96
d74a4fab77 i3: Better error reporting when connection fails
Prints the output and exit code of 'i3 --get-socketpath' if it fails and
prints the socket path if the connection fails.

Ref polybar/i3ipcpp#13
Ref #2942
2023-05-10 09:42:05 +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
Patrick Ziegler
031a29332a
doc: Use readthedocs config file (#2957)
This is the recommended way to configure the project instead of using
the website.

It should also help fix readthedocs/readthedocs.org#10290
2023-05-08 19:13:02 +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
61f0e9dd5d fix(tray): Vertically center in inner bar area
The tray should be vertically centered in the inner area of the bar.
Unequal top and bottom borders should not affect the alignment relative
to other text.

Fixes #2950
2023-04-29 14:45:01 +02:00
patrick96
7bc673b8f2 fix(doc): %s in extlinks caption before sphinx 4.0
There is no way to support extlinks with a custom caption in both sphinx
< 4 and >= 4 at the same time without implementing different behavior
per version.
2023-04-20 01:24:02 +02:00
patrick96
89ca0255f1 doc: Fix extlinks %s substitution in caption
Substitutions in the caption are only supported in version 4 of
sphinx.
However, RTD uses sphinx 1.8.6

Just letting it append the value seems to work in both 1.8.6 and newer
versions.
2023-04-18 15:48:38 +02:00
patrick96
cf802ad431 doc: Mention errors and warnings in migration guide 2023-04-18 15:48:38 +02:00
patrick96
dbac7d8ae8 doc: Finish tray migration guide 2023-04-18 15:48:38 +02:00
patrick96
fcef90be24 doc: Start tray migration guide 2023-04-18 15:48:38 +02:00
patrick96
6148bb7f14 doc: Add empty migration page 2023-04-18 15:48:38 +02:00
patrick96
30bb1584fc doc: Add page about default config 2023-04-18 15:48:38 +02:00
patrick96
f3c911991c doc: Document custom directive in python script 2023-04-18 15:48:38 +02:00
patrick96
44b5f87884 doc: Use issue directive to link to issue 2023-04-18 15:48:38 +02:00
patrick96
006e971dad doc: Add module links 2023-04-18 15:48:38 +02:00
patrick96
6e0cff97ff doc(tray): Add type at the beginning 2023-04-18 15:48:38 +02:00
patrick96
fc422b1107 doc: Style external links in RTD theme 2023-04-18 15:48:38 +02:00
patrick96
81684a6c9d doc: Show version in alabaster theme (local builds) 2023-04-18 15:48:38 +02:00
patrick96
0032f27686 doc: Use extlinks for linking to issues and PRs 2023-04-18 15:48:38 +02:00
patrick96
234e606b41 doc: Replace custom domain with add_object_type
Less overhead and doesn't require a new dependency
2023-04-18 15:48:38 +02:00
patrick96
c48aa1998c fix(doc): Setup function not always running
If the sphinx version was below 1.8.5, no setup function was defined at
all.
2023-04-18 15:48:38 +02:00
patrick96
98d58b6f27 doc: Reformat conf.py 2023-04-18 15:48:38 +02:00
patrick96
c6eb3f88ea doc(tray): Initial experiments 2023-04-18 15:48:38 +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
4e66b1f4b8 tray: Remove tray-scale module setting 2023-04-01 21:04:58 +02:00
patrick96
921e2d0670
Merge remote-tracking branch 'upstream/master' into tray-child-window 2023-03-25 22:04:21 +01:00
patrick96
04fefa0a0e
fix(tray): Correct y-position with border
The border size was not taken into account when calculating the tray
icon's y-position
2023-03-25 20:17:22 +01: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
23153c3a23
tray: Address rendering related TODOs
Currently, we don't support 32-bit visuals and don't set
_NET_SYSTEM_TRAY_VISUAL

It is unclear what happens if the default visual (which is used as a
fallback if _NET_SYSTEM_TRAY_VISUAL is not set) is 32-bit.
In that case, we may need to explicitly use a 24-bit visual.
2023-03-25 19:19:09 +01:00
patrick96
3e3a380069
tray: Remove option TODOs
They are noted in #2689
2023-03-25 19:18:34 +01:00
patrick96
ac589b32dd
Remove TODOs
Not doign this. Using the desired background as the X window background
color would require us to always first check before using the pixmap or
cairo context.
2023-03-25 17:31:52 +01:00
patrick96
616b3fe3e7
color: fix tests 2023-03-23 23:15:21 +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
8cc1b4fcfd fix(build): Use CMAKE_INSTALL_FULL_<dir> for default config
Using CMAKE_INSTALL_SYSCONFDIR does respect CMAKE_INSTALL_PREFIX, but it
prefixes it to CMAKE_INSTALL_SYSCONFDIR, which results in the default
config being installed to /usr/etc/polybar/config.ini or
/usr/local/etc/polybar/config.ini

CMAKE_INSTALL_FULL_SYSCONFDIR gives an absolute path that respects the
prefix but does the right thing (uses /etc) if it is /usr

Ref: #2770
2023-02-13 22:08:57 +01:00
patrick96
b3cbf0a644 ci: Update codecov and checkout actions
The coverage job fails because of the outdated codecov action and the
checkout v2 action uses a deprecated version of nodejs
2023-02-13 22:00:43 +01:00
patrick96
fc423c0921 fix(i3): Deal with negative coordinates
Pulls in fix in i3ipcpp repo: https://github.com/polybar/i3ipcpp/pull/12

Fixes https://github.com/polybar/polybar/issues/2888
Ref https://github.com/i3/i3/discussions/5352
2023-01-05 22:11:08 +01:00
patrick96
e8870d6537
tray: Prevent crash when no wallpaper is found 2022-12-21 23:47:57 +01:00
patrick96
edf37385cb script: Bump poll timeout to 250ms
The module has a poll timeout because it needs to periodically check if
it is shutting down. Otherwise, it would be stuck polling and the bar
couldn't shut down until the script produces a new line.

However, this causes the bar to wake up intermittently (currently
~40/s) due to the 25ms timeout.
Bumping this to 250ms still gives us timely shut downs and caps the
number of wake ups to 4/s.

This is only a stop-gap solution, ideally the script runner is
integrated into the main event loop and uses its polling handles which
don't have to wake up to check for a shutdown.

Ref #1778
Ref #2337
2022-12-12 00:52:13 +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
d5498c8a8a script: Require zero exit code to show empty module.
Showing an empty module if the script failed but produced no output does
not make too much sense.

Ref #2857
2022-11-05 12:43:43 +01:00
patrick96
d296d67953
Merge remote-tracking branch 'upstream/master' into tray-child-window 2022-10-31 23:30:07 +01:00