normal update
This commit is contained in:
parent
cff1deb93f
commit
8137ce7e25
10 changed files with 48 additions and 88 deletions
|
|
@ -33,7 +33,7 @@ bind = CTRL ALT SHIFT, W, exec, /home/rafayahmad/dotfiles/scripts/startWin11.sh
|
||||||
|
|
||||||
# Window movement
|
# Window movement
|
||||||
bind = SUPER, V, togglefloating,
|
bind = SUPER, V, togglefloating,
|
||||||
bind = SUPER, H, togglesplit, # dwindle
|
bind = SUPER, H, layoutmsg, togglesplit
|
||||||
bind = CTRL, Q, killactive,
|
bind = CTRL, Q, killactive,
|
||||||
bind = ALT, TAB, cyclenext,
|
bind = ALT, TAB, cyclenext,
|
||||||
bind = SUPER, TAB, swapnext,
|
bind = SUPER, TAB, swapnext,
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ exec-once = swaync
|
||||||
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
||||||
exec-once = eww daemon
|
exec-once = eww daemon
|
||||||
|
|
||||||
exec-once = hyprpaper && ~/dotfiles/scripts/currentWallpaperHyprlock.sh
|
exec-once = hyprpaper
|
||||||
exec-once = /home/rafayahmad/dotfiles/scripts/brightnessWidget.sh
|
exec-once = /home/rafayahmad/dotfiles/scripts/brightnessWidget.sh
|
||||||
exec-once = ~/dotfiles/scripts/battWarning.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:fluffychat silent] GTK_CSD=0 /opt/fluffychat/fluffychat
|
||||||
exec-once = [workspace special:thunderbird silent] thunderbird
|
exec-once = [workspace special:thunderbird silent] thunderbird
|
||||||
|
|
@ -142,10 +142,9 @@ misc {
|
||||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
# windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
|
# windowrulev2 = nomaximizerequest, class:.* # You'll probably like this.
|
||||||
|
|
||||||
windowrulev2 = pin, class:(Rofi)
|
windowrule = match:class clipse, float 1
|
||||||
windowrulev2 = float, class:(clipse)
|
windowrule = match:class clipse, size 700 600
|
||||||
windowrulev2 = size 700 600, class:(clipse)
|
windowrule = match:class ^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$, float 1
|
||||||
windowrulev2 = float, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$
|
windowrule = match:class ^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$, size 900 600
|
||||||
windowrulev2 = size 900 600, class:^(xdg-desktop-portal-gtk|gtk3-filechooser-dialog)$
|
windowrule = match:class org.gnome.Calculator, float 1
|
||||||
windowrulev2 = float, class:(org.gnome.Calculator)
|
windowrule = match:class org.gnome.Calculator, size 500 700
|
||||||
windowrulev2 = size 500 700, class:(org.gnome.Calculator)
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,7 @@
|
||||||
splash = false
|
splash = false
|
||||||
preload = ~/dotfiles/bgs/2.png
|
wallpaper {
|
||||||
preload = ~/dotfiles/bgs/1.png
|
monitor = eDP-1
|
||||||
wallpaper = eDP-1, ~/dotfiles/bgs/1.png
|
path = ~/dotfiles/bgs/
|
||||||
|
fit_mode = cover
|
||||||
|
timeout = 3600
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -2478,6 +2478,8 @@
|
||||||
#: }}}A
|
#: }}}A
|
||||||
font_size 13.0
|
font_size 13.0
|
||||||
|
|
||||||
|
map ctrl+shift+n nop
|
||||||
|
|
||||||
map ctrl+k send_key down
|
map ctrl+k send_key down
|
||||||
map ctrl+i send_key up
|
map ctrl+i send_key up
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
},
|
},
|
||||||
"model_parameters": []
|
"model_parameters": []
|
||||||
}, */
|
}, */
|
||||||
|
"enable_language_server": false,
|
||||||
"remove_trailing_whitespace_on_save": false,
|
"remove_trailing_whitespace_on_save": false,
|
||||||
"use_on_type_format": false,
|
"use_on_type_format": false,
|
||||||
"git_panel": {
|
"git_panel": {
|
||||||
|
|
@ -38,6 +39,7 @@
|
||||||
},
|
},
|
||||||
"show_edit_predictions": false,
|
"show_edit_predictions": false,
|
||||||
"agent": {
|
"agent": {
|
||||||
|
"always_allow_tool_actions": false,
|
||||||
"default_profile": "write",
|
"default_profile": "write",
|
||||||
"default_model": {
|
"default_model": {
|
||||||
"provider": "copilot_chat",
|
"provider": "copilot_chat",
|
||||||
|
|
|
||||||
BIN
bgs/3.png
BIN
bgs/3.png
Binary file not shown.
|
Before Width: | Height: | Size: 2.8 MiB |
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
currentWallpaper=$(hyprctl hyprpaper listactive)
|
# currentWallpaper=$(hyprctl hyprpaper listactive)
|
||||||
currentWallpaper=${currentWallpaper:8}
|
# currentWallpaper=${currentWallpaper:8}
|
||||||
configFile=${currentWallpaper: -5:1}
|
# configFile=${currentWallpaper: -5:1}
|
||||||
configFile="/home/rafayahmad/.config/hypr/hyprlock/${configFile}.conf"
|
# configFile="/home/rafayahmad/.config/hypr/hyprlock/${configFile}.conf"
|
||||||
|
currentWallpaper=/home/rafayahmad/dotfiles/bgs/2.png
|
||||||
export currentWallpaper
|
export currentWallpaper
|
||||||
echo "$configFile"
|
# echo "$configFile"
|
||||||
hyprlock -c "$configFile"
|
hyprlock -c /home/rafayahmad/dotfiles/.config/hypr/hyprlock/2.conf
|
||||||
|
|
|
||||||
|
|
@ -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
22
scripts/youtubeBlocker.sh
Executable 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
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
2025-12-07
|
|
||||||
59
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue