summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorMightyPlaza <123664421+MightyPlaza@users.noreply.github.com>2023-12-17 14:29:58 +0000
committerGitHub <noreply@github.com>2023-12-17 14:29:58 +0000
commit2a777cb71bc727836ca9c73ebb193773a99f8f1e (patch)
tree41cf460712f68a90966060734e5fdd74b7359b3f /src/debug/HyprCtl.cpp
parent9ca0c7d814d6039450ff0341556faa1ce9b37e82 (diff)
hyprctl: add commit date to "hyprctl version" (#4171)
* add commit date to "hyprctl version" modified: scripts/generateVersion.sh modified: src/debug/HyprCtl.cpp modified: src/version.h.in * Nix: add date to hyprctl --------- Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 98526ef4..68b74fa7 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -748,7 +748,7 @@ std::string versionRequest(HyprCtl::eHyprCtlOutputFormat format) {
if (format == HyprCtl::eHyprCtlOutputFormat::FORMAT_NORMAL) {
std::string result = "Hyprland, built from branch " + std::string(GIT_BRANCH) + " at commit " + GIT_COMMIT_HASH + " " + GIT_DIRTY + " (" + commitMsg +
- ").\nTag: " + GIT_TAG + "\n\nflags: (if any)\n";
+ ").\nDate: " + GIT_COMMIT_DATE + "\nTag: " + GIT_TAG + "\n\nflags: (if any)\n";
#ifdef LEGACY_RENDERER
result += "legacyrenderer\n";
@@ -771,9 +771,10 @@ std::string versionRequest(HyprCtl::eHyprCtlOutputFormat format) {
"commit": "{}",
"dirty": {},
"commit_message": "{}",
+ "commit_date": "{}",
"tag": "{}",
"flags": [)#",
- GIT_BRANCH, GIT_COMMIT_HASH, (strcmp(GIT_DIRTY, "dirty") == 0 ? "true" : "false"), escapeJSONStrings(commitMsg), GIT_TAG);
+ GIT_BRANCH, GIT_COMMIT_HASH, (strcmp(GIT_DIRTY, "dirty") == 0 ? "true" : "false"), escapeJSONStrings(commitMsg), GIT_COMMIT_DATE, GIT_TAG);
#ifdef LEGACY_RENDERER
result += "\"legacyrenderer\",";