From 0b539b0b0278f2d7c2b7629e6d28d8463cba2688 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Mon, 5 Jun 2023 20:35:32 +1200 Subject: Added a very basic config, and fixed some stuff NOTE: for some reason toggling doesn't work anymore --- main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index e74634d..2e1f0ad 100644 --- a/main.cpp +++ b/main.cpp @@ -47,11 +47,13 @@ std::ofstream yatlog; Globals globals; Display*& dpy = globals.dpy; -Window& root = globals.root; +Window &root = globals.root; + +void updateMousePos(); CommandsModule commandsModule; Config cfg(commandsModule); -KeybindsModule keybindsModule(commandsModule, cfg, globals); +KeybindsModule keybindsModule(commandsModule, cfg, globals, &updateMousePos); int sW, sH; int bH; @@ -82,7 +84,6 @@ int currWS = 1; // Usefull functions int FFCF(int sID); void detectScreens(); -void updateMousePos(); void focusRoot(int root); void handleConfigErrs(vector cfgErrs); @@ -270,7 +271,7 @@ void cWS(int newWS) //log("Changing WS with keybind"); - for(int i = 0; i < nscreens; i++) + for(int i = 0; i < cfg.workspaces[newWS - 1].screenPreferencesc; i++) { if(nscreens > cfg.workspaces[newWS - 1].screenPreferences[i]) { @@ -304,6 +305,8 @@ void cWS(int newWS) //log("Roots tiled"); XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + cout << focusedWorkspaces[0] << endl; + //EWMH setCurrentDesktop(currWS); } -- cgit v1.2.3