: nply/dwhkd

commit efc05a984f1fc42a97d650cfb345854a4f295c65
parent f90c0ad389fb6c9560714fb14f40211704b7b854
Author: theSoberSobber <akshatshrivastava0010@gmail.com>
Date: Mon, 4 Dec 2023 10:43:34 +0530

add cf/lc
3 files changed, 13 insertions(+), 5 deletions(-)
M
README.md
|
8
++++++--
M
actions.c
|
2
+-
M
config.h
|
8
++++++--
diff --git a/README.md b/README.md
@@ -22,8 +22,10 @@ Please see [VD-Action.md](./VD-action.md).
 // VK_TAB == TAB KEY on Keyboard
 
 // command, argument
-static const char *termcmd[]  = { "wt.exe", NULL };
-static const char *vscode[] = {"code", "D:/code"};
+static const char *termcmd[]  = {NULL, "wt.exe", NULL };
+static const char *vscode[] = {NULL, "code", "D:/code"};
+static const char * codeforces[] = {"open", "https://codeforces.com", NULL};
+static const char * leetcode[] = {"open", "https://leetcode.com", NULL};
 
 #define NUMKEY(x) \
 		{MODKEY,	x+'0',	GoToDesktopNumberW, 	{.i= x ? x : 10}}, \

@@ -34,6 +36,8 @@ static Key keys[] = {
 	{ MODKEY,                       'B',       test,          {0} },
 	{ MODKEY,                       'P',       spawn,      	  {.v = vscode} },
 	{ MODKEY,                     VK_RETURN, spawn,         {.v = termcmd } },
+	{ MODKEY,                     	'C', spawn,         {.v = codeforces } },
+	{ MODKEY,                     	'L', spawn,         {.v = leetcode } },
 	{ MODKEY,                       'E',       toggleexplorer, {0} },
 	{ MODKEY | MOD_SHIFT,                       'Q',       quit,          {0} },
 	#ifdef VDA_FEATURES
diff --git a/actions.c b/actions.c
@@ -9,7 +9,7 @@ void test(const Arg* arg) {
 }
 
 void spawn(const Arg *arg) {
-	ShellExecute(NULL, NULL, ((char **)arg->v)[0], ((char **)arg->v)[1], NULL, SW_SHOWDEFAULT);
+	ShellExecute(NULL, ((char **)arg->v)[0], ((char **)arg->v)[1], ((char **)arg->v)[2], NULL, SW_SHOWDEFAULT);
 }
 
 void toggleexplorer(const Arg *arg) {
diff --git a/config.h b/config.h
@@ -7,8 +7,10 @@
 // VK_TAB == TAB KEY on Keyboard
 
 // command, argument
-static const char *termcmd[]  = { "wt.exe", NULL };
-static const char *vscode[] = {"code", "D:/code"};
+static const char *termcmd[]  = {NULL, "wt.exe", NULL };
+static const char *vscode[] = {NULL, "code", "D:/code"};
+static const char * codeforces[] = {"open", "https://codeforces.com", NULL};
+static const char * leetcode[] = {"open", "https://leetcode.com", NULL};
 
 #define NUMKEY(x) \
 		{MODKEY,	x+'0',	GoToDesktopNumberW, 	{.i= x ? x : 10}}, \

@@ -19,6 +21,8 @@ static Key keys[] = {
 	{ MODKEY,                       'B',       test,          {0} },
 	{ MODKEY,                       'P',       spawn,      	  {.v = vscode} },
 	{ MODKEY,                     VK_RETURN, spawn,         {.v = termcmd } },
+	{ MODKEY,                     	'C', spawn,         {.v = codeforces } },
+	{ MODKEY,                     	'L', spawn,         {.v = leetcode } },
 	{ MODKEY,                       'E',       toggleexplorer, {0} },
 	{ MODKEY | MOD_SHIFT,                       'Q',       quit,          {0} },
 	#ifdef VDA_FEATURES