From 8dea2c5a5b8db89e7b7359fb652d04dac9402f3e Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Tue, 11 Jan 2022 14:58:23 -0400 Subject: [PATCH 1/8] update theme to the "sunset" color palette --- config.def.h | 122 ++++++++++++++++++++++---------------------- themes/sunset.theme | 7 +++ 2 files changed, 68 insertions(+), 61 deletions(-) create mode 100644 themes/sunset.theme diff --git a/config.def.h b/config.def.h index 74dbadae..e4632ab7 100644 --- a/config.def.h +++ b/config.def.h @@ -7,45 +7,45 @@ static const unsigned int borderpx = 3; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int startmenusize = 30; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ -static const unsigned int systrayspacing = 0; /* systray spacing */ +static const unsigned int systrayspacing = 2; /* systray spacing */ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = {"Inter-Regular:size=12", "Fira Code Nerd Font:size=12"}; +static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code:style=SemiLight:size=12"}; static int barheight; static char xresourcesfont[30]; -static char col_bg[] = "#121212"; -static char col_text[] = "#DFDFDF"; -static char col_black[] = "#000000"; +static char col_bg[] = "#161923"; +static char col_text[] = "#B7BCD4"; +static char col_black[] = "#161923"; -static char col_bg_accent[] = "#384252"; -static char col_bg_accent_hover[] = "#4C5564"; -static char col_bg_hover[] = "#1C1C1C"; +static char col_bg_accent[] = "#1F2437"; +static char col_bg_accent_hover[] = "#2C334D"; +static char col_bg_hover[] = "#1F2437"; -static char col_light_blue[] = "#89B3F7"; -static char col_light_blue_hover[] = "#a1c2f9"; -static char col_blue[] = "#536DFE"; -static char col_blue_hover[] = "#758afe"; +static char col_light_blue[] = "#8A8BBE"; +static char col_light_blue_hover[] = "#A886C3"; +static char col_blue[] = "#67689F"; +static char col_blue_hover[] = "#8762A5"; -static char col_light_green[] = "#81c995"; -static char col_light_green_hover[] = "#99d3aa"; -static char col_green[] = "#1e8e3e"; -static char col_green_hover[] = "#4ba465"; +static char col_light_green[] = "#D879B4"; +static char col_light_green_hover[] = "#E675A8"; +static char col_green[] = "#BC5294"; +static char col_green_hover[] = "#CB4A85"; -static char col_light_yellow[] = "#fdd663"; -static char col_light_yellow_hover[] = "#fddd82"; -static char col_yellow[] = "#f9ab00"; -static char col_yellow_hover[] = "#f9bb33"; +static char col_light_yellow[] = "#F1739A"; +static char col_light_yellow_hover[] = "#F9728A"; +static char col_yellow[] = "#D84572"; +static char col_yellow_hover[] = "#E2415D"; -static char col_light_red[] = "#f28b82"; -static char col_light_red_hover[] = "#f4a19a"; -static char col_red[] = "#d93025"; -static char col_red_hover[] = "#e05951"; +static char col_light_red[] = "#FE7478"; +static char col_light_red_hover[] = "#FF7965"; +static char col_red[] = "#E84045"; +static char col_red_hover[] = "#E84C34"; static const char *tagcolors[2][5][3] = { [SchemeNoHover] = { @@ -57,22 +57,22 @@ static const char *tagcolors[2][5][3] = { [SchemeTagFilled] = { [ColFg] = col_text, [ColBg] = col_bg_accent, - [ColDetail] = col_light_blue, + [ColDetail] = col_light_yellow, }, [SchemeTagFocus] = { - [ColFg] = col_black, - [ColBg] = col_light_green, - [ColDetail] = col_green, - }, - [SchemeTagNoFocus] = { [ColFg] = col_black, [ColBg] = col_light_yellow, [ColDetail] = col_yellow, }, - [SchemeTagEmpty] = { + [SchemeTagNoFocus] = { [ColFg] = col_black, [ColBg] = col_light_red, [ColDetail] = col_red, + }, + [SchemeTagEmpty] = { + [ColFg] = col_black, + [ColBg] = col_light_blue, + [ColDetail] = col_blue, } }, [SchemeHover] = { @@ -84,22 +84,22 @@ static const char *tagcolors[2][5][3] = { [SchemeTagFilled] = { [ColFg] = col_text, [ColBg] = col_bg_accent_hover, - [ColDetail] = col_light_blue_hover, + [ColDetail] = col_light_yellow_hover, }, [SchemeTagFocus] = { - [ColFg] = col_black, - [ColBg] = col_light_green_hover, - [ColDetail] = col_green_hover, - }, - [SchemeTagNoFocus] = { [ColFg] = col_black, [ColBg] = col_light_yellow_hover, [ColDetail] = col_yellow_hover, }, - [SchemeTagEmpty] = { + [SchemeTagNoFocus] = { [ColFg] = col_black, [ColBg] = col_light_red_hover, [ColDetail] = col_red_hover, + }, + [SchemeTagEmpty] = { + [ColFg] = col_black, + [ColBg] = col_light_blue_hover, + [ColDetail] = col_blue_hover, } } }; @@ -109,7 +109,7 @@ static const char *windowcolors[2][7][3] = { [SchemeWinFocus] = { [ColFg] = col_text, [ColBg] = col_bg_accent, - [ColDetail] = col_light_blue, + [ColDetail] = col_light_yellow, }, [SchemeWinNormal] = { [ColFg] = col_text, @@ -117,14 +117,14 @@ static const char *windowcolors[2][7][3] = { [ColDetail] = col_bg, }, [SchemeWinMinimized] = { - [ ColFg ] = col_bg_accent, + [ ColFg ] = col_light_blue, [ ColBg ] = col_bg, [ ColDetail ] = col_bg, }, [SchemeWinSticky] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_yellow, - [ ColDetail ] = col_yellow, + [ ColBg ] = col_light_green, + [ ColDetail ] = col_bg, }, [ SchemeWinStickyFocus ] = { [ ColFg ] = col_black, @@ -134,12 +134,12 @@ static const char *windowcolors[2][7][3] = { [SchemeWinOverlay] = { [ ColFg ] = col_black, [ ColBg ] = col_light_yellow, - [ ColDetail ] = col_yellow, + [ ColDetail ] = col_bg, }, [SchemeWinOverlayFocus] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_green, - [ ColDetail ] = col_green, + [ ColBg ] = col_light_yellow, + [ ColDetail ] = col_yellow, }, }, //TODO: different hover colors @@ -147,7 +147,7 @@ static const char *windowcolors[2][7][3] = { [SchemeWinFocus] = { [ColFg] = col_text, [ColBg] = col_bg_accent_hover, - [ColDetail] = col_light_blue_hover, + [ColDetail] = col_light_yellow_hover, }, [SchemeWinNormal] = { [ColFg] = col_text, @@ -155,14 +155,14 @@ static const char *windowcolors[2][7][3] = { [ColDetail] = col_bg_hover, }, [SchemeWinMinimized] = { - [ ColFg ] = col_bg_accent_hover, - [ ColBg ] = col_bg, - [ ColDetail ] = col_bg, + [ ColFg ] = col_light_blue_hover, + [ ColBg ] = col_bg_hover, + [ ColDetail ] = col_bg_hover, }, [SchemeWinSticky] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_yellow_hover, - [ ColDetail ] = col_yellow_hover, + [ ColBg ] = col_light_green_hover, + [ ColDetail ] = col_bg_hover, }, [ SchemeWinStickyFocus ] = { [ ColFg ] = col_black, @@ -172,12 +172,12 @@ static const char *windowcolors[2][7][3] = { [SchemeWinOverlay] = { [ ColFg ] = col_black, [ ColBg ] = col_light_yellow_hover, - [ ColDetail ] = col_yellow_hover, + [ ColDetail ] = col_bg_hover, }, [SchemeWinOverlayFocus] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_green_hover, - [ ColDetail ] = col_green_hover, + [ ColBg ] = col_light_yellow_hover, + [ ColDetail ] = col_yellow_hover, }, } }; @@ -191,8 +191,8 @@ static const char *closebuttoncolors[2][3][3] = { }, [ SchemeCloseLocked ] = { [ ColFg ] = col_text, - [ ColBg ] = col_light_yellow, - [ ColDetail ] = col_yellow + [ ColBg ] = col_light_green, + [ ColDetail ] = col_green }, [ SchemeCloseFullscreen ] = { [ColFg] = col_text, @@ -208,8 +208,8 @@ static const char *closebuttoncolors[2][3][3] = { }, [ SchemeCloseLocked ] = { [ ColFg ] = col_text, - [ ColBg ] = col_light_yellow_hover, - [ ColDetail ] = col_yellow_hover + [ ColBg ] = col_light_green_hover, + [ ColDetail ] = col_green_hover }, [ SchemeCloseFullscreen ] = { [ColFg] = col_text, @@ -220,10 +220,10 @@ static const char *closebuttoncolors[2][3][3] = { }; static const char *bordercolors[] = { - [ SchemeBorderNormal ] = col_bg_accent, - [ SchemeBorderTileFocus ] = col_light_blue, + [ SchemeBorderNormal ] = col_bg, + [ SchemeBorderTileFocus ] = col_light_yellow, [ SchemeBorderFloatFocus ] = col_light_green, - [ SchemeBorderSnap ] = col_light_yellow + [ SchemeBorderSnap ] = col_light_blue }; static const char *statusbarcolors[] = { diff --git a/themes/sunset.theme b/themes/sunset.theme new file mode 100644 index 00000000..a3597e18 --- /dev/null +++ b/themes/sunset.theme @@ -0,0 +1,7 @@ +static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code SemiLight:style=SemiLight:size=12"}; +static const char col_gray1[] = "#1F2437"; /* top bar d */ +static const char col_gray2[] = "#B7BCD4";/*unfocused fonts d */ +static const char col_gray3[] = "#1F2437";/*unfocused border d */ +static const char col_gray4[] = "#B7BCD4";/*focused fonts d */ +static const char col_gray5[] = "#F1739A";/*focused windows d */ +static const char col_cyan[] = "#F1739A";/*focused instantmenu or topbar d */ From 6314d3ab935a80c62a5d4aec99426ec81a722474 Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Tue, 11 Jan 2022 15:53:01 -0400 Subject: [PATCH 2/8] fix Ubuntu Light font --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index e4632ab7..46f8dc08 100644 --- a/config.def.h +++ b/config.def.h @@ -12,7 +12,7 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display sy static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code:style=SemiLight:size=12"}; +static const char *fonts[] = {"Ubuntu:size=12:style=Light", "Cascadia Code:style=SemiLight:size=12"}; static int barheight; static char xresourcesfont[30]; From b4966c7e9159bdebe054c403b7464fe17e815222 Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 03:49:22 -0300 Subject: [PATCH 3/8] add support for arbitrary refresh rates in animations --- config.mk | 5 ++++- instantwm.c | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/config.mk b/config.mk index 1fd3de4e..3c128e63 100644 --- a/config.mk +++ b/config.mk @@ -15,6 +15,9 @@ X11LIB = /usr/X11R6/lib XINERAMALIBS = -lXinerama XINERAMAFLAGS = -DXINERAMA +# XRandR +XRANDRLIBS = -lXrandr + # freetype FREETYPELIBS = -lfontconfig -lXft FREETYPEINC = /usr/include/freetype2 @@ -23,7 +26,7 @@ FREETYPEINC = /usr/include/freetype2 # includes and libs INCS = -I${X11INC} -I${FREETYPEINC} -LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} -lm +LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${XRANDRLIBS} ${FREETYPELIBS} -lm # flags CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} diff --git a/instantwm.c b/instantwm.c index d0b9adee..1bb16dde 100644 --- a/instantwm.c +++ b/instantwm.c @@ -23,6 +23,7 @@ #include #include +#include #include #include #include @@ -447,11 +448,22 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, width = w ? w : c->w; height = h ? h : c->h; - // halve frames if enough events are queried - frames = frames / 1 + (XEventsQueued(dpy, QueuedAlready) > 50); + XRRScreenConfiguration *conf = XRRGetScreenInfo(dpy, RootWindow(dpy, 0)); + short refresh_rate = XRRConfigCurrentRate(conf); + + //? scale the framerate properly for !=60Hz displays + frames = frames * (refresh_rate / 60); + double usecs = (1 / (double)refresh_rate) * 1000000; + + // halve framerate if enough events are queried + if (XEventsQueued(dpy, QueuedAlready) > 50) { + frames = frames / 2; + usecs = usecs * 2; + } // No animation if even more events are queried if (!frames || XEventsQueued(dpy, QueuedAlready) > 100) { + usecs = 0; if (resetpos) resize(c, c->x, c->y, width, height, 0); else @@ -486,7 +498,7 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, oldy + easeOutCubic(((double)time / frames)) * (y - oldy), width, height, 1); time++; - usleep(15000); + usleep(usecs); } } } From 964699fde69a784b9572e576e16045a74fe703ef Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 03:55:43 -0300 Subject: [PATCH 4/8] Revert "fix Ubuntu Light font" This reverts commit 6314d3ab935a80c62a5d4aec99426ec81a722474. --- config.def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index e3e70a33..06d9dd5d 100644 --- a/config.def.h +++ b/config.def.h @@ -12,7 +12,7 @@ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display sy static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = {"Ubuntu:size=12:style=Light", "Cascadia Code:style=SemiLight:size=12"}; +static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code:style=SemiLight:size=12"}; static int barheight; static char xresourcesfont[30]; From 9b33b8f10201739627d26468e226ed43216ca5bf Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 03:57:08 -0300 Subject: [PATCH 5/8] Revert "update theme to the "sunset" color palette" This reverts commit 8dea2c5a5b8db89e7b7359fb652d04dac9402f3e. --- config.def.h | 122 ++++++++++++++++++++++---------------------- themes/sunset.theme | 7 --- 2 files changed, 61 insertions(+), 68 deletions(-) delete mode 100644 themes/sunset.theme diff --git a/config.def.h b/config.def.h index 06d9dd5d..fa766db8 100644 --- a/config.def.h +++ b/config.def.h @@ -7,45 +7,45 @@ static const unsigned int borderpx = 3; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const unsigned int startmenusize = 30; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ -static const unsigned int systrayspacing = 2; /* systray spacing */ +static const unsigned int systrayspacing = 0; /* systray spacing */ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ static const int showsystray = 1; /* 0 means no systray */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code:style=SemiLight:size=12"}; +static const char *fonts[] = {"Inter-Regular:size=12", "Fira Code Nerd Font:size=12"}; static int barheight; static char xresourcesfont[30]; -static char col_bg[] = "#161923"; -static char col_text[] = "#B7BCD4"; -static char col_black[] = "#161923"; +static char col_bg[] = "#121212"; +static char col_text[] = "#DFDFDF"; +static char col_black[] = "#000000"; -static char col_bg_accent[] = "#1F2437"; -static char col_bg_accent_hover[] = "#2C334D"; -static char col_bg_hover[] = "#1F2437"; +static char col_bg_accent[] = "#384252"; +static char col_bg_accent_hover[] = "#4C5564"; +static char col_bg_hover[] = "#1C1C1C"; -static char col_light_blue[] = "#8A8BBE"; -static char col_light_blue_hover[] = "#A886C3"; -static char col_blue[] = "#67689F"; -static char col_blue_hover[] = "#8762A5"; +static char col_light_blue[] = "#89B3F7"; +static char col_light_blue_hover[] = "#a1c2f9"; +static char col_blue[] = "#536DFE"; +static char col_blue_hover[] = "#758afe"; -static char col_light_green[] = "#D879B4"; -static char col_light_green_hover[] = "#E675A8"; -static char col_green[] = "#BC5294"; -static char col_green_hover[] = "#CB4A85"; +static char col_light_green[] = "#81c995"; +static char col_light_green_hover[] = "#99d3aa"; +static char col_green[] = "#1e8e3e"; +static char col_green_hover[] = "#4ba465"; -static char col_light_yellow[] = "#F1739A"; -static char col_light_yellow_hover[] = "#F9728A"; -static char col_yellow[] = "#D84572"; -static char col_yellow_hover[] = "#E2415D"; +static char col_light_yellow[] = "#fdd663"; +static char col_light_yellow_hover[] = "#fddd82"; +static char col_yellow[] = "#f9ab00"; +static char col_yellow_hover[] = "#f9bb33"; -static char col_light_red[] = "#FE7478"; -static char col_light_red_hover[] = "#FF7965"; -static char col_red[] = "#E84045"; -static char col_red_hover[] = "#E84C34"; +static char col_light_red[] = "#f28b82"; +static char col_light_red_hover[] = "#f4a19a"; +static char col_red[] = "#d93025"; +static char col_red_hover[] = "#e05951"; static const char *tagcolors[2][5][3] = { [SchemeNoHover] = { @@ -57,22 +57,22 @@ static const char *tagcolors[2][5][3] = { [SchemeTagFilled] = { [ColFg] = col_text, [ColBg] = col_bg_accent, - [ColDetail] = col_light_yellow, + [ColDetail] = col_light_blue, }, [SchemeTagFocus] = { [ColFg] = col_black, - [ColBg] = col_light_yellow, - [ColDetail] = col_yellow, + [ColBg] = col_light_green, + [ColDetail] = col_green, }, [SchemeTagNoFocus] = { [ColFg] = col_black, - [ColBg] = col_light_red, - [ColDetail] = col_red, + [ColBg] = col_light_yellow, + [ColDetail] = col_yellow, }, [SchemeTagEmpty] = { [ColFg] = col_black, - [ColBg] = col_light_blue, - [ColDetail] = col_blue, + [ColBg] = col_light_red, + [ColDetail] = col_red, } }, [SchemeHover] = { @@ -84,22 +84,22 @@ static const char *tagcolors[2][5][3] = { [SchemeTagFilled] = { [ColFg] = col_text, [ColBg] = col_bg_accent_hover, - [ColDetail] = col_light_yellow_hover, + [ColDetail] = col_light_blue_hover, }, [SchemeTagFocus] = { [ColFg] = col_black, - [ColBg] = col_light_yellow_hover, - [ColDetail] = col_yellow_hover, + [ColBg] = col_light_green_hover, + [ColDetail] = col_green_hover, }, [SchemeTagNoFocus] = { [ColFg] = col_black, - [ColBg] = col_light_red_hover, - [ColDetail] = col_red_hover, + [ColBg] = col_light_yellow_hover, + [ColDetail] = col_yellow_hover, }, [SchemeTagEmpty] = { [ColFg] = col_black, - [ColBg] = col_light_blue_hover, - [ColDetail] = col_blue_hover, + [ColBg] = col_light_red_hover, + [ColDetail] = col_red_hover, } } }; @@ -109,7 +109,7 @@ static const char *windowcolors[2][7][3] = { [SchemeWinFocus] = { [ColFg] = col_text, [ColBg] = col_bg_accent, - [ColDetail] = col_light_yellow, + [ColDetail] = col_light_blue, }, [SchemeWinNormal] = { [ColFg] = col_text, @@ -117,14 +117,14 @@ static const char *windowcolors[2][7][3] = { [ColDetail] = col_bg, }, [SchemeWinMinimized] = { - [ ColFg ] = col_light_blue, + [ ColFg ] = col_bg_accent, [ ColBg ] = col_bg, [ ColDetail ] = col_bg, }, [SchemeWinSticky] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_green, - [ ColDetail ] = col_bg, + [ ColBg ] = col_light_yellow, + [ ColDetail ] = col_yellow, }, [ SchemeWinStickyFocus ] = { [ ColFg ] = col_black, @@ -134,12 +134,12 @@ static const char *windowcolors[2][7][3] = { [SchemeWinOverlay] = { [ ColFg ] = col_black, [ ColBg ] = col_light_yellow, - [ ColDetail ] = col_bg, + [ ColDetail ] = col_yellow, }, [SchemeWinOverlayFocus] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_yellow, - [ ColDetail ] = col_yellow, + [ ColBg ] = col_light_green, + [ ColDetail ] = col_green, }, }, //TODO: different hover colors @@ -147,7 +147,7 @@ static const char *windowcolors[2][7][3] = { [SchemeWinFocus] = { [ColFg] = col_text, [ColBg] = col_bg_accent_hover, - [ColDetail] = col_light_yellow_hover, + [ColDetail] = col_light_blue_hover, }, [SchemeWinNormal] = { [ColFg] = col_text, @@ -155,14 +155,14 @@ static const char *windowcolors[2][7][3] = { [ColDetail] = col_bg_hover, }, [SchemeWinMinimized] = { - [ ColFg ] = col_light_blue_hover, - [ ColBg ] = col_bg_hover, - [ ColDetail ] = col_bg_hover, + [ ColFg ] = col_bg_accent_hover, + [ ColBg ] = col_bg, + [ ColDetail ] = col_bg, }, [SchemeWinSticky] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_green_hover, - [ ColDetail ] = col_bg_hover, + [ ColBg ] = col_light_yellow_hover, + [ ColDetail ] = col_yellow_hover, }, [ SchemeWinStickyFocus ] = { [ ColFg ] = col_black, @@ -172,12 +172,12 @@ static const char *windowcolors[2][7][3] = { [SchemeWinOverlay] = { [ ColFg ] = col_black, [ ColBg ] = col_light_yellow_hover, - [ ColDetail ] = col_bg_hover, + [ ColDetail ] = col_yellow_hover, }, [SchemeWinOverlayFocus] = { [ ColFg ] = col_black, - [ ColBg ] = col_light_yellow_hover, - [ ColDetail ] = col_yellow_hover, + [ ColBg ] = col_light_green_hover, + [ ColDetail ] = col_green_hover, }, } }; @@ -191,8 +191,8 @@ static const char *closebuttoncolors[2][3][3] = { }, [ SchemeCloseLocked ] = { [ ColFg ] = col_text, - [ ColBg ] = col_light_green, - [ ColDetail ] = col_green + [ ColBg ] = col_light_yellow, + [ ColDetail ] = col_yellow }, [ SchemeCloseFullscreen ] = { [ColFg] = col_text, @@ -208,8 +208,8 @@ static const char *closebuttoncolors[2][3][3] = { }, [ SchemeCloseLocked ] = { [ ColFg ] = col_text, - [ ColBg ] = col_light_green_hover, - [ ColDetail ] = col_green_hover + [ ColBg ] = col_light_yellow_hover, + [ ColDetail ] = col_yellow_hover }, [ SchemeCloseFullscreen ] = { [ColFg] = col_text, @@ -220,10 +220,10 @@ static const char *closebuttoncolors[2][3][3] = { }; static const char *bordercolors[] = { - [ SchemeBorderNormal ] = col_bg, - [ SchemeBorderTileFocus ] = col_light_yellow, + [ SchemeBorderNormal ] = col_bg_accent, + [ SchemeBorderTileFocus ] = col_light_blue, [ SchemeBorderFloatFocus ] = col_light_green, - [ SchemeBorderSnap ] = col_light_blue + [ SchemeBorderSnap ] = col_light_yellow }; static const char *statusbarcolors[] = { diff --git a/themes/sunset.theme b/themes/sunset.theme deleted file mode 100644 index a3597e18..00000000 --- a/themes/sunset.theme +++ /dev/null @@ -1,7 +0,0 @@ -static const char *fonts[] = {"Ubuntu Light:size=12", "Cascadia Code SemiLight:style=SemiLight:size=12"}; -static const char col_gray1[] = "#1F2437"; /* top bar d */ -static const char col_gray2[] = "#B7BCD4";/*unfocused fonts d */ -static const char col_gray3[] = "#1F2437";/*unfocused border d */ -static const char col_gray4[] = "#B7BCD4";/*focused fonts d */ -static const char col_gray5[] = "#F1739A";/*focused windows d */ -static const char col_cyan[] = "#F1739A";/*focused instantmenu or topbar d */ From 356437fbf848214584121e65f7a7b159192acb71 Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 15:09:45 -0300 Subject: [PATCH 6/8] undo change to frame count halving For some reason, I assumed the goal of this line was to halve the framerate but preserve the time spent in the animation... Since I'm pretty sure that wasn't the intent, undo the change --- instantwm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/instantwm.c b/instantwm.c index 1bb16dde..2cadfcea 100644 --- a/instantwm.c +++ b/instantwm.c @@ -455,11 +455,8 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, frames = frames * (refresh_rate / 60); double usecs = (1 / (double)refresh_rate) * 1000000; - // halve framerate if enough events are queried - if (XEventsQueued(dpy, QueuedAlready) > 50) { - frames = frames / 2; - usecs = usecs * 2; - } + // halve frames if enough events are queried + frames = frames * 1 + (XEventsQueued(dpy, QueuedAlready) > 50); // No animation if even more events are queried if (!frames || XEventsQueued(dpy, QueuedAlready) > 100) { From bf5456271c9f99bc8be1665fa88e0f91c8dae528 Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 15:14:57 -0300 Subject: [PATCH 7/8] fix the frame halving because I typed the wrong character I am an intelligent person who does things intelligently --- instantwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instantwm.c b/instantwm.c index 2cadfcea..b60baeeb 100644 --- a/instantwm.c +++ b/instantwm.c @@ -456,7 +456,7 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, double usecs = (1 / (double)refresh_rate) * 1000000; // halve frames if enough events are queried - frames = frames * 1 + (XEventsQueued(dpy, QueuedAlready) > 50); + frames = frames / 1 + (XEventsQueued(dpy, QueuedAlready) > 50); // No animation if even more events are queried if (!frames || XEventsQueued(dpy, QueuedAlready) > 100) { From 3ae11a8b64a3e04d710164588d9ea715251f17d4 Mon Sep 17 00:00:00 2001 From: Saphira Kai Date: Mon, 28 Mar 2022 15:17:39 -0300 Subject: [PATCH 8/8] remove my comment styling '?' for consistency --- instantwm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instantwm.c b/instantwm.c index b60baeeb..482b9c3e 100644 --- a/instantwm.c +++ b/instantwm.c @@ -451,7 +451,7 @@ void animateclient(Client *c, int x, int y, int w, int h, int frames, XRRScreenConfiguration *conf = XRRGetScreenInfo(dpy, RootWindow(dpy, 0)); short refresh_rate = XRRConfigCurrentRate(conf); - //? scale the framerate properly for !=60Hz displays + // scale the framerate properly for !=60Hz displays frames = frames * (refresh_rate / 60); double usecs = (1 / (double)refresh_rate) * 1000000;