You are not logged in.
@null (#571)
Could you please post your .Xdefaults? (I'm interested in your color scheme).
Last edited by graph (2012-07-04 14:41:59)
Offline
here you go: https://bbs.archlinux.org/viewtopic.php … 8#p1124758
Offline
Mines pretty vanilla, and I would love some tips on making it purdy.
I have conky displaying the current time and track in mpd. If the track title is longer than 15 characters, it scrolls.
Does anyone know how to make a terminal take up all the vertical space it can? (hard to word. the terminal doesn't take all of the screen vertically, which shows my wallpaper.
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#525252";
static const char normbgcolor[] = "#252627";
static const char normfgcolor[] = "#A4c9e0";
static const char selbordercolor[] = "#A4c9e0";
static const char selbgcolor[] = "#525252";
static const char selfgcolor[] = "#BBBBBB";
static const unsigned int borderpx = 1; /* border pixel of windows */
static const unsigned int snap = 1; /* 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[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Firefox", NULL, NULL, 1 << 8, False, -1 },
};
/* layout(s) */
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster = 1; /* number of clients in master area */
static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
#include "bstack.c"
#include "bstackhoriz.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "[]=", tile }, /* first entry is default */
{ "><>", NULL }, /* no layout function means floating behavior */
{ "[M]", monocle },
{ "TTT", bstack },
{ "===", bstackhoriz },
};
/* 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 *termcmd[] = { "uxterm", NULL };
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ControlMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, 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_x, 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|ControlMask, XK_b, 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_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} },
};
Fixed, sorry for the big picture.
Last edited by tylerlong (2012-07-20 12:33:19)
Offline
Looking good, tylerlong. A couple of things:
1) Take a look at the DWM Arch wiki page, especially the section concerning size hints; that should help you take care of that empty space around your terminal window. No guarantee depending on which terminal you use, but it works with most of the popular ones.
2) You'll want to resize your screenshot to fit our image guidlines. Any moment now, a mod is going to come along and take your shot down.
forum rules.
Offline
Looking good, tylerlong. A couple of things:
1) Take a look at the DWM Arch wiki page, especially the section concerning size hints; that should help you take care of that empty space around your terminal window. No guarantee depending on which terminal you use, but it works with most of the popular ones.
2) You'll want to resize your screenshot to fit our image guidlines. Any moment now, a mod is going to come along and take your shot down.
forum rules.
Thanks a lot, I'm looking at those now.
edit: My terminal is fixed!
Last edited by tylerlong (2012-07-20 12:37:51)
Offline
Offline
Nice desktop there, are you listening to some compilation/cover album? That song you are listening to is originally done by Blind Guardian.
Offline
It's Van Canto's cover of the song. Van Canto is a metal acapella group which covers several metal classics. Mainly they are singers of several metal bands that started this as a side project.
Offline
Grid to find back the sh.. spread over all tags. (MOD-0)
I've been using openbox for 2 years. I tested, probably too quickly, several tiling WMs without getting convinced enough to make the jump. To my defense, I must say that my PC is used by several Windozians because it's connected to the living-room big stereo. I don't feel like explaining these people the use of a tiling WM. To make it worst it happens often during evenings where they are more or less drunk (and me too :-).
For the Windozians I put a few launchers in dwm-trayer. It's not the best solution as the little app I wrote to put launchers in the system tray are GTK2 apps with all the overhead it brings.
I need many desktops as I tend to put only one application per tag: What made me fall in love with DWM is the ability to bring in the current tag stuff from other tags (MOD-CTRL-n) and to attach a window to several tags. Dynamic and flexible .
Patches I use :
- grid (to find back all the sh.. I spread on all the tags...)
- nextprevtag
- azerty
I also use a plain conky, urxvt with pseudo transparency, mygtkmenu, terminus font...
My config will probably evolve but right now I'm quite happy with it.
PS: Background image Nasa apod site
Last edited by xamaco (2012-07-22 18:57:29)
Offline
Hello, I'm using DWM because I was looking for a Tiling WM, and I was learning C so I supposed DWM would help me a bit
So far I like it, but there is one problem.
When I resize a "window" in let's say Desktop1 it also resizes the window that is in the same field in Desktop2, and that's a bit annoying.
Is this why is it called a dynamic window manager ?
Is there some kind of patch to change this ? Or any similar WMs that don't do this ? (Configured in C)
Thanks.
Offline
Hello, I'm using DWM because I was looking for a Tiling WM, and I was learning C so I supposed DWM would help me a bit
So far I like it, but there is one problem.When I resize a "window" in let's say Desktop1 it also resizes the window that is in the same field in Desktop2, and that's a bit annoying.
Is this why is it called a dynamic window manager ?Is there some kind of patch to change this ? Or any similar WMs that don't do this ? (Configured in C)
Thanks.
Wrong place to ask, you can probably request a patch here: https://bbs.archlinux.org/viewtopic.php?id=92895 or since you are learning C you can try make a patch yourself maybe.
Offline
I suspect the pertag patch would "fix" this, but I haven't used it. It is not a problem, that's how dwm works: there are not separate "desktops", just different tags. When you change the layout, you change the layout - you don't resize windows as windows don't really have sizes assigned, they just fill part of the layout.
If you're looking for other WMs, you might like MonsterWM which is very similar to DWM just without a (default/builtin) status bar and with workspaces rather than tags, so it'll do what you intended here.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github
Offline
^^Wow! That is friggin awesome illusionist.^^
Offline
Mind sharing your statusbar script?
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
@stlarch
thank you mate.
@rasi
it is not any script just some conky configuration with terminus2 font.
conky config --> http://pastebin.com/QWiy9RaJ
terminus2 font --> https://github.com/w0ng/dwm/blob/master/terminus2.bdf
Edit Reason: Bad url.
Last edited by illusionist (2012-07-31 19:54:56)
Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github
Offline
I made my dwmstatus look like this:
The important bits are the percentage bars, which are basically unicode characters generated by conky displayed with the fixed font ("-*-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-*-*" to be precise) and which change their size dynamically according to the percentage.
The same is true for the up and down arrows which only show if something is up or downloaded. If the up and download rate is roughly the same both, up and down arrow will show. This can of course also be used to display the read/write rate of the hard disk as well.
The other "icons" are just obscure unicode characters which I found in the fixed font.
This is realized with a lua script. You will have to activate lua build flags for conky to make this work. If you include the script with "lua_load /home/<user>/.conky.lua" the important functions are ${lua bar $<percentage vlaue>} for the percentage bar and ${lua updown $<up speed per second> $<down speed per second>} for the up and down arrow.
Files:
".conky.lua":
do
function conky_bar(str)
str = tonumber(conky_parse(str))
return string.char(226, 150, math.floor( 129 + str * 7 / 100 ))
end
function dehumanize(sn)
n = string.match(sn, '(%d+)')
s = string.match(sn, '(%a+)')
if string.upper(s) == "K" then
n = n * 1000
elseif string.upper(s) == "M" then
n = n * 10000000
end
return tonumber(n)
end
function conky_updown(u, d)
u = conky_parse(u)
d = conky_parse(d)
un = dehumanize(u)
dn = dehumanize(d)
uparrow = string.char(226,135,167)
doarrow = string.char(226,135,169)
ar = " "
st = d
if dn > 0 then
udd = un / dn
if udd == 0 then
st = d
ar = " " .. doarrow
elseif udd < 0.5 then
st = d
ar = " " .. doarrow
elseif udd > 2 then
s = u
ar = uparrow .. " "
else
if udd > 1 then
st = u
end
ar = uparrow .. doarrow
end
else
st = u
if un > 0 then
ar = uparrow .. " "
end
end
return st .. ar
end
function conky_unispace(str,n)
str = conky_parse(str):match'^%s*(.*%S)' or ''
return string.rep(" ", n - string.len(str)) .. str
end
end
".conkyrc":
out_to_console yes
out_to_ncurses no
#out_to_x no
update_interval 1
update_interval_on_battery 2.0
use_spacer left
if_up_strictness address
short_units yes
#format_human_readable yes
disable_auto_reload
lua_load /home/sprash/.conky.lua
TEXT
❏ ${lua unispace ${cpu cpu0} 2}%${lua bar ${cpu cpu1}}${lua bar ${cpu cpu2}}${lua bar ${cpu cpu3}}${lua bar ${cpu cpu4}}${ibm_temps 0}°C${if_match "$ibm_fan" != "0"} ${ibm_fan}rpm$endif▕ \
☰ $memperc%${lua bar $memperc}${if_match "$swap"!=" 0B"} SWP: $swap$endif▕ \
❍ ${fs_used_perc /}%${lua bar ${fs_used_perc /}} ${lua updown ${diskio_read /dev/sda} ${diskio_write /dev/sda}}▕ \
${if_up wlan0}♒ ${lua unispace ${wireless_link_qual_perc wlan0} 2}%${lua bar ${wireless_link_qual_perc wlan0}} ${wireless_essid wlan0} ${wireless_bitrate wlan0} ${lua updown ${upspeed wlan0} ${downspeed wlan0}}▕ ${endif}\
${if_up eth0}⎓ ${lua updown ${upspeed eth0} ${downspeed eth0}}▕ ${endif}\
♫ $mixer%${lua bar $mixer}▕ \
⁍ ${smapi_bat_perc 0}%${lua bar ${smapi_bat_perc 0}}${smapi_bat_temp 0}°C${if_match "${smapi_bat_power 0}" != "0.0" } ${lua unispace ${smapi_bat_power 0} 5}W$endif${if_empty $battery_time}$else ${lua unispace $battery_time 10}$endif▕ \
◷ ${time %a %d.%m.%Y %H:%M:%S}
*Edit image problems
Last edited by sprash (2012-08-01 09:07:05)
Offline
sprash, that is beautiful! As soon as I get home I'm going to try it out. Thanks a lot!
Offline
I'm sort of new to DWM, but this is what I have
Dzen config is a heavily modified version of this http://dotshare.it/dots/294/
"Pipes" terminal color script here
Last edited by sunderphon (2012-08-05 15:30:12)
Offline
Hey, I encountered some problem as I wanted to patch my dwm with that systray script… always giving me errors… does anyone have an idea how to fix it or knows a workaround? Patching it still works, but when it comes to recompile there is an error due to missing variable instantiation and I don't really know what to do…
Help is appreciated!
Thanks.
domac [ git ]
Offline
Show off your Dwm configuration!
This isn't a support thread. You are better off asking the maintainer of the patch about any errors...
Offline
domac, you could also start a new thread for that issue, several of us would probably be willing, and possibly able, to help.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Ok, I'm sorry! I'll will share a screen as soon as I fixed it!
Thank you Trilby!
Edit: Fixed it, Screens to come… ;-)
Last edited by domac (2012-08-07 11:12:20)
domac [ git ]
Offline
Finally…
…and another one…
Here it is, I'm sorry for asking that question above.
Last edited by domac (2012-08-07 19:12:13)
domac [ git ]
Offline