[Insert your commit message here. Be sure to make it descriptive.]

This commit is contained in:
coolnsx
2024-02-26 18:08:57 +05:30
parent ca2da57aa3
commit 09ab6e0765
18 changed files with 95 additions and 29 deletions

20
hypr/battery Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/sh
i=10
dir="/sys/class/power_supply/BAT0/"
icon_dir="/usr/share/icons/Papirus/22x22/panel/"
[ -n "$1" ] && printf "Sleep for %s seconds\n" "$i"
while sleep $i; do
capacity_level=$(cat "$dir"/capacity_level)
state=$(cat "$dir"/status)
case $capacity_level in
*ritical) i=10 ;;
*ow) i=60 ;;
*) i=300 ;;
esac
[ -n "$1" ] && printf "Sleep for %s seconds\n" "$i"
[ "$state" = "Discharging" ] || continue
[ "$capacity_level" != "Normal" ] && notify-send -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$(cat "$dir/capacity") Battery $capacity_level, Please Plugin Charger!!" -u "$capacity_level"
done

View File

@@ -1,7 +1,9 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,highrr,auto,1.6
monitor=,highrr,auto,1.6,bitdepth,10
#monitor=,2880x1800@60.000999,auto,1.6,bitdepth,10
$hypr_dir="$HOME/.config/hypr"
$accent=00D8CE
$accent=5E88DD
#envs
#env = LIBVA_DRIVER_NAME,nvidia
@@ -37,7 +39,7 @@ general {
gaps_out = 4
border_size = 3
col.active_border = rgb($accent)
col.inactive_border = rgba(595959aa)
col.inactive_border = rgba(484848aa)
resize_on_border=false
layout = dwindle
@@ -54,7 +56,7 @@ decoration {
blur {
enabled = yes
size = 8
passes = 3
passes = 2
}
}
@@ -87,6 +89,7 @@ gestures {
misc {
force_default_wallpaper = 0
vfr = 1
}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
@@ -185,8 +188,9 @@ exec-once=dbus-update-activation-environment --systemd --all
exec-once=ssh-agent
exec-once=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once=node $HOME/github/arrpc/src > /tmp/arrpc-log
#exec-once=swaybg -i $HOME/.config/wall/9.png
exec-once=swaybg -i $HOME/.config/wall/18.png
exec-once=xrdb -merge $HOME/.config/.Xresource
exec-once=$hypr_dir/workspace 'focus'
exec-once=sleep 2 && $hypr_dir/workspace
exec-once=$hypr_dir/battery
#exec-once=sleep 2 && $hypr_dir/workspace
exec-once=google-chrome-stable

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

View File

@@ -10,9 +10,11 @@ while [ $i -le 5 ]; do
temp=$((temp / 1000))
bat_stats=$(cat /sys/class/power_supply/BAT0/status)
vol_stats=$(pamixer --get-mute)
charge=$(cat /sys/class/power_supply/BAT*/capacity)
[ "$bat_stats" = "Discharging" ] && bat_icon=🔋 || bat_icon=🔌
[ "$bat_stats" = "Discharging" ] && [ "$charge" -lt 20 ] && bat_icon="🪫"
[ "$vol_stats" = "true" ] && vol_icon=🔇 || vol_icon=🔊
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem MB / $mem_total_mb MB\n$bat_icon Battery : $(cat /sys/class/power_supply/BAT*/capacity) (${bat_stats})\n☀ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
notify-send -i "lol" "<----------(STATS)---------->" "🧠 CPU usage : $(top -ibn1 | sed -nE 's_%Cpu\(s\):(.*)us.*_\1_p' | cut -d' ' -f2-3) %\n🌡 Cpu Temp : $temp °C\n🔳 RAM : $mem MB / $mem_total_mb MB\n$bat_icon Battery : $charge (${bat_stats})\n☀ Brightness : $(light -G | cut -d'.' -f1)%\n$vol_icon Volume : $(pamixer --get-volume-human)\n🎵 $(pgrep -af mpvsocket >/dev/null && cut -d ">" -f1 /tmp/yt-music/current | cut -d":" -f2)" -h "string:x-canonical-private-synchronous:${0##*/}" -t 1500 &
: $((i += 1))
sleep 1
done

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB