dot

packages and services management
Log | Files | Refs | README

commit b0a7c5d1681f41c7761ec4c3538520e2acecf666
parent 6024308a3d79bee96b6c38f0418ef5567734940b
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 21 May 2017 11:24:25 +0200

wallpaper colours

Diffstat:
M.xinitrc | 2+-
Mbin/color | 4++++
Mbin/ii-filter-3 | 7+------
Mbuild/dwm/config.h | 2++
4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/.xinitrc b/.xinitrc @@ -1,7 +1,7 @@ #!/bin/sh setxkbmap us -option compose:ralt -xsetroot -bitmap etc/tile.xbm -bg '#ffeecc' -fg '#000000' +xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#ffffff' xset +fp "$CONFIG/fonts" while xsetroot -name "$(status)" diff --git a/bin/color b/bin/color @@ -1,5 +1,8 @@ [ "$DISPLAY" ] || exit +fg=`hexdump /dev/urandom | sed q | cut -c 9-12,14-15` +bg=`hexdump /dev/urandom | sed q | cut -c 9-12,14-15` + case "$1" in ( 0 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#000000' ;; ( 1 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#555555' ;; @@ -10,4 +13,5 @@ case "$1" in ( 6 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#440000' -fg '#88cc00' ;; ( 7 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#000000' -fg '#008888' ;; ( 8 ) xsetroot -bitmap "$ETC/tile.xbm" -bg '#333333' -fg '#000000' ;; +( * ) xsetroot -bitmap "$ETC/tile.xbm" -bg "#$fg" -fg "#$bg" ;; esac diff --git a/bin/ii-filter-3 b/bin/ii-filter-3 @@ -1,6 +1,6 @@ # http://tools.suckless.org/ii -awk ' +gawk ' { last = date; date = $1; @@ -21,10 +21,5 @@ date != last { printf("%s %10s ", $2, ""); sub("[^ ]* *[^ ]*", ""); } - - while (match("^.{50}")) { - line = $0; - substr - print } ' diff --git a/build/dwm/config.h b/build/dwm/config.h @@ -75,11 +75,13 @@ static const Layout layouts[] = { 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", "-f", dmenufont, NULL }; +static const char *color[] = { "color", NULL }; static Key keys[] = { /* modifier key function argument */ { MODKEY, XK_space, spawn, {.v = dmenucmd } }, { MODKEY, XK_Return, spawn, {.v = termcmd } }, + { MODKEY, XK_c, spawn, {.v = color } }, { MODKEY, XK_b, togglebar, {0} }, { MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } },