Skip to content

Instantly share code, notes, and snippets.

@jferris
Created September 19, 2014 17:40
Show Gist options
  • Select an option

  • Save jferris/eca59c30b756d89eea63 to your computer and use it in GitHub Desktop.

Select an option

Save jferris/eca59c30b756d89eea63 to your computer and use it in GitHub Desktop.
Send time, battery, and Wifi status to libnotify
#!/usr/bin/zsh
time_status=$(date +%l:%M%p | sed "s/^ *//")
date_status=$(date +%A,\ %B\ %e)
battery_status=$(acpi | head -n1 | sed "s/^[^,]*, //" | sed "s/,.*//")
wifi_status=$(iwconfig wlp3s0 | grep ESSID | sed "s/^.*://" | tr -d '"')
notify-send -t 3000 "$time_status" "$date_status\nBattery: $battery_status\nConnected to $wifi_status"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment