Skip to content

Commit

Permalink
hyprland/workspaces: Use hyprland's persistent workspaces configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
zjeffer committed Feb 4, 2024
1 parent 4c5ff80 commit 2abc7cc
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 144 deletions.
13 changes: 6 additions & 7 deletions include/modules/hyprland/workspaces.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ class Workspace {
int id() const { return m_id; };
std::string name() const { return m_name; };
std::string output() const { return m_output; };
bool isActive() const { return m_active; };
bool isActive() const { return m_isActive; };
bool isSpecial() const { return m_isSpecial; };
bool isPersistent() const { return m_isPersistent; };
bool isVisible() const { return m_isVisible; };
bool isEmpty() const { return m_windows == 0; };
bool isUrgent() const { return m_isUrgent; };

bool handleClicked(GdkEventButton* bt) const;
void setActive(bool value = true) { m_active = value; };
void setActive(bool value = true) { m_isActive = value; };
void setPersistent(bool value = true) { m_isPersistent = value; };
void setUrgent(bool value = true) { m_isUrgent = value; };
void setVisible(bool value = true) { m_isVisible = value; };
Expand All @@ -99,7 +99,7 @@ class Workspace {
std::string m_name;
std::string m_output;
uint m_windows;
bool m_active = false;
bool m_isActive = false;
bool m_isSpecial = false;
bool m_isPersistent = false;
bool m_isUrgent = false;
Expand Down Expand Up @@ -160,6 +160,8 @@ class Workspaces : public AModule, public EventHandler {

void onWindowTitleEvent(std::string const& payload);

void onConfigReloaded();

int windowRewritePriorityFunction(std::string const& window_rule);

void doUpdate();
Expand All @@ -184,10 +186,7 @@ class Workspaces : public AModule, public EventHandler {
{"NUMBER", SortMethod::NUMBER},
{"DEFAULT", SortMethod::DEFAULT}};

void fillPersistentWorkspaces();
void createPersistentWorkspaces();
std::vector<std::string> m_persistentWorkspacesToCreate;
bool m_persistentCreated = false;
void initializeWorkspaces();

std::string m_format;

Expand Down
Loading

0 comments on commit 2abc7cc

Please sign in to comment.