better now
This commit is contained in:
parent
4f46de8d00
commit
358503f857
5010 changed files with 161 additions and 603699 deletions
37
scripts/battWarning.sh
Executable file
37
scripts/battWarning.sh
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
|
||||
batteryStatus=$(cat /sys/class/power_supply/BAT0/status)
|
||||
batteryLevel=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
currentPowerSetting=$(powerprofilesctl get)
|
||||
|
||||
if [ "$batteryLevel" -le "25" ] && [ "$batteryStatus" == "Discharging" ]; then
|
||||
notify-send -u critical -i ~/Stuff/scripts/battery-alert.svg "Low Battery" "25% battery remaining"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$batteryLevel" -le "40" ]; then
|
||||
if [ "$currentPowerSetting" != "power-saver" ]; then
|
||||
powerprofilesctl set power-saver
|
||||
notify-send -t 3000 "Battery Saver Turned On"
|
||||
fi
|
||||
elif [ "$batteryLevel" -ge "40" ] && [ "$batteryLevel" -le "75" ]; then
|
||||
if [ "$currentPowerSetting" != "balanced" ]; then
|
||||
powerprofilesctl set balanced
|
||||
notify-send -t 3000 "Battery Saver Turned Off"
|
||||
fi
|
||||
elif [ "$batteryLevel" -ge "75" ] && [ "$batteryStatus" == "Charging" ] || [ "$batteryStatus" == "Full" ]; then
|
||||
if [ "$currentPowerSetting" != "performance" ]; then
|
||||
powerprofilesctl set performance
|
||||
notify-send -t 3000 "Performance Mode Turned On"
|
||||
fi
|
||||
elif [ "$batteryLevel" -ge "75" ]; then
|
||||
if [ "$currentPowerSetting" != "balanced" ]; then
|
||||
powerprofilesctl set balanced
|
||||
notify-send -t 3000 "Performance Mode Turned Off"
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 60
|
||||
done
|
1
scripts/battery-alert.svg
Normal file
1
scripts/battery-alert.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 14H11V8H13M13 18H11V16H13M16.7 4H15V2H9V4H7.3C6.6 4 6 4.6 6 5.3V20.6C6 21.4 6.6 22 7.3 22H16.6C17.3 22 17.9 21.4 17.9 20.7V5.3C18 4.6 17.4 4 16.7 4Z" /></svg>
|
After Width: | Height: | Size: 231 B |
28
scripts/changeWallpaper.sh
Executable file
28
scripts/changeWallpaper.sh
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
monitor="eDP-1"
|
||||
|
||||
currentWallpaper=$(hyprctl hyprpaper listactive)
|
||||
currentWallpaper=${currentWallpaper:8}
|
||||
|
||||
echo "$currentWallpaper"
|
||||
|
||||
wallpapers=$(hyprctl hyprpaper listloaded)
|
||||
|
||||
set=false
|
||||
for wallpaper in $wallpapers; do
|
||||
echo "$wallpaper"
|
||||
if $set; then
|
||||
hyprctl hyprpaper wallpaper "${monitor},${wallpaper}"
|
||||
set=false
|
||||
fi
|
||||
if [ "$wallpaper" = "$currentWallpaper" ]; then
|
||||
set=true
|
||||
echo yes
|
||||
fi
|
||||
done
|
||||
|
||||
if $set; then
|
||||
hyprctl hyprpaper wallpaper "${monitor},/home/rafayahmad/dotfiles/bgs/1.png"
|
||||
fi
|
||||
|
7
scripts/currentWallpaperHyprlock.sh
Executable file
7
scripts/currentWallpaperHyprlock.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
currentWallpaper=$(hyprctl hyprpaper listactive)
|
||||
currentWallpaper=${currentWallpaper:8}
|
||||
configFile=${currentWallpaper: -5:1}
|
||||
configFile="/home/rafayahmad/.config/hypr/hyprlock/${configFile}.conf"
|
||||
export currentWallpaper
|
||||
hyprlock -c "$configFile"
|
3
scripts/reloadwaybar
Executable file
3
scripts/reloadwaybar
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/bash
|
||||
killall waybar
|
||||
waybar
|
Loading…
Add table
Add a link
Reference in a new issue