mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-22 13:35:57 +01:00
better time to clear logs
This commit is contained in:
parent
7bf163d45b
commit
abc4c6d36e
5 changed files with 15 additions and 9 deletions
|
@ -17,14 +17,6 @@ void ConfigManager::init() {
|
||||||
configValues["max_fps"].intValue = 60;
|
configValues["max_fps"].intValue = 60;
|
||||||
|
|
||||||
ConfigManager::loadConfigLoadVars();
|
ConfigManager::loadConfigLoadVars();
|
||||||
|
|
||||||
// Clear logs
|
|
||||||
std::ofstream logs;
|
|
||||||
const char* const ENVHOME = getenv("HOME");
|
|
||||||
const std::string DEBUGPATH = ENVHOME + (std::string) "/.hypr.log";
|
|
||||||
logs.open(DEBUGPATH, std::ios::out | std::ios::trunc);
|
|
||||||
logs << " ";
|
|
||||||
logs.close();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleBind(const std::string& command, const std::string& value) {
|
void handleBind(const std::string& command, const std::string& value) {
|
||||||
|
|
|
@ -5,9 +5,12 @@ Started by Vaxry on 2021 / 11 / 17
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
#include "windowManager.hpp"
|
#include "windowManager.hpp"
|
||||||
|
|
||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
|
clearLogs();
|
||||||
|
|
||||||
Debug::log(LOG, "Hypr debug log. Built on " + std::string(__DATE__) + " at " + std::string(__TIME__));
|
Debug::log(LOG, "Hypr debug log. Built on " + std::string(__DATE__) + " at " + std::string(__TIME__));
|
||||||
|
|
||||||
g_pWindowManager->DisplayConnection = xcb_connect(NULL, NULL);
|
g_pWindowManager->DisplayConnection = xcb_connect(NULL, NULL);
|
||||||
|
|
|
@ -14,3 +14,12 @@ std::string exec(const char* cmd) {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clearLogs() {
|
||||||
|
std::ofstream logs;
|
||||||
|
const char* const ENVHOME = getenv("HOME");
|
||||||
|
const std::string DEBUGPATH = ENVHOME + (std::string) "/.hypr.log";
|
||||||
|
logs.open(DEBUGPATH, std::ios::out | std::ios::trunc);
|
||||||
|
logs << " ";
|
||||||
|
logs.close();
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../defines.hpp"
|
#include "../defines.hpp"
|
||||||
|
#include <fstream>
|
||||||
|
|
||||||
std::string exec(const char* cmd);
|
std::string exec(const char* cmd);
|
||||||
|
void clearLogs();
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "bar/Bar.hpp"
|
#include "bar/Bar.hpp"
|
||||||
#include "config/ConfigManager.hpp"
|
#include "config/ConfigManager.hpp"
|
||||||
#include "utilities/Monitor.hpp"
|
#include "utilities/Monitor.hpp"
|
||||||
|
#include "utilities/Util.hpp"
|
||||||
|
|
||||||
class CWindowManager {
|
class CWindowManager {
|
||||||
public:
|
public:
|
||||||
|
|
Loading…
Reference in a new issue