Snippets

Huntly Cameron arch-bat

Created by Huntly Cameron
1
2
3
4
5
6
7
8
#!/bin/sh
state=$(acpi | cut -d ' ' -f 3 | sed -r 's/,//g')
output=$(acpi | cut -d' ' -f 4,5 | sed -r 's/,//g')
if [ "$state" == "Charging" ]; then
  echo " $output" 
else
 echo " $output"
fi

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.