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 Dec 30, 2023
1 parent 41ebdc3 commit 8deff8d
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 133 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 @@ -159,6 +159,8 @@ class Workspaces : public AModule, public EventHandler {

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

void onConfigReloaded();

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

bool m_allOutputs = false;
Expand All @@ -173,10 +175,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 8deff8d

Please sign in to comment.