From 57e0ad291e4663e66e05185c6f35402c4248959c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E5=92=8C=E3=81=A7=E3=81=AA=E3=82=8A?= <16044253+Daenarii@users.noreply.github.com> Date: Thu, 15 Mar 2018 15:59:25 +0800 Subject: [PATCH] Added support for more devices on polybar config --- src/larbs_user.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/larbs_user.sh b/src/larbs_user.sh index f9c5c0a..a77974d 100755 --- a/src/larbs_user.sh +++ b/src/larbs_user.sh @@ -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 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/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 echo Downloading email setup...