mirror of
https://github.com/CoolnsX/hyprdots.git
synced 2025-12-20 07:15:23 +05:30
[Insert your commit message here. Be sure to make it descriptive.]
This commit is contained in:
20
hypr/battery
Executable file
20
hypr/battery
Executable 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
|
||||
@@ -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 |
@@ -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
|
||||
|
||||
BIN
hypr/wall_2K.png
BIN
hypr/wall_2K.png
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB |
BIN
hypr/wall_4K.png
BIN
hypr/wall_4K.png
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
BIN
hypr/wall_8K.png
BIN
hypr/wall_8K.png
Binary file not shown.
|
Before Width: | Height: | Size: 146 KiB |
Reference in New Issue
Block a user