You are not logged in.
Nice one, mind sharing ? i quite like this volume applet
Offline
DP, sorry xE
Last edited by FaN_OnLy1 (2010-05-16 12:44:27)
Offline
Nice one, mind sharing ? i quite like this volume applet
Sure. There's a batteri indicator also, I unplugged the AC below to show you how it looks. The volume bar changes color when it reaches a certain volume in %. I'm unsure who made the script initially, I just added some things to it - like the changing of colors at %'s etc.
#!/bin/zsh
#lockfile -r0 ${0}.lock && {
# vim:ft=zsh ts=4
# acpi -t | awk '{print $4}' | sed -e 's/\.[0-9]//g'
DZEN=`which dzen2`
GDBAR=`which gdbar`
BARBG='#616161' # grayish
BARFG='#3666A4' # blue
BARH=8
BARW=50
SLEEP=1
ICONCOLOR='#477AB3'
ICONPATH='/usr/share/icons/sm4tik'
BCOLOR='#3666a4'
# TODO: figure out how to find active interface.. ;x
#INTERFACE=eth0
INTERFACE=wlan0
RXB=`cat /sys/class/net/${INTERFACE}/statistics/rx_bytes`
TXB=`cat /sys/class/net/${INTERFACE}/statistics/tx_bytes`
SOUND_DEVICE='PCM'
# Date format
MYDATE_FORMAT='%H:%M:%S - %a, %d.%m.%Y'
# Fetch date and time
#------------------------------------------------------------------------------
mydate() {
# Convert to lowercase using tr - retarded.
date +${MYDATE_FORMAT} | tr '[A-Z]' '[a-z]'
}
# Fetch battery level
#------------------------------------------------------------------------------
battery_level() {
# Battery 0: Discharging, 82%, 01:21:57 remaining
percent=`acpi -b | awk {'print $4'} | sed -e 's/%,//g'`
POSM=$percent
if [[ $POSM -gt 70 ]]
then
BARFG='#3666A4'
elif [[ $POSM -gt 50 ]]
then
BARFG='#93D44F'
elif [[ $POSM -lt 51 ]]
BARFG='#FF6565'
then
fi
print "$POSM" | $GDBAR -h $BARH -w $BARW -fg $BARFG -bg $BARBG -s o -ss 1 -sw 4 -nonl
}
volicon() {
ismuted=`amixer sget $SOUND_DEVICE | grep "Front" | awk '{if (NR == "2") print $7}' | sed -e 's/\[//g;s/\]//g'`
if [[ $ismuted == "on" ]]
then
print "^i(${ICONPATH}/spkr_01.xbm)"
elif [[ $ismuted == "off" ]]
then
print "^fg(#616161)^i(${ICONPATH}/spkr_02.xbm)"
fi
}
fvolume() {
percentage=`amixer sget $SOUND_DEVICE | grep "Front" | awk {'print $5'} | grep -m 1 % | sed -e 's/[][%]//g'`
if [[ $percentage == 100 ]]
then
BARFG='#FF6565'
print -n "$(echo $percentage | $GDBAR -fg $BARFG -bg $BARBG -h $BARH -w $BARW -s o -ss 1 -sw 4 -nonl)" # Volume full
elif [[ $percentage -gt 50 ]]
then
BARFG='#93D44F'
print -n "$(echo $percentage | $GDBAR -fg $BARFG -bg $BARBG -h $BARH -w $BARW -s o -ss 1 -sw 4 -nonl)" # Volume half to full
elif [[ $percentage -gt 25 ]]
then
print -n "$(echo $percentage | $GDBAR -fg $BARFG -bg $BARBG -h $BARH -w $BARW -s o -ss 1 -sw 4 -nonl)" # Volume quarter to half
elif [[ $percentage -lt 26 ]]
then
print -n "$(echo $percentage | $GDBAR -fg $BARFG -bg $BARBG -h $BARH -w $BARW -s o -ss 1 -sw 4 -nonl)" # Volume low to quarter
fi
}
# Output
#------------------------------------------------------------------------------
while true; do
RXBN=`cat /sys/class/net/${INTERFACE}/statistics/rx_bytes`
TXBN=`cat /sys/class/net/${INTERFACE}/statistics/tx_bytes`
RXR=$(printf "%3d\n" $(echo "($RXBN - $RXB) / 1024/${SLEEP}" | bc))
TXR=$(printf "%3d\n" $(echo "($TXBN - $TXB) / 1024/${SLEEP}" | bc))
#print -n " ^fg(#616161)${INTERFACE}: ^fg($BCOLOR)${RXR} ^fg(#616161)kB/s ^fg($BCOLOR)^i(${ICONPATH}/net_down_02.xbm) ^fg($BCOLOR)${TXR} ^fg(#616161)kB/s ^fg($BCOLOR)^i(${ICONPATH}/net_up_02.xbm) ^ca(1, "amixer set PCM toggle")^fg($BCOLOR)$(volicon)^ca() ^fg()$(fvolume) ^fg($BCOLOR)^i(${ICONPATH}/clock.xbm) ^fg($BCOLOR)$(mydate) ^fg($BCOLOR)^i($ICONPATH/arch.xbm) \n"
print -n " ^fg($ICONCOLOR)^i(${ICONPATH}/bat_full_02.xbm) $(battery_level) ^fg($ICONCOLOR)^i(${ICONPATH}/wifi_01.xbm) ^fg(#ddeedd)${RXR} ^fg($ICONCOLOR)^i(${ICONPATH}/net_down_02.xbm) ^fg(#ddeedd)${TXR} ^fg($ICONCOLOR)^i(${ICONPATH}/net_up_02.xbm) ^ca(1, "amixer set PCM toggle")^fg($ICONCOLOR)$(volicon)^ca() ^fg()$(fvolume) ^fg($ICONCOLOR)^i(${ICONPATH}/clock.xbm) ^fg(#ddeedd)$(mydate) ^fg($ICONCOLOR)^i($ICONPATH/arch.xbm) \n"
RXB=$RXBN; TXB=$TXBN
sleep $SLEEP
done | $DZEN -h 20 -x 690 -ta r -fn 'xft:Droid Sans Mono:pixelsize=11' -e ''
#}
Last edited by valvet (2010-05-16 12:55:14)
Offline
Nice!
What is your GTK theme and what's the nowplaying thing? Covergloobus?
Offline
me likes...i dont use xmonad, but i must say, that looks awesome!
what i cannot build, i do not understand
Offline
stumpwm
emacs
urxvt + screen
uzbl-tabbed
loving stump, loving uzbl, loving arch
Last edited by rakka (2010-05-16 18:41:40)
Arch x86_64 - GitHub
Offline
@valvet, thanks alot oh while you're there, you seem to be using zsh, so let me point you to a script i wrote if you also want the battery to display in your prompt http://bbs.archlinux.org/viewtopic.php? … 09#p758209
Offline
Made an adapted version of the wonderful Madbox theme made by ADComp called MadPablo.
Colours are quite different olive green and light blue.
The fonts used are bitstream vera sans mono for the conky
Monofur,acitve window title; Sans inactive window header and menu header
Menu item and on screen display Neutra Text Book Alt
Apperance settings: Avenir LT Std 12.
Used gcolor2 getting the colors right.
If you like it let me know and I will upload adapted theme and so.
Direct link:http://img375.imageshack.us/img375/7655 … 71920x.png
Uploaded with ImageShack.us
Last edited by pablokal (2010-05-16 20:21:22)
GNu/Linux: Nu nog schoner: http://linuxnogschoner.blogspot.com/
Offline
Haven't posted a screenshot in a couple of months, so...
Clean:
http://omploader.org/tNGNhOADirty:
http://omploader.org/tNGNhYgDwm, urxvt, vim, cmus
nice wallpaper, mind sharing?
Offline
Fluxbox + hidden Panel + Tint2
Super Clean: http://i41.tinypic.com/m963h2.jpg
Clean: http://i43.tinypic.com/xlvtwi.jpg
Dirty: http://i40.tinypic.com/14t258j.jpg
Last edited by Fluxbox (2010-05-17 00:38:46)
Offline
first post
Nice job! Welcome to the boards...
Offline
bluepumpkin wrote:Haven't posted a screenshot in a couple of months, so...
Clean:
http://omploader.org/tNGNhOADirty:
http://omploader.org/tNGNhYgDwm, urxvt, vim, cmus
nice wallpaper, mind sharing?
It's a modification (by me) of this wallpaper: http://chix0r.deviantart.com/art/No-gir … offset=160
Offline
edit
Last edited by vampt3k (2011-05-22 19:14:49)
Offline
Hi! Very nice setup! Would you mind sharing your config? I'm very much interested on how you added icons before the workspace names, your config in the status bars, and the font.
Offline
first post
Mind sharing font and Xdefaults?
##hippie irc.freenode.net
Offline
Offline
Snip
Compiz standalone,tint2,conky
nice na12.
What menu is that if it is compiz-deskmenu how did you get it to work with rightclick?
I have tried and still no joy rightclick just does not work.
Certified Android Junkie
Arch 64
Offline
lalw wrote:first post
Mind sharing font and Xdefaults?
Never heard of silicon graphics font package? Remember mentioning it sometime back, with the same font of course. The font should be screen. The font from my shot earlier is also from sgi font package. It's called iris. Look up sgi font package in the net.
"You know what I found? Right in the kernel, in the heart of the operating system, I found a developer's comment that said, `Does this belong here?`" -- Simon Lok about Linux kernel in 2005
Reflections on the Strange and the not so Strange
http://skinwalker.wordpress.com
Offline
na12 wrote:Snip
Compiz standalone,tint2,conky
nice na12.
What menu is that if it is compiz-deskmenu how did you get it to work with rightclick?
I have tried and still no joy rightclick just does not work.
Yes it is.Open CCSM go to Commands,tab Commands and write "compiz-deskmenu" in Command line 0,then go to Viewport Switcher,tab Desktop-based Viewport Switching,and write "commands" in Plugin for initiate action,and "run_command0_key" in Action name for initiate.Everything goes without quotes.
Offline
What wallpaper is this?
1-Crawl 2-Cnfg 3-ATF 4-Exit ?
Offline
Clean :
http://dl.dropbox.com/u/5863152/2010-05 … _scrot.png
Dirty :
http://dl.dropbox.com/u/5863152/2010-05 … _scrot.png
Last edited by puzzled (2010-05-17 14:15:54)
Offline