aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprpm
diff options
context:
space:
mode:
authorKAGEYAM4 <[email protected]>2024-10-22 04:58:42 +0530
committerGitHub <[email protected]>2024-10-22 00:28:42 +0100
commit5e96d738e698f22969ca502d042d5751711c6d8a (patch)
treeb986e61ac44745c9057283acfe9f875394bde7d3 /hyprpm
parent9df0f0b66c66706c9ce8cf9f80e834d5abfc1e96 (diff)
downloadHyprland-5e96d738e698f22969ca502d042d5751711c6d8a.tar.gz
Hyprland-5e96d738e698f22969ca502d042d5751711c6d8a.zip
hyprpm: Add option to notify on fail and keep original notify (#8167)
* Only generate notification on fail Hyprpm fail/pass notification are mutually exclusive. * Add option to notify on fail and keep original notify (#1) * Add option to notify on fail and keep original notify --------- Co-authored-by: KAGEYAM4 <[email protected]> --------- Co-authored-by: littleblack111 <[email protected]>
Diffstat (limited to 'hyprpm')
-rw-r--r--hyprpm/src/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/hyprpm/src/main.cpp b/hyprpm/src/main.cpp
index 67f14aed..55fb57e2 100644
--- a/hyprpm/src/main.cpp
+++ b/hyprpm/src/main.cpp
@@ -23,7 +23,8 @@ constexpr std::string_view HELP = R"#(┏ hyprpm, a Hyprland Plugin Manager
┣ Flags:
-┣ --notify | -n → Send a hyprland notification for important events (e.g. load fail)
+┣ --notify | -n → Send a hyprland notification for important events (including both successes and fail events)
+┣ --notify-fail | -nn → Send a hyprland notification for fail events only
┣ --help | -h → Show this menu
┣ --verbose | -v → Enable too much logging
┣ --force | -f → Force an operation ignoring checks (e.g. update -f)
@@ -43,7 +44,7 @@ int main(int argc, char** argv, char** envp) {
}
std::vector<std::string> command;
- bool notify = false, verbose = false, force = false, noShallow = false;
+ bool notify = false, notifyFail = false, verbose = false, force = false, noShallow = false;
for (int i = 1; i < argc; ++i) {
if (ARGS[i].starts_with("-")) {
@@ -52,6 +53,8 @@ int main(int argc, char** argv, char** envp) {
return 0;
} else if (ARGS[i] == "--notify" || ARGS[i] == "-n") {
notify = true;
+ } else if (ARGS[i] == "--notify-fail" || ARGS[i] == "-nn") {
+ notifyFail = notify = true;
} else if (ARGS[i] == "--verbose" || ARGS[i] == "-v") {
verbose = true;
} else if (ARGS[i] == "--no-shallow" || ARGS[i] == "-s") {
@@ -155,7 +158,7 @@ int main(int argc, char** argv, char** envp) {
break;
default: break;
}
- } else if (notify) {
+ } else if (notify && !notifyFail) {
g_pPluginManager->notify(ICON_OK, 0, 4000, "[hyprpm] Loaded plugins");
}
} else if (command[0] == "list") {