Permalink
Browse files

Binaries

  • Loading branch information...
1 parent c63e59a commit 471416fba88556c19df47114a91fd367f2595a05 @frznvm0 committed Apr 29, 2012
Showing with 69 additions and 0 deletions.
  1. +8 −0 bin/open
  2. +44 −0 bin/statusbar
  3. +17 −0 bin/wallpaper
View
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ -S /tmp/.X11-unix/X0 ]; then
+ chromium --memory-model=low --enable-seccomp-sandbox $@ &>/dev/null &
+else
+ w3m $@
+fi
+
View
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+bat(){
+ percent=$(acpi -b | cut -d ',' -f 2 | sed 's/\s//')
+ if [ -n "$(acpi -b | grep Discharging)" ]; then
+ echo "BAT $percent"
+ else
+ echo "AC"
+ fi
+}
+
+cpu(){
+ read cpu a b c previdle rest < /proc/stat
+ prevtotal=$((a+b+c+previdle))
+ sleep 0.5
+ read cpu a b c idle rest < /proc/stat
+ total=$((a+b+c+idle))
+ percent="$((100*( (total-prevtotal) - (idle-previdle) ) / (total-prevtotal) ))"
+ echo "CPU $percent%"
+}
+
+mem(){
+ used=$(free -m | awk '/^Mem/ {print $3}')
+ echo "MEM $used""MB"
+}
+
+net(){
+ ifc=$(ifconfig -s -a | grep RU)
+
+ echo -n "NET "
+ (echo $ifc | grep eth &>/dev/null) && echo -n "eth "
+ (echo $ifc | grep wlan &>/dev/null) && echo -n "wlan "
+ (echo $ifc | grep ppp &>/dev/null) && echo -n "ppp "
+}
+
+mailcount(){
+ echo "MAIL $(ls -1 ~/mail/INBOX/new | wc -l)"
+}
+
+while true; do
+ xsetroot -name "$(bat) · $(cpu) · $(mem) · $(net)· $(mailcount) · $(date +%H:%M:%S)"
+ sleep 1s
+done
+
View
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+cd ~/images/wallpaper
+
+while true; do
+ files=()
+
+ for i in *.jpg *.png; do
+ [[ -f "$i" ]] && files+=("$i")
+ done
+
+ range=${#files[@]}
+ ((range)) && feh --bg-fill "${files[RANDOM % range]}"
+
+ sleep 10m
+done
+

0 comments on commit 471416f

Please sign in to comment.