Added scripts
This commit is contained in:
parent
e7214b60fa
commit
d915aaf7ed
2
Makefile
2
Makefile
|
@ -13,6 +13,8 @@ clean:
|
|||
install: output
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
install -m 0755 someblocks $(DESTDIR)$(PREFIX)/bin/someblocks
|
||||
install -m 0755 blocks-battery $(DESTDIR)$(PREFIX)/bin/blocks-battery
|
||||
install -m 0755 blocks-mail $(DESTDIR)$(PREFIX)/bin/blocks-mail
|
||||
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
|
||||
install -m 0644 someblocks.1 $(DESTDIR)$(MANPREFIX)/man1/someblocks.1
|
||||
uninstall:
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
percentage=$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep percentage: | cut -c 26-)
|
||||
state=$(upower -i /org/freedesktop/UPower/devices/battery_BAT1 | grep state: | cut -c 26- | grep -E '^discharging$')
|
||||
|
||||
if [ -z $state ]
|
||||
then
|
||||
echo $percentage+
|
||||
else
|
||||
echo $percentage
|
||||
fi
|
|
@ -0,0 +1,2 @@
|
|||
unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/INBOX/new/ -type f | wc -l 2>/dev/null)"
|
||||
echo $unread
|
Loading…
Reference in New Issue