guest@dotshare [~/groups/wms/dwm] $ ls Dwm-rocks/ | cat

Dwm rocks! (scrot)

DjDexter Sep 16, 2013 (wms/dwm)

config.h(raw, dl)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/* See LICENSE file for copyright and license details. */

/* appearance */
//static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char font[]            = "7x13";
static const char normbordercolor[] = "#4F4F4F";
static const char normbgcolor[]     = "#000000";
static const char normfgcolor[]     = "#DFDFDF"; // #36FF00
static const char selbordercolor[]  = "#8F8F8F"; //  #6f6f6f // #0066ff
static const char selbgcolor[]      = "#3F3F3F";
static const char selfgcolor[]      = "#BFBFBF";
static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 32;       /* snap pixel */
static const Bool showbar           = True;     /* False means no bar */
static const Bool topbar            = True;     /* False means bottom bar */

/* tagging */
static const char *tags[] = { "General", "II", "III", "IV", "V", "VI", "IRC", "GIMP", "Nav" };

static const Rule rules[] = {
	/* class      instance    title       tags mask     isfloating   monitor */
	{ "Gimp",     NULL,       NULL,       0,            True,        -2 },
	{ "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
 { "MPlayer",  NULL,       NULL,             0,       True,       -1 },
 { "mplayer2",  NULL,       NULL,            0,       True,       -1 },
 { "mednafen",  NULL,       NULL,            0,       True,       -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 Bool resizehints = False; /* True 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 Mod4Mask
#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 const char *dmenucmd[]  = { "gmrun", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]   = { "uxterm", NULL };
static const char *termuxcmd[] = { "uxterm", "screen", NULL };
static const char *firexcmd[]  = { "qupzilla", NULL };
static const char *mpdprev[] = { "ncmpcpp", "prev", NULL };
static const char *mpdnext[] = { "ncmpcpp", "next", NULL };
static const char *mpdpause[] = { "ncmpcpp", "toggle", NULL};
static Key keys[] = {
	/* modifier                     key        function        argument */
	{ MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
	{ MODKEY|ShiftMask,             XK_p,      spawn,          {.v = termcmd } },
	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termuxcmd } },
	{ MODKEY,                       XK_o,      spawn,          {.v = firexcmd } },
	{ 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|ShiftMask,             XK_c,      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_F1,     spawn,          {.v = mpdprev } },
        { MODKEY,                       XK_F2,     spawn,          {.v = mpdnext } },
        { MODKEY,                       XK_Escape, spawn,          {.v = mpdpause } },
	TAGKEYS(                        XK_1,                      0)
	TAGKEYS(                        XK_2,                      1)
	TAGKEYS(                        XK_3,                      2)
	TAGKEYS(                        XK_4,                      3)
	TAGKEYS(                        XK_5,                      4)
	TAGKEYS(                        XK_6,                      5)
	TAGKEYS(                        XK_7,                      6)
	TAGKEYS(                        XK_8,                      7)
	TAGKEYS(                        XK_9,                      8)
	{ MODKEY|ShiftMask,             XK_q,      quit,           {0} },
};

/* 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} },
};

CLICK TO VIEW

x

.xinitrc(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/sh
sh /home/dexter4/.fehbg &
xcompmgr -c &
#conky -c /home/dexter4/.conkyrc-console |dzen2 -ta left &
#hologate the xterm fonts to dzen2 and ok :)
#emm suggestion of 4chan /g/ people :)
#conky -c /home/dexter4/.conkyrc-console |dzen2 -ta left -fg '#ddccbb' -fn '-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859-*' &
#conky -c  $HOME/.conkyrc-console |dzen2 -ta left -fg '#ddccbb' -fn '-*-terminus-*-r-normal-*-*-90-*-*-*-*-iso8859-*' &
xbindkeys &
autocutsel &
setxkbmap es &
#xsetroot -cursor_name left_ptr & 
#exec 9wm -nostalgia
#exec /usr/local/bin/ratpoison
conky -c $HOME/.conkyrc-console | while read -r; do xsetroot -name "$REPLY"; done &
exec /usr/local/bin/dwm
 

x

.conkyrc-console(raw, dl)

1
2
3
4
5
6
7
8
9
out_to_console yes
out_to_x no
background no
update_interval 2
total_run_times 0
use_spacer none
#use_xft yes
TEXT
${cpu cpu}% :: $memperc% ($mem) :: ${downspeed wlan0} K/s :: ${upspeed wlan0} K/s :: ${execi 1 $HOME/.conky-wifi} ${time %a %b %d %I:%M%P}
 

x

.conky-wifi(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#!/bin/bash
# Interfaz valida para wifi wlanX, muestra Essid, Interfaz (Cona la que estes conectado), AP, IP (externa), Calidad de seƱal (xx/70).
  ESTADO="`/sbin/iwgetid`"
  if [ "$ESTADO" != "" ]; then
	ESSID="`/sbin/iwgetid --raw`"
	INTERFAZ="`/sbin/iwgetid | awk '{print $1}'`"
    SENAL="`/sbin/iwconfig 2> /dev/null | sed -n "/${INTERFAZ}/{n;n;n;n;n;p;}" | awk -F'=' '{printf $NF}' | sed 's/\s//g'`"
    MI_MAC="`/sbin/ifconfig | grep $INTERFAZ | awk '{print $5}' | cut -c1-8`"
	AP="`/sbin/iwgetid --raw --ap | cut -c1-8`"
    BITR="`/sbin/iwconfig 2> /dev/null | sed -n "/${INTERFAZ}/{n;n;p;}" | sed -E 's/^[^=]+=([.0-9]+)\s.*/\1Mb\/s/'`"
#    IP_EXT="`cat ~/scripts/data_xsetroot | sed -n '4p'`"
#    HOSTS="`cat ~/scripts/data_xsetroot | sed -n '2p'`"
    echo "$ESSID $AP $SENAL $BITR $INTERFAZ $MI_MAC "
  else
    echo "Sin conexion"
  fi
 

x

.xbindkeysrc(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# For the benefit of emacs users: -*- shell-script -*-
###########################
# xbindkeys configuration #
###########################
#
# Version: 1.8.4
#
# If you edit this file, do not forget to uncomment any lines
# that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# To specify a key, you can use 'xbindkeys --key' or
# 'xbindkeys --multikey' and put one of the two lines in this file.
#
# The format of a command line is:
#    "command to start"
#       associated key
#
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier:
#   Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock),
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#

# The release modifier is not a standard X modifier, but you can
# use it if you want to catch release events instead of press events

# By defaults, xbindkeys does not pay attention with the modifiers
# NumLock, CapsLock and ScrollLock.
# Uncomment the lines above if you want to pay attention to them.

#keystate_numlock = enable
#keystate_capslock = enable
#keystate_scrolllock= enable

# Examples of commands:

"xbindkeys_show" 
  control+shift + q

# set directly keycode (here control + f with my keyboard)
#"xterm"
#  c:41 + m:0x4

# specify a mouse button
"xterm"
  control + b:2

#"xterm -geom 50x20+20+20"
#   Shift+Mod2+alt + s
#
## set directly keycode (here control+alt+mod2 + f with my keyboard)
#"xterm"
#  alt + c:0x29 + m:4 + mod2
#
## Control+Shift+a  release event starts rxvt
#"rxvt"
#  release+control+shift + a
#
## Control + mouse button 2 release event starts rxvt
#"rxvt"
#  Control + b:2 + Release
#   "xlock -nice 0 -mode blank &"
#   Alt+F10
"transset --min 0.1 -p --dec 0.2"
control+shift +f
"transset -p --dec 0.1 -m 1"
control+shift +d
"amixer set PCM 5%+ -q"
Control+shift+z
"amixer set PCM 5%- -q"
Control+shift+x
##################################
# End of xbindkeys configuration #
##################################
 

x

Notes

Simple dwm setup, In Debian Sid.
The font in the terminal is terminus-medium, (including dwm), the config of dwm, includes shortcuts to control ncmpcpp, default layout is tiling, modkey is superkey (win key).

In the screenshot shows, two screen sessions, one in the main layout of windows, another in finch (pidgin in console) multiprotocol program, a ncmpcpp, and wavemon for wifi level status, etc.

Includes a wifi status script with ESSID info, MAC of the access point, bitrate, wlan interface, and local MAC (these macs not show all digits).

Wallpaper: http://a.pomf.se/7Vb3.png