Commit Graph

31 Commits

Author SHA1 Message Date
patrick96
ea3eb6eaa4 ci: Update ubuntu version 2023-05-15 14:44:50 +02: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
b8af14fa8c Move codecov.yml to .github folder 2022-03-13 21:26:54 +01:00
patrick96
880fbc242d Expand support page 2022-03-07 22:34:16 +01:00
patrick96
67fb58c993 Move features request and build issues to Discussions 2022-03-07 22:34:16 +01:00
patrick96
60eb7b522a Issue template typo 2022-03-07 22:34:16 +01:00
Patrick Ziegler
3356188056
Use sockets for IPC (#2539)
Deprecates not using `polybar-msg` for IPC.

Fixes #2532
Closes #2465
Fixes #2504

* Create FIFO specific NamedPipeHandle subclass to PipeHandle

* Prototype SocketHandle

* Move mainloop up to main.cpp

* Pass eventloop to ipc class

* Deprecate sending ipc over the named pipe

Unfortunately, we can only show the warning in the polybar log and not
give the user any feedback because the pipe is one-way

* Move eventloop into its own namespace

* Prototype ipc socket handling

* Remove handles from ipc_client

Should be independent from eventloop logic

* Remove ipc clients when finished

* Add tests for ipc_client decoding

* Add callback for complete ipc messages

* Remove template param from mixins

* Move signal handler to new callback system

* Move poll handle to new callback system

* Move FSEventHandle to new callback system

* Move TimerHandle and AsyncHandle to new callback system

* Move PipeHandle to new callback system

* Implement socket functionality in new callback system

* Correctly reset ipc named pipe handle

* Let client close handles in error callback

* Wrap client pipe and ipc::client in connection class

* Better decoder log messages

* Socket path logic

* Fix CI warnings

* Remove UVHandleGeneric

* Fix error when socket folder already exists

* Proof of concept message writeback

* Restructure ipc files

* polybar-msg: Use sockets

* polybar-msg: Better syntax for actions

* Fix memory leak with fifo

After EOF, the pipe wasn't closed and EOF was called all the time, each
time allocating a new pipe.

* Make polybar-msg compile on its own

* Rudimentary writeback for polybar-msg

* Fix payload reference going out of scope.

* Add IPC documentation

* Cleanup polybar-msg code

* Specify the v0 ipc message format

* Close ipc connection after message

* Fix ipc tests

* Properly close ipc connections

* Fix polybar-msg not working with action string

* Write polybar-msg manpage

* polybar-msg: Stop using exit()

* ipc: Print log message with PID

* Add tests for ipc util

* polybar-msg: Print PID with success message

* ipc: Propagate message errors

* Rename ipc::client to ipc::decoder

* Rename ipc.cpp to polybar-msg.cpp

* ipc: Write encoder function and fix decoder bugs

* ipc: Use message format for responses

* ipc: Handle wrong message types

* ipc: Write back error message if ipc message cannot be processed

This only happens for commands and empty actions.
Non-empty actions are not immediately executed, but deferred until the
next loop iteration.

* Remove TODO about deleting runtime directory

The socket file is not deleted after socket.close() is called, only
after libuv executes the close callback.
So we can't just call rmdir because it will probably always fail.

* CLeanup WriteRequest

* Update manpage authors

* Cleanup
2022-01-22 20:35:37 +01:00
Patrick Ziegler
b5fb44220d
ci: Use new codecov uploader (#2541)
* ci: Use new codecov uploader

The bash uploader is deprecated

Ref: https://about.codecov.io/blog/codecov-uploader-deprecation-plan/

* Collect coverage report using lcov

* Remove branch coverage

There are a lot of hidden branches in the C++ code which doesn't make it
very useful
2021-10-16 19:58:34 +02:00
Patrick Ziegler
22014c70c4
Use the new GitHub issue forms (#2530)
* Use the new GitHub issue forms

This now automatically adds labels and marks certain information as
mandatory. It also automatically formats some fields (e.g. polybar
config).

Ref: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms

* Update bug_report issue link

* Fix bug_report description
2021-10-10 14:00:18 +02:00
patrick96
ba118477e0 ci: Add libuv dependency 2021-09-21 20:36:23 +02:00
patrick96
04344aa0e7 CI: apt update before installing doc dependencies
Caused a 404 not found error
2021-01-24 16:05:31 +01:00
Patrick Ziegler
d5be8cad97
Add compiler warning for missing override specifier (#2341)
* build: Add -Wsuggest-override

We should always use the override specifier when overriding virtual
functions. This helps prevent errors when a subclass tries to create a
function with the same name as a virtual function in a super-class but
with a different purpose.

* clang-format

* Upload logs on failure

* Add override to unsupported.hpp

* cmake: Make -Wsuggest-override flag conditional
2021-01-04 10:38:43 +01:00
patrick96
6479ebc83f ci: Make sphinx warnings errors 2020-12-24 12:46:02 +01:00
patrick96
c3fbd1e3e8 ci: Add job for polybar-msg 2020-12-24 02:20:38 +01:00
patrick96
20c88ca977 ci: Use libnl 2020-12-24 02:20:38 +01:00
patrick96
c24a6999a4 refactor(cmake): Allow targets to be enabled individually
Each major target of polybar can now be enabled/disabled while
configuring (even polybar itself).

The cmake code specific to each target will only run if the target is
enabled.

This allows us to for example just build the documentation without
having to run all the cmake code related to compilation or having the
polybar dependencies installed (other than sphinx).
2020-12-24 02:20:38 +01:00
Patrick Ziegler
eee22cb351 Create FUNDING.yml 2020-12-23 17:27:36 +01:00
Patrick Ziegler
d63bf294b7
Adopt "keep a changelog" (#2308)
* Adopt keep a changelog

Ref: https://keepachangelog.com/en/1.0.0/

* Add changelog to release and contributing docs

* Use H2 for automatically added Download section

The individual changelog subsections use H3 and the changelog section
uses H2, so the Download section should use the same heading

* Add already present changes to changelog

* Mention changelog issue references in CONTRIBUTING.md
2020-12-16 16:04:10 +01:00
patrick96
1c554dd0e0
Merge branch 'hotfix/3.5.1' 2020-12-12 13:28:57 +01:00
patrick96
95537f458d ci: Add manual trigger 2020-12-12 01:43:12 +01:00
patrick96
cf739ed295 ci: Use github actions 2020-12-12 01:43:12 +01:00
Patrick Ziegler
1168ef36a0
github: Add action to create release archive (#2277)
Whenever a release is published, this action will create a release
archive and update the release body with a download section.

This also integrates the suggestions from #2276

Resolves #2276
2020-12-06 18:16:17 +01:00
Patrick Ziegler
078aa3c8cb
github: Typo in build issue template (#2260) 2020-12-02 15:16:15 +01:00
patrick96
9d31b51a63 github: Cleanup issue templates
We no longer allow people to create issues from a blank template.

The templates for bug reports and build issues are also much more
explicit in what they want from the user.
2020-11-26 21:00:40 +01:00
patrick96
2f549575c7 github: Add PR template
Gives structure to pull requests and make it easier for us to review.
2020-11-26 21:00:40 +01:00
patrick96
5eb293cb71 doc: Add gitter room to issue template chooser 2019-12-27 17:21:14 +01:00
patrick96
8d3dedc2bd github: Add subreddit as contact link
This is yet another way to steer people towards reddit for questions
instead of using the github issue tracker

Ref: https://help.github.com/en/github/building-a-strong-community/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
2019-11-03 12:55:32 +01:00
patrick96
07913058fb Clearly separate issue and bug reports
The issue tracker should be for bugs only. Right now actual bugs can
easily fall through the cracks because we get stuck answering questions
and basically providing tech support.

This move is also intended to have more traffic to our subreddit and IRC
channel with the hope that the community can also help itself out.
2019-03-13 21:03:28 +01:00
patrick96
914ec3e102 github: Add distro to bug report template 2019-03-13 21:03:28 +01:00
Patrick Ziegler
84a92d2a1c
github: Ask about regressions in bug reports (#1587)
Often it would be useful to know if something broke after an update or
if the bug was there from the beginning
2019-01-08 16:59:44 +01:00
Patrick Ziegler
b32e48a440
github: Custom issue templates (#1388)
* github: Add template for bug or issue reports

* github: Add template for build issues

* github: Add tempalte for feature requests

* github: Change 'New Issue' links to issue chooser

Github provides an issue chooser dialog when custom issue templates are
used.
2018-08-17 23:34:00 +02:00