You are not logged in.

#201 2010-11-08 16:40:05

sam87
Member
From: down the rabbit hole
Registered: 2009-09-26
Posts: 141

Re: Show off your Dwm configuration!

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

#202 2010-11-08 17:25:39

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Show off your Dwm configuration!

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...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#203 2010-11-08 18:06:43

sam87
Member
From: down the rabbit hole
Registered: 2009-09-26
Posts: 141

Re: Show off your Dwm configuration!

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

#204 2010-11-08 18:44:54

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Show off your Dwm configuration!

Yes, it sounds like you patched it correctly. Try patching against a vanilla 5.8.2 and see how you go...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#205 2010-11-08 21:12:05

Dethredic
Member
Registered: 2009-01-24
Posts: 361
Website

Re: Show off your Dwm configuration!

TheMuffinMan wrote:

Dirty:
rK44ds.jpg

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

#206 2010-11-09 01:48:34

bluepumpkin
Member
Registered: 2009-08-28
Posts: 58

Re: Show off your Dwm configuration!

Dethredic wrote:

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

#207 2010-11-09 08:13:58

0mark
Member
From: earth
Registered: 2010-06-09
Posts: 162
Website

Re: Show off your Dwm configuration!

@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

#208 2010-11-09 09:27:10

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: Show off your Dwm configuration!

tNjNvYg

@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. hmm

Offline

#209 2010-11-09 17:27:44

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Show off your Dwm configuration!

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.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#210 2010-12-17 03:31:35

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Show off your Dwm configuration!

Just migrated from i3. I like it as much as i3. Both have pros and cons

2010-12-16-221745_1280x1024_scrot.png

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

#211 2010-12-17 03:36:51

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: Show off your Dwm configuration!

kcirick: Would you mind sharing your gmail python script?

Offline

#212 2010-12-17 03:38:44

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Show off your Dwm configuration!

markbabc wrote:

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

#213 2010-12-17 03:52:46

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: Show off your Dwm configuration!

kcirick wrote:
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 tongue if anyone wants the python version instead of using wget i can post it (just replacing wget with urllib.urlopen().read() )

Offline

#214 2010-12-17 03:56:38

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Show off your Dwm configuration!

markbabc wrote:

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 tongue 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

#215 2010-12-17 04:14:52

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: Show off your Dwm configuration!

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

#216 2010-12-17 21:07:16

na12
Member
From: /home/serbia
Registered: 2008-12-23
Posts: 752

Re: Show off your Dwm configuration!

JokerBoy wrote:

http://ompldr.org/tNjNvYg

@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. hmm

What text editor you use here?

Last edited by na12 (2010-12-17 21:08:24)

Offline

#217 2010-12-17 21:20:32

c00kiemon5ter
Member
From: Greece
Registered: 2010-06-01
Posts: 562
Website

Re: Show off your Dwm configuration!

yay, I changed from openbox to dwm and it's so nice smile
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

#218 2010-12-17 22:11:53

JokerBoy
Member
From: România
Registered: 2009-09-24
Posts: 641

Re: Show off your Dwm configuration!

na12 - vim

Offline

#219 2010-12-18 14:59:43

Lokaltog
Member
From: Norway
Registered: 2009-12-04
Posts: 53
Website

Re: Show off your Dwm configuration!

markbabc wrote:

(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

#220 2010-12-28 00:22:49

kcirick
Member
Registered: 2010-06-21
Posts: 364

Re: Show off your Dwm configuration!

na12 wrote:

2010-09-29-174240_1280x800_scrot.jpg

Can I get a wallpaper for this please? Thanks!

Offline

#221 2010-12-28 16:35:00

twin
Member
From: Greece
Registered: 2008-12-23
Posts: 47

Re: Show off your Dwm configuration!

kcirick wrote:

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

#222 2011-01-17 20:09:31

Meyithi
Member
From: Wirral, UK
Registered: 2009-06-21
Posts: 550
Website

Re: Show off your Dwm configuration!

Time for an update as I've had had a purge for the new year and shed 100+ packages, finally happy with this.

dwmjan11_thumb.png

Stock dwm, on a netbook I only really tile to take screenshots cool

Jumbled mess of confs @ http://www.meyithi.com/dots/nb/


The mind roams more freely in empty rooms.
dwm - colours - ncmpcpp - system
irc://irc.freenode.net:meyithi

Offline

#223 2011-01-18 18:52:33

muunleit
Member
From: Germany
Registered: 2008-02-23
Posts: 234

Re: Show off your Dwm configuration!

2011-01-18-194256_1280x1024_scrot.jpg 2011-01-18-194457_1280x1024_scrot.jpg

/* 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

#224 2011-01-18 23:34:13

markbabc
Member
Registered: 2010-11-06
Posts: 157

Re: Show off your Dwm configuration!

muunleit wrote:

*SNIP*

/* appearance */
*SNIP*.

omgz sexy, configs please?

Offline

#225 2011-01-19 06:25:08

muunleit
Member
From: Germany
Registered: 2008-02-23
Posts: 234

Re: Show off your Dwm configuration!

markbabc wrote:
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

Board footer

Powered by FluxBB