From 5c836e6460ae5e8c290cfff61ec0d2d0e99dfa15 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 16 Jul 2022 15:57:31 +0200 Subject: added master layout --- src/config/ConfigManager.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 00550878..250ee6e5 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -43,6 +43,8 @@ void CConfigManager::setDefaultVars() { configValues["general:col.active_border"].intValue = 0xffffffff; configValues["general:col.inactive_border"].intValue = 0xff444444; configValues["general:cursor_inactive_timeout"].intValue = 0; + + configValues["general:layout"].strValue = "dwindle"; configValues["misc:disable_hyprland_logo"].intValue = 0; configValues["misc:disable_splash_rendering"].intValue = 0; @@ -80,6 +82,9 @@ void CConfigManager::setDefaultVars() { configValues["dwindle:special_scale_factor"].floatValue = 0.8f; configValues["dwindle:split_width_multiplier"].floatValue = 1.0f; + configValues["master:special_scale_factor"].floatValue = 0.8f; + configValues["master:new_is_master"].intValue = 1; + configValues["animations:enabled"].intValue = 1; configValues["animations:speed"].floatValue = 7.f; configValues["animations:curve"].strValue = "default"; @@ -923,6 +928,9 @@ void CConfigManager::loadConfigLoadVars() { // Update window border colors g_pCompositor->updateAllWindowsAnimatedDecorationValues(); + // update layout + g_pLayoutManager->switchToLayout(configValues["general:layout"].strValue); + // Force the compositor to fully re-render all monitors for (auto& m : g_pCompositor->m_vMonitors) m->forceFullFrames = 2; -- cgit v1.2.3 From aac546b7710e14397f6986c55ad628fedac2de14 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 16 Jul 2022 16:27:17 +0200 Subject: added center windowrule --- src/config/ConfigManager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 250ee6e5..dc2d3d48 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -571,6 +571,7 @@ void CConfigManager::handleWindowRule(const std::string& command, const std::str && RULE.find("monitor") != 0 && RULE != "nofocus" && RULE != "noblur" + && RULE != "center" && RULE != "fullscreen" && RULE.find("animation") != 0 && RULE.find("rounding") != 0 -- cgit v1.2.3 From 6f1b9d6af97a15f4ee13a137924d22cb98d2a855 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 16 Jul 2022 23:24:42 +0200 Subject: add master:new_on_top --- src/config/ConfigManager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index dc2d3d48..6ca263ee 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -84,6 +84,7 @@ void CConfigManager::setDefaultVars() { configValues["master:special_scale_factor"].floatValue = 0.8f; configValues["master:new_is_master"].intValue = 1; + configValues["master:new_on_top"].intValue = 0; configValues["animations:enabled"].intValue = 1; configValues["animations:speed"].floatValue = 7.f; -- cgit v1.2.3 From 60cc33a53cd401be92673c144eaa67555525933e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Mon, 18 Jul 2022 11:46:42 +0200 Subject: added time logging --- src/config/ConfigManager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 6ca263ee..8990e251 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -24,6 +24,7 @@ CConfigManager::CConfigManager() { configPaths.emplace_back(CONFIGPATH); Debug::disableLogs = &configValues["debug:disable_logs"].intValue; + Debug::disableTime = &configValues["debug:disable_time"].intValue; } void CConfigManager::setDefaultVars() { @@ -55,6 +56,7 @@ void CConfigManager::setDefaultVars() { configValues["debug:overlay"].intValue = 0; configValues["debug:damage_blink"].intValue = 0; configValues["debug:disable_logs"].intValue = 0; + configValues["debug:disable_time"].intValue = 1; configValues["decoration:rounding"].intValue = 1; configValues["decoration:blur"].intValue = 1; -- cgit v1.2.3 From 1ba600ca23706683ddd4035ce12cace43b911980 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 19 Jul 2022 18:35:24 +0200 Subject: added workspace swipe fingers --- src/config/ConfigManager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 8990e251..81e63b1b 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -126,6 +126,7 @@ void CConfigManager::setDefaultVars() { configValues["input:touchpad:drag_lock"].intValue = 0; configValues["gestures:workspace_swipe"].intValue = 0; + configValues["gestures:workspace_swipe_fingers"].intValue = 3; configValues["gestures:workspace_swipe_distance"].intValue = 300; configValues["gestures:workspace_swipe_invert"].intValue = 1; configValues["gestures:workspace_swipe_min_speed_to_force"].intValue = 30; -- cgit v1.2.3 From d52446135bd46dc0260d9507e82173847d4196c8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Tue, 19 Jul 2022 19:26:53 +0200 Subject: add sensitivity per device & reload mice on config --- src/config/ConfigManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 81e63b1b..9d474fcc 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -108,6 +108,7 @@ void CConfigManager::setDefaultVars() { configValues["animations:workspaces_speed"].floatValue = 0.f; configValues["animations:workspaces"].intValue = 1; + configValues["input:sensitivity"].floatValue = 0.f; configValues["input:kb_layout"].strValue = "us"; configValues["input:kb_variant"].strValue = STRVAL_EMPTY; configValues["input:kb_options"].strValue = STRVAL_EMPTY; @@ -140,6 +141,7 @@ void CConfigManager::setDefaultVars() { void CConfigManager::setDeviceDefaultVars(const std::string& dev) { auto& cfgValues = deviceConfigs[dev]; + cfgValues["sensitivity"].floatValue = 0.f; cfgValues["kb_layout"].strValue = "us"; cfgValues["kb_variant"].strValue = STRVAL_EMPTY; cfgValues["kb_options"].strValue = STRVAL_EMPTY; @@ -902,8 +904,10 @@ void CConfigManager::loadConfigLoadVars() { g_pLayoutManager->getCurrentLayout()->recalculateMonitor(m->ID); // Update the keyboard layout to the cfg'd one if this is not the first launch - if (!isFirstLaunch) + if (!isFirstLaunch) { g_pInputManager->setKeyboardLayout(); + g_pInputManager->setMouseConfigs(); + } // Calculate the internal vars configValues["general:main_mod_internal"].intValue = g_pKeybindManager->stringToModMask(configValues["general:main_mod"].strValue); -- cgit v1.2.3 From fc33cae70cab2c5acaeac77e8a5c2594c7292bbd Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 20 Jul 2022 22:33:43 +0200 Subject: change bind flag parsing --- src/config/ConfigManager.cpp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 9d474fcc..fa9a1334 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -506,9 +506,21 @@ void CConfigManager::handleAnimation(const std::string& command, const std::stri configSetValueSafe("animations:" + ANIMNAME + "_style", curitem); } -void CConfigManager::handleBind(const std::string& command, const std::string& value, bool locked) { +void CConfigManager::handleBind(const std::string& command, const std::string& value) { // example: - // bind=SUPER,G,exec,dmenu_run + // bind[fl]=SUPER,G,exec,dmenu_run + + // flags + bool locked = false; + const auto ARGS = command.substr(4); + for (auto& arg : ARGS) { + if (arg == 'l') { + locked = true; + } else { + parseError = "bind: invalid flag"; + return; + } + } auto valueCopy = value; @@ -710,8 +722,7 @@ std::string CConfigManager::parseKeyword(const std::string& COMMAND, const std:: } } else if (COMMAND == "monitor") handleMonitor(COMMAND, VALUE); - else if (COMMAND == "bind") handleBind(COMMAND, VALUE); - else if (COMMAND == "bindl") handleBind(COMMAND, VALUE, true); + else if (COMMAND.find("bind") == 0) handleBind(COMMAND, VALUE); else if (COMMAND == "unbind") handleUnbind(COMMAND, VALUE); else if (COMMAND == "workspace") handleDefaultWorkspace(COMMAND, VALUE); else if (COMMAND == "windowrule") handleWindowRule(COMMAND, VALUE); -- cgit v1.2.3 From fa2bd3b1a846e7395f96b3bd3587a5ef92ed30be Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Wed, 20 Jul 2022 22:45:06 +0200 Subject: added keybinds on key up --- src/config/ConfigManager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index fa9a1334..deca2fcd 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -512,10 +512,14 @@ void CConfigManager::handleBind(const std::string& command, const std::string& v // flags bool locked = false; + bool release = false; const auto ARGS = command.substr(4); + for (auto& arg : ARGS) { if (arg == 'l') { locked = true; + } else if (arg == 'r') { + release = true; } else { parseError = "bind: invalid flag"; return; @@ -552,9 +556,9 @@ void CConfigManager::handleBind(const std::string& command, const std::string& v if (KEY != "") { if (isNumber(KEY) && std::stoi(KEY) > 9) - g_pKeybindManager->addKeybind(SKeybind{"", std::stoi(KEY), MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap}); + g_pKeybindManager->addKeybind(SKeybind{"", std::stoi(KEY), MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap, release}); else - g_pKeybindManager->addKeybind(SKeybind{KEY, -1, MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap}); + g_pKeybindManager->addKeybind(SKeybind{KEY, -1, MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap, release}); } } -- cgit v1.2.3