diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-19 10:41:30 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-19 10:41:30 +1200 |
| commit | 185015b39b8db953b8034f29724ef03de09e7ea1 (patch) | |
| tree | 9a5ac8ffbd65942f4ce0117a5316f7db7f4eb918 /config.h.old | |
| parent | 557faa2603d33d6f6a8b7baa9c9f7891bfcb8d30 (diff) | |
| download | YATwm-185015b39b8db953b8034f29724ef03de09e7ea1.tar.gz YATwm-185015b39b8db953b8034f29724ef03de09e7ea1.zip | |
fixup: Cleaning up old files
Diffstat (limited to 'config.h.old')
| -rw-r--r-- | config.h.old | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/config.h.old b/config.h.old deleted file mode 100644 index 31005e7..0000000 --- a/config.h.old +++ /dev/null @@ -1,93 +0,0 @@ -#pragma once - -#include "error.h" - -#include <toml++/toml.hpp> - -#include <X11/X.h> -#include <X11/keysym.h> - -#include <string> - -enum MoveDir -{ - Up, - Right, - Down, - Left -}; - -typedef union -{ - char* str; - int num; - MoveDir dir; -} KeyArg; - -struct KeyBind -{ - unsigned int modifiers; - KeySym keysym; - void(* func) (const KeyArg arg); - KeyArg args; -}; - -//Keybind commands -#define KEYCOM(X) \ - void X (const KeyArg arg) -KEYCOM(exit); -KEYCOM(spawn); -KEYCOM(toggle); -KEYCOM(kill); -KEYCOM(changeWS); -KEYCOM(wToWS); -KEYCOM(focChange); -KEYCOM(wMove); -KEYCOM(bashSpawn); -KEYCOM(reload); -KEYCOM(wsDump); -KEYCOM(nextMonitor); - -class Config -{ - public: - Config(); - ~Config(); - void free(); - - Err loadFromFile(std::string path); - Err reload(); - - // Startup - std::string* startupBash; - int startupBashc; - - // Main - int gaps; - int outerGaps; - std::string logFile; - - // Workspaces - int numWS; - std::string* workspaceNames; - int workspaceNamesc; - int maxMonitors; - int** screenPreferences; - int screenPreferencesc; - - // Keybinds - KeyBind* binds; - int bindsc; - private: - template <typename T> - T getValue(std::string path, Err* err); - - void loadWorkspaceArrays(toml::table tbl, toml::table defaults, Err* err); - void loadStartupBash(toml::table tbl, toml::table defaults, Err* err); - - toml::table tbl; - toml::table defaults; - - bool loaded = false; - std::string path; -}; |
