=============================================================================== DWM Scripts README =============================================================================== Copyright ========= DWM Scripts - wrapper for dwm/dmenu/slock (C) 2007-2009 Gerardo García Peña Programmed by Gerardo García Peña This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Installation Instructions ========================= Patch DWM 5.x.x --------------- Add this line to the begining of 'config.h': #include Change and add the following assignments: static const char *dmenucmd[] = { "dmenu-wrapper", NULL }; static const char *termcmd[] = { "dwm-xterm", NULL }; static const char *lockcmd[] = { "dwm-screen-lock", NULL }; static const char *volmutecmd[] = { "dwm-volume-mute", NULL }; static const char *volupcmd[] = { "dwm-volume-up", NULL }; static const char *voldowncmd[] = { "dwm-volume-down", NULL }; Add following keys to add screenlocker, alt tab and multimedia keys: { MODKEY|ControlMask, XK_l, spawn, {.v = lockcmd } }, { 0, XF86XK_AudioMute, spawn, {.v = volmutecmd } }, { 0, XF86XK_AudioLowerVolume, spawn, {.v = voldowncmd } }, { 0, XF86XK_AudioRaiseVolume, spawn, {.v = volupcmd } }, { MODKEY, XK_Tab, focusstack, {.i = +1 } }, If you don't have multimedia keys, you can also try: { MODKEY|ControlMask, XK_F12, spawn, {.v = volmutecmd } }, { MODKEY|ControlMask, XK_Down, spawn, {.v = voldowncmd } }, { MODKEY|ControlMask, XK_Up, spawn, {.v = volupcmd } }, I recommed seriously to remove this line: { MODKEY|ShiftMask, XK_q, quit, {0} }, Finally, if you don't like forced layouts or tags (depending on application name), I recommend deletion of following line: { "Firefox", NULL, NULL, 1 << 8, True }, Or adding others like following: { "xeyes", NULL, NULL, 0, True }, Another interesting hack is to change the window properties: static const char selbordercolor[] = "#ff0000"; static const char selbgcolor[] = "#3465a4"; static const char selfgcolor[] = "#ffffff"; Patch DWM 4.x.x --------------- Add this line to the begining of 'config.h': #include And change these keybindings in 'config.h': { MODKEY|ShiftMask, XK_Return, spawn, "exec dwm-xterm" }, \ { MODKEY, XK_p, spawn, "exec dmenu-wrapper" }, \ Add these lines to the keybindings table: { MODKEY|ControlMask, XK_l, spawn, "exec dwm-screen-lock" }, \ { 0, XF86XK_AudioMute, spawn, "exec dwm-volume-mute" }, \ { 0, XF86XK_AudioLowerVolume, spawn, "exec dwm-volume-down" }, \ { 0, XF86XK_AudioRaiseVolume, spawn, "exec dwm-volume-up" }, \ { MODKEY, XK_Tab, focusnext, NULL }, \ I recommed seriously to remove this line: { MODKEY|ShiftMask, XK_q, quit, NULL }, \ Choose your xterm ----------------- Edit dwm-xterm to choose your xterm. By default it will try to launch "x-terminal-emulator" (Debian default). If "x-terminal-emulator" does not exists then it will try to launch a simple "xterm". Change your background ---------------------- Copy your background at your home directory with name .dwm-background. If you want you can set the extension (for instance .dwm-background.jpg), but it is optional. If none is supplied, then the default background (in /usr/share/dwm/default-dwm-background) will be used. If your background is name .dwm-background-center.jpg, the background will be centered. You can also try con seamless, tile and scale. By default, is none is specified, the background will be scaled. You can update (or refresh) your background at any time calling the dwm-set-background script. NOTE: You must install 'feh' (a light image viewer and cataloguer) to make this script work. In Debian is so easy as executing 'apt-get install feh' as root user. Setup keys ---------- You should create a file ~/.Xmodmap where you assign keycodes to Xkeysims. You can discover keycodes with 'xev', a program that prints X window events. The format of the file is (in case of Dell Lattitude D600 and Compaq NC6400): keycode 160 = XF86AudioMute keycode 174 = XF86AudioLowerVolume keycode 176 = XF86AudioRaiseVolume Currently following keys are recognized: XF86AudioMute - Audio mute XF86AudioLowerVolume - Decrements audio volume by 5% XF86AudioRaiseVolume - Increments audio volume by 5% If you don't have multimedia keys you can configure other keybindings like: { 0, XK_F12, spawn, "exec dwm-volume-mute" }, \ { MODKEY|ControlMask, XK_Down, spawn, "exec dwm-volume-down" }, \ { MODKEY|ControlMask, XK_Up, spawn, "exec dwm-volume-up" }, \ Setup Xsessions --------------- You must prepare your desktop to use DWM Scripts. Usually there are two files that need to be created/modified: In /usr/share/xsessions/dwm.desktop: [Desktop Entry] Encoding=UTF-8 Name=Dwm Comment=Dynamic window manager Exec=/usr/bin/dwm-wrapper Icon=dwm.png Type=XSession And if you are using Debian you should modify /var/lib/menu-xdg/xsessions/X-Debian-WindowManagers-dwm.desktop: [Desktop Entry] Encoding=UTF-8 Type=Application Name=Dwm Comment=Dynamic manager Exec=/usr/bin/dwm-wrapper [Window Manager] SessionManaged=true