Page 12 of 15

Re: cwm

Posted: Sun Nov 16, 2014 3:22 pm
by ivanovnegro
machinebacon wrote:thanks to drew i quit posting scrots :D
True.

Re: cwm

Posted: Thu Nov 27, 2014 5:56 pm
by dkeg
Happy Thanksgiving

Re: cwm

Posted: Thu Nov 27, 2014 6:25 pm
by rhowaldt
damn. that's more beautiful than my GF.

Re: cwm

Posted: Thu Nov 27, 2014 9:21 pm
by ivanovnegro
And Tim complaining about OpenSuse on IRC, oops. :)

Re: cwm

Posted: Thu Nov 27, 2014 10:00 pm
by stark
With a desktop like that who wouldn't be relaxed ;)

Re: cwm

Posted: Fri Nov 28, 2014 3:08 am
by franksinistra
as always nice dkeg, very nice

Re: cwm

Posted: Fri Nov 28, 2014 6:49 am
by Dr_Chroot
Wow, dkeg! Fantastic as always. You didn't by chance post your bar config anywhere, did you?

Re: cwm

Posted: Fri Nov 28, 2014 4:53 pm
by dkeg
on my github somewhere. Nothing special. Its a combination of my old stats scripts (which is around here somewhere) and some ideas from one of z3bra's creations. And thanks Joe for the amixer piece.

Code: Select all

#!/bin/sh
#
# mix of inspiration from z3bra and my own shit

temp() {
    awk '{print $1/1000}' /sys/class/thermal/thermal_zone0/temp 
}
mem() {
    free -m | awk 'NR==3 {print $3}' 
}
clock() {
    date +'%e %b %R'
}
batt() {
    cat /sys/class/power_supply/BAT0/capacity 2>/dev/null
}
music() {
    cmusbar 2>/dev/null
}
vol() {
    amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/' | sed -e 's/%//g'
}
groups() {
    xprop -root _NET_CURRENT_DESKTOP | awk '{print $3}'
}
tags() {
    herbstclient list_monitors | awk '{gsub(/"/," ");print $5}'
    #herbstclient tag_status
}
pingd() {
    $HOME/bin/pingd
}

# Fill buffer, output it to stdout.
while :; do
    buf="%{l} %{B#FF1a1b1d} "
    buf="${buf} %{F#FFa69c8e} GRP #"
    buf="${buf} %{F#FFf9f9f9} $(groups) "
    #buf="${buf} %{F#FFabacae} $(tags) "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFa69c8e} batt "
    buf="${buf} %{F#FFdfdfdf} $(batt) "
    buf="${buf} %{F#FFa69c8e} mem "
    buf="${buf} %{F#FFdfdfdf} $(mem) "
    buf="${buf} %{F#FFa69c8e} vol "
    buf="${buf} %{F#FFdfdfdf} $(vol) %{c}"
    buf="${buf} %{F#FFabacae} $(music) %{r}"
    buf="${buf} %{F#FFa69c8e} $(pingd) "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFFFFFFF} $() "   
    buf="${buf} %{F#FFf8eaec} $(clock) "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "
    buf="${buf} %{F#FFFFFFFF} $() "   

    echo $buf
    sleep 1 
done

Re: cwm

Posted: Fri Nov 28, 2014 5:54 pm
by simgin
^ Sorry, guys newbie question. I was wondering what "2>/dev/null" does, or is home to? Battery and music are both using it, and it got me puzzled. I am complete rookie in bash, but curious on it. Sorry for the inconvenience.

Simon

PS: Dkeg, Herbstluftswm script?

Re: cwm

Posted: Fri Nov 28, 2014 6:33 pm
by dkeg
the 2 is for STDERR. So any error output is sent to /dev/null. The battery line has it b/c my original did not offer anything if the user has no battery. The cmus line includes it b/c I was testing something. It didn't work, but caused no issues, so I forgot about it. I should have cleaned it up better.

You could look up more information under say 'linux IO redirection'

What herbstluftwm script you looking for? Oh, cwm uses groups, herbst, uses tags. So would comment out what I don't need. Was playing around recently with herbstclient.

Re: cwm

Posted: Fri Nov 28, 2014 7:14 pm
by simgin
Ahh ok, thank you very much dkeg, much appreciated. Will look up the IO stuff. Didn't know where to start searching and for what. I was just nosey with your script :)

Cheers mate
simon

Re: cwm

Posted: Fri Nov 28, 2014 9:45 pm
by Dr_Chroot
Thanks dkeg! You da man B)

Re: cwm

Posted: Sat Nov 29, 2014 2:35 pm
by machinebacon
Simon, check this: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html

Anyway one of the best resources for Bash :)

Re: cwm

Posted: Sat Nov 29, 2014 6:11 pm
by simgin
^ Thank you for the link Jules :) Busy weekend of reading now.

cheers
simon

Re: cwm

Posted: Sat Dec 13, 2014 3:05 am
by dkeg
another weekend for sharing my current scheme.
a varied version of some color scheme
gohufont, using boldFont
and gohufont all around; bar, dmenu, notifications
escalated.png

Re: cwm

Posted: Sat Dec 13, 2014 4:43 am
by Dr_Chroot
^ Fantastic, dkeg! I am really digging gohu; very nice font. And that perfect window alignment... how? Everything in your scrot is simply superb. +1

Re: cwm

Posted: Sat Dec 13, 2014 4:48 am
by zharper
^^ awesome, really liking your desktops dkeg.

Re: cwm

Posted: Sat Dec 13, 2014 5:00 am
by machinebacon
i jizzed my pants again :) nice scrot, drew!

Re: cwm

Posted: Sat Dec 13, 2014 5:23 am
by franksinistra
i like your blush scrot better dkeg, but i like it nonetheless

btw what's that next to ttytter?

Re: cwm

Posted: Sat Dec 13, 2014 9:39 am
by machinebacon
^ looks like vim with nerd tree explorer (http://www.vim.org/scripts/script.php?script_id=1658)