add battery monitor program
This commit is contained in:
parent
8201828ee9
commit
b13e18461c
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
while true
|
||||
do
|
||||
echo $(date +"%a, %B %d %Y @%I:%M %p %Z") "||" $(battstat) > ~/.config/sdorfehs/bar
|
||||
done
|
|
@ -5,6 +5,7 @@ permit nopass :staff cmd make
|
|||
permit nopass :staff cmd reboot
|
||||
permit nopass :staff cmd halt
|
||||
permit nopass :staff cmd pkg_add
|
||||
permit nopass :staff cmd install
|
||||
permit nopass :staff cmd pkg_info
|
||||
permit nopass :staff cmd pkg_delete
|
||||
permit nopass :staff cmd sysmerge
|
||||
|
|
10
setup.pl
10
setup.pl
|
@ -123,6 +123,13 @@ sub compile_afetch {
|
|||
system('doas', 'make', 'install');
|
||||
}
|
||||
|
||||
# Setup Battery Monitor
|
||||
sub setup_battstat {
|
||||
system('git', 'clone', 'https://github.com/imwally/battstat.git', "$ENV{HOME}/.battstat");
|
||||
chdir "$ENV{HOME}/.battstat";
|
||||
system('doas', 'install', './battstat', '/usr/local/bin');
|
||||
}
|
||||
|
||||
# Updates XDG user directories
|
||||
sub update_xdg_user_dirs {
|
||||
system('xdg-user-dirs-update');
|
||||
|
@ -196,6 +203,9 @@ sub main {
|
|||
print_message("Compiling afetch...");
|
||||
compile_afetch();
|
||||
|
||||
print_message("Setting up Battery Monitor...");
|
||||
setup_battstat();
|
||||
|
||||
closedir $dh;
|
||||
|
||||
update_xdg_user_dirs();
|
||||
|
|
Loading…
Reference in New Issue