hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.97k stars 913 forks source link

Autofocus not working #8627

Open GHOST-mHBr opened 3 days ago

GHOST-mHBr commented 3 days ago

Already reported ? *

Regression?

No

System Info and Version

System/Version info ```sh Hyprland 0.45.2 built from branch at commit 12f9a0d0b93f691d4d9923716557154d74777b0a ([gha] Nix: update inputs). Date: Tue Nov 19 21:47:18 2024 Tag: v0.45.2, commits: 5451 built against aquamarine 0.5.0 flags set: debug System Information: System name: Linux Node name: Ghost Release: 6.11.5-arch1-1 Version: #1 SMP PREEMPT_DYNAMIC Tue, 22 Oct 2024 18:31:38 +0000 GPU information: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM107GLM [Quadro M2000M] [10de:13b0] (rev a2) (prog-if 00 [VGA controller]) NVRM version: NVIDIA UNIX x86_64 Kernel Module 560.35.03 Fri Aug 16 21:39:15 UTC 2024 os-release: NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch BUILD_ID=rolling ANSI_COLOR="38;2;23;147;209" HOME_URL="https://archlinux.org/" DOCUMENTATION_URL="https://wiki.archlinux.org/" SUPPORT_URL="https://bbs.archlinux.org/" BUG_REPORT_URL="https://gitlab.archlinux.org/groups/archlinux/-/issues" PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" LOGO=archlinux-logo plugins: ======Config-Start====== Config File: /home/arch/.config/hypr/hyprland.conf: Read Succeeded # Setup monitors # See https://wiki.hyprland.org/Configuring/Monitors/ monitor=,preferred,auto,1 # Dual monitor example on G15 Strix # eDP-1 is the built in monitor while DP-1 is external # Both monitors here are at 1440 and 165Hz # DP-1 is on the left and eDP-1 is on the right #monitor=DP-1,2560x1440@165,0x0,1 #monitor=eDP-1,2560x1440@165,2560x0,1 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # env = XDG_CURRENT_DESKTOP,Hyprland # env = XDG_SESSION_DESKTOP,Hyprland # env = XDG_SESSION_TYPE,wayland # env = LIBVA_DRIVER_NAME,nvidia # env = GBM_BACKEND,nvidia-drm # env = __GLX_VENDOR_LIBRARY_NAME,nvidia # env = WLR_DRM_NO_ATOMIC,1 # libva-nvidia-driver # env = NVD_BACKEND,direct # env = WLR_NO_HARDWARE_CURSORS,1 ---> Deprecated env = LC_CTYPE, en_US.UTF-8 # Zed env = QT_QPA_PLATFORM,wayland;xcb env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORMTHEME,qt5ct env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = HYPRLAND_LOG_WLR,1 env = HYPRLAND_NO_SD_NOTIFY,1 env = ELECTRON_OZONE_PLATFORM_HINT,auto env = TERM,xterm-kitty # Execute your favorite apps at launch exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = ~/.config/hypr/xdg-portal-hyprland exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once = hypridle exec-once = mpDris2 exec-once = bluetoothctl power off exec-once = waybar exec-once = systemctl --user start hyprpolkitagent exec-once = clipcatd exec = swaybg -m fit -i ~/wallpapers/nord-background/ign_colorful.png # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { kb_layout = us,ir kb_options = grp:alt_shift_toggle kb_variant = kb_model = kb_options = kb_rules = follow_mouse = 0 touchpad { natural_scroll = yes scroll_factor = 2.0 } repeat_rate = 40 repeat_delay = 320 sensitivity = 0.4 # -1.0 - 1.0, 0 means no modification. numlock_by_default = true mouse_refocus = false } cursor { no_hardware_cursors = true } general { # See https://wiki.hyprland.org/Configuring/Variables/ for more gaps_in = 5 gaps_out = 10 border_size = 1 #col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg col.active_border=rgba(cdd6d18A) col.inactive_border = rgba(cdd6d100) layout = dwindle } misc { disable_hyprland_logo = yes } decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more rounding = 7 blur { enabled = true size = 10 passes = 1 ignore_opacity=true } # drop_shadow = yes # shadow_range = 4 # shadow_render_power = 3 dim_inactive=false # col.shadow = rgba(1a1a1aee) } animations { enabled = true # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more bezier = myBezier, 0.05, 0.9, 0.1, 1.05 animation = windows, 1, 7, myBezier animation = windowsOut, 1, 7, default, popin 80% animation = border, 1, 10, default animation = fade, 1, 7, default animation = workspaces, 1, 6, default } 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_on_active = true new_on_top = true inherit_fullscreen = false } gestures { # See https://wiki.hyprland.org/Configuring/Variables/ for more workspace_swipe = true } binds{ focus_preferred_method=0 } xwayland { force_zero_scaling=true } render{ explicit_sync = 0 } # Example windowrule v1 # windowrule = float,^(thunar)$ # Example windowrule v2 # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # rules below would make the specific app transparent windowrule = float,^(.*)$ windowrulev2 = tile,title:^(Visual Studio Code)$ windowrulev2 = opacity 0.9 0.7,title:^(Visual Studio Code)$ windowrulev2 = tile,title:^(Qt Creator)$ windowrulev2 = opacity 0.9 0.7,title:^(Qt Creator)$ windowrulev2 = opacity 0.9 0.7,title:^(Hiddify)$ windowrulev2 = tile,class:^(dev\.zed\.Zed)$ windowrulev2 = opacity 0.9 0.7,class:^(dev\.zed\.Zed)$ windowrulev2 = opaque,title:^(btop)$ windowrulev2 = opaque,title:^(helix)(.*)$ # windowrule = center,^(.*)$ windowrule = tile, title:^(.*)(Mozilla Firefox)$ windowrulev2 = opacity 0.9 0.7,class:^(kitty)$ windowrulev2 = size 900 700,class:^(kitty)$ windowrulev2 = size 800 700,class:^(nemo)$ windowrulev2 = size 1000 800,title:^(Telegram)$ windowrulev2 = size 800 600,title:NekoRay layerrule = blur, notifications layerrule = ignorealpha 0.5, notifications # See https://wiki.hyprland.org/Configuring/Keywords/ for more $mainMod = SUPER # Change keyboard layout # bind = $mainMod, SPACE, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next bindl = $mainMod, SPACE, exec, hyprctl switchxkblayout at-translated-set-2-keyboard next # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more bind = $mainMod, 36, exec, kitty #open the terminal bind = $mainMod, Q, killactive, # close the active window bind = $mainMod, F, fullscreen, # close the active window bind = $mainMod, M, exec, wlogout --protocol layer-shell # show the logout window bind = $mainMod, b, exec, firefox # bind = $mainMod SHIFT, M, exit, # Exit Hyprland all together no (force quit Hyprland) bind = $mainMod, E, exec, nemo # Show the graphical file browser bind = $mainMod, V, togglefloating, # Allow a window to float bind = $mainMod, D, exec, tofi-drun --drun-launch=true # Show the graphicall app launcher bind = $mainMod, P, pin # dwindle bind = $mainMod, J, togglesplit, # dwindle bind = $mainMod, S, exec, grim -g "$(slurp)" - | swappy -f - # take a screenshot bind = $mainMod, T, exec, telegram-desktop bind = $mainMod, tab, exec, $HOME/Scripts/window-changer.sh # bind = $mainMod,tab,layoutmsg,rollnext # ROG G15 Strix (2021) Specific binds # bind = ,156, exec, rog-control-center # ASUS Armory crate key # bind = ,211, exec, asusctl profile -n; pkill -SIGRTMIN+8 waybar # Fan Profile key switch between power profiles bind = ,121, exec, pamixer -t # Speaker Mute FN+F1 bind = ,122, exec, pamixer -d 5 # Volume lower key bind = ,123, exec, pamixer -i 5 # Volume Higher key bind = ,256, exec, pamixer --default-source -t # Mic mute key bind = ,232, exec, brightnessctl set 5%- # Screen brightness down FN+F7 bind = ,233, exec, brightnessctl set 5%+ # Screen brightness up FN+F8 bind = ,237, exec, brightnessctl -d asus::kbd_backlight set 33%- # Keyboard brightness down FN+F2 bind = ,238, exec, brightnessctl -d asus::kbd_backlight set 33%+ # Keyboard brightnes up FN+F3 # bind = ,210, exec, asusctl led-mode -n # Switch keyboard RGB profile FN+F4 # Move focus with mainMod + arrow keys bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d # 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 #Music player controls bind = $mainMod SHIFT, N, exec, playerctl next bind = $mainMod SHIFT, B, exec, playerctl previous bind = $mainMod SHIFT, P, exec, playerctl play-pause # 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 ======Config-End======== ```

Description

Auto-focus is not working for me. Let's say I have three windows opened in the order A(tiling) ,B(floating), C(floating). When I close C, the focus changes to A, I expect it to change to B since it was created after A. I have tried disabling mouse_refocus and focus_preferred_method, but neither is working.

How to reproduce

Create three windows. first one tiling and then two floating. close the last floating window, the focus changes to the tiling one.

Crash reports, logs, images, videos

No response

vaxerski commented 1 day ago

iirc when closed the focus will fall back to the window under the closed one

GHOST-mHBr commented 18 hours ago

At least for me looks like it's not how it works. Take a look at this screen recording please

https://github.com/user-attachments/assets/c78da8a6-2afa-4f03-afcf-933f2be0edd5