You are not logged in.
how does one get the pertag patch to work?is it supposed to keep each tag with their own layout, say tag1 with floating, tag 2 with monocle..or..?and if it does, how do i "activate" it, because i apply it and my tags are the same throughout..:(
what i cannot build, i do not understand
Offline
Did it apply cleanly? You shouldn't need to activate it: just set a layout in each tag and as you move between them they should stick...
Offline
at first i got a few lines that failed to patch, and i added them manually, i hope that's what i was supposed to do, and then i compiled it and it worked fine, as in no errors and all that.But when i set a layout, it sets it to all the tags, am using pango-dwm by the way, from the AUR.maybe that has something to do with it?
what i cannot build, i do not understand
Offline
Yes, it sounds like you patched it correctly. Try patching against a vanilla 5.8.2 and see how you go...
Offline
How do people colour the top bar on the right?
Are you using conkycli or something different?
edit also how do you get the icons in the top right as shown here
http://img517.imageshack.us/f/dirtyq.png/
Last edited by Dethredic (2010-11-08 22:03:41)
Offline
How do people colour the top bar on the right?
Are you using conkycli or something different?edit also how do you get the icons in the top right as shown here
http://img517.imageshack.us/f/dirtyq.png/
If I'm not mistaken, people use the dzen2 status bar most of the time. It alows you to have both colors and icons. As an alternative, there is a patch at suckless.org that allows the native status bar to have colors: http://dwm.suckless.org/patches/statuscolors
Offline
@Dethredic:
There is a second color patch (http://dwm.suckless.org/patches/fancyco … rclickable), but i is not maintained any more (but was until dwm 5.8 or so). Also, there is the experimental branch of my dwm patchset, which features 'real' colors and icons and bar graphs (also icons as bar graph). Its in the aur as 'dwm-sprinkles-svn-experimental'.
Ceterum autem censeo Systemdinem esse delendam
Offline
@jasonwryan - what pertag patch with initlayouts are you using on 5.8.2? from what i see here is for 5.7.2 and i assume that must be one for 5.8.2. or not.
Arch64/DWM || My Dropbox referral link
Offline
From memory, the 5.7.2 patch works on 5.8.2 - looking back through my patchset, I don't see that I have made any changes.
Nice screenie btw. That font is a nice choice.
Offline
Just migrated from i3. I like it as much as i3. Both have pros and cons
The patches I've applied are AttachAside, BottomStack, and NMaster. The status bar is native status bar (i.e. not using conky/dzen2). I found out that if I used dzen2, then the statusbar stays on one monitor only (I now use dual-monitor set up), so I researched a little bit to do it this way (most I got from Gentoo wiki).
The config.h is as follows
/*
* DWM Configuration File
*/
/* Appearance */
static const char font[] = "-misc-fixed-medium-*-*-*-12-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#000000";
static const char normbgcolor[] = "#000000";
static const char normfgcolor[] = "#FFFFFF";
static const char selbordercolor[] = "#1793D0";
static const char selbgcolor[] = "#000000";
static const char selfgcolor[] = "#1793D0";
static const unsigned int borderpx = 2; /* border pixel of windows */
static const unsigned int snap = 32; /* snap pixel */
static const Bool showbar = True; /* False means no bar */
static const Bool topbar = True; /* False means bottom bar */
/* Tagging */
static const char *tags[] = { "Main", "Web", "Code", "Grid", "Root", "Latex", "Misc" };
static const Rule rules[] = {
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, True, -1 },
{ "Chromium", NULL, NULL, 1 << 1, False, -1 },
};
/* Layout(s) */
static const float mfact = 0.5; /* factor of master area size [0.05..0.95] */
static const Bool resizehints = False; /* True means respect size hints in tiled resizals */
static const int nmaster = 1; /* default number of clients in the master area */
#include "nmaster-sym.c"
#include "bstack.c"
static const Layout layouts[] = {
/* symbol arrange function */
{ "-|=", ntile },
{ "-|-", nbstack },
{ "[M]", monocle },
{ "><>", NULL }, /* no layout function means floating behavior */
};
/* 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[] = { "urxvt", NULL };
static const char *browsercmd[] = { "chromium", NULL };
/* Key Definitions */
static Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = browsercmd } },
{ MODKEY, XK_Up, focusstack, {.i = +1 } },
{ MODKEY, XK_Down, focusstack, {.i = -1 } },
{ MODKEY, XK_Left, setmfact, {.f = -0.05} },
{ MODKEY, XK_Right, setmfact, {.f = +0.05} },
{ MODKEY, XK_Return, zoom, {0} },
{ MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
{ MODKEY, XK_b, setlayout, {.v = &layouts[1]} },
{ MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
{ MODKEY, XK_f, setlayout, {.v = &layouts[3]} },
{ 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|ControlMask, XK_Left, incnmaster, {.i = -1 } },
{ MODKEY|ControlMask, XK_Right, incnmaster, {.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)
{ MODKEY|ShiftMask, XK_c, killclient, {0} },
{ MODKEY|ShiftMask, XK_e, 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|ShiftMask, Button1, resizemouse, {0} },
{ ClkTagBar, 0, Button1, view, {0} },
{ ClkTagBar, 0, Button3, toggleview, {0} },
{ ClkTagBar, MODKEY, Button1, tag, {0} },
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
};
and .xinitrc
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#feh --bg-scale ~/Wallpapers/zebra.jpg &
#feh --bg-scale ~/Wallpapers/Kelly_Rick-31_Small.jpg &
feh --bg-center ~/Wallpapers/christmas.jpg &
xsetroot -cursor_name left_ptr
# Initialize Variables for getcpu() function
PREV_TOTAL=0
PREV_IDLE=0
getcpu(){
CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
unset CPU[0] # Discard the "cpu" prefix.
IDLE=${CPU[4]} # Get the idle CPU time.
# Calculate the total CPU time.
TOTAL=0
for VALUE in "${CPU[@]}"; do
let "TOTAL=$TOTAL+$VALUE"
done
# Calculate the CPU usage since we last checked.
let "DIFF_IDLE=$IDLE-$PREV_IDLE"
let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
echo "$TOTAL $IDLE $DIFF_USAGE"
}
getmem(){
MEM=(`/usr/bin/free -m | grep 'Mem'`)
SWAP=(`/usr/bin/free -m | grep 'Swap'`)
let "FREE=${MEM[3]}+${MEM[5]}+${MEM[6]}"
let "MEM_USAGE=(100*(${MEM[1]}-$FREE))/${MEM[1]}"
let "SWAP_USAGE=(100*${SWAP[2]})/${SWAP[1]}"
echo "$MEM_USAGE%/$SWAP_USAGE%"
}
battery(){
FULL=`cat /sys/class/power_supply/BAT1/energy_full`
PRESENT=`cat /sys/class/power_supply/BAT1/present`
CHARGE=`cat /sys/class/power_supply/BAT1/energy_now`
STATUS=`cat /sys/class/power_supply/BAT1/status`
if test "$PRESENT" != "0" ; then
let "CHARGE=${CHARGE}*100/${FULL}"
case $STATUS in
Full)
SIGN="=";;
Charging)
SIGN="+";;
Discharging)
SIGN="-";;
esac
echo "${CHARGE}${SIGN}"
else
echo "AC"
fi
}
INDEX=20
while true; do
cpuusage=(`getcpu`)
PREV_TOTAL=${cpuusage[0]}
PREV_IDLE=${cpuusage[1]}
if test "$INDEX" > "10" ; then
GMAIL=`python ~/.local/scripts/gmail.py`
INDEX=1
fi
xsetroot -name "${cpuusage[2]}% :: `getmem` :: ${GMAIL} :: `battery` [`date +'%A, %B %d %H:%M'`]"
let "INDEX=${INDEX}+1"
sleep 10
done &
# Exec dwm
#(sleep 1s && conky | dzen2 -bg black -fg white -fn -misc-fixed-medium-*-*--12-*-*-*-*-*-*-* -p -w 550 -h 14 -x 730 -y 0 -ta r) &
exec ~/dwm/dwm
Let me know if there are any questions :-)
Offline
kcirick: Would you mind sharing your gmail python script?
Offline
kcirick: Would you mind sharing your gmail python script?
Here you go:
import os
import string
# Enter your username and password below within double quotes
username="username"
password="password"
com="wget -O - https://"+username+":"+password+"@mail.google.com/mail/feed/atom --no-check-certificate"
temp=os.popen(com)
msg=temp.read()
index=str.find(msg,"<fullcount>")
index2=str.find(msg,"</fullcount>")
fc=int(msg[index+11:index2])
if fc==0:
print("0 new")
else:
print(str(fc)+" new")
Offline
markbabc wrote:kcirick: Would you mind sharing your gmail python script?
Here you go:
*snip*
ahhh username and pass BEFORE the address, i was trying to make a python script do that for a while but couldnt get it to logon if anyone wants the python version instead of using wget i can post it (just replacing wget with urllib.urlopen().read() )
Offline
ahhh username and pass BEFORE the address, i was trying to make a python script do that for a while but couldnt get it to logon if anyone wants the python version instead of using wget i can post it (just replacing wget with urllib.urlopen().read() )
Using python function instead of wget makes much more sense... I never use python, and I just got this piece of code somewhere on the internet, so it's probably not elegant at all. I will try this. Thanks
Offline
import urllib
# Enter your username and password below within double quotes
username="username"
password="password"
msg = urllib.urlopen("https://%s:%s@mail.google.com/mail/feed/atom"%(username,password)).read()
index=str.find(msg,"<fullcount>")
index2=str.find(msg,"</fullcount>")
fc=int(msg[index+11:index2])
if fc==0:
print "0 new"
else:
print str(fc)+" new"
btw its python2 because python3.x didnt like urllib.urlopen and didnt give me the option to use urllib2.urlopen
Also the import of strings is not needed because str is a built in function
Last edited by markbabc (2010-12-17 04:16:18)
Offline
@jasonwryan - what pertag patch with initlayouts are you using on 5.8.2? from what i see here is for 5.7.2 and i assume that must be one for 5.8.2. or not.
What text editor you use here?
Last edited by na12 (2010-12-17 21:08:24)
Offline
yay, I changed from openbox to dwm and it's so nice
I use latest dwm from hg repo (→ dwm-5.9) along with push, bstack and pertag patches.
here are my confs along with a mirror branch which I'll keep up to date as long I use dwm
https://github.com/c00kiemon5ter/dwm
and two screenshots for fun xD
https://github.com/c00kiemon5ter/dotfil … anshot.png
https://github.com/c00kiemon5ter/dotfil … /.shot.png
.:[ git me! ] :.
Offline
Offline
(gmail script)
I created an updated, Python3 compatible version of your script yesterday, it's a part of my dwm status script and it's available in my GitHub repo. The script can check multiple accounts (Google Apps accounts as well as regular Gmail accounts), and the accounts are configured in ~/.gmailaccounts in the format "url|username|password", e.g. "ht tps://mail.google.c om/mail/feed/atom|user@gmail.com|password".
I've created a standalone version as well:
#!/usr/bin/python
import sys
import os
import urllib.request
import xml.dom.minidom
unread = []
for account in open(os.environ['HOME'] + '/.gmailaccounts', encoding='utf-8'):
(url, user, passwd) = account.split('|')
auth_handler = urllib.request.HTTPBasicAuthHandler()
auth_handler.add_password(realm='New mail feed', uri='https://mail.google.com/', user=user, passwd=passwd)
opener = urllib.request.build_opener(auth_handler)
urllib.request.install_opener(opener)
request = urllib.request.urlopen(url)
dom = xml.dom.minidom.parseString(request.read())
count = dom.getElementsByTagName('fullcount')[0].childNodes[0].data
unread.append(count)
# the unread list contains the unread count of each mail account
print(' / '.join(unread))
Offline
Offline
Can I get a wallpaper for this please? Thanks!
here it is:
http://voidsenses.deviantart.com/art/So … -123586101
btw it's a perfect wallpaper for dwm.
Offline
Time for an update as I've had had a purge for the new year and shed 100+ packages, finally happy with this.
Stock dwm, on a netbook I only really tile to take screenshots
Jumbled mess of confs @ http://www.meyithi.com/dots/nb/
Offline
/* appearance */
static const char font[] = "-*-fixed-medium-r-*-*-13-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#222222";
static const char normbgcolor[] = "#333333";
static const char normfgcolor[] = "#859496";
static const char selbordercolor[] = "#0088cc";
static const char selbgcolor[] = "#333333";
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 */
...
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline
*SNIP*
/* appearance */ *SNIP*.
omgz sexy, configs please?
Offline
muunleit wrote:*SNIP*
/* appearance */ *SNIP*.
omgz sexy, configs please?
Except of the part I posted, dwms config.h is default, weechat.conf is dafault, mocs theme is "transparent-background", my .conkyrc and my .Xdefaults are
out_to_x no
out_to_console yes
background no
update_interval 5.0
update_interval_on_battery 30.0
total_run_times 0
cpu_avg_samples 2
net_avg_samples 2
short_units yes
format_human_readable yes
lua_load /home/muunleit/programme/lua-projekte/conky_bat.lua
TEXT
${time %H:%M %_d.%b'%y} $alignr cpu [$loadavg] $alignr ram [$mem] swap [$swap] labor [${fs_used /home/muunleit/labor}] $alignr${lua conky_bat}Addr [${if_match "${addr eth0}"=="No Address"}${addr wlan0}$else${addr eth0}$endif]
## urxvt
## real tranparency
#URxvt.depth: 32
#URxvt.background: rgba:0000/0000/0000/bbbb
URxvt.foreground: gray85
URxvt.font: xft:Terminus:pixelsize=13:antialias=false
URxvt.boldFont: xft:Terminus:bold:pixelsize=13:antialias=false
URxvt.scrollBar: false
URxvt.shading: 80
URxvt.transparent: true
URxvt.saveLines: 1024
URxvt.color1: firebrick3
URxvt.color2: darkolivegreen3
URxvt.color3: lightgoldenrod3
URxvt.color4: royalblue3
URxvt.color5: hotpink3
URxvt.color6: deepskyblue3
URxvt.color9: firebrick1
URxvt.color10: darkolivegreen1
URxvt.color11: lightgoldenrod1
URxvt.color12: royalblue1
URxvt.color13: hotpink1
URxvt.color14: deepskyblue1
## urxvt perl url-oeffner
URxvt.perl-ext: default,matcher
URxvt.urlLauncher: firefoxURxvt.tabbed.tabbar-fg: 6
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 2
URxvt.tabbed.tab-bg: 0
URxvt.matcher.button: 1
Last edited by muunleit (2011-01-19 06:27:59)
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline