Added Hypridle and Hyprlock && switched to UWSM
This commit is contained in:
27
modules/overlays/battery-status.sh
Normal file
27
modules/overlays/battery-status.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
############ Variables ############
|
||||
enable_battery=false
|
||||
battery_charging=false
|
||||
|
||||
####### Check availability ########
|
||||
for battery in /sys/class/power_supply/*BAT*; do
|
||||
if [[ -f "$battery/uevent" ]]; then
|
||||
enable_battery=true
|
||||
if [[ $(cat /sys/class/power_supply/*/status | head -1) == "Charging" ]]; then
|
||||
battery_charging=true
|
||||
fi
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
############# Output #############
|
||||
if [[ $enable_battery == true ]]; then
|
||||
if [[ $battery_charging == true ]]; then
|
||||
echo -n "(+) "
|
||||
fi
|
||||
echo -n "$(cat /sys/class/power_supply/*/capacity | head -1)"%
|
||||
if [[ $battery_charging == false ]]; then
|
||||
echo -n " remaining"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
7
modules/overlays/check-capslock.sh
Normal file
7
modules/overlays/check-capslock.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
MAIN_KB_CAPS=$(hyprctl devices | grep -B 6 "main: yes" | grep "capsLock" | head -1 | awk '{print $2}')
|
||||
|
||||
if [ "$MAIN_KB_CAPS" = "yes" ]; then
|
||||
echo "Caps Lock active"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
@@ -4,5 +4,16 @@
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(import ./heybrochecklog.nix)
|
||||
|
||||
(self: super: {
|
||||
# battery-status = prev.writeShellApplication {
|
||||
# name = "battery-status";
|
||||
# text = builtins.readFile ./battery-status.sh;
|
||||
# };
|
||||
check-capslock = super.writeShellApplication {
|
||||
name = "check-capslock";
|
||||
text = builtins.readFile ./check-capslock.sh;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user