From 76616e90e1ee013031cd7a6f3d8fd2b58b61f70e Mon Sep 17 00:00:00 2001 From: hellisabove Date: Sun, 22 Jun 2025 15:16:12 +0300 Subject: [PATCH] Added some stuff to config file --- config.h | 38 +++++++++++++++++++------------------- dwm.c | 21 --------------------- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/config.h b/config.h index a27aabd..397bd34 100644 --- a/config.h +++ b/config.h @@ -26,16 +26,15 @@ static const char norm_border[] = "#091833"; static const char sel_fg[] = "#ea00d9"; static const char sel_bg[] = "#321959"; static const char sel_border[] = "#ea00d9"; -/*static const char *colors[][3] = { - [SchemeNorm] = { norm_fg, norm_bg, norm_border }, - [SchemeSel] = { sel_fg, sel_bg, sel_border }, -};*/ static const char *colors[][3] = { - /* fg bg border */ + [SchemeNorm] = { norm_fg, norm_bg, norm_border }, + [SchemeSel] = { sel_fg, sel_bg, sel_border }, +}; +/*static const char *colors[][3] = { +// fg bg border [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -}; - +};*/ /* tagging */ //tag names (upper left) static const char *tags[] = { "1", "2", "3", "4", "5" }; @@ -77,18 +76,19 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ //static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn",dmenufont, "-nb", norm_bg, "-nf", norm_fg, "-sb", sel_bg, "-sf", sel_fg, NULL }; -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; -//sets st as the default terminal -static const char *termcmd[] = { "st", "-e", "zsh", NULL }; +//static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; +static const char *dmenucmd[] = { "rofi", "-show", "drun", NULL}; +/* sets st as the default terminal */ +static const char *termcmd[] = { "kitty", "-e", "zsh", NULL }; /* volume controls */ static const char *upvol[] = { "amixer", "-q", "set", "Master", "5%+", "unmute", NULL }; static const char *downvol[] = { "amixer", "-q", "set", "Master", "5%-", "unmute", NULL }; static const char *mutevol[] = { "amixer", "-q", "set", "Master", "toggle", NULL }; /* brightness controls */ -static const char *light_up[] = { "brightnessctl", "--device", "amdgpu_bl0", "set", "+10%", NULL }; -static const char *light_down[] = { "brightnessctl", "--device", "amdgpu_bl0", "set", "10%-", NULL }; -static const char *kbdl_up[] = { "brightnessctl", "--device", "asus::kbd_backlight", "set", "+10%", NULL }; -static const char *kbdl_down[] = {"brightnessctl", "--device", "asus::kbd_backlight", "set", "10%-", NULL }; +static const char *light_up[] = { "brightnessctl", "--device", "intel_backlight", "set", "+10%", NULL }; +static const char *light_down[] = { "brightnessctl", "--device", "intel_backlight", "set", "10%-", NULL }; +//static const char *kbdl_up[] = { "brightnessctl", "--device", "asus::kbd_backlight", "set", "+10%", NULL }; +//tatic const char *kbdl_down[] = {"brightnessctl", "--device", "asus::kbd_backlight", "set", "10%-", NULL }; static Key keys[] = { /* modifier key function argument */ @@ -121,11 +121,11 @@ static Key keys[] = { { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, - { 0, XF86XK_KbdBrightnessUp, spawn, {.v = kbdl_up } }, - { 0, XF86XK_KbdBrightnessDown, spawn, {.v = kbdl_down } }, - { 0, XF86XK_MonBrightnessUp, spawn, {.v = light_up } }, - { 0, XF86XK_MonBrightnessDown, spawn, {.v = light_down } }, - TAGKEYS( XK_1, 0) +// { 0, XF86XK_KbdBrightnessUp, spawn, {.v = kbdl_up } }, +// { 0, XF86XK_KbdBrightnessDown, spawn, {.v = kbdl_down } }, + { 0, XF86XK_MonBrightnessUp, spawn, {.v = light_up } }, + { 0, XF86XK_MonBrightnessDown, spawn, {.v = light_down } }, + TAGKEYS( XK_1, 0) TAGKEYS( XK_2, 1) TAGKEYS( XK_3, 2) TAGKEYS( XK_4, 3) diff --git a/dwm.c b/dwm.c index c8564fe..82326e2 100644 --- a/dwm.c +++ b/dwm.c @@ -188,7 +188,6 @@ static void detachstack(Client *c); static Monitor *dirtomon(int dir); static void drawbar(Monitor *m); static void drawbars(void); -static void enternotify(XEvent *e); static void expose(XEvent *e); static void focus(Client *c); static void focusin(XEvent *e); @@ -286,7 +285,6 @@ static void (*handler[LASTEvent]) (XEvent *) = { [ConfigureRequest] = configurerequest, [ConfigureNotify] = configurenotify, [DestroyNotify] = destroynotify, - //[EnterNotify] = enternotify, [Expose] = expose, [FocusIn] = focusin, [KeyPress] = keypress, @@ -853,25 +851,6 @@ drawbars(void) drawbar(m); } -void -enternotify(XEvent *e) -{ - Client *c; - Monitor *m; - XCrossingEvent *ev = &e->xcrossing; - - if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) - return; - c = wintoclient(ev->window); - m = c ? c->mon : wintomon(ev->window); - if (m != selmon) { - unfocus(selmon->sel, 1); - selmon = m; - } else if (!c || c == selmon->sel) - return; - focus(c); -} - void expose(XEvent *e) {