mirror of
				https://github.com/rad4day/Waybar.git
				synced 2025-10-30 23:42:42 +01:00 
			
		
		
		
	Merge branch 'master' into master
This commit is contained in:
		| @@ -1,30 +1,28 @@ | ||||
| #pragma once | ||||
| #include <string> | ||||
| #include <memory> | ||||
| #include <mutex> | ||||
| #include <deque> | ||||
| #include <functional> | ||||
| #include <memory> | ||||
| #include <mutex> | ||||
| #include <string> | ||||
| #include <thread> | ||||
|  | ||||
| namespace waybar::modules::hyprland { | ||||
| class IPC { | ||||
| public: | ||||
|  public: | ||||
|   IPC() { startIPC(); } | ||||
|  | ||||
|   void registerForIPC(const std::string&, std::function<void(const std::string&)>); | ||||
|  | ||||
|   std::string getSocket1Reply(const std::string& rq); | ||||
|  | ||||
| private: | ||||
|  private: | ||||
|   void startIPC(); | ||||
|   void parseIPC(const std::string&); | ||||
|  | ||||
|  void startIPC(); | ||||
|  void parseIPC(const std::string&); | ||||
|  | ||||
|  std::mutex callbackMutex; | ||||
|  std::deque<std::pair<std::string, std::function<void(const std::string&)>>> callbacks; | ||||
|   std::mutex callbackMutex; | ||||
|   std::deque<std::pair<std::string, std::function<void(const std::string&)>>> callbacks; | ||||
| }; | ||||
|  | ||||
| inline std::unique_ptr<IPC> gIPC; | ||||
| inline bool modulesReady = false; | ||||
| }; | ||||
|  | ||||
| };  // namespace waybar::modules::hyprland | ||||
|   | ||||
| @@ -1,20 +1,20 @@ | ||||
| #include <fmt/format.h> | ||||
|  | ||||
| #include "ALabel.hpp" | ||||
| #include "AButton.hpp" | ||||
| #include "bar.hpp" | ||||
| #include "modules/hyprland/backend.hpp" | ||||
| #include "util/json.hpp" | ||||
|  | ||||
| namespace waybar::modules::hyprland { | ||||
|  | ||||
| class Language : public waybar::ALabel { | ||||
| public: | ||||
| class Language : public waybar::AButton { | ||||
|  public: | ||||
|   Language(const std::string&, const waybar::Bar&, const Json::Value&); | ||||
|   ~Language() = default; | ||||
|  | ||||
|   auto update() -> void; | ||||
|  | ||||
| private: | ||||
|  private: | ||||
|   void onEvent(const std::string&); | ||||
|  | ||||
|   void initLanguage(); | ||||
| @@ -26,4 +26,4 @@ private: | ||||
|   std::string layoutName_; | ||||
| }; | ||||
|  | ||||
| } | ||||
| }  // namespace waybar::modules::hyprland | ||||
|   | ||||
| @@ -10,13 +10,13 @@ | ||||
| namespace waybar::modules::hyprland { | ||||
|  | ||||
| class Window : public waybar::ALabel { | ||||
| public: | ||||
|  public: | ||||
|   Window(const std::string&, const waybar::Bar&, const Json::Value&); | ||||
|   ~Window() = default; | ||||
|  | ||||
|   auto update() -> void; | ||||
|  | ||||
| private: | ||||
|  private: | ||||
|   uint getActiveWorkspaceID(std::string); | ||||
|   std::string getLastWindowTitle(uint); | ||||
|   void onEvent(const std::string&); | ||||
| @@ -28,4 +28,4 @@ private: | ||||
|   std::string lastView; | ||||
| }; | ||||
|  | ||||
| } | ||||
| }  // namespace waybar::modules::hyprland | ||||
		Reference in New Issue
	
	Block a user
	 herlev
					herlev