Skip to content

Instantly share code, notes, and snippets.

@rook2pawn
Created July 27, 2011 10:16
Show Gist options
  • Save rook2pawn/1109083 to your computer and use it in GitHub Desktop.
Save rook2pawn/1109083 to your computer and use it in GitHub Desktop.
bash prompt show remaining batt power and current time
PS1="\$(acpi -b | perl -ne 'print \$1.\" \".+(join \":\",(localtime)[2,1]),\"> \" if /(\\\d{1,}%)/')"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment