feat: add privacy configuration file for window rules and screensharing protection;

feat: implement distraction toggle script for hosts file management;
feat: add privacy toggle script with status checking capability;
refactor: improve grayscale toggle script with status parameter support;
refactor: reorganize hyprland gestures and input configuration;
chore: remove unused bspwm script and btop configuration files;
chore: delete obsolete rofi-wayland launcher themes and configurations;
feat: extend nvim filetype recognition for pascal scripts;
feat: enhance swaync configuration with new toggle buttons and layout adjustments;
chore: update waybar goal file content;
chore: modify gitignore patterns for cava assets and thunar configurations;
fix: adjust thunar custom actions to use swww instead of hyprpaper
This commit is contained in:
2025-11-12 14:03:39 +03:00
parent f4e7adb2e6
commit 1a07095d35
103 changed files with 197 additions and 19199 deletions

View File

@@ -41,7 +41,6 @@ exec-once = swaync
exec-once = ~/.config/hypr/scripts/random_wallpaper.sh
exec-once = ~/.config/hypr/scripts/autofreezer.sh
exec-once = ~/.config/bspwm/checkupdates.sh
exec-once = libinput-gestures
exec-once = copyq --start-server
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
exec-once = thunar --daemon
@@ -288,27 +287,26 @@ input {
# https://wiki.hyprland.org/Configuring/Variables/#gestures
gestures {
# Workspaces
gesture = 3, horizontal, scale: 2, workspace
gesture = 4, horizontal, scale: 2, workspace
workspace_swipe_forever = true
gesture = 4, vertical, dispatcher, exec, pkill rofi || $menu
gesture = 3, vertical, dispatcher, exec, pkill rofi || $menu
# Notification center
gesture = 4, horizontal, dispatcher, exec, $notificationCenter
gesture = 3, horizontal, dispatcher, exec, $notificationCenter
# Volume control
gesture = 3, up, dispatcher, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%+
gesture = 3, down, dispatcher, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%-
gesture = 4, up, scale: 0.1, dispatcher, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%+
gesture = 4, down, dispatcher, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 10%-
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device {
name = epic-mouse-v1
sensitivity = -0.5
name = gxtp7863:00-27c6:01e0-touchpad
sensitivity = 0.5
}
###################
### KEYBINDINGS ###
###################
@@ -610,31 +608,13 @@ windowrule = workspace 8 silent,class:^(Element)$
windowrule = group override set always,class:^(Element)$
# Screensharing protection
windowrule = tag +privacy,class:^(org.telegram.desktop)$
windowrule = tag +privacy,class:^(Element)$
windowrule = tag +privacy,class:^(vesktop)$
windowrule = tag +privacy,class:^(com.github.hluk.copyq)$
windowrule = tag +privacy,class:^(org.keepassxc.KeePassXC)$
windowrule = tag +privacy,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrule = tag +privacy,title:^(diary)$
windowrule = tag +privacy,class:thunar,title:.*(Downloads|Telegram Desktop).*
windowrule = tag +privacy,class:^(Mullvad VPN)$
windowrule = tag +privacy,class:^(Tor Browser)$
windowrule = tag +privacy,class:^(zen)$,title:.*Private Browsing.*
windowrule = tag +privacy,class:^(Logseq)$
windowrule = tag +privacy,class:^(com.obsproject.Studio)$
# These aren't added in my version yet
# layerrule = noscreenshare, swaync-control-center
# layerrule = noscreenshare, swaync-notification-window
source = ~/.config/hypr/privacy.conf
windowrule = noscreenshare, tag:privacy
windowrule = bordercolor rgba(cc00ffff) rgba(630063ff) 90deg,tag:privacy
windowrule = noscreenshare 0, tag:privacyexpose
windowrule = bordercolor rgba(ff0000ff) rgba(ff0000ff) 90deg,tag:privacyexpose
windowrule = dimaround, tag:privacyexpose
# Nextcloud
windowrule = float,animation slide top,resize 800 600,move center,class:^(com.nextcloud.desktopclient.nextcloud)$
# com.saivert.pwvucontrol
windowrule = float,class:^(com.saivert.pwvucontrol)$
windowrule = size 600 400,class:^(com.saivert.pwvucontrol)$
@@ -666,7 +646,7 @@ layerrule = dimaround, swaync-control-center
layerrule = ignorezero, swaync-control-center
layerrule = ignorezero, swaync-notification-window
layerrule = animation slideIn right, swaync-control-center
layerrule = animation slideIn right, swaync-notification-window
# Waybar blur
layerrule = ignorezero, waybar
layerrule = blur, waybar

15
hypr/privacy.conf Normal file
View File

@@ -0,0 +1,15 @@
windowrule = tag +privacy,class:^(org.telegram.desktop)$
windowrule = tag +privacy,class:^(Element)$
windowrule = tag +privacy,class:^(vesktop)$
windowrule = tag +privacy,class:^(com.github.hluk.copyq)$
windowrule = tag +privacy,class:^(org.keepassxc.KeePassXC)$
windowrule = tag +privacy,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrule = tag +privacy,title:^(diary)$
windowrule = tag +privacy,class:thunar,title:.*(Downloads|Telegram Desktop).*
windowrule = tag +privacy,class:^(Mullvad VPN)$
windowrule = tag +privacy,class:^(Tor Browser)$
windowrule = tag +privacy,class:^(zen)$,title:.*Private Browsing.*
windowrule = tag +privacy,class:^(Logseq)$
windowrule = tag +privacy,class:^(com.obsproject.Studio)$
layerrule = noscreenshare, swaync-control-center
layerrule = noscreenshare, swaync-notification-window

View File

@@ -1,22 +1,31 @@
#!/bin/bash
FILENAME="$HOME/.config/hypr/grayscale.conf"
# Define the configuration file path
FILE="$HOME/.config/hypr/grayscale.conf"
# Check if the file exists
if [ ! -f "$FILENAME" ]; then
echo "File not found: $FILENAME"
if [ ! -f "$FILE" ]; then
echo "File not found: $FILE"
exit 1
fi
# Check if the file is already commented
if grep -q '^[[:space:]]*#' "$FILENAME"; then
echo "Uncommenting the file: $FILENAME"
# Uncomment the lines
sed -i 's/^[[:space:]]*#\s*//g' "$FILENAME"
# Toggle comments
# If the first line is not commented out, comment out the entire file
if ! grep -q '^#' "$FILE"; then
if [ $1 = 'g' ]; then
echo "true"
exit 0
fi
sed -i 's/^/#/' "$FILE"
echo "Commented out all lines in $FILE."
else
echo "Commenting the file: $FILENAME"
# Comment the lines
sed -i 's/^/# /' "$FILENAME"
if [ $1 = 'g' ]; then
echo "false"
exit 0
fi
sed -i 's/^#//g' "$FILE"
echo "Uncommented all lines in $FILE."
fi
hyprctl reload

View File

@@ -0,0 +1,61 @@
#!/bin/bash
# Define the configuration file path
FILE="/etc/hosts"
TMP_FILE="/tmp/hosts.$$" # Use PID to make temp file unique
if [ ! -f "$FILE" ]; then
echo "File not found: $FILE"
exit 1
fi
# Variables to identify the distraction remover section
START_LINE=$(grep -n '^# Distraction removers' "$FILE" | cut -d: -f1)
END_LINE=$(grep -n '^# End of distraction removers' "$FILE" | cut -d: -f1)
if [ -n "$START_LINE" ] && [ -n "$END_LINE" ]; then
# Calculate lines for sed
START=$((START_LINE + 1))
END=$((END_LINE - 1))
# If the first line of the distraction section is not commented, comment them
if ! sed -n "${START}p" "$FILE" | grep -q '^#'; then
if [ "$1" = 'g' ]; then
echo "true"
exit 0
fi
# Copy to temp file, edit, then copy back
cp "$FILE" "$TMP_FILE"
sed -i "${START},${END}s/^/#/" "$TMP_FILE"
# Use sudo to copy back if needed, or direct copy if run as root
if [ "$(id -u)" -eq 0 ]; then
cp "$TMP_FILE" "$FILE"
echo "Commented out distraction removers in $FILE."
else
cp "$TMP_FILE" "$FILE"
echo "Commented out distraction removers in $FILE."
fi
rm -f "$TMP_FILE"
else
if [ "$1" = 'g' ]; then
echo "false"
exit 0
fi
# Uncomment the section
cp "$FILE" "$TMP_FILE"
sed -i "${START},${END}s/^#//" "$TMP_FILE"
if [ "$(id -u)" -eq 0 ]; then
cp "$TMP_FILE" "$FILE"
echo "Uncommented distraction removers in $FILE."
else
cp "$TMP_FILE" "$FILE"
echo "Uncommented distraction removers in $FILE."
fi
rm -f "$TMP_FILE"
fi
else
echo "Distraction removers section not found in $FILE."
exit 1
fi
systemd-resolve --flush-cache || notify-send "System Resolve" "Error flushing cache. Are you allowed to run the command?"

29
hypr/scripts/toggle_privacy.sh Executable file
View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Define the configuration file path
FILE="$HOME/.config/hypr/privacy.conf"
if [ ! -f "$FILE" ]; then
echo "File not found: $FILE"
exit 1
fi
# Toggle comments
# If the first line is not commented out, comment out the entire file
if ! grep -q '^#' "$FILE"; then
if [ $1 = 'g' ]; then
echo "true"
exit 0
fi
sed -i 's/^/#/' "$FILE"
echo "Commented out all lines in $FILE."
else
if [ $1 = 'g' ]; then
echo "false"
exit 0
fi
sed -i 's/^#//g' "$FILE"
echo "Uncommented all lines in $FILE."
fi