feat: Add opacity keybinds, replace hyprpaper with swww and update windowrules

This commit is contained in:
2025-06-16 17:53:21 +10:00
parent 33f640a9d3
commit f1d33ebd85
10 changed files with 105 additions and 16 deletions

View File

@@ -160,7 +160,7 @@ plugin {
columns = 3
gap_size = 5
bg_col = rgb(111111)
workspace_method = center current # [center/first] [workspace] e.g. first 1 or center m+1
workspace_method = first 1 # [center/first] [workspace] e.g. first 1 or center m+1
enable_gesture = true # laptop touchpad
gesture_fingers = 3 # 3 or 4

View File

@@ -79,10 +79,10 @@ image {
# monitor =
path = $HOME/.face
rounding = 25
size = 100
size = 200
# border_color = rgb(0, 0, 0)
border_size = 0
position = 200, 75
position = 150, 100
halign = left
valign = center
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

View File

@@ -90,6 +90,7 @@ bind = $mainMod CTRL SHIFT, S, exec, hyprshot -m window -m active
bind = $mainMod, TAB, hyprexpo:expo, toggle
bind = ALT, TAB, lastdesk
bind = CTRL ALT, TAB, togglespecialworkspace, terminal
# hyprlang noerror false
@@ -167,7 +168,36 @@ bind = , 0, exec, hyprctl notify 5 2000 0 "Restarting hyprpaper"
bind = , 0, exec, hyprpaper >> ~/.logs/hyprpaper.log
bind = , 0, submap, reset
bind = , I, invertactivewindow
bind = , I, submap, reset
bind = , V, exec, hyprctl dispatch vdeskreset
bind = , V, submap, reset
bind = , K, exec, hyprctl notify 0 2000 0 "Click To Kill!!!"
bind = , K, exec, hyprctl kill
bind = , K, submap, reset
bind = , O, exec, hyprctl notify 2 2000 0 "Set Opacity..."
bind = , O, submap, opacity
bind = , catchall, submap, reset
# Opacity submap
submap = opacity
bind = , 1, exec, ~/.config/hypr/scripts/opacity.sh 0.1
bind = , 2, exec, ~/.config/hypr/scripts/opacity.sh 0.2
bind = , 3, exec, ~/.config/hypr/scripts/opacity.sh 0.3
bind = , 4, exec, ~/.config/hypr/scripts/opacity.sh 0.4
bind = , 5, exec, ~/.config/hypr/scripts/opacity.sh 0.5
bind = , 6, exec, ~/.config/hypr/scripts/opacity.sh 0.6
bind = , 7, exec, ~/.config/hypr/scripts/opacity.sh 0.7
bind = , 8, exec, ~/.config/hypr/scripts/opacity.sh 0.8
bind = , 9, exec, ~/.config/hypr/scripts/opacity.sh 0.9
bind = , 0, exec, ~/.config/hypr/scripts/opacity.sh 1
bind = , C, exec, ~/.config/hypr/scripts/opacity.sh -1
bind = , catchall, submap, reset
submap = reset

View File

@@ -6,7 +6,8 @@ clipse -listen &
#/home/nathan/AppImages/Fingertip-0.0.4-beta2-linux-X64.AppImage & # This is broken using sane now
/home/nathan/AppImages/nextcloud_desktop_sync_client.appimage --background &
#/home/nathan/AppImages/nextcloud_desktop_sync_client.appimage --background &
nextcloud &
# discord --start-minimized & Using vesktop now
sleep 2
@@ -17,9 +18,3 @@ kdeconnect-indicator
# Misc
/home/nathan/scripts/mute.sh
# Fix dolphin file assosiations
XDG_MENU_PREFIX=arch- kbuildsycoca6
#sleep 10 && WallRizz -r -n -d ~/.config/backgrounds

38
.config/hypr/scripts/opacity.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
# Check if arg is passed
if [ -z "$1" ]; then
echo "Usage: $0 <opacity>"
echo "Example: $0 0.8"
exit 1
fi
# Validate opacity value (0.0 to 1.0 or -1)
if ! [[ "$1" =~ ^(-1|0(\.[0-9]+)?|1(\.0)?)$ ]]; then
echo "Error: Opacity must be a number between 0 and 1 or -1 for default."
exit 1
fi
# Get the opacity value
opacity="$1"
# Clear existing opacity settings
hyprctl dispatch tagwindow -- -opacity:0.1
hyprctl dispatch tagwindow -- -opacity:0.2
hyprctl dispatch tagwindow -- -opacity:0.3
hyprctl dispatch tagwindow -- -opacity:0.4
hyprctl dispatch tagwindow -- -opacity:0.5
hyprctl dispatch tagwindow -- -opacity:0.6
hyprctl dispatch tagwindow -- -opacity:0.7
hyprctl dispatch tagwindow -- -opacity:0.8
hyprctl dispatch tagwindow -- -opacity:0.9
hyprctl dispatch tagwindow -- -opacity:1
# Exit if opacity is -1 (default)
if [ "$opacity" == "-1" ]; then
hyprctl notify 1 1000 0 "Resetting opacity to default"
exit 0
fi
hyprctl notify 1 1000 0 "Setting opacity to $opacity"
hyprctl dispatch tagwindow opacity:"$opacity"

View File

@@ -1,9 +1,11 @@
exec-once = hyprpm reload -n
exec-once = hyprpanel > ~/.logs/hyprpanel.log
exec-once = hyprpaper > ~/.logs/hyprpaper.log
# exec-once = hyprpaper > ~/.logs/hyprpaper.log # Using swww now
exec-once = hypridle
exec-once = /usr/bin/kdeconnectd
exec-once = systemctl --user start hyprpolkitagent
exec-once = ~/.config/hypr/scripts/exec-once.sh > ~/.logs/exec-once.log 2>&1
# Random wallpaper
exec-once = WallRizz -r -n -d ~/.config/backgrounds

View File

@@ -23,7 +23,9 @@ windowrulev2 = float,class:(mpv)
windowrulev2 = float,class:^(brave-)(.*)(-.*)$
windowrulev2 = move onscreen cursor,class:^(brave-)(.*)(-.*)$
windowrulev2 = move onscreen cursor -50% 0,class:^(Nextcloud)$
windowrulev2 = move onscreen cursor -50% 0,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrulev2 = float,class:^(com.nextcloud.desktopclient.nextcloud)$
windowrulev2 = size 800px, 500px,class:^(com.nextcloud.desktopclient.nextcloud)$
# # Start windows
stickyrule = class:discord,5
@@ -41,6 +43,8 @@ windowrule = size 100% 100%, class:^(Gromit-mpx)$
# Floating broken windows
windowrule = opacity 1 override 1 override class:^(xdg-desktop-portal-gtk)$
windowrule = stayfocused, class:^(xdg-desktop-portal-gtk)$
windowrule = stayfocused, class:^(soffice)$
#windowrule = float 1, class:^(xdg-desktop-portal-gtk)$
@@ -61,3 +65,16 @@ windowrule = opacity 1 override 0.75 override class:^(Alacritty)$
workspace = special:terminal, on-created-empty: alacritty
# hyprlang noerror false
# Tags for opacity
windowrule = opacity 0.1 override 0.1 override, tag:opacity:0.1
windowrule = opacity 0.2 override 0.2 override, tag:opacity:0.2
windowrule = opacity 0.3 override 0.3 override, tag:opacity:0.3
windowrule = opacity 0.4 override 0.4 override, tag:opacity:0.4
windowrule = opacity 0.5 override 0.5 override, tag:opacity:0.5
windowrule = opacity 0.6 override 0.6 override, tag:opacity:0.6
windowrule = opacity 0.7 override 0.7 override, tag:opacity:0.7
windowrule = opacity 0.8 override 0.8 override, tag:opacity:0.8
windowrule = opacity 0.9 override 0.9 override, tag:opacity:0.9
windowrule = opacity 1 override 1 override, tag:opacity:1