Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

dwm statusbar

Started by 0day, April 14, 2015, 09:59:30 PM

Previous topic - Next topic

0day

how to for add wifi in dwm status bar?
This is my start script:

#!/bin/bash

#start dwm

# Show memory use, volume %, battery % and time in status bar
while xsetroot -name "RAM:$(free -m | awk '/cache:/ { print $3"MB" }')  Vol:$(amixer get Master | tail -1 | awk '{ print $5 }' | tr -d '[]')  Batt:$(acpi | awk '{ print $4 }' | tr -d ',')  $(date '+%e %b %Y %a %k:%M')"
    do
        sleep 1
    done &

synclient VertEdgeScroll=1 &

exec dwm

0day

try...

#!/bin/bash

#start dwm

wifi(){
      STATUS="X`/sbin/iwgetid`"
      if test "$STATUS" != "X" ; then
        ESSID="`/sbin/iwgetid |awk -F ":" '{print $2}'|sed -e 's/"//g'`"
        LINK="`awk '/wlan0:/ {print $3}' /proc/net/wireless |sed -e 's/\.//g'`"
      echo " $ESSID:$LINK"
      fi
    }

# Show memory use, volume %, battery %, wifi status and time in status bar
while xsetroot -name "`wifi` RAM:$(free -m | awk '/cache:/ { print $3"MB" }')  Vol:$(amixer get Master | tail -1 | awk '{ print $5 }' | tr -d '[]')  Batt:$(acpi | awk '{ print $4 }' | tr -d ',')  $(date '+%e %b %Y %a %k:%M')"
    do
        sleep 1
    done &

synclient VertEdgeScroll=1 &

exec dwm

View the most recent posts on the forum