Merge pull request #15 from Daenarii/master

Added support for more devices on polybar config
This commit is contained in:
Luke Smith 2018-03-15 11:49:17 -07:00 committed by GitHub
commit eda9ecbeac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,8 +37,12 @@ git clone https://github.com/lukesmithxyz/voidrice.git >/dev/null &&
dialog --infobox "Now compiling polybar. This is the last program, but may take some time..." 10 60 dialog --infobox "Now compiling polybar. This is the last program, but may take some time..." 10 60
wifi=$(ls /sys/class/net | grep wl) wifi=$(ls /sys/class/net | grep wl)
eth=$(ls /sys/class/net | grep eth) eth=$(ls /sys/class/net | grep e)
bat=$(ls /sys/class/power_supply | grep BAT)
adp=$(ls /sys/class/power_supply | grep ADP)
bl=$(ls /sys/class/backlight | grep _backlight)
sed -i "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc sed -i "s/wlp3s0/$wifi/g; s/enp0s25/$eth/g" /home/$(whoami)/.config/polybar/config /home/$(whoami)/.bashrc
sed -i "s/BAT0/$bat/g; s/ADP1/$adp/g; s/intel_backlight/$bl/g" /home/$(whoami)/.config/polybar/config
packer --noconfirm -S polybar || packer --noconfirm -S polybar-git packer --noconfirm -S polybar || packer --noconfirm -S polybar-git
echo Downloading email setup... echo Downloading email setup...