ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[RP] Using dzen, ratpoison, freebsd


From: Dirk Arlt
Subject: [RP] Using dzen, ratpoison, freebsd
Date: Mon, 18 May 2009 23:54:30 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (berkeley-unix)

Hi all you nice people!

I work on using dzen with ratpoison but most scripts i find via Google
are done for xmonad. I'd love to see some scripts working using rp with
fbsd.

For now i have two simple ones, working but not satisfying:

-----------------------------------------------------------------
leftbar:
-----------------------------------------------------------------

#!/bin/sh

XPOS=0
WIDTH=830
HEIGHT=16
FONT="-*-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
FG="#959595"
BG="#000000"

GREEN="^fg(#aece92)^bg()"
YELLOW="^fg(#968a38)^bg()"
RED="^fg(#bc8383)^bg()"
WHITE="^fg(#ffffff)^bg()"

CLEAN="^fg()^bg()"

while true; do

BATTERYLINE=$(echo "Batt: $GREEN`sysctl -n hw.acpi.battery.life`%$CLEAN")
CPULINE=$(echo "CPU: $RED`sysctl -n dev.cpu.0.freq`$CLEAN")
TEMPLINE=$(echo "Temp: $WHITE`sysctl -n hw.acpi.thermal.tz0.temperature`$CLEAN")

echo "$BATTERYLINE | $CPULINE | $TEMPLINE"

done | dzen2 -h $HEIGHT -ta l -x $XPOS -w $WIDTH -h 14 -fg $FG -bg $BG -fn $FONT


-----------------------------------------------------------------
rightbar:
-----------------------------------------------------------------

#!/bin/sh

XPOS=830
WIDTH=450
HEIGHT=16
FONT="-*-fixed-*-*-*-*-12-*-*-*-*-*-*-*"
FG="#959595"
BG="#000000"

GREEN="^fg(#aece92)^bg()"
YELLOW="^fg(#968a38)^bg()"
RED="^fg(#bc8383)^bg()"
WHITE="^fg(#ffffff)^bg()"

CLEAN="^fg()^bg()"

while true; do

DATELINE=$(echo "`date +%d-%B-%Y` $WHITE`date +%H:%M:%S`$CLEAN")

echo "$DATELINE"

done | dzen2 -h $HEIGHT -ta r -x $XPOS -w $WIDTH -h 14 -fg $FG -bg $BG -fn $FONT


-----------------------------------------------------------------
in .ratpoisonrc:
-----------------------------------------------------------------

exec ratpoison -c "set padding 0 14 0 0" -c "exec 
~/.ratpoison/ratpoison.dzen.leftbar" -c "exec 
~/.ratpoison/ratpoison.dzen.rightbar"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]