From e9cc5756dbb0a2d079a7b5e3438d79945f819df5 Mon Sep 17 00:00:00 2001 From: BossCode45 Date: Sat, 3 Jun 2023 21:30:05 +1200 Subject: feat: Keybind updates Re added the ability to swap super and mod as a config parameter (the ~swapmods~) command). Finally fixed keybinds sometimes not working because of numlock, bitwise & with the modifiers I actually care about. --- config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config.cpp') diff --git a/config.cpp b/config.cpp index cff7a45..6ade520 100644 --- a/config.cpp +++ b/config.cpp @@ -45,6 +45,11 @@ const void Config::addWorkspaceCmd(const CommandArg* argv) numWS++; } +const void Config::swapSuperAltCmd(const CommandArg* argv) +{ + swapSuperAlt ^= true; +} + Config::Config(CommandsModule& commandsModule) : commandsModule(commandsModule) { @@ -53,6 +58,7 @@ Config::Config(CommandsModule& commandsModule) commandsModule.addCommand("outergaps", &Config::outerGapsCmd, 1, {NUM}, this); commandsModule.addCommand("logfile", &Config::logFileCmd, 1, {STR_REST}, this); commandsModule.addCommand("addworkspace", &Config::addWorkspaceCmd, 2, {STR, NUM_ARR_REST}, this); + commandsModule.addCommand("swapmods", &Config::swapSuperAltCmd, 0, {}, this); } std::vector Config::reloadFile() @@ -72,6 +78,7 @@ std::vector Config::loadFromFile(std::string path) outerGaps = 3; logFile = "/tmp/yatlog.txt"; numWS = 0; + swapSuperAlt = false; //Probably need something for workspaces and binds too... -- cgit v1.2.3