[SOLVED] dwm urxvt by default
Hello,
I installed Arch with dwm and i can't figure out how to change the default terminal to urxvt so that when i use alt+shift+enter it opens urxvt instead of xterm. I edited the config.h with urxvt but it doesn't work. What did i miss?
Last edited by heck (2014-08-25 22:05:52)
Do you use:
makepkg -efi
to build the package from the ABS?
man makepkg wrote:
-e, --noextract
Do not extract source files or run the prepare() function (if present); use whatever source already exists in the $srcdir/ directory. This is
handy if you want to go into $srcdir/ and manually patch or tweak code, then make a package out of the result. Keep in mind that creating a
patch may be a better solution to allow others to use your PKGBUILD.
-f, --force
makepkg will not build a package if a built package already exists in the PKGDEST (set in makepkg.conf(5)) directory, which may default to the
current directory. This allows the built package to be overwritten.
-i, --install
Install or upgrade the package after a successful build using pacman(8).
Similar Messages
-
[SOLVED] DWM+pertag+bstack error
hi
i'm trying to compile dwm with pertag diff patch and bstack.c
i get an error while compiling it:
CC dwm.c
In file included from config.h:42,
from dwm.c:254:
bstack.c: En la función 'bstack':
bstack.c:7: error: puntero deferenciado a tipo de dato incompletoº
bstack.c:11:error:puntero..
make: *** [dwm.o] Error 1
==> ERROR: Falló la compilación.ª
Abortando...
º means: dereference pointer to incomplete data type
ª means: Compilation failed.
it sucks 'cos i want to read pdf on top of my 10" screen and write documents at bottom, without the problem of change to another desktop and have to move to another layout, i.e., floating for gimp
another thing: for write this post i must to write the code manually, 'cos a don't know how to copy from urxvt and paste it to firefox.. yep, that's a newbie question
Edit: solved here
Last edited by kismet010 (2010-02-08 05:51:09)Looks like this workaround isn't enough to get it to compile on the latest hg clone.
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.8" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
dwm.c: In function 'gaplessgrid':
dwm.c:262: error: dereferencing pointer to incomplete type
dwm.c:276: error: dereferencing pointer to incomplete type
dwm.c:276: error: dereferencing pointer to incomplete type
dwm.c:279: error: dereferencing pointer to incomplete type
dwm.c:282: error: dereferencing pointer to incomplete type
dwm.c:282: error: dereferencing pointer to incomplete type
dwm.c:283: error: dereferencing pointer to incomplete type
dwm.c:284: error: dereferencing pointer to incomplete type
make: *** [dwm.o] Error 1
Line 262 for me is:
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next))
I've tried many things and maybe i'm missing something very simple here. -
[SOLVED] dwm: cannot open mixer
I've been setting up dwm through the last hours and I had an issue with sound playback. Firstly, I can play any sound from the console or any other wm. The problem appears when I start dwm by using xinit but loading it through gdm seems to solve the problem but still I'm not satisfied with that solution. I think that gdm do something in order to grant access to the sound card but on the other hand I still have another problem with multiple running applications that playback sound, only the first opened application can.
After starting dwm with xinit I get "amixer: Mixer attach default error: No such file or directory" and by running alsamixer I get "cannot open mixer: No such file or directory".
Thanks in advance
Last edited by russo (2011-06-20 04:01:15)Well, I checked those posts.
/dev/mixer exists
I tried to load the snd-pcm-oss but nothing changed.
However I noticed that I can run alsamixer as root. I'm not sure but maybe having to run gdm as root while running xinit as user made the difference but still it doesn't make sense since I can run openbox with xinit and everything works fine. I'll keep trying
EDIT: Finally, I tried to load openbox through xinit and had the same problem. Next I tried to reboot removing gdm from the daemons and start dwm directly with the xinitrc options. Now it seems to work fine. Maybe gdm blocked the sound card once it opened.
Last edited by russo (2011-06-20 04:00:56) -
[SOLVED] dwm + gkrellm. gkrellm in all tags + apps not over it
hi! i'm using dwm right now, and it's here to stay in my config, but i'm a convert from fluxbox, and on it, i used to run gkrellm, it was beautifull to have it showed in every desktop, so right now i think if it's posible to have gkrellm in dwm, in the exact same behavior, so it shows in every tag, and the opened apps, dont get over it, like the slit in fluxbox...
here's my config.h, i've added gkrellm to the floating apps list, but don't know how to edit it so gkrellm show in every tag
/* See LICENSE file for copyright and license details. */
/* appearance */
/* static const char font[] = "-*-terminus-medium-r-normal-*-18-*-*-*-*-*-*-*"; */
static const char font[] = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#111111";
static const char normbgcolor[] = "#000000";
static const char normfgcolor[] = "#ffffff";
static const char selbordercolor[] = "#777777";
static const char selbgcolor[] = "#222222";
static const char selfgcolor[] = "#ffffff";
static unsigned int borderpx = 1; /* border pixel of windows */
static unsigned int snap = 32; /* snap pixel */
static Bool showbar = True; /* False means no bar */
static Bool topbar = False; /* False means bottom bar */
/* tagging */
static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static Rule rules[] = {
/* class instance title tags mask isfloating */
{ "Gimp", NULL, NULL, 0, True },
{ "Firefox", NULL, NULL, 1 << 8, True },
{ "MPlayer", NULL, "MPlayer", 0, True },
{ "feh", NULL, "feh", 0, True },
{ "glxgears", "glxgears", "glxgears", 0, True },
{ "vlc", NULL, "vlc", 0, True },
{ "xine", NULL, "xine", 0, True },
{ "gkrellm", NULL, "gkrellm", 0, True },
{ "galculator", NULL, NULL, 0, True },
{ "xcalc", NULL, NULL, 0, True },
{ "winff", NULL, "winff", 0, True },
{ "snes9x", NULL, "snes9x", 0, True },
/* layout(s) */
static float mfact = 0.55;
static Bool resizehints = True; /* False means respect size hints in tiled resizals */
static 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 const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmda[] = { "urxvt", NULL };
static const char *termcmdb[] = { "urxvt", "-sh", "50", NULL };
static const char *amixcmdua[] = { "amixer", "-q", "set", "PCM", "20+", NULL };
static const char *amixcmdda[] = { "amixer", "-q", "set", "PCM", "20-", NULL };
static const char *amixcmdub[] = { "amixer", "-q", "set", "Front", "10+", NULL };
static const char *amixcmddb[] = { "amixer", "-q", "set", "Front", "10-", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_Return, spawn, {.v = termcmda } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmdb } },
{ MODKEY, XK_z, spawn, {.v = amixcmdda } },
{ MODKEY, XK_x, spawn, {.v = amixcmdua } },
{ MODKEY|ShiftMask, XK_z, spawn, {.v = amixcmddb } },
{ MODKEY|ShiftMask, XK_x, spawn, {.v = amixcmdub } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ControlMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, XK_q, 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 } },
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 a tag number (starting at 0),
* 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 = termcmda } },
{ 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} },
THANKS!!
Last edited by leo2501 (2008-08-08 11:01:14)i will answer myself, someone get me the "key" in the ML. lol...
On 8/4/08, Anselm R Garbe <[EMAIL PROTECTED]> wrote:
> Also you might patch dwm.c to leave some space on the right for the
> window, e.g. in updategeom:
>
> wh-=200;
decreasing window area height would leave space at the _bottom_
ww-=200;
is probably what you meant
Anselm R Garbe
Mon, 04 Aug 2008 04:29:45 -0700
You need to define a rule to make it floating and tag it with all tags.
{ "gkrellm", NULL, "gkrellm", ~0, True },
Also you might patch dwm.c to leave some space on the right for the
window, e.g. in updategeom:
wh-=200;
Kind regards,
Anselm
Rickard Gustafsson
Mon, 04 Aug 2008 04:28:39 -0700
{ "gkrellm", NULL, "gkrellm", (1 << 9) - 1, True },
or you could just replace (1 << 9) - 1 with 511. -
[Solved] DWM with w0ng' config
Hi everyone,
Im using dwm on archlinux, and i try to install w0ng' config. But it is not working, i cant press anykey, i try shift+alt+q, shift+alt+p, alt+1, alt+2..... my screen no change, i must switch to tty2 and recompile dwm to default.
I upload 4 images for more details. This is top-left and top-right of my screen:
http://i.imgur.com/Em8286U.jpg
http://i.imgur.com/zrxOtqC.jpg
http://i.imgur.com/ObcOAKp.jpg
http://i.imgur.com/hjd3KTH.jpg
I installed font terminus2 and xbmicons:
fc-list | grep termi
/usr/share/fonts/local/terminus2.bdf: Terminus2:style=Regular
/root/.fonts/terminus2.bdf: Terminus2:style=Regular
fc-list | grep xb
/root/.fonts/xbmicons.pcf: xbmicons:style=Regular
/usr/share/fonts/local/xbmicons.pcf: xbmicons:style=Regular
and here is how do i do:
cd /home/user/Download/dwm-master/
cp PKGBUILD /root/dwm/
cp 0* config.h bstack.c gaplessgrid.c push.c /root/dwm/src/
cd /root/dwm/
makepkg -efi
Tks for reading.
-- mod edit: changed images to links - Trilby --
Last edited by x3004 (2014-07-12 17:37:00)Here is my config, i change a bit on w0ng' config:
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-xbmicons-medium-r-*-*-12-*-*-*-*-*-*-*" ","
/*"-*-terminus-medium-r-*-*-12-*-*-*-*-*-*-*";*/
"-*-terminus2-medium-r-*-*-12-*-*-*-*-*-*-*";
#define NUMCOLORS 12
static const char colors[NUMCOLORS][ColLast][9] = {
// border foreground background
{ "#282a2e", "#373b41", "#1d1f21" }, // 1 = normal (grey on black)
{ "#f0c674", "#c5c8c6", "#1d1f21" }, // 2 = selected (white on black)
{ "#dc322f", "#1d1f21", "#f0c674" }, // 3 = urgent (black on yellow)
{ "#282a2e", "#282a2e", "#1d1f21" }, // 4 = darkgrey on black (for glyphs)
{ "#282a2e", "#1d1f21", "#282a2e" }, // 5 = black on darkgrey (for glyphs)
{ "#282a2e", "#cc6666", "#1d1f21" }, // 6 = red on black
{ "#282a2e", "#b5bd68", "#1d1f21" }, // 7 = green on black
{ "#282a2e", "#de935f", "#1d1f21" }, // 8 = orange on black
{ "#282a2e", "#f0c674", "#282a2e" }, // 9 = yellow on darkgrey
{ "#282a2e", "#81a2be", "#282a2e" }, // A = blue on darkgrey
{ "#282a2e", "#b294bb", "#282a2e" }, // B = magenta on darkgrey
{ "#282a2e", "#8abeb7", "#282a2e" }, // C = cyan on darkgrey
/* edit here */
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 = 0; /* border pixel of windows */
static const unsigned int snap = 8; /* 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[] = { "\uE000", "\uE001", "\uE002", "\uE003", "\uE008",
"\uE004", "\uE005", "\uE006","\uE007 " };
static const Rule rules[] = {
/* class instance title tags mask isfloating iscentred monitor */
{ "feh", NULL, NULL, 0, True, True, -1 },
{ "Gcolor2", NULL, NULL, 0, True, True, -1 },
{ "XFontSel", NULL, NULL, 0, True, True, -1 },
{ "Xfd", NULL, NULL, 0, True, True, -1 },
{ "Firefox", NULL, NULL, 1, False, False, -1 },
{ "URxvt", "ircmailbt", NULL, 1 << 1, False, False, -1 },
{ "Gvim", NULL, NULL, 1 << 2, False, False, -1 },
{ "Zathura", NULL, NULL, 1 << 3, False, False, -1 },
{ "libreoffice-calc", NULL, NULL, 1 << 3, False, False, -1 },
{ "libreoffice-impress", NULL, NULL, 1 << 3, False, False, -1 },
{ "libreoffice-startcenter", NULL, NULL, 1 << 3, False, False, -1 },
{ "libreoffice-writer", NULL, NULL, 1 << 3, False, False, -1 },
{ "mpv", NULL, NULL, 1 << 4, False, False, -1 },
{ "TeamViewer.exe", NULL, NULL, 1 << 5, True, False, -1 },
{ "Wine", NULL, NULL, 1 << 5, True, False, -1 },
{ "Gimp", NULL, NULL, 1 << 5, True, False, -1 },
{ "URxvt", "filemgr", NULL, 1 << 6, False, False, -1 },
{ "Chromium", NULL, NULL, 1 << 7, False, False, -1 },
/* layout(s) */
static const float mfact = 0.50; /* 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 */
#include "bstack.c"
#include "gaplessgrid.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "\uE020 \uE009 \uE020", tile }, /* first entry is default */
{ "\uE020 \uE00A \uE020", NULL }, /* no layout function means floating behavior */
{ "\uE020 \uE00B \uE020", monocle },
{ "\uE020 \uE00C \uE020", bstack },
{ "\uE020 \uE00D \uE020", gaplessgrid },
/* key definitions */
#define MODKEY Mod4Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, view, {.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[] = { "dmenu_run", "-fn", font, "-nb", colors[0][ColBG], "-nf", colors[0][ColFG], "-sb", colors[1][ColBG], "-sf", colors[1][ColFG], NULL };
static const char *termcmd[] = { "urxvtc", NULL };
static const char scratchpadname[] = "scratchpad";
static const char *scratchpadcmd[] = { "urxvtc", "-name", scratchpadname, "-geometry", "100x25", NULL };
static const char *volupcmd[] = { "amixer", "-q", "set", "PCM", "5%+", NULL };
static const char *voldncmd[] = { "amixer", "-q", "set", "PCM", "5%-", NULL };
static const char *mpctog[] = { "ncmpcpp", "toggle", NULL };
static const char *mpcprev[] = { "ncmpcpp", "prev", NULL };
static const char *mpcnext[] = { "ncmpcpp", "next", NULL };
#include "push.c"
static Key keys[] = {
/* modifier key function argument */
/* edit here: change XK_o to XK_p
{ MODKEY, XK_o, spawn, {.v = dmenucmd } },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
/* edit here
{ MODKEY, XK_s, togglescratch, {.v = scratchpadcmd} },
{ MODKEY, XK_apostrophe, spawn, {.v = volupcmd } },
{ MODKEY, XK_semicolon, spawn, {.v = voldncmd } },
{ MODKEY, XK_slash, spawn, {.v = mpctog } },
{ MODKEY, XK_bracketleft, spawn, {.v = mpcprev } },
{ MODKEY, XK_bracketright, spawn, {.v = mpcnext } },
{ MODKEY|ControlMask, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
{ MODKEY|ShiftMask, XK_j, pushdown, {0} },
{ MODKEY|ShiftMask, XK_k, pushup, {0} },
{ 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_b, setlayout, {.v = &layouts[3]} },
{ MODKEY, XK_g, setlayout, {.v = &layouts[4]} },
{ 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 } },
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, toggleview, {0} },
{ ClkTagBar, 0, Button3, view, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
And here is "makepkg -efi" output:
=> 01-statuscolours.diff
patching file dwm.c
=> 02-monoclecount.diff
patching file dwm.c
=> 03-noborder.diff
patching file dwm.c
=> 04-centredfloating.diff
patching file dwm.c
=> 05-scratchpad.diff
patching file dwm.c
=> 06-attachaside.diff
patching file dwm.c
Hunk #1 succeeded at 161 with fuzz 2 (offset 8 lines).
Hunk #2 succeeded at 426 (offset 28 lines).
Hunk #3 succeeded at 1223 with fuzz 1 (offset 106 lines).
=> 07-nopaddedbar.diff
patching file dwm.c
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
CC -o dwm
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama
CC = cc
installing executable file to /root/dwm/pkg/dwm/usr/bin
installing manual page to /root/dwm/pkg/dwm/usr/share/man/man1
loading packages...
resolving dependencies...
looking for inter-conflicts...
Packages (1): dwm-6.0-2
Total Installed Size: 0.09 MiB
Net Upgrade Size: 0.00 MiB
checking keyring...
checking package integrity...
loading package files...
checking for file conflicts...
checking available disk space...
reinstalling dwm...
@jasonwryan: I saw your name in here, nice to meet you (statuscolors-6.0 patch is not exists). -
[SOLVED] [dwm] Can't start dwm
Hi!
I've recently entered the world of tiling WM and started with dwm.
Since I'm kinda insecure, and wanted to keep gnome as well, I've followed every single step in the wiki article and used the ~/.Xclients way, so I could start dwm from gdm (I've followed also the steps in the discussion page as well).
Then, when I tried to startup dwm from gdm, it doesn't start, and goes back again to gdm.
My ~/.Xclients file is the following:
setxkbmap -layout pt
#relogio
while true; do
xsetroot -name "$( date +"%F %R" )"
sleep 1m # Update time every minute
done &
# #estado da bateria
# while true; do
# batt=$(LC_ALL=C acpi -b)
# case $batt in
# *Discharging*)
# batt="${batt#* * * }"
# batt="${batt%%, *} "
# batt=""
# esac
# xsetroot -name "$batt$(date +%R)"
# sleep 60
# done &
#conky bar
conky | while read -r; do xsetroot -name "$REPLY"; done &
#executar o dwm
exec dwm
It's all things copied from the wiki page, just for testing if everything was fine...
My /usr/share/xsessions/dwm.desktop file is:
[Desktop Entry]
Encoding=UTF-8
Name=Dwm
Comment=Dynamic window manager
Exec=/usr/local/bin/dwm
Icon=dwm
Type=XSession
And I've created a /usr/share/xsessions/user.desktop file that looks like this:
[Desktop Entry]
Encoding=UTF-8
Name=User XSession script
Comment=Runs your ~./Xsession script
Exec=/etc/X11/Xsession
Type=Application
Thanks in advance for any help, I've searched the forums and used google and couldn't find any answer to this problem :S
Last edited by Aeriel (2011-09-01 17:19:02)haxit, thanks I've managed to solve the problem!
I've installed SLiM and set up everything in .xinitrc.
The dwm.desktop doesn't match with yours because I've changed somethings and because I didn't backup the file (I know, it's super dumb and stupid) I had to paste the defaults I found in the web.
Thanks.
Fellow gdm and dwm users, an advice, put everything in .xinitrc. It's easier.
Last edited by Aeriel (2011-09-01 17:19:30) -
[SOLVED] DWM running with gnome difficulties - cracked leaving GNOME!
UPDATE: concept as a perceived requirement has been scrubed. No longer needing Gnome's environment ... just some gtk/gnome libraries here and there though, obviously. See last post of mine here if ya like and you're rushed a bit.
Having problems getting gnome to live with DWM though I can compile myself as i just learned how from the wiki.
OBJECTIVE: retain at least the bottom menu bar of gnome (and program access) for a while yet .... while using DWM.
Hi... having the most amazing time with Xmonad, awesome, stumpwm, dmenu etc.
At this point I've realized that Xmonad and DWM have basically the same keybinding.
For how it work WELL, as it's an originator, and keeping it simple ummm.... was it 18k or 180k? hehehe (see other posts about dwm) I'm going to go with dwm for the forseeable future. they're all great though having done the studying it's really a simple decision.... If I wanted to swap to something else later I'd have the skill to know how simple that would be... dwm does cover ALL of what I sensibly need to work quickly and SIMPLY/manageably...
DUE TO UPDATE COMMENT AT TOP - SOME OF THE NEXT COUPLE OF POST IS REDUNDANT a BIT though maybe not:
So... I'm wishing to be able to access my folders and programs through the gnome menu as a fail-safe until I figure out how to get around any gottcha before I reinstall WITHOUT gnome (just some of the libraries obviously for packages that need them)
I really need to get going immediately with DWM and having had lots of fun with Xmonad (works easily with gnome though i like the simplicity of default DWM) ...
ALL I really need is what I now have left of gnome's desktop visibility which is the bottom bar with a menu applet embeded in it...
Actually.... IF there's a way to GRAPHICALLY see folders ie. boot programs without having to find the binary though would be cool.
Gnome can do it's thing in the background.... though right now ALL I can get by adding DWM WITH metacity in the gnome sessions properties leaves me WITHOUT the bootom bar that gets me to my programs...
yep, duh.
any assistance apreciated as I can't stand working without dwm (or similar tiling wm) though I'm too new at it and generally not skilled enough at this move to get to my program's ICONS... using dmenu for all booting just isn't practical for me today.. then again who knows what the next hour will bring! hehehe
So..... ANYONE have DWM code that'll work??? .... I think I'd prefer it to be stock otherwise...
whatver happens thanks and everything's so cool.... have learned SO much....
Last edited by yvonney (2009-02-03 09:44:22)well as i remember, my own path was something like this...
Windozes -> PCLinuxOS -> (K-X)Ubuntu -> Arch(XFCE4(desktop environment)) -> Arch(Fluxbox(no DE)) -> Arch(wmii+gnu/screen) -> Arch(dwm+gnu/screen)
not talking about GNU/screen its like not talking about breathing to me right now at the beggining (like all i pass throught in GNU/linux) i can barely understand something "as complex" to understand like screen, but using it, showed me that EVERYTHING is a matter of understanding throught direct experience
so i'll recommend to you that you start looking to gnu/screen, is so damn easy to configure/use once you understand it, but difficult when you start reading about it, like dwm is in first place
what i do for file assosiations and such is using midnight commander (cli-file manager) and i edited a menu (F2 on a dir/file) and it popups showing the list of apps that i configured to open that file extension, i configured tuxcmd in the past but i didnt used it for months now...
here's the ~/.mc/menu i did... (i use urxvt as a daemon starting "urxvtd -q -f -o &" in .xinit, you may change "urxvtc" with your terminal emulator of choice... (i hope it will be urxvt(c) and not something like gnome-terminal )
shell_patterns=0
+ ! t t
@ Do something on the current file
CMD=%{Enter command}
$CMD %f
7 compress to 7zip (dir27z)
urxvtc -e dir27z %f &
@ compress file to zip (file2zip)
urxvtc -e file2zip %f &
@ compress dir to zip (dir2zip)
urxvtc -e dir2zip %f &
@ dir to iso (mkisofs -V volume_name -J -r -o isoimage.iso)
urxvtc -e mkisofs -V NEW -J -r -o isoimage.iso %f &
s make symlink in /tmp/burn (mksym)
mksym %f &
x make executable (chmod 755)
chmod 755 %f
r chown -cR root:root
sudo chown -cR root:root %f
a chown -cR aleyscha:users
sudo chown -cR aleyscha:users %f
u mount /dev/cdrom
mount /dev/cdrom
u umount /dev/cdrom
umount /dev/cdrom
u wodim -v dev=/dev/cdrom -blank=fast
urxvtc -e wodim -v dev=/dev/cdrom -blank=fast &
u dd if=/dev/cdrom of=/downloads/New/isoimage.iso
urxvtc -e dd if=/dev/cdrom of=/downloads/New/isoimage.iso &
u unmount ISO Image (fusermount -u /mnt/cdrom)
fusermount -u /mnt/cdrom
u unmount ISO Image (fusermount -u /mnt/iso1)
fusermount -u /mnt/iso1
u unmount ISO Image (fusermount -u /mnt/iso2)
fusermount -u /mnt/iso2
g edit file in gvim as root (sudo gvim %f &)
sudo gvim %f &
c copy (fui %f)
urxvtc -e fui %f &
p paste (fui --copy)
urxvtc -e fui --copy &
p paste (fui --move)
urxvtc -e fui --move &
c clamscan (clamscan --recursive --infected --bell --remove)
urxvtc -e clamscan --recursive --infected --bell --remove %f &
b Send via Bluetooth to device (obexftp -b 00:17:D5:85:0D:6F -p)
obexftp -b 00:17:D5:85:0D:6F -p %f &
+ t t
d Do something on the tagged files
set %t; CMD=%{Enter command}
while [ -n "$1" ]; do
$CMD "$1"
shift
done
+ t t
@ Make symlink in /tmp/burn
while [ -n "$1" ]; do
mksym "$1"
shift
done
0 Edit a bug report and send it to root
I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
${EDITOR-vi} $I
test -r $I && mail root < $I
rm -f $I
=+ f \.1$ | f \.3$ | f \.4$ | f \.5$ | f \.6$ | f \.7$ | f \.8$ | f \.man$ & t r
1 Display the file with roff -man
nroff -man %f | less
2 Call the info hypertext browser
info
= t d
3 Compress the current subdirectory (tar.gz)
Pwd=`basename "%d" /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | gzip -f9 > "$tar.tar.gz" && \
echo "../$tar.tar.gz created."
4 Compress the current subdirectory (tar.bz2)
Pwd=`basename %d /`
echo -n "Name of the compressed file (without extension) [$Pwd]: "
read tar
if [ "$tar"x = x ]; then tar="$Pwd"; fi
cd .. && \
tar cf - "$Pwd" | bzip2 -f > "$tar.tar.bz2" && \
echo "../$tar.tar.bz2 created."
= f \.c$ & t r
+ f \.c$ & t r & ! t t
5 Compile and link current .c file
make `basename %f .c` 2>/dev/null || cc -O -o `basename %f .c` %f
+ t r & ! t t
a Append file to opposite
cat %f >>%D/%f
+ t t
A Append files to opposite files
set %t
while [ -n "$1" ]; do
cat $1 >>%D/$1
shift
done
+ t r & ! t t
d Delete file if a copy exists in the other directory.
if [ "%d" = "%D" ]; then
echo "The two directores must be different"
exit 1
fi
if [ -f %D/%f ]; then # if two of them, then
if cmp -s %D/%f %f; then
rm %f && echo %f: DELETED
else
echo "%f and %D/%f differ: NOT deleted"
echo -n "Press RETURN "
read key
fi
else
echo %f: No copy in %D/%f: NOT deleted.
fi
+ t t
D Delete tagged files if a copy exists in the other directory.
if [ "%d" = "%D" ]; then
echo "The two directores must be different"
exit 1
fi
for i in %t
do
if [ -f %D/$i ]; then
SUM1="`sum $i`"
SUM2="`sum %D/$i`"
if [ "$SUM1" = "$SUM2" ]; then
rm $i && echo ${i}: DELETED
else
echo $i and %D/$i differ: NOT deleted.
fi
else
echo %f has no copy in %D/%f: NOT deleted.
fi
done
m View manual page
MAN=%{Enter manual name}
%view man -P cat $MAN
= f \.gz$ & t r
+ ! t t
n Inspect gzip'ed newsbatch file
dd if=%f bs=1 skip=12|zcat|${PAGER-more}
# assuming the cunbatch header is 12 bytes long.
= t r &
+ ! t t
h Strip headers from current newsarticle
CHECK=`awk '{print $1 ; exit}' %f` 2>/dev/null
case $CHECK in
Newsgroups:|Path:)
I=`mktemp ${MC_TMPDIR:-/tmp}/news.XXXXXX` || exit 1
cp %f $I && sed '/^'"$CHECK"' /,/^$/d' $I > %f
[ "$?" = "0" ] && rm $I
echo %f: header removed
echo %f is not a news article.
esac
+ t t
H Strip headers from the marked newsarticles
set %t
while [ -n "$1" ]; do
CHECK=`awk '{print $1 ; exit}' $1` 2>/dev/null
WFILE=`mktemp ${MC_TMPDIR:-/tmp}/news.XXXXXX` || exit 1
case $CHECK in
Newsgroups:|Path:)
cp $1 $WFILE && sed '/^'"$CHECK"' /,/^$/d' $WFILE > $1
if [ "$?" = "0" ]; then
rm $WFILE; echo $1 header removed. OK.
else
echo "Oops! Please check $1 against $WFILE"
fi
echo $1 skipped: Not a news article.
esac
shift
done
= t r
+ ! t t
r Copy file to remote host
echo -n "To which host?: "
read Host
echo -n "To which directory on $Host?: "
read Dir
rcp -p %f ${Host}:$Dir
+ t t
R Copy files to remote host (no error checking)
echo -n "Copy files to which host?: "
read Host
echo -n "To which directory on $Host? :"
read Dir
rcp -pr %u ${Host}:$Dir
= f \.tex$ & t r
+ f \.tex$ & t r & ! t t
t Run latex on file and show it with xdvi
latex %f && xdvi `basename %f .tex`.dvi
=+ f ^part | f ^Part | f uue & t r
+ t t
U Uudecode marked news articles (needs work)
set %t
while [ -n "$1" ]; do # strip headers
FIRST=`awk '{print $1 ; exit}' $1`
cat $1 | sed '/^'"$FIRST"' /,/^$/d'; shift
done
) |sed '/^$/d' |sed -n '/^begin 6/,/^end$/p' | uudecode
if [ "$?" != "0" ]; then
echo "Cannot decode %t"
fi
echo "Please test the output file before deleting anything"
=+ f \.tar\.gz$ | f \.tar\.z$ | f \.tgz$ | f \.tpz$ | f \.tar\.Z$| f \.tar\.bz2$ & t r
x Extract the contents of a compressed tar file
unset EXT
case %f in
*.tar.bz2) EXT=tar_bz2;;
esac
if [ "$EXT" = "tar_bz2" ]; then
bunzip2 -c %f | tar xvf -
else
gzip -dc %f | tar xvf -
fi
= t r
+ ! t t
y Gzip or gunzip current file
unset DECOMP
case %f in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v %f
+ t t
Y Gzip or gunzip tagged files
for i in %t
do
unset DECOMP
case $i in
*.gz) DECOMP=-d;;
*.[zZ]) DECOMP=-d;;
esac
gzip $DECOMP -v $i
done
+ ! t t
b Bzip2 or bunzip2 current file
unset DECOMP
case %f in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v %f
+ t t
B Bzip2 or bunzip2 tagged files
for i in %t
do
unset DECOMP
case $i in
*.bz2) DECOMP=-d;;
esac
bzip2 $DECOMP -v $i
done
+ f \.tar.gz$ | f \.tgz$ | f \.tpz$ | f \.tar.Z$ | f \.tar.z$ | f \.tar.bz2$ | f \.tar.F$ & t r & ! t t
z Extract compressed tar file to subdirectory
unset D
set gzip -cd
case %f in
*.tar.gz) D="`basename %f .tar.gz`";;
*.tgz) D="`basename %f .tgz`";;
*.tpz) D="`basename %f .tpz`";;
*.tar.Z) D="`basename %f .tar.Z`";;
*.tar.z) D="`basename %f .tar.z`";;
*.tar.bz2) D="`basename %f .tar.bz2`"; set bunzip2 -c ;;
*.tar.F) D="`basename %f .tar.F`"; set freeze -dc;
esac
mkdir $D; cd $D && ($1 $2 ../%f | tar xvf -)
+ t t
Z Extract compressed tar files to subdirectories
for i in %t
do
set gzip -dc
unset D
case $i in
*.tar.gz) D="`basename $i .tar.gz`";;
*.tgz) D="`basename $i .tgz`";;
*.tpz) D="`basename $i .tpz`";;
*.tar.Z) D="`basename $i .tar.Z`";;
*.tar.z) D="`basename $i .tar.z`";;
*.tar.F) D="`basename $i .tar.F`"; set freeze -dc;;
*.tar.bz2) D="`basename $i .tar.bz2`"; set bunzip2 -c;;
esac
mkdir $D; (cd $D && $1 $2 ../$i | tar xvf -)
done
+ f \.gz$ | f \.tgz$ | f \.tpz$ | f \.Z$ | f \.z$ | f \.bz2$ & t r & ! t t
c Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
unset D
unset EXT
case %f in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz|tpz) D="`basename %f .$EXT`.tar";;
gz|Z|z) D="`basename %f .$EXT`";;
bz2) D="`basename %f .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v %f ; gzip -f9 -v $D
else
gunzip -v %f ; bzip2 -v $D
fi
+ t t
C Convert gz<->bz2, tar.gz<->tar.bz2 & tgz->tar.bz2
set %t
while [ -n "$1" ]
do
unset D
unset EXT
case $1 in
*.tgz) EXT=tgz;;
*.tpz) EXT=tpz;;
*.Z) EXT=Z;;
*.z) EXT=z;;
*.gz) EXT=gz;;
*.bz2) EXT=bz2;;
esac
case $EXT in
tgz) D="`basename $1 .tgz`.tar";;
tpz) D="`basename $1 .tpz`.tar";;
gz|Z|z) D="`basename $1 .$EXT`";;
bz2) D="`basename $1 .bz2`";;
esac
if [ "$EXT" = "bz2" ]; then
bunzip2 -v $1
gzip -f9 -v $D
else
gunzip -v $1
bzip2 -v $D
fi
shift
done
+ x /usr/bin/open | x /usr/local/bin/open & x /bin/sh
o Open next a free console
open -s -- sh
#### Added by me ####
#### Video File Menu ####
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
p mplayer
mplayer %f
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
i ffmpeg -i (show audio/video info)
ffmpeg -i %f
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
i mediainfo (show audio/video info)
mediainfo %f
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
v vlc
vlc %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Edit with AviDemux (avidemux2_gtk %f)
avidemux2_gtk %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Encode to h264 vhq 96 700 (enc2h264 vhq 96 700 %f)
urxvtc -e enc2h264 vhq 96 700 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Encode to h264 hq 64 500 (enc2h264 hq 64 500 %f)
urxvtc -e enc2h264 hq 64 500 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Encode to h264 wmv 17fps 500 64 (enc2h264 wmv17 %f)
urxvtc -e enc2h264 wmv17 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Encode to h264 wmv 25fps 500 64 (enc2h264 wmv25 %f)
urxvtc -e enc2h264 wmv25 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
@ Encode to -oac mp3_abr_96 (enc2h264 audio 96)
urxvtc -e enc2h264 audio 96 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
@ Encode to vhq 140 1000 (scale to 624x352, enc2h264 series %f)
urxvtc -e enc2h264 series %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
e Encode to mpg 160 1152 (enc2mpg mpg 160 1152 %f)
urxvtc -e enc2mpg mpg 160 1152 %f &
+ f \.avi$ | f \.mpg$ | f \.mpeg$ | f \.mkv$ | f \.ts$ | f \.rm$ | f \.vob$ | f \.VOB$ | f \.rmvb$ | f \.flv$ | f \.wmv | f \.ram | f \.mp4 | f \.asf | f \.ogm | f \.m2v | f \.evo$ & t r & ! t t
f mplayer framebuffer (mplayer -vo fbdev -fs)
mplayer -vo fbdev -fs %f
+ f \.mkv$ & t r & ! t t
e Extract mkv file (video-audio-subtitle, extractmkv %f)
urxvtc -e extractmkv %f &
#### Audio File Menu ####
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ & t r & ! t t
p mplayer
urxvtc -e mplayer %f &
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ & t r & ! t t
i ffmpeg -i (show audio/video info)
ffmpeg -i %f &
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ & t r & ! t t
i mediainfo (show audio/video info)
mediainfo %f &
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ & t r & ! t t
a audacity
audacity %f
+ f \.wav$ | f \.mp3$ | f \.au$ | f \.aiff$ | f \.snd$ | f \.mp2$ | f \.flac$ | f \.wma$ | f \.snd$ | f \.mpc$ | f \.ac3$ | f \.mid$ | f \.ogg$ & t r & ! t t
e Encode to ABR MP3 (enc2mp3)
urxvtc -e enc2mp3 %f &
#### Disk Image File Menu ####
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
i isomaster
isomaster %f
+ f \.cue$ | f \.bin$ & t r & ! t t
3 Convert BIN to ISO (bin2iso)
urxvtc -e bin2iso %f &
+ f \.iso$ | f \.ccd$ | f \.img$ | f \.nrg$ | f \.mdf$ | f \.cue$ | f \.bin$ | f \.daa$ | f \.b6t$ | f \.b6i$ & t r & ! t t
c Poweriso convert image to ISO (all2iso)
urxvtc -e all2iso %f &
+ f \.ccd$ & t r & ! t t
5 Convert CCD to ISO (myccd2iso)
urxvtc -e myccd2iso %f &
+ f \.iso$ | f \.bin$ | f \.img$ | f \.nrg$ | f \.mdf$ & t r & ! t t
5 Fuseiso mount image /mnt/cdrom (fuseiso %f /mnt/cdrom)
fuseiso %f /mnt/cdrom
+ f \.iso$ | f \.bin$ | f \.img$ | f \.nrg$ | f \.mdf$ & t r & ! t t
5 Fuseiso mount image /mnt/iso1 (fuseiso %f /mnt/iso1)
fuseiso %f /mnt/iso1
+ f \.iso$ | f \.bin$ | f \.img$ | f \.nrg$ | f \.mdf$ & t r & ! t t
5 Fuseiso mount image /mnt/iso2 (fuseiso %f /mnt/iso2)
fuseiso %f /mnt/iso2
+ f \.cue$ & t r & ! t t
5 Burn BIN/CUE image (cdrdao write --device /dev/cdrom %f)
urxvtc -e cdrdao write --device /dev/cdrom %f &
+ f \.iso$ | f \.bin$ & t r & ! t t
5 Burn ISO image (burn-cd -m)
urxvtc -e burn-cd -m %f &
+ f \.iso$ & t r & ! t t
5 Burn ISO image (wodim -v dev=/dev/cdrom)
urxvtc -e wodim -v dev=/dev/cdrom %f &
#### Image File Menu ####
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
v xv
xv %f &
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
v feh
feh %f &
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
f feh --scale-down
feh --scale-down %f &
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
g gimp
gimp %f &
+ f \.jpg$ | f \.jpeg$ | f \.bmp$ | f \.png$ | f \.gif$ | f \.svg$ & t r & ! t t
3 geeqie
geeqie %f &
#### PDF File Menu ####
+ f \.pdf$ & t r & ! t t
v epdfview
epdfview %f &
+ f \.pdf$ & t r & ! t t
x xpdf
xpdf %f
+ f \.pdf$ & t r & ! t t
x viewpdf
urxvtc -e viewpdf %f &
#### Text File Menu ####
+ f \.txt$ | f \.nfo$ | f \.cfg$ | f \.log$ | f \.srt$ | f \.sub$ | f \.ssa$ & t r & ! t t
v leafpad
leafpad %f &
+ f \.txt$ | f \.nfo$ | f \.cfg$ | f \.log$ | f \.srt$ | f \.sub$ | f \.ssa$ & t r & ! t t
g gvim
gvim %f &
#### Archive File Menu ####
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
l List file contents (7z l)
urxvtc -e 7z l %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
1 xarchiver
xarchiver %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
2 Extract *.tar.gz (tar -xzvf)
urxvtc -e tar -xzvf %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
3 Extract *.tar.bz2 (tar -xjvf)
urxvtc -e tar -xjvf %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ | f \.cbr$ | f \.cbz$ & t r & ! t t
4 Extract *.rar Full Path (unrar x)
urxvtc -e unrar x %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ | f \.cbr$ | f \.cbz$ & t r & ! t t
5 Extract *.rar Current Dir (unrar e)
urxvtc -e unrar e %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ | f \.cbr$ | f \.cbz$ & t r & ! t t
5 Extract broken *.rar Full Path (unrar x -kb)
urxvtc -e unrar x -kb %f &
+ f \.zip$ & t r & ! t t
6 Extract *.zip (unzip)
urxvtc -e unzip %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
6 Extract *.zip with bsdtar (bsdtar -xvf)
urxvtc -e bsdtar -xvf %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
7 Extract *.7z Full Path (7z x)
urxvtc -e 7z x %f &
+ f \.zip$ | f \.tar.gz$ | f \.rar$ | f \.bz2$ | f \.tgz$ | f \.7z$ | f \.ace$ & t r & ! t t
8 Extract *.7z Current Dir (7z e)
urxvtc -e 7z e %f &
+ f \.ace$ & t r & ! t t
9 Extract *.ace Full Path (unace x)
urxvtc -e unace x %f &
+ f \.ace$ & t r & ! t t
a Extract *.ace Current Dir (unace e)
urxvtc -e unace e %f &
+ f \.rar$ | f \.cbz$ & t r & ! t t
b Extract *.rar in *.rar_dir directory (unrar2dir)
urxvtc -e unrar2dir %f &
+ f \.zip$ & t r & ! t t
c Extract *.zip in *.zip_dir directory (unzip2dir)
urxvtc -e unzip2dir %f &
+ f \.tar.gz$ | f \.bz2$ | f \.tgz$ & t r & ! t t
e yaourt Install/Upgrade Package (yaourt -U)
yaourt -U %f
#### Windows Executable File Menu ####
+ f \.exe$ | f \.EXE$ | f \.bat$ | f \.BAT$ & t r & ! t t
r wine
urxvtc -e wine %f &
+ f \.exe$ | f \.EXE$ | f \.bat$ | f \.BAT$ | f \.cmd$ | f \.CMD$ | f \.COM$ | f \.com$ & t r & ! t t
r Dosbox (Dosbox normal)
Dosbox normal %f &
+ f \.exe$ | f \.EXE$ | f \.bat$ | f \.BAT$ | f \.cmd$ | f \.CMD$ | f \.COM$ | f \.com$ & t r & ! t t
r Dosbox (Dosbox normal3x)
Dosbox normal3x %f &
+ f \.exe$ | f \.EXE$ | f \.bat$ | f \.BAT$ | f \.cmd$ | f \.CMD$ | f \.COM$ | f \.com$ & t r & ! t t
r Dosbox (Dosbox advmame3x)
Dosbox advmame3x %f &
#### Internet File Menu ####
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
k kazehakase
kazehakase %f
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
s swiftweasel
swiftweasel %f
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
s elinks
urxvtc -e elinks %f &
+ f \.htm$ | f \.html$ | f \.php$ | f \.asp$ & t r & ! t t
s links -g
links -g %f
#### Document File Menu ####
+ f \.doc$ | f \.rtf$ & t r & ! t t
a abiword
abiword %f
+ f \.doc$ | f \.rtf$ & t r & ! t t
o OpenOffice Writer
soffice -writer %f
+ f \.doc$ | f \.rtf$ & t r & ! t t
o antiword
urxvtc -e antiword %f &
+ f \.doc$ | f \.rtf$ & t r & ! t t
o viewword (antiword -f %f > vi)
urxvtc -e viewword %f &
+ f \.lit$ & t r & ! t t
o c-lit
c-lit %f
#### Spread Sheet File Menu ####
+ f \.xls$ | f \.csv$ & t r & ! t t
g gnumeric
gnumeric %f
#### Presentation File Menu ####
+ f \.ppt$ | f \.pps$ & t r & ! t t
v OpenOffice Impress (soffice -impress)
soffice -impress %f
#### Java File Menu ####
+ f \.jar$ & t r & ! t t
e Execute java program (java -jar)
java -jar %f
#### Help/Manual File Menu ####
+ f \.chm$ & t r & ! t t
v xchm
xchm %f
#### Emulator Roms ####
+ f \.smc$ & t r & ! t t
v zsnes
zsnes %f
+ f \.smc$ & t r & ! t t
v snes9x (snes9x -tr -dfr -y2)
snes9x -tr -dfr -y2 %f
+ f \.smd$ & t r & ! t t
v dgen (dgen -G 1280x960)
dgen -G 1280x960 %f
+ f \.v64$ | f \.z64$ & t r & ! t t
v mupen64_nogui
mupen64_nogui %f
+ f \.nes$ & t r & ! t t
v tuxnes
tuxnes %f
+ f \.nes$ & t r & ! t t
v fceu
fceu -input1 gamepad %f
+ f \.nes$ & t r & ! t t
v ines
ines %f
+ f \.int$ & t r & ! t t
v intellivission
int %f
+ f \.gb$ | f \.gba$ & t r & ! t t
v VisualBoyAdvance
VisualBoyAdvance -4 %f
+ f \.gb$ | f \.gba$ & t r & ! t t
v gvba
gvba %f
+ f \.gba$ & t r & ! t t
v vgba
vgba %f
+ f \.gb$ & t r & ! t t
v vgb
vgb %f
+ f \.adf$ & t r & ! t t
v amigacomputer
e-uae %f
+ f \.gcm$ & t r & ! t t
v tuxcube
tuxcube %f
+ f \.st$ & t r & ! t t
v hatari
hatari %f
+ f \.a26$ & t r & ! t t
v stella
stella %f
+ f \.col$ & t r & ! t t
v colem32
colem32 %f
#### Source-Code File Menu ####
+ f \.c$ & t r & ! t t
c compile source file (gcc -O2 -Wall -pedantic)
urxvtc -e gcc -O2 -Wall -pedantic %f
+ f \.cpp$ & t r & ! t t
c compile source file (gcc -O2 -Wall -pedantic)
urxvtc -e g++ -O2 -Wall -pedantic %f -
Trying to get dwm, urxvt, transparency to work nicely together
New Arch user here, great distribution.
I've been trying to set up dwm with the Monaco font (great monospace/ttf font) and transparency. As you know, dwm launches uxterm by default as a new terminal. I wanted something with transparency, so I tried urxvt and tried to get it to use "fake" transparency (I could try real transparency, but when I launch xcompmgr I get a plethora of streaming error messages, so I guess I'll have the fake stuff). My ~.Xresources file looks like so:
! URxvt*font: Monaco
URxvt*background: black
URxvt*foreground: white
URxvt*termName: rxvt
URxvt*multichar_encoding: utf-8
URxvt*transparent: true
URxvt*tintColor: white
URxvt*shading: 50
URxvt*loginShell: true
URxvt*scrollBar: false
URxvt*scrollKey: true
URxvt*saveLines: 3000
I grabbed this somewhere from the net. I've commented out the font, because its another issue and I'll address it below. After saving this, and running xrdb -load ~/.Xresources, I try launching urxvt. The colors work fine (background and foreground), but I can't seem to get the transparency working at all. Instead its just a solid color.
As for the font, I installed Monaco from the arch repos. I tried using xlsfonts to get the "name" of the font, but that showed up nothing. Can urxvt use ttf fonts?
Thanks for your help, I'll post anything else anyone needs.
Last edited by maxmackie (2012-05-29 23:41:54)JackH79 wrote:
This will probably help (it will probably help with your font problems as well). See what it says about using shading and tintColor at the same time.
Also, just for future reference, please use Code tags for posting file content or terminal output.
Like this:
[code]Some text[/code]
Thanks for the link. I must have skimmed over too quickly last time. I got the font working, awesome how the wiki uses the font I want as an example For the transparency however, no dice. I tried using either only shading or tint, but both of them failed. Just to be 100% certain, I don't need xcompmgr running or anything for this to work right?
Trilby wrote:I'm not sure where dwm comes into play here, but I will give you one of my own grievances: I much prefer "real" transparency because with psuedo-transparency, whenever the layout changes, there seems to be a good bit of lag between to windows changing shape and the pseudo-background being redrawn. It's ugly as hell - so I use true transparency. I'm still working, however, on a dwm patch to "hide other" windows in monocle mode, because as is, a true transparent terminal in monocle mode shows other windows below it ... also ugly as hell.
The only saving grace is that I never really use terminals in monocle mode - thats just for my web browser on occasion.
As for the problem at hand, I second Jack's point. Remove one of those and try again.
I figured I'd mention dwm seeing as they mention transparency issues out of box (ie, none). I thought maybe running dwm required me to have an extra daemon running or something... I do agree that true transparency would be much nicer, but I'm running into big issues with xcompmgr. Running from shell dumps an endless stream of "error 163: BadPicture request 149 minor 8 serial xxxxx" and running it straight from dmenu results in ugly transparency between different tags in dwm (I have a terminal open on tag 1 and firefox open on tag 2, I can see firefox through the terminal on tag 1). Admittedly, I haven't read into anything regarding xcompmgr so these could all be trivial issues.
jasonwryan wrote:Welcome to the boards Max. What took you so long?
Hey Jason. Well, a couple years back I saw your awesome screenshot of dwm and decided to switch from KDE to it. I guess recently I felt like going the whole way and running Arch. I loved getting everything up and running manually (nothing like installing an OS and being given only a simple terminal ). Thanks for the welcome. -
[SOLVED] awesome & urxvt results in some screen flickering
Hi,
i've been using awesome since a few weeks and i noticed a flickering problem when starting urxvt (via mod4+enter).
urxvt starts, disappears, comes back again, disappears and so on.
starting up urxvt (time until i get a usable promt) takes about 1-2 seconds.
However, i don't know how to track the problem down. Maybe it is urxvt's (i think it is), maybe it is awesome's or even ati's fault (using 2.6.32 with open source ati driver).
when i switch between multiple windows (using mod4+n) only urxvt windows are flickering. Switching between gui-apps (ff, dolphin, …) works as expected.
maybe someone has an idea about this …
Here are the configs:
.Xdefaults:
!URxvt settings
!--[Title]--!
URxvt*title: urxvtc
URxvt*termName: rxvt-unicode
URxvt*cursorBlink: true
URxvt*urgentOnBell: true
!--[Url's /launching/marking/yanking]--!
URxvt.perl-ext: default,matcher
URxvt.urlLauncher: /usr/bin/firefox
URxvt.matcher.button: 1
!--[Fonts]--!
URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=14:antialias=false
URxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true:antialias=false
URxvt.boldItalicFont: xft:Bitstream Vera Sans Mono:bold:italic:autohint=true:antialias=false
URxvt.underlineColor: yellow
URxvt.scrollBar: false
!--[Urxvt Options]--!
URxvt.boldMode: false
URxvt.imLocale: de_AT.UTF-8
URxvt.loginShell: true
URxvt.saveLines: 512
URxvt.inheritPixmap: true
URxvt.borderless: true
URxvt.jumpScroll: true
URxvt.tintColor: white
URxvt.internalBorder: 0
URxvt.cursorBlink: false
URxvt.cursorColor: #dd9900
URxvt.cursorColor2: #000000
URxvt.background: #222222
URxvt.foreground: #ddccbb
URxvt.colorBD: #ffffff
URxvt.colorIT: #bbbbbb
URxvt.colorUL: #999999
URxvt.underlineColor: #999999
URxvt*saveLines: 512
!URxvt*depth: 32
!URxvt*background: rgba:02f0/04f0/04f0/cccc
URxvt*transparent: true
URxvt*shading: 10
!--[Colours]--!
!Theme One from
!http://phraktured.net/terminal-colors/terminal%20theme.tags.html
*background: rgb:00/00/00
*foreground: rgb:a8/a8/a8
*color0: rgb:00/00/00
*color1: rgb:a8/00/00
*color2: rgb:00/a8/00
*color3: rgb:a8/54/00
*color4: rgb:00/00/a8
*color5: rgb:a8/00/a8
*color6: rgb:00/a8/a8
*color7: rgb:a8/a8/a8
*color8: rgb:54/50/54
*color9: rgb:f8/54/50
*color10: rgb:50/fc/50
*color11: rgb:f8/fc/50
*color12: rgb:50/54/f8
*color13: rgb:f8/54/f8
*color14: rgb:50/fc/f8
*color15: rgb:f8/fc/f8
http://github.com/nblock/config/blob/master/.Xdefaults
rc.lua:
-- {{{ Load libraries
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
require("vicious")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvtc"
editor = "vim"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
awful.layout.suit.tile, --1
awful.layout.suit.tile.left, --2
awful.layout.suit.tile.bottom, --3
awful.layout.suit.tile.top, --4
awful.layout.suit.fair, --5
awful.layout.suit.fair.horizontal, --6
awful.layout.suit.spiral, --7
awful.layout.suit.spiral.dwindle, --8
awful.layout.suit.max, --9
awful.layout.suit.max.fullscreen, --10
awful.layout.suit.magnifier, --11
awful.layout.suit.floating --12
-- some commands
local commands = {}
commands.suspend = "sudo pm-suspend"
commands.help = "touch ~/seppal"
commands.lock = "xscreensaver-command --lock"
commands.screenshot = "scrot -e 'mv $f ~/bilder/screenshots'"
--audio stuff
commands.raisevol = "amixer set PCM 2%+"
commands.lowervol = "amixer set PCM 2%-"
commands.mute = "amixer sset PCM toggle"
commands.cmusnext = "cmus-remote --next"
commands.cmusprev = "cmus-remote --prev"
commands.cmuspause = "cmus-remote --pause"
commands.cmusplay = "cmus-remote --play"
commands.calc = "krunner"
--todo
commands.fileman = "pcmanfm"
commands.calc = "xcalc"
commands.browser = "firefox"
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({
"1 download", "2 mail", "3 chat",
"4 music", "5 news", "6 fm",
7, 8, 9 }, s,
{layouts[3], layouts[1], layouts[1], -- Tags: 1, 2, 3
layouts[1], layouts[1], layouts[1], -- 4, 5 ,6
layouts[1], layouts[1], layouts[1] -- 7, 8, 9
end
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal }
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- {{{ Wibox
-- {{{ Widgets configuration
-- {{{ Reusable separators
local spacer = widget({ type = "textbox", name = "spacer" })
local separator = widget({ type = "textbox", name = "separator" })
spacer.text = " "
separator.text = " <span foreground='red'>•</span> "
-- {{{ CPU load
local cpuwidget = widget({ type = "textbox" })
vicious.register(cpuwidget, vicious.widgets.cpu, "<span foreground='orange'>load: </span><span foreground='green'>$2%</span><span foreground='orange'> - </span><span foreground='green'>$3%</span>")
-- {{{ CPU temperature
local thermalwidget = widget({ type = "textbox" })
vicious.register(thermalwidget, vicious.widgets.thermal, "<span foreground='orange'>temp: </span><span foreground='green'>$1°C</span>", 20, "thermal_zone1")
-- {{{ Battery state
-- Widget icon
-- baticon = widget({ type = "imagebox", name = "baticon" })
-- baticon.image = image(beautiful.widget_bat)
local batwidget = widget({ type = "textbox" })
vicious.register(batwidget, vicious.widgets.bat, "<span foreground='orange'>bat: </span><span foreground='green'>$1$2%</span>", 60, "C1C5")
-- {{{ Date and time
local datewidget = widget({ type = "textbox" })
vicious.register(datewidget, vicious.widgets.date, "<span foreground='green'>%a, %d.%m.%y - %H:%M</span>", 5)
-- {{{ Volume widget
local volwidget = widget({ type = "textbox" })
vicious.register(volwidget, vicious.widgets.volume, "<span foreground='orange'>vol: </span><span foreground='green'>$1%</span>", 1, 'PCM')
-- {{{ System tray
systray = widget({ type = "systray" })
-- {{{ Wibox initialisation
local wibox = {}
local promptbox = {}
local layoutbox = {}
local taglist = {}
taglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev))
for s = 1, screen.count() do
-- Create a promptbox
promptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create a layoutbox
layoutbox[s] = awful.widget.layoutbox(s)
layoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)
-- Create a taglist widget
taglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, taglist.buttons)
-- Create the wibox
wibox[s] = awful.wibox({
position = "top", screen = s,
fg = beautiful.fg_normal, bg = beautiful.bg_normal
-- Add widgets to the wibox
wibox[s].widgets = {{
launcher, taglist[s], layoutbox[s], promptbox[s],
layout = awful.widget.layout.horizontal.leftright
s == screen.count() and systray or nil,
spacer, datewidget,
separator, volwidget,
separator, batwidget,
separator, cpuwidget,
separator, thermalwidget,
layout = awful.widget.layout.horizontal.rightleft
end
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
-- {{{ Key bindings
globalkeys = awful.util.table.join(
--user defined
awful.key({}, "XF86PowerOff", function() awful.util.spawn_with_shell(commands.suspend) end ),
awful.key({}, "Help", function() awful.util.spawn_with_shell(commands.help) end ),
awful.key({ modkey, }, "F12", function () awful.util.spawn_with_shell(commands.lock) end),
--audio stuff
awful.key({}, "XF86AudioMute", function() awful.util.spawn_with_shell(commands.mute) end ),
awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn_with_shell(commands.raisevol) end ),
awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn_with_shell(commands.lowervol) end ),
awful.key({}, "XF86AudioNext", function() awful.util.spawn_with_shell(commands.cmusnext) end ),
awful.key({}, "XF86AudioPrev", function() awful.util.spawn_with_shell(commands.cmusprev) end ),
awful.key({}, "XF86AudioPlay", function() awful.util.spawn_with_shell(commands.cmuspause) end ),
awful.key({}, "XF86Tools", function() awful.util.spawn_with_shell(commands.cmusplay) end ),
awful.key({}, "XF86Calculator", function() awful.util.spawn_with_shell(commands.calc) end ),
awful.key({}, "Print", function() awful.util.spawn_with_shell(commands.screenshot) end ),
-- awful.key({}, "XF86MyComputer", function() awful.util.spawn_with_shell(commands.fileman) end ),
-- awful.key({}, "XF86Mail", function() awful.util.spawn_with_shell(commands.mail) end ),
-- awful.key({}, "XF86HomePage", function() awful.util.spawn_with_shell(commands.browser) end ),
-- awful.key({}, "XF86Sleep", function() awful.util.spawn_with_shell(commands.lock) end ),
-- awful.key({"Control", "Mod1"}, "l", function() awful.util.spawn_with_shell(commands.lock) end ),
--default bindings
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "n",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "n", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "n", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
-- Prompt
awful.key({ modkey }, "r", function () promptbox[mouse.screen]:run() end),
-- Run stuff in a Terminal
awful.key({ modkey }, "x", function ()
awful.prompt.run({ prompt = "Run in Terminal: " }, promptbox[mouse.screen].widget,
function (prog)
awful.util.spawn_with_shell(terminal .. " -name " .. prog .. " -e /bin/bash -c " .. prog)
end)
end)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "j", function (c) c.minimized = not c.minimized end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber));
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
--floating apps
{ rule = { class = "pinentry-qt4" },
properties = { floating = true } },
{ rule = { class = "Gimp" },
properties = { floating = true } },
--apptags
--downloading stuff
{ rule = { class = "JDownloader" },
properties = { tag = tags[1][1],switchtotag = true } },
{ rule = { instance = "rtorrent" },
properties = { tag = tags[1][1],switchtotag = false } },
-- mail
{ rule = { class = "Kmail" },
properties = { tag = tags[1][2],switchtotag = true } },
--chat and stuff like that
{ rule = { class = "Choqok" },
properties = { tag = tags[1][3],switchtotag = false } },
{ rule = { class = "Kopete" },
properties = { tag = tags[1][3],switchtotag = false } },
-- cmus
{ rule = { instance = "cmus" },
properties = { tag = tags[1][4],switchtotag = true } },
-- news
{ rule = { instance = "newsbeuter" },
properties = { tag = tags[1][5],switchtotag = true } },
--file manager
{ rule = { class = "Dolphin" },
properties = { tag = tags[1][6],switchtotag = true } },
--misc stuff
{ rule = { class = "Konqueror" },
properties = { tag = tags[1][9],switchtotag = true } },
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.add_signal("manage", function (c, startup)
-- Add a titlebar
-- awful.titlebar.add(c, { modkey = modkey })
-- remove gaps
c.size_hints_honor = false
-- Enable sloppy focus
c:add_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- {{{ Autostart
os.execute("krandrtray &")
-- vim: fdm=marker fdl=0 sts=4 ai
http://github.com/nblock/config/blob/ma … ome/rc.lua
Thanks.
Last edited by nblock (2010-01-02 09:59:24)Try this .Xdefaults which works with awesome/urxvt.
*utf8: 1
*faceSize: 10
*jumpScroll: true
*multiScroll: true
*boldMode: false
*scrollBar: false
*cutNewline: false
*scrollTtyOutput: false
*scrollKey: true
*cursorBlink: true
*dynamicColors: true
*saveLines: 5000
*geometry: 125x45
! URxvt
URxvt*termName: xterm
URxvt.font: xft:Bitstream Vera Sans Mono:antialias=true:pixelsize=12
!urxvt.font: xft:Bitstream Vera Sans Mono-12:antialias=true
URxvt*transparent: false
URxvt*tintColor: #666666
URxvt*shading: 50
URxvt*scrollBar: false
URxvt*internalBorder: 5
URxvt*urgentOnBell: true
URxvt*scrollTtyKeypress: true
URxvt*underlineColor: yellow
URxvt*perl-ext-common: default,matcher
URxvt*urlLauncher: firefox
URxvt*matcher.button: 1
URxvt*matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-]
! Colours
*background: #303030
*foreground: #f2f2f2
*cursorColor: #999
*highlightColor: #333
*color0: #101010
*color1: #f13a21
*color2: #93f91d
*color3: #ffd00a
*color4: #404f9e
*color5: #ec0048
*color6: #2aa7e7
*color7: #f2f2f2
*color8: #1d202f
*color9: #ff361e
*color10: #ffc005
*color11: #93ff00
*color12: #3071ff
*color13: #ef0051
*color14: #4bb8fd
*color15: #a020f0
Last edited by r6 (2010-01-02 05:05:11) -
[Solve]Set ibus as default IM when use other english language in gnome
Hello everybody,
I am satisfied with Arch + Gnome3 + Ibus in English language. With English language, Ibus is already set to default system-input-methods as well as I expected.
However, today I change language from english to vietnamese, System-input-methods change to other method, not Ibus.
I looked for programs to change input method such as im-settings, im-chooser and im-switch, but it's not exist in arch package or aur.
I add "export GTK_IM_MODULE="ibus"" to file ~/.bashrc , I can use Ibus only in firefox, libreoffice. To use Ibus with other programs as gedit, gnome-terminal, I must manual change input method by right click and choose Ibus.
So, How can I set Ibus as default system IM?
By the way, I can use Ibus in all Qt applications without trouble after set in qtconfig.
Thanks for reading.
Last edited by s8dtvt (2011-06-25 01:56:18)Well, I set: LOCALE="vi_VN.UTF-8" instead of LOCALE="en_US.UTF-8" by default in file "/etc/rc.conf" and it's solved.
-
[SOLVED] Where's the default xmobar config?
I searched all over the Wiki and the xmobar site and couldn't find it. I wanted to know if there is a default configuration file for xmobar (the one that is used if there is no ~/.xmobarrc). It has the workspaces on the left, the current window title to the right of that, and the date and time (red) + operating system (green) on the right side.
Thanks
Last edited by itsbrad212 (2010-08-17 00:57:48)schen wrote:Why don't you just use xmobarrc? Also, it seems it's only configurable with "command-line options" or xmobarrc.
I wanted to see if I could copy what I was already using to make a ~/.xmobarrc and add to it. It turns out that the command line options were being passed in my ~/.xmonad/xmonad.hs, so I guess that makes this thread solved... -
[solved]DWM apply systray patch
[solved]I am trying to appply the systray6.1 patch to dwm. The "patch" goes fine but when I make I get the below errors:
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.1" -DXINERAMA
LDFLAGS = -s -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft
CC = cc
CC drw.c
CC dwm.c
dwm.c: In function ‘clientmessage’:
dwm.c:589:26: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
swa.background_pixel = scheme[SchemeNorm].bg->rgb;
^
dwm.c: In function ‘updatesystray’:
dwm.c:2221:18: error: incompatible type for argument 9 of ‘XCreateSimpleWindow’
systray->win = XCreateSimpleWindow(dpy, root, x, m->by, w, bh, 0, 0, scheme[SchemeSel].bg->rgb);
^
In file included from dwm.c:36:0:
/usr/include/X11/Xlib.h:1621:15: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’
extern Window XCreateSimpleWindow(
^
dwm.c:2224:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
wa.background_pixel = scheme[SchemeNorm].bg->rgb;
^
dwm.c:2244:24: error: incompatible types when assigning to type ‘long unsigned int’ from type ‘XftColor’
wa.background_pixel = scheme[SchemeNorm].bg->rgb;
^
dwm.c:2263:2: error: incompatible type for argument 3 of ‘XSetForeground’
XSetForeground(dpy, drw->gc, scheme[SchemeNorm].bg->rgb);
^
In file included from dwm.c:36:0:
/usr/include/X11/Xlib.h:3227:12: note: expected ‘long unsigned int’ but argument is of type ‘XftColor’
extern int XSetForeground(
^
Makefile:18: recipe for target 'dwm.o' failed
make: *** [dwm.o] Error 1
I haven't applied any other patches. Any idea what I am doing wrong? I can go into dwm.c and see the lines the error is refering to but I am not sure what the problem is.
Thanks
Last edited by derrickcope (2015-05-01 02:30:45)I just got the latest one off of the repo at git.suckless.org/dwm. the page says 6.0 but my config.mk says version 6.1. I did try the 6.0 version but the patch had errors. I am a little confused. The other patches come back with errors too. I am using an unpatched version at the moment so I would think most patches should work.
What should I do? -
[SOLVED] dwm doesn't compile with moveresize function
I'am trying to compile dwm with moveresize function but I get this error:
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -DVERSION="5.7.2" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
In file included from dwm.c:254:0:
config.h: In function 'moveresize':
config.h:23:7: error: dereferencing pointer to incomplete type
config.h:23:34: error: dereferencing pointer to incomplete type
config.h:26:9: error: dereferencing pointer to incomplete type
config.h:26:17: error: dereferencing pointer to incomplete type
config.h:27:6: error: dereferencing pointer to incomplete type
config.h:28:6: error: dereferencing pointer to incomplete type
config.h:29:6: error: dereferencing pointer to incomplete type
make: *** [dwm.o] Error 1
Here's my config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#454545";
static const char normbgcolor[] = "#454545";
static const char normfgcolor[] = "#C0C0C0";
static const char selbordercolor[] = "#C0C0C0";
static const char selbgcolor[] = "#454545";
static const char selfgcolor[] = "#FFFFFF";
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 */
/* moveresize */
static void moveresize(const Arg *arg) {
XEvent ev;
Monitor *m = selmon;
if(!(m->sel && arg && arg->v && m->sel->isfloating))
return;
resize(m->sel, m->sel->x + ((int *)arg->v)[0],
m->sel->y + ((int *)arg->v)[1],
m->sel->w + ((int *)arg->v)[2],
m->sel->h + ((int *)arg->v)[3],
True);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
/* tagging */
static const char *tags[] = { "term", "web", "fm", "im", "media", "float" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 1 << 5, True, -1 },
{ "Chromium", NULL, NULL, 1 << 1, True, -1 },
{ "MPlayer", NULL, NULL, 0, True, -1 },
{ "Wine", NULL, NULL, 1 << 5, True, -1 },
{ "Gpicview", NULL, NULL, 0, True, -1 },
{ "Pcmanfm", NULL, NULL, 1 << 2, True, -1 },
{ "Xarchiver", NULL, NULL, 0, True, -1 },
{ "Amsn", NULL, NULL, 1 << 3, True, -1 },
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
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[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *tdmenucmd[] = { "tdmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "roxterm", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "Master", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "Master", "5+", "unmute", NULL };
static const char *bgltupcmd[] = { "xbacklight", "-inc", "15", NULL };
static const char *bgltdowncmd[] = { "xbacklight", "-dec", "1", NULL };
static const char *displayoff[] = { "xset", "dpms", "force", "off", NULL };
static const char *suspend[] = { "sudo", "pm-suspend", NULL };
static Key keys[] = {
/* modifier key function argument */
{ 0, 0x1008ff12, spawn, {.v = mutecmd } },
{ 0, 0x1008ff11, spawn, {.v = volupcmd } },
{ 0, 0x1008ff13, spawn, {.v = voldowncmd } },
{ 0, 0x1008ff02, spawn, {.v = bgltupcmd } },
{ 0, 0x1008ff03, spawn, {.v = bgltdowncmd } },
{ 0, 0x1008ff59, spawn, {.v = displayoff } },
{ 0, 0x1008ff2f, spawn, {.v = suspend } },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY, XK_r, spawn, {.v = tdmenucmd } },
{ 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_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY|ShiftMask, XK_Return, zoom, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY, 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|ShiftMask, XK_q, quit, {0} },
{ MODKEY, XK_Down, moveresize, {.v = (int []){ 0, 25, 0, 0 }}},
{ MODKEY, XK_Up, moveresize, {.v = (int []){ 0, -25, 0, 0 }}},
{ MODKEY, XK_Right, moveresize, {.v = (int []){ 25, 0, 0, 0 }}},
{ MODKEY, XK_Left, moveresize, {.v = (int []){ -25, 0, 0, 0 }}},
{ MODKEY|ShiftMask, XK_Down, moveresize, {.v = (int []){ 0, 0, 0, 25 }}},
{ MODKEY|ShiftMask, XK_Up, moveresize, {.v = (int []){ 0, 0, 0, -25 }}},
{ MODKEY|ShiftMask, XK_Right, moveresize, {.v = (int []){ 0, 0, 25, 0 }}},
{ MODKEY|ShiftMask, XK_Left, moveresize, {.v = (int []){ 0, 0, -25, 0 }}},
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)
/* 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|ShiftMask, Button1, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
Last edited by Aakko (2010-05-30 18:21:30)ber_t wrote:A vanilla dwm compiles fine with your config.h. So I guess you're using other patches that rearrange the #include directive for config.h in dwm.c, e.g. pertag. If that's the case, you have to put the moveresize function in dwm.c and declare it before config.h get's included, just like any other function in dwm.c.
Yes I had dwm.c patched with pertag. Vanilla compiles fine. Thanks! -
[Solved] DWM and extra key's.
Hello.
I'm using DWM and now I have new keyboard with extra kyes Audio Mute, Raise or Lower volume you know
I tried:
showkey
And I have my key in .Xmodmap , I typed:
/path/to/.Xmodmap
and all was ok
And typed xmodmap and my keys was in mod4 section , this is the output of xmodmap:
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 XF86AudioRaiseVolume (0x73), XF86AudioRaiseVolume (0x74), Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x71), ISO_Level3_Shift (0x7c)
Now I care to play with config.h of my DWM.
Here is part of it:
{ MODKEY, XF86AudioRaiseVolume, spawn, SHCMD("exec mpc volume -5")}
And when I tried to compile it with that config I got following errors:
In file included from dwm.c:271:
config.h:41: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Key'
config.h:65: warning: ISO C does not allow extra ';' outside of a function
config.h:69: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Button'
config.h:80: warning: ISO C does not allow extra ';' outside of a function
dwm.c: In function 'buttonpress':
dwm.c:440: error: 'buttons' undeclared (first use in this function)
dwm.c:440: error: (Each undeclared identifier is reported only once
dwm.c:440: error: for each function it appears in.)
dwm.c: In function 'grabbuttons':
dwm.c:929: error: 'buttons' undeclared (first use in this function)
dwm.c: In function 'grabkeys':
dwm.c:952: error: 'keys' undeclared (first use in this function)
dwm.c: In function 'keypress':
dwm.c:1020: error: 'keys' undeclared (first use in this function)
make: *** [dwm.o] Errpr 1
And building stop's :(
Is someone use extra keys with DWM.
Thanks for any help
Last edited by SpeedVin (2009-08-12 18:33:25)SpeedVin wrote:
Tillotson wrote:/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#C7C7C7";
static const char normbgcolor[] = "#000000";
static const char normfgcolor[] = "#888888";
static const char selbordercolor[] = "#1793D1";
static const char selbgcolor[] = "#000000";
static const char selfgcolor[] = "#FFFFFF";
static unsigned int borderpx = 1; /* border pixel of windows */
static unsigned int snap = 32; /* snap pixel */
static Bool showbar = True; /* False means no bar */
static Bool topbar = True; /* False means bottom bar */
/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static Rule rules[] = {
/* class instance title tags mask isfloating */
{ "Thunar", NULL, NULL, 0, True },
{ "VirtualBox", NULL, NULL, 0, True },
{ "MPlayer", NULL, NULL, 0, True },
{ "Vlc", NULL, NULL, 0, True },
{ "XCalc", NULL, NULL, 0, True },
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = True; /* False 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[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "urxvtc", NULL };
static const char *browsercmd[] = { "firefox", NULL };
static const char *musiccmd[] = { "urxvtc", "-e", "ncmpcpp", NULL };
static const char *talkcmd[] = { "urxvtc", "-e", "weechat-curses", NULL };
static const char *shutcmd[] = { "sudo", "shutdown", "-h", "now", NULL };
static const char *filebrowse[] = { "thunar", NULL };
static const char *mutecmd[] = { "amixer", "-q", "sset", "Master", "toggle", NULL };
static const char *volupcmd[] = { "amixer", "-q", "sset", "PCM", "5-", "unmute", NULL };
static const char *voldowncmd[] = { "amixer", "-q", "sset", "PCM", "5+", "unmute", NULL };
static const char *calccmd[] = { "xcalc", NULL };
static Key keys[] = {
/* modifier key function argument */
{ 0, 0x1008ff12, spawn, {.v = mutecmd } },
{ 0, 0x1008ff11, spawn, {.v = volupcmd } },
{ 0, 0x1008ff13, spawn, {.v = voldowncmd } },
{ 0, 0x1008ff1d, spawn, {.v = calccmd } },
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_b, spawn, {.v = browsercmd } },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = musiccmd } },
{ MODKEY|ShiftMask, XK_f, spawn, {.v = filebrowse } },
{ MODKEY|ShiftMask, XK_t, spawn, {.v = talkcmd } },
{ MODKEY|ShiftMask, XK_Delete, spawn, {.v = shutcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_k, focusstack, {.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 } },
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 a tag number (starting at 0),
* 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} },
Thank you very much I will see what I can do .
Sadly still no reaction -
[SOLVED] dwm Compiling Error
Hello,
I am running dwm, and I love how simple and light it is. I edited my config.h few times and compiled it and it was fine. The last time I tried, it gave me an error. I could not figure that out. I tried to use a valid config.h from the internet in case I missed my config.h up, and I tried to re-install it. Nothing worked. This is the error that I get when I run the command makepkg -efi --noconfirm:
dwm build options:
CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/include/X11 -D_FORTIFY_SOURCE=2 -DVERSION="6.0" -DXINERAMA
LDFLAGS = -s -L/usr/lib -lc -L/usr/lib/X11 -lX11 -L/usr/lib/X11 -lXinerama
CC = cc
CC dwm.c
In file included from dwm.c:288:0:
config.h:18:19: error: ‘MAXTAGLEN’ undeclared here (not in a function)
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "w" };
^
In file included from dwm.c:288:0:
config.h: In function ‘focusstackf’:
config.h:132:9: error: ‘sel’ undeclared (first use in this function)
if(!sel)
^
config.h:132:9: note: each undeclared identifier is reported only once for each function it appears in
config.h:134:8: error: ‘lt’ undeclared (first use in this function)
if(lt[sellt]->arrange) {
^
config.h:134:11: error: ‘sellt’ undeclared (first use in this function)
if(lt[sellt]->arrange) {
^
config.h:138:25: error: ‘clients’ undeclared (first use in this function)
for(c = clients; c && (!ISVISIBLE(c) || c->isfloating == sel->isfloating); c = c->next);
^
config.h:152:9: error: too few arguments to function ‘restack’
restack();
^
dwm.c:213:13: note: declared here
static void restack(Monitor *m);
^
In file included from dwm.c:288:0:
config.h: In function ‘setltor1’:
config.h:162:16: error: ‘lt’ undeclared (first use in this function)
setlayout((lt[sellt] == arg->v) ? &a : arg);
^
config.h:162:19: error: ‘sellt’ undeclared (first use in this function)
setlayout((lt[sellt] == arg->v) ? &a : arg);
^
config.h: In function ‘toggletorall’:
config.h:169:8: error: ‘sel’ undeclared (first use in this function)
if(sel && ((arg->ui & TAGMASK) == sel->tags)) {
^
config.h: In function ‘togglevorall’:
config.h:181:8: error: ‘sel’ undeclared (first use in this function)
if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
^
config.h:181:39: error: ‘tagset’ undeclared (first use in this function)
if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
^
config.h:181:46: error: ‘seltags’ undeclared (first use in this function)
if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
^
config.h: In function ‘vieworprev’:
config.h:193:34: error: ‘tagset’ undeclared (first use in this function)
view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
^
config.h:193:41: error: ‘seltags’ undeclared (first use in this function)
view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
^
config.h: In function ‘warptosel’:
config.h:200:8: error: ‘sel’ undeclared (first use in this function)
if(sel)
^
config.h: In function ‘zoomf’:
config.h:208:8: error: ‘sel’ undeclared (first use in this function)
if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
^
config.h:208:16: error: ‘lt’ undeclared (first use in this function)
if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
^
config.h:208:19: error: ‘sellt’ undeclared (first use in this function)
if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
^
config.h: At top level:
config.h:213:2: error: expected identifier or ‘(’ before ‘{’ token
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
^
config.h:213:78: error: expected identifier or ‘(’ before ‘,’ token
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
^
config.h:214:78: error: expected identifier or ‘(’ before ‘,’ token
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
^
config.h:215:78: error: expected identifier or ‘(’ before ‘,’ token
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
^
config.h:216:78: error: expected identifier or ‘(’ before ‘,’ token
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
^
config.h:222:145: warning: ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
^
config.h:223:20: error: redefinition of ‘termcmd’
static const char *termcmd[] = { "uxterm", NULL };
^
config.h:63:20: note: previous definition of ‘termcmd’ was here
static const char *termcmd[] = { "uxterm", NULL };
^
config.h:225:12: error: redefinition of ‘keys’
static Key keys[] = {
^
config.h:65:12: note: previous definition of ‘keys’ was here
static Key keys[] = {
^
config.h:264:15: error: redefinition of ‘buttons’
static Button buttons[] = {
^
config.h:96:15: note: previous definition of ‘buttons’ was here
static Button buttons[] = {
^
dwm.c: In function ‘createmon’:
dwm.c:654:15: error: ‘nmaster’ undeclared (first use in this function)
m->nmaster = nmaster;
^
dwm.c: In function ‘keypress’:
dwm.c:1087:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]
keysym = XKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0);
^
In file included from dwm.c:288:0:
dwm.c: At top level:
config.h:15:13: warning: ‘readin’ defined but not used [-Wunused-variable]
static Bool readin = True; /* False means do not read stdin */
^
In file included from dwm.c:288:0:
config.h:65:12: warning: ‘keys’ defined but not used [-Wunused-variable]
static Key keys[] = {
^
config.h:96:15: warning: ‘buttons’ defined but not used [-Wunused-variable]
static Button buttons[] = {
^
make: *** [dwm.o] Error 1
==> ERROR: A failure occurred in build().
Aborting...
And this is my config.h
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-terminus-bold-r-normal-*-14-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[] = "#eeeeee";
static const char normfgcolor[] = "#000000";
static const char selbordercolor[] = "#0066ff";
static const char selbgcolor[] = "#eeeeee";
static const char selfgcolor[] = "#0066ff";
static unsigned int borderpx = 3; /* border pixel of windows */
static unsigned int snap = 32; /* snap pixel */
static Bool showbar = True; /* False means no bar */
static Bool topbar = True; /* False means bottom bar */
static Bool readin = True; /* False means do not read stdin */
/* tagging */
const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "w" };
static Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "acme", NULL, NULL, 1 << 2, False, -1 },
{ "Acroread", NULL, NULL, 0, True, -1 },
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "GQview", NULL, NULL, 0, True, -1 },
{ "MPlayer", NULL, NULL, 0, True, -1 },
{ "Navigator", NULL, NULL, 1 << 5, False, -1 },
/* layout(s) */
static float mfact = 0.65;
static Bool resizehints = False; /* False means respect size hints in tiled resizals */
static Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "< >", NULL }, /* no layout function means floating behavior */
{ "[ ]", monocle },
/* custom functions declarations */
static void focusstackf(const Arg *arg);
static void setltor1(const Arg *arg);
static void toggletorall(const Arg *arg);
static void togglevorall(const Arg *arg);
static void vieworprev(const Arg *arg);
static void warptosel(const Arg *arg);
static void zoomf(const Arg *arg);
/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, vieworprev, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, togglevorall, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletorall, {.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[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "uxterm", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstackf, {.i = +1 } },
{ MODKEY, XK_j, warptosel, {0} },
{ MODKEY, XK_k, focusstackf, {.i = -1 } },
{ MODKEY, XK_k, warptosel, {0} },
{ MODKEY, XK_h, setmfact, {.f = -0.05} },
{ MODKEY, XK_l, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoomf, {0} },
{ MODKEY, XK_Return, warptosel, {0} },
{ MODKEY, XK_Tab, view, {0} },
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY, XK_space, setltor1, {.v = &layouts[0]} },
{ MODKEY|ShiftMask, XK_space, setltor1, {.v = &layouts[2]} },
{ MODKEY, XK_0, vieworprev, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
TAGKEYS( XK_4, 3)
TAGKEYS( XK_5, 4)
TAGKEYS( XK_w, 5)
{ MODKEY|ShiftMask, XK_q, quit, {0} },
/* button definitions */
/* click can ClkTagBar, ClkTagButton,
* ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setltor1, {.v = &layouts[0]} },
{ ClkLtSymbol, 0, Button2, setmfact, {.f = 1.65} },
{ ClkLtSymbol, 0, Button3, setltor1, {.v = &layouts[2]} },
{ ClkLtSymbol, 0, Button4, setmfact, {.f = +0.05} },
{ ClkLtSymbol, 0, Button5, setmfact, {.f = -0.05} },
{ ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
{ ClkStatusText, Button3Mask, Button1, killclient, {0} },
{ ClkWinTitle, 0, Button1, warptosel, {0} },
{ ClkWinTitle, 0, Button1, movemouse, {0} },
{ ClkWinTitle, 0, Button2, zoomf, {0} },
{ ClkWinTitle, 0, Button3, resizemouse, {0} },
{ ClkWinTitle, 0, Button4, focusstackf, {.i = -1 } },
{ ClkWinTitle, 0, Button5, focusstackf, {.i = +1 } },
{ ClkRootWin, 0, Button1, warptosel, {0} },
{ ClkRootWin, 0, Button1, movemouse, {0} },
{ ClkRootWin, 0, Button3, resizemouse, {0} },
{ ClkRootWin, 0, Button4, focusstackf, {.i = -1 } },
{ ClkRootWin, 0, Button5, focusstackf, {.i = +1 } },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, zoomf, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
{ ClkTagBar, 0, Button1, vieworprev, {0} },
{ ClkTagBar, 0, Button3, togglevorall, {0} },
{ ClkTagBar, 0, Button4, focusstackf, {.i = -1 } },
{ ClkTagBar, 0, Button5, focusstackf, {.i = +1 } },
{ ClkTagBar, Button2Mask, Button1, tag, {0} },
{ ClkTagBar, Button2Mask, Button3, toggletorall, {0} },
/* custom functions */
void
focusstackf(const Arg *arg) {
Client *c = NULL, *i;
if(!sel)
return;
if(lt[sellt]->arrange) {
if (arg->i > 0) {
for(c = sel->next; c && (!ISVISIBLE(c) || c->isfloating != sel->isfloating); c = c->next);
if(!c)
for(c = clients; c && (!ISVISIBLE(c) || c->isfloating == sel->isfloating); c = c->next);
else {
for(i = clients; i != sel; i = i->next)
if(ISVISIBLE(i) && i->isfloating == sel->isfloating)
c = i;
if(!c)
for(i = sel; i; i = i->next)
if(ISVISIBLE(i) && i->isfloating != sel->isfloating)
c = i;
if(c) {
focus(c);
restack();
else
focusstack(arg);
void
setltor1(const Arg *arg) {
Arg a = {.v = &layouts[1]};
setlayout((lt[sellt] == arg->v) ? &a : arg);
void
toggletorall(const Arg *arg) {
Arg a;
if(sel && ((arg->ui & TAGMASK) == sel->tags)) {
a.ui = ~0;
tag(&a);
else
toggletag(arg);
void
togglevorall(const Arg *arg) {
Arg a;
if(sel && ((arg->ui & TAGMASK) == tagset[seltags])) {
a.ui = ~0;
view(&a);
else
toggleview(arg);
void
vieworprev(const Arg *arg) {
Arg a = {0};
view(((arg->ui & TAGMASK) == tagset[seltags]) ? &a : arg);
void
warptosel(const Arg *arg) {
XEvent ev;
if(sel)
XWarpPointer(dpy, None, sel->win, 0, 0, 0, 0, 0, 0);
XSync(dpy, False);
while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
void
zoomf(const Arg *arg) {
if(sel && (lt[sellt]->arrange != tile || sel->isfloating))
togglefloating(NULL);
else
zoom(NULL);
{ 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[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[] = { "uxterm", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, 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|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 } },
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} },
Any suggestions?
Last edited by husainaloos (2013-05-07 16:31:16)No, you were not missing "some graphical libraries that you didn't incluce in the config.h file". It looks like, as jasonwryan said, you copied functions into your config.h without checking how they work. Thus, you ended up having functions that use variables you never define in config.h (and there's alot of those!)
Next time, either stick to already working patches found at suckless.org, or give some effort and at least try to figure out what is wrong with the code you randomly copied.
Maybe you are looking for
-
Itunes crash when connecting Itouch
Bought a new Itouch. Have latest Itunes installed (9.0.3.15) and have used my HP Compaq 8710w laptop for over a year with Ipod nano with no problems. Launch Itunes with no problems, connect new Itouch and get error message and Itunes shuts down. Itun
-
Hi, I have two databases on two different servers which are not physically connected. One database is having Oracle 9i version 9.0.1 on HP-UX and the other is having Oracle 8i version 8.1.6 also on HP-UX. The two databases are used by two different d
-
Recently while running OS X the iMac began to run extremely slow. I tried restarting and the computer just froze on the grey apple screen. I had windows XP dual booted on the same hard drive and I was able to log onto that with no problems at all. As
-
Enhancement for me53n through BADI
Hi Experts, I need to check the Open order and closed order item in ME53N t-Code(PR) through Quantity and quantity order filed. Now the problem is Order Quantity value is exceeds than quantity.if Quantity value is equal to Order Quan
-
PD Module ( Short Dump)
Hi Friends, In IT0024 when i enter qualifications it is showing short dump with our error analysis if i change any existing qualifications or enter new qualifications it is showing the scales. But when i save that it is showing short dubp. But for al