Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows resizing on focus change #51

Open
shot-codes opened this issue Dec 10, 2023 · 7 comments
Open

Windows resizing on focus change #51

shot-codes opened this issue Dec 10, 2023 · 7 comments

Comments

@shot-codes
Copy link

When changing focus, the windows are resizing ever so slightly. This causes layout shifts that are especially apparent in terminal windows. In the screen recording below, note the window size in kitty flashing while focus is changing, as well as the layout shift taking place on the text in each terminal window.

recording.mp4
@outfoxxed
Copy link
Owner

I can't reproduce this. Please confirm it does not happen on base hyprland, then give more details about your setup such as hyprland.conf, monitor size, dpi and anything else relevant

@shot-codes
Copy link
Author

I'm not entirely sure what you mean by base hyprland, If I could ask you to clarify I would be more than happy to try. I am on latest hy3-git(r209.65a849b-3) and hyprland-git (0.33.1.r20.efdf07e2-1). It's occurring on both my laptop and external monitors (eDP-1: 2560x1600, DP-1: 2560x1440). hyprland.conf below, it is running on integrated graphics, not nvidia.

hyprland.conf

plugin = /usr/lib/libhy3.so

# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1, 2560x1600@240.00301, 0x0, 1.0
monitor=DP-1, preferred, -2560x-500, 1.0
# monitor=DP-1, preferred, 2560x-500, 1.0
monitor=HDMI-A-1, preferred@100, 2560x0, 1.0

# Execute your favorite apps at launch
exec-once = mako & /usr/lib/polkit-agent-helper-1 & hyprpaper & waybar & swayidle -w


# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf

# env = WLR_DRM_DEVICES,/dev/dri/card1
# env = WLR_DRM_DEVICES,/dev/dri/card0
env = XCURSOR_SIZE,24
env = LIBVA_DRIVER_NAME,nvidia
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
env = __VK_LAYER_NV_optimus,NVIDIA_only
env = NVD_BACKEND,direct

# Comment these lines to run on integrated graphics
# env = __NV_PRIME_RENDER_OFFLOAD,1
# env = WLR_NO_HARDWARE_CURSORS,1

blurls = waybar
blurls = launcher

# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
    kb_layout = us
    kb_variant =
    kb_model =
    kb_options =
    kb_rules =

    follow_mouse = 1

    repeat_rate = 50
    repeat_delay = 300

    touchpad {
        natural_scroll = yes
        scroll_factor = 4.0
        clickfinger_behavior = true
    }

    sensitivity = 0.5 # -1.0 - 1.0, 0 means no modification.
}

general {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

	border_part_of_window = 0
    gaps_in = 10
    gaps_out = 50
    border_size = 3
    # col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.active_border = rgba(ffa100ee) rgba(ff2a00ee) 45deg
    col.inactive_border = rgba(00000000)

    layout = dwindle
}

decoration {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more

    rounding = 4
    active_opacity = 0.9
    inactive_opacity = 0.7
    
    blur {
        enabled = true
        size = 12
        passes = 3
        xray = true
        noise = 0.05
        ignore_opacity = true
    }

    drop_shadow = yes
    shadow_range = 20
    shadow_render_power = 3
    col.shadow = rgba(00000090)
}

group {
    # col.border_active = rgba(33ccffee) rgba(00ff99ee) 45deg
    col.border_inactive = rgba(33ccff00)
    col.border_active = rgba(ffa100ee) rgba(ff2a00ee) 45deg
    groupbar {
      gradients = true
      font_size = 9
      scrolling = false
      col.active = rgba(ffa100ee)
      col.inactive = rgba(ff330000)
      }
  }

animations {
    enabled = yes

    # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

    bezier = myBezier, 0.05, 0.9, 0.1, 1.0

    animation = windows, 1, 5, myBezier
    animation = windowsOut, 1, 5, default, popin 80%
    animation = border, 1, 10, default
    animation = borderangle, 1, 8, default
    animation = fade, 1, 7, default
    animation = workspaces, 1, 2, myBezier
}

dwindle {
    # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
    pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
    preserve_split = yes # you probably want this
}

master {
    # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
    new_is_master = false
    allow_small_split = false
    orientation = left
    special_scale_factor = 0.5
}

gestures {
    # See https://wiki.hyprland.org/Configuring/Variables/ for more
    workspace_swipe = off
}

