mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Show bar if a workspace becomes urgent
Add a second reason to show the bar besides visible by modifier. Update the visibility based on changes in the workspace urgency. Check all workspaces for urgency and keep the bar visible if at least one has an urgency hint.
This commit is contained in:
@ -30,8 +30,10 @@ class BarIpcClient {
|
||||
private:
|
||||
void onInitialConfig(const struct Ipc::ipc_response& res);
|
||||
void onIpcEvent(const struct Ipc::ipc_response&);
|
||||
void onCmd(const struct Ipc::ipc_response&);
|
||||
void onConfigUpdate(const swaybar_config& config);
|
||||
void onVisibilityUpdate(bool visible_by_modifier);
|
||||
void onUrgencyUpdate(bool visible_by_urgency);
|
||||
void update();
|
||||
|
||||
Bar& bar_;
|
||||
@ -40,8 +42,10 @@ class BarIpcClient {
|
||||
|
||||
swaybar_config bar_config_;
|
||||
bool visible_by_modifier_ = false;
|
||||
bool visible_by_urgency_ = false;
|
||||
|
||||
SafeSignal<bool> signal_visible_;
|
||||
SafeSignal<bool> signal_urgency_;
|
||||
SafeSignal<swaybar_config> signal_config_;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user