the cleaning begins

This commit is contained in:
RafayAhmad7548 2025-07-26 19:58:52 +05:00
parent ee2cf704f2
commit dd8482a6fb
510 changed files with 0 additions and 41801 deletions

View file

@ -1,37 +0,0 @@
#!/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 ~/dotfiles/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

View file

@ -1 +0,0 @@
<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>

Before

Width:  |  Height:  |  Size: 231 B

View file

@ -1,22 +0,0 @@
#!/bin/bash
while true; do
while "$(cat /home/rafayahmad/dotfiles/.config/eww/brightnessShow)"; do
activeWindows=$(/home/rafayahmad/eww/target/release/eww active-windows)
if [[ "$activeWindows" != *"brightnessWin"* ]] ; then
echo "opening"
/home/rafayahmad/eww/target/release/eww open brightnessWin
fi
echo false > /home/rafayahmad/.config/eww/brightnessShow
sleep 1
done
activeWindows=$(/home/rafayahmad/eww/target/release/eww active-windows)
if [[ "$activeWindows" == *"brightnessWin"* ]] ; then
echo "closing"
/home/rafayahmad/eww/target/release/eww close brightnessWin
fi
done

View file

@ -1,28 +0,0 @@
#!/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

View file

@ -1,8 +0,0 @@
#!/bin/bash
currentWallpaper=$(hyprctl hyprpaper listactive)
currentWallpaper=${currentWallpaper:8}
configFile=${currentWallpaper: -5:1}
configFile="/home/rafayahmad/.config/hypr/hyprlock/${configFile}.conf"
export currentWallpaper
echo "$configFile"
hyprlock -c "$configFile"

View file

@ -1,3 +0,0 @@
#!/usr/bin/bash
killall waybar
waybar

View file

@ -1,8 +0,0 @@
#!/bin/bash
systemctl start libvirtd || exit 1
virsh -c qemu:///system start win11
sleep 1
virt-viewer -c qemu:///system -f win11

View file

@ -1,67 +0,0 @@
#!/usr/bin/env python
from datetime import date
from datetime import datetime
import socket
import os
import time
from threading import Thread
import subprocess
date_format = "%Y-%m-%d"
youtube_focused = False
time_remaining = int(0)
def update_file():
with open('/home/rafayahmad/dotfiles/scripts/youtubeData', 'w') as file:
file.write(date.today().strftime(date_format))
file.write('\n')
file.write(time_remaining.__str__())
def read_file():
global time_remaining
with open('/home/rafayahmad/dotfiles/scripts/youtubeData') as file:
date_t = file.readline().strip()
date_t = datetime.strptime(date_t, date_format).date()
time_remaining = int(file.readline())
if date_t != date.today():
print('differnt date, resetting')
time_remaining = 60
update_file()
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
path = os.path.expandvars('$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock')
sock.connect(path)
def time_counter():
while True:
global time_remaining
if youtube_focused:
read_file()
if time_remaining == 0:
subprocess.run(['hyprctl', 'dispatch', 'killactive'])
subprocess.run(['notify-send', 'time\'s up buddy'])
time.sleep(1)
continue
time.sleep(60)
time_remaining -= 1
update_file()
print('Remainng Youtube Time is: ', time_remaining)
Thread(target=time_counter).start()
while True:
data = sock.recv(1024)
lines = data.decode().split('\n')
for line in lines:
if line.startswith('activewindow>>'):
print(line)
if line.__contains__('YouTube'):
youtube_focused = True
print('youtube focused')
else:
youtube_focused = False
print('youtube unfocused')

View file

@ -1,2 +0,0 @@
2025-07-03
0