Chase hyprland.
Add pins for 0.48.0 and 0.48.1
This commit is contained in:
@@ -23,10 +23,10 @@ CHyprEasyLabel::CHyprEasyLabel(PHLWINDOW pWindow, SMotionActionDesc *actionDesc)
|
|||||||
m_cTextColor = actionDesc->textColor;
|
m_cTextColor = actionDesc->textColor;
|
||||||
m_cBackgroundColor = actionDesc->backgroundColor;
|
m_cBackgroundColor = actionDesc->backgroundColor;
|
||||||
m_szTextFont = actionDesc->textFont;
|
m_szTextFont = actionDesc->textFont;
|
||||||
m_iPaddingTop = actionDesc->boxPadding.top;
|
m_iPaddingTop = actionDesc->boxPadding.m_top;
|
||||||
m_iPaddingBottom = actionDesc->boxPadding.bottom;
|
m_iPaddingBottom = actionDesc->boxPadding.m_bottom;
|
||||||
m_iPaddingRight = actionDesc->boxPadding.right;
|
m_iPaddingRight = actionDesc->boxPadding.m_right;
|
||||||
m_iPaddingLeft = actionDesc->boxPadding.left;
|
m_iPaddingLeft = actionDesc->boxPadding.m_left;
|
||||||
m_iRounding = actionDesc->rounding;
|
m_iRounding = actionDesc->rounding;
|
||||||
m_iBorderSize = actionDesc->borderSize;
|
m_iBorderSize = actionDesc->borderSize;
|
||||||
m_cBorderGradient = actionDesc->borderColor;
|
m_cBorderGradient = actionDesc->borderColor;
|
||||||
@@ -209,7 +209,7 @@ void CHyprEasyLabel::damageEntire() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
eDecorationLayer CHyprEasyLabel::getDecorationLayer() {
|
eDecorationLayer CHyprEasyLabel::getDecorationLayer() {
|
||||||
return DECORATION_LAYER_OVER;
|
return DECORATION_LAYER_OVERLAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t CHyprEasyLabel::getDecorationFlags() {
|
uint64_t CHyprEasyLabel::getDecorationFlags() {
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ commit_pins = [
|
|||||||
["12f9a0d0b93f691d4d9923716557154d74777b0a", "3388351d2af672f89b907404668c6076336270e9"],
|
["12f9a0d0b93f691d4d9923716557154d74777b0a", "3388351d2af672f89b907404668c6076336270e9"],
|
||||||
["788ae588979c2a1ff8a660f16e3c502ef5796755", "138f2d3404904fb7f3868a4213c1fa7847417223"],
|
["788ae588979c2a1ff8a660f16e3c502ef5796755", "138f2d3404904fb7f3868a4213c1fa7847417223"],
|
||||||
["254fc2bc6000075f660b4b8ed818a6af544d1d64", "138f2d3404904fb7f3868a4213c1fa7847417223"],
|
["254fc2bc6000075f660b4b8ed818a6af544d1d64", "138f2d3404904fb7f3868a4213c1fa7847417223"],
|
||||||
["0bd541f2fd902dbfa04c3ea2ccf679395e316887", "138f2d3404904fb7f3868a4213c1fa7847417223"]
|
["0bd541f2fd902dbfa04c3ea2ccf679395e316887", "138f2d3404904fb7f3868a4213c1fa7847417223"],
|
||||||
|
["5ee35f914f921e5696030698e74fb5566a804768", "c475d103994e7cde3c560ccd4e2498a454a39474"],
|
||||||
|
["29e2e59fdbab8ed2cc23a20e3c6043d5decb5cdc", "c475d103994e7cde3c560ccd4e2498a454a39474"]
|
||||||
]
|
]
|
||||||
[hyprEasymotion]
|
[hyprEasymotion]
|
||||||
description = "Easymotion"
|
description = "Easymotion"
|
||||||
|
|||||||
24
main.cpp
24
main.cpp
@@ -81,7 +81,7 @@ static bool parseBorderGradient(std::string VALUE, CGradientValueData *DATA) {
|
|||||||
std::string V = VALUE;
|
std::string V = VALUE;
|
||||||
|
|
||||||
CVarList varlist(V, 0, ' ');
|
CVarList varlist(V, 0, ' ');
|
||||||
DATA->m_vColors.clear();
|
DATA->m_colors.clear();
|
||||||
|
|
||||||
std::string parseError = "";
|
std::string parseError = "";
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ static bool parseBorderGradient(std::string VALUE, CGradientValueData *DATA) {
|
|||||||
if (var.find("deg") != std::string::npos) {
|
if (var.find("deg") != std::string::npos) {
|
||||||
// last arg
|
// last arg
|
||||||
try {
|
try {
|
||||||
DATA->m_fAngle = std::stoi(var.substr(0, var.find("deg"))) * (PI / 180.0); // radians
|
DATA->m_angle = std::stoi(var.substr(0, var.find("deg"))) * (PI / 180.0); // radians
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
Debug::log(WARN, "Error parsing gradient {}", V);
|
Debug::log(WARN, "Error parsing gradient {}", V);
|
||||||
return false;
|
return false;
|
||||||
@@ -98,22 +98,22 @@ static bool parseBorderGradient(std::string VALUE, CGradientValueData *DATA) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DATA->m_vColors.size() >= 10) {
|
if (DATA->m_colors.size() >= 10) {
|
||||||
Debug::log(WARN, "Error parsing gradient {}: max colors is 10.", V);
|
Debug::log(WARN, "Error parsing gradient {}: max colors is 10.", V);
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
DATA->m_vColors.push_back(CHyprColor(configStringToInt(var).value_or(0)));
|
DATA->m_colors.push_back(CHyprColor(configStringToInt(var).value_or(0)));
|
||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
Debug::log(WARN, "Error parsing gradient {}", V);
|
Debug::log(WARN, "Error parsing gradient {}", V);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DATA->m_vColors.size() == 0) {
|
if (DATA->m_colors.size() == 0) {
|
||||||
Debug::log(WARN, "Error parsing gradient {}", V);
|
Debug::log(WARN, "Error parsing gradient {}", V);
|
||||||
DATA->m_vColors.push_back(0); // transparent
|
DATA->m_colors.push_back(0); // transparent
|
||||||
}
|
}
|
||||||
|
|
||||||
DATA->updateColorsOk();
|
DATA->updateColorsOk();
|
||||||
@@ -151,8 +151,8 @@ SDispatchResult easymotionDispatch(std::string args)
|
|||||||
actionDesc.rounding = **ROUNDING;
|
actionDesc.rounding = **ROUNDING;
|
||||||
actionDesc.borderSize = **BORDERSIZE;
|
actionDesc.borderSize = **BORDERSIZE;
|
||||||
if(!parseBorderGradient(*BORDERCOLOR, &actionDesc.borderColor)) {
|
if(!parseBorderGradient(*BORDERCOLOR, &actionDesc.borderColor)) {
|
||||||
actionDesc.borderColor.m_vColors.clear();
|
actionDesc.borderColor.m_colors.clear();
|
||||||
actionDesc.borderColor.m_fAngle = 0;
|
actionDesc.borderColor.m_angle = 0;
|
||||||
}
|
}
|
||||||
actionDesc.motionKeys = *MOTIONKEYS;
|
actionDesc.motionKeys = *MOTIONKEYS;
|
||||||
actionDesc.blur = **BLUR;
|
actionDesc.blur = **BLUR;
|
||||||
@@ -185,11 +185,11 @@ SDispatchResult easymotionDispatch(std::string args)
|
|||||||
actionDesc.borderSize = configStringToInt(kv[1]).value_or(0);
|
actionDesc.borderSize = configStringToInt(kv[1]).value_or(0);
|
||||||
} else if (kv[0] == "bordercolor") {
|
} else if (kv[0] == "bordercolor") {
|
||||||
CVarList varlist(kv[1], 0, 's');
|
CVarList varlist(kv[1], 0, 's');
|
||||||
actionDesc.borderColor.m_vColors.clear();
|
actionDesc.borderColor.m_colors.clear();
|
||||||
actionDesc.borderColor.m_fAngle = 0;
|
actionDesc.borderColor.m_angle = 0;
|
||||||
if(!parseBorderGradient(kv[1], &actionDesc.borderColor)) {
|
if(!parseBorderGradient(kv[1], &actionDesc.borderColor)) {
|
||||||
actionDesc.borderColor.m_vColors.clear();
|
actionDesc.borderColor.m_colors.clear();
|
||||||
actionDesc.borderColor.m_fAngle = 0;
|
actionDesc.borderColor.m_angle = 0;
|
||||||
}
|
}
|
||||||
} else if (kv[0] == "motionkeys") {
|
} else if (kv[0] == "motionkeys") {
|
||||||
actionDesc.motionKeys = kv[1];
|
actionDesc.motionKeys = kv[1];
|
||||||
|
|||||||
Reference in New Issue
Block a user