misc {
    disable_hyprland_logo = true
  }

# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#executing for more
device:epic-mouse-v1 {
    sensitivity = -0.5
}

# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more

windowrule = opacity 1.0 override 1.0 override,Gimp

# windowrulev2 = bordersize 0, focus: 0

# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER

# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Return, exec, kitty
bind = $mainMod, Q, killactive, 
# bind = $mainMod, M, exit, 
# bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating, 
# bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, S, togglesplit, # dwindle

# Move focus with mainMod + arrow keys
bind = $mainMod, H, hy3:movefocus, l
bind = $mainMod, L, hy3:movefocus, r
bind = $mainMod, K, hy3:movefocus, u
bind = $mainMod, J, hy3:movefocus, d

# Resize focused window
bind = $mainMod SHIFT, L, resizeactive, 40 0
bind = $mainMod SHIFT, H, resizeactive, -40 0
bind = $mainMod SHIFT, K, resizeactive, 0 -40
bind = $mainMod SHIFT, J, resizeactive, 0 40

# Move focused window
bind = $mainMod alt, H, movewindow, l
bind = $mainMod alt, L, movewindow, r
bind = $mainMod alt, K, movewindow, u
bind = $mainMod alt, J, movewindow, d

# Groups
bind = $mainMod ALT, G, togglegroup
bind = $mainMod CTRL, O, moveoutofgroup
bind = $mainMod CTRL, H, moveintogroup, l
bind = $mainMod CTRL, L, moveintogroup, r
bind = $mainMod CTRL, K, moveintogroup, u
bind = $mainMod CTRL, J, moveintogroup, d
bind = $mainMod CTRL, J, changegroupactive, f
bind = $mainMod CTRL, K, changegroupactive, b

# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10

# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10

# Scroll through existing workspaces with mainMod + scroll
# bind = $mainMod, mouse_down, workspace, e+1
# bind = $mainMod, mouse_up, workspace, e-1

# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

bind = $mainMod, SPACE, exec, tofi-drun --drun-launch=true
bind = $mainMod SHIFT, SPACE, exec, tofi-drun -c ~/.config/tofi/config-prime | xargs hyprctl dispatch exec prime-run 

# tux fn-key Binds
bind = , XF86MonBrightnessDown, exec, xbacklight -dec 10
bind = , XF86MonBrightnessUp, exec, xbacklight -inc 10
bind = , XF86AudioMute, exec, pamixer --toggle-mute
bind = , XF86AudioLowerVolume, exec, pamixer --decrease 10
bind = , XF86AudioRaiseVolume, exec, pamixer --increase 10

# Dynamic gaps
bind = $mainMod SHIFT, G, exec, /home/shot/.config/hypr/scripts/toggle_gaps/toggle_gaps.sh

# Screenshots
bind =  CTRL SHIFT, 4, exec, /home/shot/.config/hypr/scripts/screenshots/portion.sh
bind =  CTRL SHIFT, 2, exec, /home/shot/.config/hypr/scripts/screenshots/DP-1.sh
bind =  CTRL SHIFT, 1, exec, /home/shot/.config/hypr/scripts/screenshots/eDP-1.sh

# Light/Dark mode toggle
bind = $mainMod SHIFT, T, exec, /home/shot/.config/hypr/scripts/toggle-system-theme.sh

bind = $mainMod CTRL SHIFT, F, fakefullscreen
bind = CTRL SHIFT, F, fullscreen

@outfoxxed
Copy link
Owner

By base hyprland I mean hyprland with no plugins.

@shot-codes
Copy link
Author

Ah okay, the only plugin I am using is hy3 :)

@outfoxxed
Copy link
Owner

If it dosen't happen on base hyprland also check if #52 fixes it.

@shot-codes
Copy link
Author

shot-codes commented Dec 11, 2023

It's happening with border_part_of_window set to 1 and 0. I should note, this is occurring dependent on the amount of columns I have. Doesn't happen with 1, 2, or 4 columns, but seemingly with every other number of columns (tested up to 11

*edit
Just updated hyprland-git and hy3, behavior is still present

hy3-git r232.a562617-1
hyprland-git 0.33.1.r23.167f2ed3-1

@outfoxxed
Copy link
Owner

I've been able to reproduce this on my machine now but only unintentionally. Not sure what causes it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants