xaizek / d2if (License: GPLv2+) (since 2018-12-07)
Simple dzen2 input formatter, which is supposed to not waste CPU time for nothing and provides a number of builtin "widgets" for displaying system information.
Commit 7b9620c3eb4931086344ebfccb2f9f3268d0c093

Simplify Player class a bit
No need for that data to be class members.
Author: xaizek
Author date (UTC): 2016-04-20 16:50
Committer name: xaizek
Committer date (UTC): 2016-04-20 16:50
Parent(s): 8dcff69bc9796bc5cde126eb4710f406611aeb0f
Signing key:
Tree: 7d2fa2039069ac9aea6ecb5e0ff5100e9c34d009
File Lines added Lines deleted
src/Player.cpp 2 4
src/Player.hpp 0 3
File src/Player.cpp changed (mode: 100644) (index 2cabf74..4e3baa8)
... ... static std::string getStateMark(MpdState state);
33 33
34 34 Player::Player(const ColorScheme& colorScheme, std::string host, int port) Player::Player(const ColorScheme& colorScheme, std::string host, int port)
35 35 : Field(colorScheme) : Field(colorScheme)
36 , host(std::move(host))
37 , port(port)
38 36 { {
39 std::thread([this]()
37 std::thread([=]()
40 38 { {
41 39 while (true) { while (true) {
42 40 try { try {
43 MpdClient mpdClient(this->host, this->port);
41 MpdClient mpdClient(host, port);
44 42
45 43 while (true) { while (true) {
46 44 const std::string song = mpdClient.getCurrentSong(); const std::string song = mpdClient.getCurrentSong();
File src/Player.hpp changed (mode: 100644) (index c4acdfa..f3755cf)
... ... public:
33 33 virtual void update() override; virtual void update() override;
34 34
35 35 private: private:
36 const std::string host;
37 const int port;
38
39 36 std::shared_ptr<std::string> status; std::shared_ptr<std::string> status;
40 37 }; };
41 38
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/d2if

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/d2if

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master