diff --git a/.gitignore b/.gitignore index 291b309..c984e79 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,3 @@ *.o *.orig *.rej -dwm - -# makepkg stuff -*.pkg* -pkg/ -src/ diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 8e4f11d..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -1,27 +0,0 @@ -branches: master - -when: - event: push - -pipeline: - build: - image: 'archlinux:latest' - commands: - # Update packages - - pacman -Syu --needed --noconfirm base-devel - # Create non-root user to perform build & switch to their home - - groupadd -g 1000 builder - - useradd -mg builder builder - - chown -R builder:builder "$PWD" - - "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" - - su builder - # Build the package - - MAKEFLAGS="-j$(nproc)" makepkg -s --noconfirm --needed - - publish: - image: 'archlinux:latest' - commands: - # Publish the package - - 'curl -s -XPOST -H "X-API-KEY: $API_KEY" -T "$(ls *.pkg*)" https://arch.r8r.be/publish' - secrets: - - api_key diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 7583e82..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,49 +0,0 @@ -# Maintainer: Jef Roosens - -pkgname=jjr-dwm -pkgver=6.3 -pkgrel=1 -pkgdesc="Personal build of the Dynamic Window Manager." -arch=("x86_64") - -url="https://git.rustybever.be/Chewing_Bever/dwm" -license=("MIT") - -depends=("libx11" "libxinerama" "libxft" "freetype2" "jjr-st" "dmenu") -makedepends=("clang") -provides=("dwm") -conflicts=("dwm" "dwm-git") - -source=("config.def.h" "config.h" "config.mk" "drw.c" "drw.h" "dwm.1" "dwm.c" -"LICENSE" "Makefile" "transient.c" "util.c" "util.h" "dwm.desktop" "README") -sha256sums=('f662413dd3882e83a8d1bd6165abdf1c78f358a9100e875b0c6633d41f65f224' - '0fc893d4cbb2955411d047773a75269ef318d04ec2477624f01158dea539703b' - 'cda18f3700ed39dadbba983a36220320a88853d6858689b072fc0500b26b8fc8' - '85cc51a6a392a81d6073ff8d994200651cb8042b3bed93ce19e565ab752f8dae' - '137808b0e48f4acd8672678172edf16839ff0b4c13b7721deddb920a0d553fd7' - '216e0326791ac90a16549d39514d42cda0dfd5524df1ad511326a472cbd0f816' - 'fcb808784839c38457a4e2834de2ddf730ccfbe9ef3ee85b55df01169998358f' - 'b99adfc25cce6d62c1cc72a3105bb5d913a2faa40f172c14cfb204067f08c939' - 'f5c9137d07849db36942045df9be4f71727207cd90e7cc45aeffcf3c2469b9dc' - '54c37c558613ab3da856b19c4b4c0c56c224133a253bf5fa6557b489da545d7c' - 'dec870d0b5834c9008ff62f495710daf524cffdf12d0cf8ba4fadf5643623987' - '1196a7b6efbf4cb3f5c435fffd72e7647f977483845d5c78c1c48d9ab8b96819' - 'bc36426772e1471d6dd8c8aed91f288e16949e3463a9933fee6390ee0ccd3f81' - 'f0384e29e3f249fcd52a30c35c722fca50e9fabfdeb7725f4073e05170358d86') - -build() { - make -} - -package() { - local installopts='--mode 0644 -D --target-directory' - local shrdir="$pkgdir/usr/share" - local licdir="$shrdir/licenses/$pkgname" - local docdir="$shrdir/doc/$pkgname" - - make PREFIX=/usr DESTDIR="$pkgdir" install - - install $installopts "$licdir" "LICENSE" - install $installopts "$docdir" "README" - install $installopts "$pkgdir/usr/share/xsessions" "dwm.desktop" -} diff --git a/config.def.h b/config.def.h index d4332fa..99b8ad4 100644 --- a/config.def.h +++ b/config.def.h @@ -42,7 +42,6 @@ static const Rule rules[] = { static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ static const int nmaster = 1; /* number of clients in master area */ static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ -static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ static const Layout layouts[] = { /* symbol arrange function */ diff --git a/config.h b/config.h index 47aff90..12b3902 100644 --- a/config.h +++ b/config.h @@ -1,131 +1,128 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ -static const unsigned int snap = 32; /* snap pixel */ -static const int showbar = 1; /* 0 means no bar */ -static const int topbar = 1; /* 0 means bottom bar */ -static const char *fonts[] = {"monospace:size=10"}; -static const char dmenufont[] = "monospace:size=10"; -static const char col_gray1[] = "#222222"; -static const char col_gray2[] = "#444444"; -static const char col_gray3[] = "#bbbbbb"; -static const char col_gray4[] = "#eeeeee"; -static const char col_cyan[] = "#005577"; +static const unsigned int borderpx = 1; /* border pixel of windows */ +static const unsigned int snap = 32; /* snap pixel */ +static const int showbar = 1; /* 0 means no bar */ +static const int topbar = 1; /* 0 means bottom bar */ +static const char *fonts[] = { "monospace:size=10" }; +static const char dmenufont[] = "monospace:size=10"; +static const char col_gray1[] = "#222222"; +static const char col_gray2[] = "#444444"; +static const char col_gray3[] = "#bbbbbb"; +static const char col_gray4[] = "#eeeeee"; +static const char col_cyan[] = "#005577"; -static const unsigned int baralpha = 150; // Default is 0xd0 -static const unsigned int borderalpha = OPAQUE; // Max is 255 +static const unsigned int baralpha = 150; // Default is 0xd0 +static const unsigned int borderalpha = OPAQUE; // Max is 255 -static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = {col_gray3, col_gray1, col_gray2}, - [SchemeSel] = {col_gray4, col_cyan, col_cyan}, +static const char *colors[][3] = { + /* fg bg border */ + [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, + [SchemeSel] = { col_gray4, col_cyan, col_cyan }, }; -static const unsigned int alphas[][3] = { - /* fg bg border */ - [SchemeNorm] = {OPAQUE, baralpha, borderalpha}, - [SchemeSel] = {OPAQUE, baralpha, borderalpha}, +static const unsigned int alphas[][3] = { + /* fg bg border */ + [SchemeNorm] = { OPAQUE, baralpha, borderalpha }, + [SchemeSel] = { OPAQUE, baralpha, borderalpha }, }; /* tagging */ -static const char *tags[] = {"1", "2", "3", "4", "5", "6", "7", "8", "9"}; +static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; static const Rule rules[] = { - /* xprop(1): - * WM_CLASS(STRING) = instance, class - * WM_NAME(STRING) = title - */ - /* class instance title tags mask isfloating monitor */ - {"Gimp", NULL, NULL, 0, 1, -1}, - {"Firefox", NULL, NULL, 1 << 8, 0, -1}, + /* xprop(1): + * WM_CLASS(STRING) = instance, class + * WM_NAME(STRING) = title + */ + /* class instance title tags mask isfloating monitor */ + { "Gimp", NULL, NULL, 0, 1, -1 }, + { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ -static const int nmaster = 1; /* number of clients in master area */ -static const int resizehints = - 1; /* 1 means respect size hints in tiled resizals */ -static const int lockfullscreen = - 1; /* 1 will force focus on the fullscreen window */ +static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ +static const int nmaster = 1; /* number of clients in master area */ +static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ static const Layout layouts[] = { - /* symbol arrange function */ - {"[]=", tile}, /* first entry is default */ - {"><>", NULL}, /* no layout function means floating behavior */ - {"[M]", monocle}, + /* symbol arrange function */ + { "[]=", tile }, /* first entry is default */ + { "><>", NULL }, /* no layout function means floating behavior */ + { "[M]", monocle }, }; /* key definitions */ #define MODKEY Mod1Mask -#define TAGKEYS(KEY, TAG) \ - {MODKEY, KEY, view, {.ui = 1 << TAG}}, \ - {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ - {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ - {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, +#define TAGKEYS(KEY,TAG) \ + { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ + { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ + { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, /* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) \ - { \ - .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \ - } +#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } /* commands */ -static char dmenumon[2] = - "0"; /* component of dmenucmd, manipulated in spawn() */ -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 *termcmd[] = {"st", NULL}; +static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ +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 *termcmd[] = { "st", NULL }; -/* modifier key function argument */ + /* modifier key function argument */ static Key keys[] = { - {MODKEY, XK_d, spawn, {.v = dmenucmd}}, - {MODKEY, XK_Return, spawn, {.v = termcmd}}, - {MODKEY, XK_b, togglebar, {0}}, - {MODKEY, XK_j, focusstack, {.i = +1}}, - {MODKEY, XK_k, focusstack, {.i = -1}}, - /* { MODKEY , XK_i , incnmaster , {.i = +1 } } , */ - /* { MODKEY , XK_d , incnmaster , {.i = -1 } } , */ - {MODKEY, XK_h, setmfact, {.f = -0.05}}, - {MODKEY, XK_l, setmfact, {.f = +0.05}}, - /* { MODKEY , XK_Return , zoom , {0} } , */ - {MODKEY, XK_Tab, view, {0}}, - {MODKEY, XK_x, killclient, {0}}, - {MODKEY, XK_t, setlayout, {.v = &layouts[0]}}, - {MODKEY, XK_f, setlayout, {.v = &layouts[1]}}, - {MODKEY, XK_m, setlayout, {.v = &layouts[2]}}, - {MODKEY, XK_space, setlayout, {0}}, - {MODKEY | ShiftMask, XK_space, togglefloating, {0}}, - {MODKEY, XK_0, view, {.ui = ~0}}, - {MODKEY | ShiftMask, XK_0, tag, {.ui = ~0}}, - {MODKEY, XK_comma, focusmon, {.i = -1}}, - {MODKEY, XK_period, focusmon, {.i = +1}}, - {MODKEY | ShiftMask, XK_comma, tagmon, {.i = -1}}, - {MODKEY | ShiftMask, XK_period, tagmon, {.i = +1}}, - {MODKEY, XK_F2, spawn, {.v = {"dmenu_optimus", NULL}}}, - {MODKEY, XK_F3, spawn, {.v = {"dmenu_kb_layout", NULL}}}, - {MODKEY, XK_F4, spawn, {.v = {"dmenu_audio_sinks", NULL}}}, - {MODKEY | ShiftMask, XK_q, quit, {0}}, - TAGKEYS(XK_y, 0) TAGKEYS(XK_u, 1) TAGKEYS(XK_i, 2) TAGKEYS(XK_o, 3) - TAGKEYS(XK_p, 4) TAGKEYS(XK_6, 5) TAGKEYS(XK_7, 6) TAGKEYS(XK_8, 7) - TAGKEYS(XK_9, 8)}; + { MODKEY , XK_d , spawn , {.v = dmenucmd } } , + { MODKEY , XK_Return , spawn , {.v = termcmd } } , + { MODKEY , XK_b , togglebar , {0} } , + { MODKEY , XK_j , focusstack , {.i = +1 } } , + { MODKEY , XK_k , focusstack , {.i = -1 } } , + /* { MODKEY , XK_i , incnmaster , {.i = +1 } } , */ + /* { MODKEY , XK_d , incnmaster , {.i = -1 } } , */ + { MODKEY , XK_h , setmfact , {.f = -0.05} } , + { MODKEY , XK_l , setmfact , {.f = +0.05} } , + /* { MODKEY , XK_Return , zoom , {0} } , */ + { MODKEY , XK_Tab , view , {0} } , + { MODKEY , XK_x , killclient , {0} } , + { MODKEY , XK_t , setlayout , {.v = &layouts[0]} } , + { MODKEY , XK_f , setlayout , {.v = &layouts[1]} } , + { MODKEY , XK_m , setlayout , {.v = &layouts[2]} } , + { MODKEY , XK_space , setlayout , {0} } , + { MODKEY|ShiftMask , XK_space , togglefloating , {0} } , + { MODKEY , XK_0 , view , {.ui = ~0 } } , + { MODKEY|ShiftMask , XK_0 , tag , {.ui = ~0 } } , + { MODKEY , XK_comma , focusmon , {.i = -1 } } , + { MODKEY , XK_period , focusmon , {.i = +1 } } , + { MODKEY|ShiftMask , XK_comma , tagmon , {.i = -1 } } , + { MODKEY|ShiftMask , XK_period , tagmon , {.i = +1 } } , + { MODKEY , XK_F2 , spawn , {.v = { "dmenu_optimus" , NULL }}} , + { MODKEY , XK_F3 , spawn , {.v = { "dmenu_kb_layout" , NULL }}} , + { MODKEY , XK_F4 , spawn , {.v = { "dmenu_audio_sinks" , NULL }}} , + { MODKEY|ShiftMask , XK_q , quit , {0} } , + TAGKEYS( XK_y , 0) + TAGKEYS( XK_u , 1) + TAGKEYS( XK_i , 2) + TAGKEYS( XK_o , 3) + TAGKEYS( XK_p , 4) + TAGKEYS( XK_6 , 5) + TAGKEYS( XK_7 , 6) + TAGKEYS( XK_8 , 7) + TAGKEYS( XK_9 , 8) +}; /* button definitions */ -/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, - * ClkClientWin, or ClkRootWin */ +/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ static Button buttons[] = { - /* click event mask button function argument - */ - {ClkLtSymbol, 0, Button1, setlayout, {0}}, - {ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]}}, - {ClkWinTitle, 0, Button2, zoom, {0}}, - {ClkStatusText, 0, Button2, spawn, {.v = termcmd}}, - {ClkClientWin, MODKEY, Button1, movemouse, {0}}, - {ClkClientWin, MODKEY, Button2, togglefloating, {0}}, - {ClkClientWin, MODKEY, Button3, resizemouse, {0}}, - {ClkTagBar, 0, Button1, view, {0}}, - {ClkTagBar, 0, Button3, toggleview, {0}}, - {ClkTagBar, MODKEY, Button1, tag, {0}}, - {ClkTagBar, MODKEY, Button3, toggletag, {0}}, + /* click event mask button function argument */ + { ClkLtSymbol, 0, Button1, setlayout, {0} }, + { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, + { ClkWinTitle, 0, Button2, zoom, {0} }, + { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, + { ClkClientWin, MODKEY, Button1, movemouse, {0} }, + { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, + { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, + { ClkTagBar, 0, Button1, view, {0} }, + { ClkTagBar, 0, Button3, toggleview, {0} }, + { ClkTagBar, MODKEY, Button1, tag, {0} }, + { ClkTagBar, MODKEY, Button3, toggletag, {0} }, }; + diff --git a/config.mk b/config.mk index c95968c..21b5404 100644 --- a/config.mk +++ b/config.mk @@ -1,5 +1,5 @@ # dwm version -VERSION = 6.3 +VERSION = 6.2 # Customize below to fit your system @@ -35,4 +35,4 @@ LDFLAGS = ${LIBS} #LDFLAGS = ${LIBS} # compiler and linker -CC = clang +CC = cc diff --git a/drw.o b/drw.o new file mode 100644 index 0000000..a2bb4fd Binary files /dev/null and b/drw.o differ diff --git a/dwm b/dwm new file mode 100755 index 0000000..a0943a9 Binary files /dev/null and b/dwm differ diff --git a/dwm.c b/dwm.c index f54d374..c30fbab 100644 --- a/dwm.c +++ b/dwm.c @@ -729,9 +729,6 @@ drawbar(Monitor *m) unsigned int i, occ = 0, urg = 0; Client *c; - if (!m->showbar) - return; - /* draw status first so it can be overdrawn by tags later */ if (m == selmon) { /* status is only drawn on selected monitor */ drw_setscheme(drw, scheme[SchemeNorm]); @@ -865,7 +862,7 @@ focusstack(const Arg *arg) { Client *c = NULL, *i; - if (!selmon->sel || (selmon->sel->isfullscreen && lockfullscreen)) + if (!selmon->sel) return; if (arg->i > 0) { for (c = selmon->sel->next; c && !ISVISIBLE(c); c = c->next); diff --git a/dwm.desktop b/dwm.desktop deleted file mode 100644 index b0c3354..0000000 --- a/dwm.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Name=Dwm -Comment=Dynamic window manager -Exec=dwm -Icon=dwm -Type=XSession diff --git a/dwm.o b/dwm.o new file mode 100644 index 0000000..8f612b0 Binary files /dev/null and b/dwm.o differ diff --git a/util.o b/util.o new file mode 100644 index 0000000..4607dbd Binary files /dev/null and b/util.o differ