From b21f78e41f5f25da092a9d50e5c04562122316e8 Mon Sep 17 00:00:00 2001 From: caffeine01 Date: Tue, 10 Dec 2024 21:07:42 +0000 Subject: [PATCH 1/4] amend review observations --- hyprbars/barDeco.cpp | 6 +----- hyprbars/main.cpp | 7 +++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/hyprbars/barDeco.cpp b/hyprbars/barDeco.cpp index 7ffb2e6..d5ed2b4 100644 --- a/hyprbars/barDeco.cpp +++ b/hyprbars/barDeco.cpp @@ -130,11 +130,7 @@ void CHyprBar::onMouseDown(SCallbackInfo& info, IPointer::SButtonEvent e) { } void CHyprBar::onTouchDown(SCallbackInfo& info) { - if (m_pWindow.lock() != g_pCompositor->m_pLastWindow.lock()) - return; - - const auto PWINDOW = m_pWindow.lock(); - const auto COORDS = cursorRelativeToBar(); + const auto COORDS = cursorRelativeToBar(); static auto* const PHEIGHT = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:bar_height")->getDataStaticPtr(); static auto* const PBARBUTTONPADDING = (Hyprlang::INT* const*)HyprlandAPI::getConfigValue(PHANDLE, "plugin:hyprbars:bar_button_padding")->getDataStaticPtr(); diff --git a/hyprbars/main.cpp b/hyprbars/main.cpp index 48bab9d..67960a8 100644 --- a/hyprbars/main.cpp +++ b/hyprbars/main.cpp @@ -82,7 +82,7 @@ Hyprlang::CParseResult onNewButton(const char* K, const char* V) { } bool userfg = false; - auto fgcolor = configStringToInt(""); + auto fgcolor = configStringToInt("0"); if (vars.size() == 5) { userfg = true; @@ -122,7 +122,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_color", Hyprlang::INT{*configStringToInt("rgba(33333388)")}); HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_height", Hyprlang::INT{15}); - HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_color", Hyprlang::INT{*configStringToInt("rgba(ffffffff)")}); + HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:col.text", Hyprlang::INT{*configStringToInt("rgba(ffffffff)")}); HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_size", Hyprlang::INT{10}); HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_title_enabled", Hyprlang::INT{1}); HyprlandAPI::addConfigValue(PHANDLE, "plugin:hyprbars:bar_text_font", Hyprlang::STRING{"Sans"}); @@ -146,8 +146,7 @@ APICALL EXPORT PLUGIN_DESCRIPTION_INFO PLUGIN_INIT(HANDLE handle) { HyprlandAPI::reloadConfig(); - /* HyprlandAPI::addNotification(PHANDLE, "[hyprbars] Initialized successfully!", CHyprColor{0.2, 1.0, 0.2, 1.0}, 5000); annoying and dumb as fuck.*/ - + HyprlandAPI::addNotification(PHANDLE, "[hyprbars] Initialized successfully!", CHyprColor{0.2, 1.0, 0.2, 1.0}, 5000); return {"hyprbars", "A plugin to add title bars to windows.", "Vaxry", "1.0"}; } From 7f31b2b95ad4413af32d26db6eb2a43a41bf902e Mon Sep 17 00:00:00 2001 From: caffeine01 Date: Tue, 10 Dec 2024 21:12:09 +0000 Subject: [PATCH 2/4] revert flake lock update (got vibe vaxry was not happy) --- flake.lock | 96 ++++++++++-------------------------------------------- 1 file changed, 18 insertions(+), 78 deletions(-) diff --git a/flake.lock b/flake.lock index 5222f7a..ff1c3a0 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1731959031, - "narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=", + "lastModified": 1731496216, + "narHash": "sha256-nlQrNN+tmJ+iP6Ck/czwZI0Hxz3oNvUyGkVruxJwgwA=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "4468981c1c50999f315baa1508f0e53c4ee70c52", + "rev": "3b00e96f90cb0040de6d88ad99bf5f4d443f0c59", "type": "github" }, "original": { @@ -100,42 +100,11 @@ "type": "github" } }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1733248371, - "narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, "hyprland": { "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", "hyprland-protocols": "hyprland-protocols", - "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", @@ -145,11 +114,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1733683959, - "narHash": "sha256-+tHGw4fimhZ9LtGUTpXV8V1EH5AWY6FC/3u5OmZ4I5A=", + "lastModified": 1731526492, + "narHash": "sha256-tzWLCOcIxvJvxB25kC0Q371pc5wBBzbzwSlSNc4L8gw=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "0a27af8cd190315c1f13363ebd11e83d30455d48", + "rev": "3fb47372b79265ebdabeeefdad10359d5b18377a", "type": "github" }, "original": { @@ -183,35 +152,6 @@ "type": "github" } }, - "hyprland-qtutils": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1733472316, - "narHash": "sha256-PvXiFLIExJEJj+goLbIuXLTN5CSDSAUsAfiYSdbbWg0=", - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "rev": "969427419276c7ee170301ef1ebe0f68eb6eb2e2", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "type": "github" - } - }, "hyprlang": { "inputs": { "hyprutils": [ @@ -253,11 +193,11 @@ ] }, "locked": { - "lastModified": 1732288281, - "narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=", + "lastModified": 1731518387, + "narHash": "sha256-aZZw1ZvTMLkcA6udlvkA3hrCkuipoWLy8s/JNnIclxY=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c", + "rev": "315fba5d21d87ddb756d4bebdb49f99d86b0ffe8", "type": "github" }, "original": { @@ -293,11 +233,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733392399, - "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", + "lastModified": 1731139594, + "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", + "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", "type": "github" }, "original": { @@ -334,11 +274,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1733318908, - "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { @@ -403,11 +343,11 @@ ] }, "locked": { - "lastModified": 1733157064, - "narHash": "sha256-NetqJHAN4bbZDQADvpep+wXk2AbMZ2bN6tINz8Kpz6M=", + "lastModified": 1730743262, + "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "fd85ef39369f95eed67fdf3f025e86916edeea2f", + "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d", "type": "github" }, "original": { From b2a89dfcb9c6052ba6bf5b2c9cda464b548b9ae5 Mon Sep 17 00:00:00 2001 From: caffeine01 Date: Tue, 10 Dec 2024 21:34:40 +0000 Subject: [PATCH 3/4] flake.lock 100% needs to be updated as it is using older versions of hyprland which break compilation. --- flake.lock | 96 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index ff1c3a0..34538e8 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1731496216, - "narHash": "sha256-nlQrNN+tmJ+iP6Ck/czwZI0Hxz3oNvUyGkVruxJwgwA=", + "lastModified": 1731959031, + "narHash": "sha256-TGcvIjftziC1CjuiHCzrYDwmOoSFYIhdiKmLetzB5L0=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "3b00e96f90cb0040de6d88ad99bf5f4d443f0c59", + "rev": "4468981c1c50999f315baa1508f0e53c4ee70c52", "type": "github" }, "original": { @@ -100,11 +100,42 @@ "type": "github" } }, + "hyprgraphics": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1733248371, + "narHash": "sha256-FFLJzFTyNhS7tBEEECx0B8Ye/bpmxhFVEKlECgMLc6c=", + "owner": "hyprwm", + "repo": "hyprgraphics", + "rev": "cc95e5babc6065bc3ab4cd195429a9900836ef13", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprgraphics", + "type": "github" + } + }, "hyprland": { "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", + "hyprgraphics": "hyprgraphics", "hyprland-protocols": "hyprland-protocols", + "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", @@ -114,11 +145,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1731526492, - "narHash": "sha256-tzWLCOcIxvJvxB25kC0Q371pc5wBBzbzwSlSNc4L8gw=", + "lastModified": 1733864105, + "narHash": "sha256-WjyOigIoneQijFAHxpu2xHCRdl4PcVctx0c1miPBBIA=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "3fb47372b79265ebdabeeefdad10359d5b18377a", + "rev": "4d05677e8d398b6fa144eae7a98ad4f2a54acb92", "type": "github" }, "original": { @@ -152,6 +183,35 @@ "type": "github" } }, + "hyprland-qtutils": { + "inputs": { + "hyprutils": [ + "hyprland", + "hyprutils" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1733472316, + "narHash": "sha256-PvXiFLIExJEJj+goLbIuXLTN5CSDSAUsAfiYSdbbWg0=", + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "rev": "969427419276c7ee170301ef1ebe0f68eb6eb2e2", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-qtutils", + "type": "github" + } + }, "hyprlang": { "inputs": { "hyprutils": [ @@ -193,11 +253,11 @@ ] }, "locked": { - "lastModified": 1731518387, - "narHash": "sha256-aZZw1ZvTMLkcA6udlvkA3hrCkuipoWLy8s/JNnIclxY=", + "lastModified": 1732288281, + "narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "315fba5d21d87ddb756d4bebdb49f99d86b0ffe8", + "rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c", "type": "github" }, "original": { @@ -233,11 +293,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1731139594, - "narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", + "lastModified": 1733392399, + "narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", + "rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661", "type": "github" }, "original": { @@ -274,11 +334,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1731363552, - "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "lastModified": 1733318908, + "narHash": "sha256-SVQVsbafSM1dJ4fpgyBqLZ+Lft+jcQuMtEL3lQWx2Sk=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", + "rev": "6f4e2a2112050951a314d2733a994fbab94864c6", "type": "github" }, "original": { @@ -343,11 +403,11 @@ ] }, "locked": { - "lastModified": 1730743262, - "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=", + "lastModified": 1733157064, + "narHash": "sha256-NetqJHAN4bbZDQADvpep+wXk2AbMZ2bN6tINz8Kpz6M=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d", + "rev": "fd85ef39369f95eed67fdf3f025e86916edeea2f", "type": "github" }, "original": { From 57b7940dead80a2c5c2513281653fed8311d35f5 Mon Sep 17 00:00:00 2001 From: caffeine01 Date: Tue, 10 Dec 2024 22:28:30 +0000 Subject: [PATCH 4/4] sensible --- hyprbars/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyprbars/main.cpp b/hyprbars/main.cpp index 67960a8..d56ee36 100644 --- a/hyprbars/main.cpp +++ b/hyprbars/main.cpp @@ -82,7 +82,7 @@ Hyprlang::CParseResult onNewButton(const char* K, const char* V) { } bool userfg = false; - auto fgcolor = configStringToInt("0"); + auto fgcolor = configStringToInt("rgb(ffffff)"); if (vars.size() == 5) { userfg = true;