diff options
author | f1sher | 2018-11-18 17:41:03 +0100 |
---|---|---|
committer | f1sher | 2018-11-18 17:51:43 +0100 |
commit | 83ad1ffcd8969d74e14c2a74378d8ec0f4c1aaaa (patch) | |
tree | f04874a964d9180c8ad9b0389c822c9d5b6d1ef3 | |
download | aur-83ad1ffcd8969d74e14c2a74378d8ec0f4c1aaaa.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | config.h | 112 | ||||
-rw-r--r-- | dwm.desktop | 7 | ||||
-rw-r--r-- | dwm.install | 3 |
5 files changed, 194 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..58f4951b7009 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = dwm-keycodes + pkgdesc = A dynamic window manager for X - with keycodes patch + pkgver = 6.1 + pkgrel = 1 + url = https://dwm.suckless.org + install = dwm.install + arch = i686 + arch = x86_64 + license = MIT + depends = libx11 + depends = libxinerama + depends = libxft + depends = freetype2 + depends = st + depends = dmenu + provides = dwm + conflicts = dwm + options = zipman + source = https://dl.suckless.org/dwm/dwm-6.1.tar.gz + source = dwm.desktop + source = config.h + source = https://dwm.suckless.org/patches/keycodes/dwm-keycodes-6.1.diff + md5sums = f0b6b1093b7207f89c2a90b848c008ec + md5sums = 939f403a71b6e85261d09fc3412269ee + md5sums = 948cb0fa3bc0c2fa0b90d654acda1827 + md5sums = 8bebc6b37fc6229b9b08ded6babf3fd2 + +pkgname = dwm-keycodes + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..54bba28405c1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: f1she3 <f1sher@gmx.com> +# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=dwm-keycodes +_pkgname=dwm +pkgver=6.1 +pkgrel=1 +patchname=keycodes +patchver=$pkgver +pkgdesc="A dynamic window manager for X - with keycodes patch" +url="https://dwm.suckless.org" +arch=('i686' 'x86_64') +license=('MIT') +options=(zipman) +depends=('libx11' 'libxinerama' 'libxft' 'freetype2' 'st' 'dmenu') +provides=('dwm') +conflicts=('dwm') +install=${_pkgname}.install +source=(https://dl.suckless.org/dwm/dwm-$pkgver.tar.gz dwm.desktop config.h +https://dwm.suckless.org/patches/$patchname/${_pkgname}-$patchname-$patchver.diff) +md5sums=('f0b6b1093b7207f89c2a90b848c008ec' + '939f403a71b6e85261d09fc3412269ee' + '948cb0fa3bc0c2fa0b90d654acda1827' + '8bebc6b37fc6229b9b08ded6babf3fd2') + +prepare() { + cd $srcdir/${_pkgname}-$pkgver + patch -p1 -i ../${_pkgname}-$patchname-$patchver.diff + cp $srcdir/config.h config.h +} + +build() { + cd $srcdir/${_pkgname}-$pkgver + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 FREETYPEINC=/usr/include/freetype2 +} + +package() { + cd $srcdir/${_pkgname}-$pkgver + make PREFIX=/usr DESTDIR=$pkgdir install + install -m644 -D LICENSE $pkgdir/usr/share/licenses/${_pkgname}/LICENSE + install -m644 -D README $pkgdir/usr/share/doc/${_pkgname}/README + install -m644 -D $srcdir/dwm.desktop $pkgdir/usr/share/xsessions/dwm.desktop +} diff --git a/config.h b/config.h new file mode 100644 index 000000000000..b109e4c4aa14 --- /dev/null +++ b/config.h @@ -0,0 +1,112 @@ +/* See LICENSE file for copyright and license details. */ + +/* appearance */ +static const char *fonts[] = { + "monospace:size=10" +}; +static const char dmenufont[] = "monospace:size=10"; +static const char normbordercolor[] = "#444444"; +static const char normbgcolor[] = "#222222"; +static const char normfgcolor[] = "#bbbbbb"; +static const char selbordercolor[] = "#005577"; +static const char selbgcolor[] = "#005577"; +static const char selfgcolor[] = "#eeeeee"; +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 */ + +/* tagging */ +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 }, +}; + +/* 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 Layout layouts[] = { + /* 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} }, + +/* helper for spawning shell commands in the pre dwm-5.0 fashion */ +#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", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL }; +static const char *termcmd[] = { "st", NULL }; + +static Key keys[] = { + /* modifier key function argument */ + { MODKEY, 33, spawn, {.v = dmenucmd } }, // p + { MODKEY|ShiftMask, 36, spawn, {.v = termcmd } }, // Return + { MODKEY, 56, togglebar, {0} }, // b + { MODKEY, 44, focusstack, {.i = +1 } }, // j + { MODKEY, 45, focusstack, {.i = -1 } }, // k + { MODKEY, 31, incnmaster, {.i = +1 } }, // i + { MODKEY, 40, incnmaster, {.i = -1 } }, // d + { MODKEY, 43, setmfact, {.f = -0.05} }, // h + { MODKEY, 46, setmfact, {.f = +0.05} }, // l + { MODKEY, 36, zoom, {0} }, // Return + { MODKEY, 23, view, {0} }, // Tab + { MODKEY|ShiftMask, 54, killclient, {0} }, // c + { MODKEY, 28, setlayout, {.v = &layouts[0]} }, // t + { MODKEY, 41, setlayout, {.v = &layouts[1]} }, // f + { MODKEY, 58, setlayout, {.v = &layouts[2]} }, // m + { MODKEY, 65, setlayout, {0} }, // space + { MODKEY|ShiftMask, 65, togglefloating, {0} }, // space + { MODKEY, 19, view, {.ui = ~0 } }, // 0 + { MODKEY|ShiftMask, 19, tag, {.ui = ~0 } }, // 0 + { MODKEY, 59, focusmon, {.i = -1 } }, // comma + { MODKEY, 60, focusmon, {.i = +1 } }, // period + { MODKEY|ShiftMask, 59, tagmon, {.i = -1 } }, // comma + { MODKEY|ShiftMask, 60, tagmon, {.i = +1 } }, // period + TAGKEYS( 10, 0) // 1 + TAGKEYS( 11, 1) // 2 + TAGKEYS( 12, 2) // 3 + TAGKEYS( 13, 3) // 4 + TAGKEYS( 14, 4) // 5 + TAGKEYS( 15, 5) // 6 + TAGKEYS( 16, 6) // 7 + TAGKEYS( 17, 7) // 8 + TAGKEYS( 18, 8) // 9 + { MODKEY|ShiftMask, 24, quit, {0} }, // q +}; + +/* button definitions */ +/* click can be 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} }, +}; diff --git a/dwm.desktop b/dwm.desktop new file mode 100644 index 000000000000..b0c33541ba30 --- /dev/null +++ b/dwm.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Dwm +Comment=Dynamic window manager +Exec=dwm +Icon=dwm +Type=XSession diff --git a/dwm.install b/dwm.install new file mode 100644 index 000000000000..48bffc5d8f12 --- /dev/null +++ b/dwm.install @@ -0,0 +1,3 @@ +post_install() { + echo "-- Edit config.h and rebuild package if you want to change settings" +} |