normal update

This commit is contained in:
RafayAhmad7548 2026-03-13 01:11:46 +05:00
parent cff1deb93f
commit 8137ce7e25
Signed by: RafayAhmad
SSH key fingerprint: SHA256:WURX8viobA1uawb4dWM3LqYrY+XPcZcXhAXAlrYdhtE
10 changed files with 48 additions and 88 deletions

View file

@ -33,7 +33,7 @@ bind = CTRL ALT SHIFT, W, exec, /home/rafayahmad/dotfiles/scripts/startWin11.sh
# Window movement
bind = SUPER, V, togglefloating,
bind = SUPER, H, togglesplit, # dwindle
bind = SUPER, H, layoutmsg, togglesplit
bind = CTRL, Q, killactive,
bind = ALT, TAB, cyclenext,
bind = SUPER, TAB, swapnext,

View file

@ -19,10 +19,10 @@ exec-once = swaync
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = eww daemon
exec-once = hyprpaper && ~/dotfiles/scripts/currentWallpaperHyprlock.sh
exec-once = hyprpaper
exec-once = /home/rafayahmad/dotfiles/scripts/brightnessWidget.sh
exec-once = ~/dotfiles/scripts/battWarning.sh
exec-once = ~/dotfiles/scripts/youtubeBlocker.py
exec-once = ~/dotfiles/scripts/youtubeBlocker.sh
exec-once = [workspace special:fluffychat silent] GTK_CSD=0 /opt/fluffychat/fluffychat
exec-once = [workspace special:thunderbird silent] thunderbird
@ -142,10 +142,9 @@ misc {
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
windowrulev2 = pin, class:(Rofi)
windowrulev2 = float, class:(clipse)
windowrulev2 = size 700 600, class:(clipse)
windowrulev2 = float, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$
windowrulev2 = size 900 600, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$
windowrulev2 = float, class:(org.gnome.Calculator)
windowrulev2 = size 500 700, class:(org.gnome.Calculator)
windowrule = match:class clipse, float 1
windowrule = match:class clipse, size 700 600
windowrule = match:class ^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$, float 1
windowrule = match:class ^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$, size 900 600
windowrule = match:class org.gnome.Calculator, float 1
windowrule = match:class org.gnome.Calculator, size 500 700

View file

@ -1,4 +1,7 @@
splash = false
preload = ~/dotfiles/bgs/2.png
preload = ~/dotfiles/bgs/1.png
wallpaper = eDP-1, ~/dotfiles/bgs/1.png
wallpaper {
monitor = eDP-1
path = ~/dotfiles/bgs/
fit_mode = cover
timeout = 3600
}

View file

@ -2478,6 +2478,8 @@
#: }}}A
font_size 13.0
map ctrl+shift+n nop
map ctrl+k send_key down
map ctrl+i send_key up

View file

@ -23,6 +23,7 @@
},
"model_parameters": []
}, */
"enable_language_server": false,
"remove_trailing_whitespace_on_save": false,
"use_on_type_format": false,
"git_panel": {
@ -38,6 +39,7 @@
},
"show_edit_predictions": false,
"agent": {
"always_allow_tool_actions": false,
"default_profile": "write",
"default_model": {
"provider": "copilot_chat",

BIN
bgs/3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

View file

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

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')

22
scripts/youtubeBlocker.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/bash
is_valid_youtube_time() {
now=$(date +%H%M)
start=1000
end=1800
(( 10#$now >= start && 10#$now <= end ))
}
handle() {
case $1 in
activewindow*)
echo $1
if [[ $1 == *YouTube* ]] && ! is_valid_youtube_time; then
hyprctl dispatch killactive
notify-send "ENOUGH, LOCK IN"
fi
esac
}
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read -r line; do handle "$line"; done

View file

@ -1,2 +0,0 @@
2025-12-07
59