diff --git a/.config/hypr/hyprbinds.conf b/.config/hypr/hyprbinds.conf index 4039495..4cc79cf 100644 --- a/.config/hypr/hyprbinds.conf +++ b/.config/hypr/hyprbinds.conf @@ -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, diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 2082dac..8a05dd4 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -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 diff --git a/.config/hypr/hyprpaper.conf b/.config/hypr/hyprpaper.conf index 349ec14..eebe03c 100644 --- a/.config/hypr/hyprpaper.conf +++ b/.config/hypr/hyprpaper.conf @@ -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 +} diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index b061b99..d19b73c 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -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 diff --git a/.config/zed/settings.json b/.config/zed/settings.json index d746693..0647477 100644 --- a/.config/zed/settings.json +++ b/.config/zed/settings.json @@ -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", diff --git a/bgs/3.png b/bgs/3.png deleted file mode 100644 index 1047282..0000000 Binary files a/bgs/3.png and /dev/null differ diff --git a/scripts/currentWallpaperHyprlock.sh b/scripts/currentWallpaperHyprlock.sh index a02979a..4034e7b 100755 --- a/scripts/currentWallpaperHyprlock.sh +++ b/scripts/currentWallpaperHyprlock.sh @@ -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 diff --git a/scripts/youtubeBlocker.py b/scripts/youtubeBlocker.py deleted file mode 100755 index 6c60eee..0000000 --- a/scripts/youtubeBlocker.py +++ /dev/null @@ -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') diff --git a/scripts/youtubeBlocker.sh b/scripts/youtubeBlocker.sh new file mode 100755 index 0000000..b5dc90c --- /dev/null +++ b/scripts/youtubeBlocker.sh @@ -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 diff --git a/scripts/youtubeData b/scripts/youtubeData deleted file mode 100644 index c998624..0000000 --- a/scripts/youtubeData +++ /dev/null @@ -1,2 +0,0 @@ -2025-12-07 -59 \ No newline at end of file