Skip to content

Commit

Permalink
chore(style): clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
Syndelis committed Oct 22, 2023
1 parent 11eddd9 commit 1c3746f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/Compositor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,8 @@ void CCompositor::sanityCheckWorkspaces() {
continue;
}

const auto& WORKSPACE = *it;
const auto WINDOWSONWORKSPACE = getWindowsOnWorkspace(WORKSPACE->m_iID);
const auto& WORKSPACE = *it;
const auto WINDOWSONWORKSPACE = getWindowsOnWorkspace(WORKSPACE->m_iID);

if (WINDOWSONWORKSPACE == 0) {
if (!isWorkspaceVisible(WORKSPACE->m_iID)) {
Expand Down
4 changes: 2 additions & 2 deletions src/config/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,10 +1173,10 @@ void CConfigManager::handleWorkspaceRules(const std::string& command, const std:
rules = value.substr(WORKSPACE_DELIM + 1);
}

const static std::string ruleOnCreatedEmtpy = "on-created-empty:";
const static std::string ruleOnCreatedEmtpy = "on-created-empty:";
const static int ruleOnCreatedEmtpyLen = ruleOnCreatedEmtpy.length();

auto assignRule = [&](std::string rule) {
auto assignRule = [&](std::string rule) {
size_t delim = std::string::npos;
if ((delim = rule.find("gapsin:")) != std::string::npos)
wsRule.gapsIn = std::stoi(rule.substr(delim + 7));
Expand Down
26 changes: 13 additions & 13 deletions src/config/ConfigManager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ struct SConfigValue {
};

struct SWorkspaceRule {
std::string monitor = "";
std::string workspaceString = "";
std::string workspaceName = "";
int workspaceId = -1;
bool isDefault = false;
bool isPersistent = false;
std::optional<int64_t> gapsIn;
std::optional<int64_t> gapsOut;
std::optional<int64_t> borderSize;
std::optional<int> border;
std::optional<int> rounding;
std::optional<int> decorate;
std::optional<int> shadow;
std::string monitor = "";
std::string workspaceString = "";
std::string workspaceName = "";
int workspaceId = -1;
bool isDefault = false;
bool isPersistent = false;
std::optional<int64_t> gapsIn;
std::optional<int64_t> gapsOut;
std::optional<int64_t> borderSize;
std::optional<int> border;
std::optional<int> rounding;
std::optional<int> decorate;
std::optional<int> shadow;
std::optional<std::string> onCreatedEmptyRunCmd;
};

Expand Down
4 changes: 2 additions & 2 deletions src/helpers/MiscFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,8 +632,8 @@ int64_t getPPIDof(int64_t pid) {

return 0;
#else
std::string dir = "/proc/" + std::to_string(pid) + "/status";
FILE* infile;
std::string dir = "/proc/" + std::to_string(pid) + "/status";
FILE* infile;

infile = fopen(dir.c_str(), "r");
if (!infile)
Expand Down
5 changes: 2 additions & 3 deletions src/helpers/Workspace.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
#include <string>
#include "../defines.hpp"

enum eFullscreenMode : int8_t
{
enum eFullscreenMode : int8_t {
FULLSCREEN_INVALID = -1,
FULLSCREEN_FULL = 0,
FULLSCREEN_MAXIMIZED
Expand Down Expand Up @@ -54,7 +53,7 @@ class CWorkspace {
std::string m_szLastMonitor = "";

// Whether the user configured command for on-created-empty has been executed, if any
bool m_bOnCreatedEmptyExecuted = false;
bool m_bOnCreatedEmptyExecuted = false;

void startAnim(bool in, bool left, bool instant = false);
void setActive(bool on);
Expand Down

0 comments on commit 1c3746f

Please sign in to comment.