From e9896fe52bc55517dfff43e7de003085f01eaa33 Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 15 May 2025 08:35:28 +0200 Subject: [PATCH] added smart borders, and windowrules.conf --- .../hyprland/hypr-usr/windowrules.conf | 54 ++++++++++++ desktopenvs/hyprland/hypr/hyprland.conf | 84 +------------------ 2 files changed, 57 insertions(+), 81 deletions(-) create mode 100644 desktopenvs/hyprland/hypr-usr/windowrules.conf diff --git a/desktopenvs/hyprland/hypr-usr/windowrules.conf b/desktopenvs/hyprland/hypr-usr/windowrules.conf new file mode 100644 index 0000000..f8029ab --- /dev/null +++ b/desktopenvs/hyprland/hypr-usr/windowrules.conf @@ -0,0 +1,54 @@ +layerrule = ignorezero, nwg-dock +workspace = w[tv1]s[false], gapsout:0, gapsin:0 +workspace = f[1]s[false], gapsout:0, gapsin:0 +windowrule = bordersize 0, floating:0, onworkspace:w[tv1]s[false] +windowrule = rounding 0, floating:0, onworkspace:w[tv1]s[false] +windowrule = bordersize 0, floating:0, onworkspace:f[1]s[false] +windowrule = rounding 0, floating:0, onworkspace:f[1]s[false] +# Example windowrule v1 +#windowrule = float, ^(rofi)$ +# Example windowrule v2 +# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ +windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. +#windowrulev2 = noborder, class:wofi +windowrulev2 = float, class:wofi +windowrulev2 = pin, class:wofi +windowrulev2 = center, class:wofi +windowrulev2 = stayfocused, class:wofi +windowrulev2 = nomaxsize, class:wofi +windowrulev2 = minsize 5 5, class:wofi +windowrulev2 = noshadow, class:wofi +windowrulev2 = float, class:nm-connection-editor +windowrulev2 = pin, class:nm-connection-editor +windowrulev2 = center, class:nm-connection-editor +windowrulev2 = nomaxsize, class:nm-connection-editor +windowrulev2 = minsize 5 5, class:nm-connection-editor +windowrulev2 = noshadow, class:nm-connection-editor +windowrulev2 = opacity 1 0.8, class:kitty +windowrulev2 = opacity 0.8 0.3, initialTitle:Spotify +windowrulev2 = float, initialTitle:Spotify +windowrulev2 = noblur, initialTitle:Spotify +#windowrulev2 = float, class:Spaceengineers +#windowrulev2 = fullscreen, class:Spaceengineers +#windowrulev2 = stayfocused, class:Spaceengineers +#windowrule = float, class:steam_app_1133870 +windowrulev2 = tile, class:RimWorldLinux +windowrulev2 = float, class:Drill.+ +#windowrulev2 = fakefullscreen, title:Drill.+ +#windowrule = fakefullscreen, class:steam_app_1217060 +#windowrule = fakefullscreen, title:Gunfire Reborn +windowrule = float, class:steam_app_1217060 +windowrule = float, title:Gunfire Reborn +#windowrulev2 = fullscreen, class:steam_app_1217060 +#windowrulev2 = fullscreen, title:Gunfire Reborn +windowrulev2 = float, title:pico.+ +windowrulev2 = minsize 60 70, title:.+btop.+ +windowrulev2 = stayfocused, class:.+dmenu.+ +windowrulev2 = move 70% 10%, class:com.nextcloud.desktopclient.nextcloud +windowrulev2 = float, class:com.nextcloud.desktopclient.nextcloud +windowrulev2 = pin, class:com.nextcloud.desktopclient.nextcloud +windowrulev2 = size 28% 50%, class:com.nextcloud.desktopclient.nextcloud +windowrulev2 = move 70% 10%, tag:mixer +windowrulev2 = float, tag:mixer +windowrulev2 = pin, tag:mixer +windowrulev2 = size 28% 50%, tag:mixer diff --git a/desktopenvs/hyprland/hypr/hyprland.conf b/desktopenvs/hyprland/hypr/hyprland.conf index 2a4a52c..1d0eece 100644 --- a/desktopenvs/hyprland/hypr/hyprland.conf +++ b/desktopenvs/hyprland/hypr/hyprland.conf @@ -1,6 +1,7 @@ source = ~/.config/input.conf source = ~/.config/monitors.conf source = ~/.config/binds.conf +source = ~/.config/windowrules.conf # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { @@ -53,7 +54,7 @@ exec-once=bash ~/Dotfiles/desktopenvs/hyprland/scripts/ewwstart.sh #exec-once = waybar exec-once = dunst # exec-once = nm-applet & -exec-once = swww-daemon & swww img /ast/bg.jpg & sleep 1s & swww restore +#exec-once = swww-daemon & swww img /ast/bg.jpg & sleep 1s & swww restore ############################# @@ -182,85 +183,6 @@ misc { force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( } - -############################## -### WINDOWS AND WORKSPACES ### -############################## - -# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more -# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules - -# Example windowrule v1 -#windowrule = float, ^(rofi)$ - -# Example windowrule v2 -# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ - -windowrulev2 = suppressevent maximize, class:.* # You'll probably like this. - -#windowrulev2 = noborder, class:wofi -windowrulev2 = float, class:wofi -windowrulev2 = pin, class:wofi -windowrulev2 = center, class:wofi -windowrulev2 = stayfocused, class:wofi -windowrulev2 = nomaxsize, class:wofi -windowrulev2 = minsize 5 5, class:wofi -windowrulev2 = noshadow, class:wofi - -windowrulev2 = float, class:nm-connection-editor -windowrulev2 = pin, class:nm-connection-editor -windowrulev2 = center, class:nm-connection-editor -windowrulev2 = nomaxsize, class:nm-connection-editor -windowrulev2 = minsize 5 5, class:nm-connection-editor -windowrulev2 = noshadow, class:nm-connection-editor - -windowrulev2 = opacity 1 0.8, class:kitty -windowrulev2 = opacity 0.8 0.3, initialTitle:Spotify -windowrulev2 = float, initialTitle:Spotify -windowrulev2 = noblur, initialTitle:Spotify - -layerrule = ignorezero, nwg-dock - -#sefix -#windowrulev2 = float, class:Spaceengineers -#windowrulev2 = fullscreen, class:Spaceengineers -#windowrulev2 = stayfocused, class:Spaceengineers - -#windowrule = float, class:steam_app_1133870 - - -#rwfix -windowrulev2 = tile, class:RimWorldLinux - -windowrulev2 = float, class:Drill.+ -#windowrulev2 = fakefullscreen, title:Drill.+ - -#windowrule = fakefullscreen, class:steam_app_1217060 -#windowrule = fakefullscreen, title:Gunfire Reborn - -windowrule = float, class:steam_app_1217060 -windowrule = float, title:Gunfire Reborn - -#windowrulev2 = fullscreen, class:steam_app_1217060 -#windowrulev2 = fullscreen, title:Gunfire Reborn - -windowrulev2 = float, title:pico.+ - -windowrulev2 = minsize 60 70, title:.+btop.+ - -windowrulev2 = stayfocused, class:.+dmenu.+ - -windowrulev2 = move 70% 10%, class:com.nextcloud.desktopclient.nextcloud -windowrulev2 = float, class:com.nextcloud.desktopclient.nextcloud -windowrulev2 = pin, class:com.nextcloud.desktopclient.nextcloud -windowrulev2 = size 28% 50%, class:com.nextcloud.desktopclient.nextcloud - -windowrulev2 = move 70% 10%, tag:mixer -windowrulev2 = float, tag:mixer -windowrulev2 = pin, tag:mixer -windowrulev2 = size 28% 50%, tag:mixer -#title:pulsemixer - #exec-once = nextcloud #exec-once=bash swww img ~/Pictures/background.jpg && swww restore #exec-once=bash dunst @@ -269,4 +191,4 @@ windowrulev2 = size 28% 50%, tag:mixer exec-once=[workspace special:magic silent] kitty exec-once=hyprctl setcursor Nordzy-cursors-lefthand 50 exec-once = hyprpaper -c ~/.config/wallpaper.conf -exec-once=GTK_THEME=Default && nwg-dock-hyprland -mb 15 -r -p bottom -nolauncher +exec-once=GTK_THEME=Default && nwg-dock-hyprland -mb 15 -r -p bottom