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.86k stars 910 forks source link

Problems with discord #7435

Open koeqaife opened 3 months ago

koeqaife commented 3 months ago

Regression?

No

System Info and Version

System/Version info ```sh Hyprland, built from branch main at commit 01ff5fdf6a00a9231bd3b56400d8bcab378c4257 (cursor: make inactive_timeout setting a float (7268)). Date: Sat Aug 10 22:42:45 2024 Tag: v0.42.0-7-g01ff5fdf, commits: 5076 flags: (if any) System Information: System name: Linux Node name: latitude-3420 Release: 6.10.3-zen1-2-zen Version: #1 ZEN SMP PREEMPT_DYNAMIC Tue, 06 Aug 2024 07:47:21 +0000 GPU information: 00:02.0 VGA compatible controller [0300]: Intel Corporation TigerLake-LP GT2 [Iris Xe Graphics] [8086:9a49] (rev 01) (prog-if 00 [VGA controller]) 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: hyprwinwrap by Vaxry ver 1.0 ======Config-Start====== Config File: /home/mrdan/.config/hypr/hyprland.conf: Read Succeeded # Monitor (custom) source = ~/dotfiles/hypr/conf/custom/monitor.conf # Autostart source = ~/dotfiles/hypr/conf/autostart.conf # Environment source = ~/dotfiles/hypr/conf/environment.conf source = ~/dotfiles/hypr/conf/custom/environment.conf # Input (custom) source = ~/dotfiles/hypr/conf/custom/input.conf # Material colors source = ~/.cache/material/colors-hyprland.conf # Some files source = ~/dotfiles/hypr/conf/window.conf source = ~/dotfiles/hypr/conf/decoration.conf source = ~/dotfiles/hypr/conf/layout.conf source = ~/dotfiles/hypr/conf/misc.conf source = ~/dotfiles/hypr/conf/keybinding.conf source = ~/dotfiles/hypr/conf/windowrule.conf # Animations source = ~/dotfiles/hypr/conf/animation.conf # Apps source = ~/dotfiles/hypr/conf/apps.conf # Custom source = ~/dotfiles/hypr/conf/custom/general.conf source = ~/dotfiles/hypr/conf/custom/cursor.conf # xdg exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP Config File: /home/mrdan/dotfiles/hypr/conf/custom/monitor.conf: Read Succeeded monitor=HDMI-A-1, 1680x1050@60, -1680x0, 1 monitor=eDP-1, 1920x1080@60, 0x0, 1 Config File: /home/mrdan/dotfiles/hypr/conf/autostart.conf: Read Succeeded # Setup XDG exec-once = ~/dotfiles/hypr/scripts/xdg.sh # Start Polkit exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Using hypridle to start hyprlock exec-once = hypridle # START APPLETS exec-once = nm-applet --indicator exec-once = blueman-applet # Load cliphist history exec-once = wl-paste --watch cliphist store # Initialize Wallpaper Engine exec-once = ~/dotfiles/hypr/scripts/init-wallpaper-engine.sh # exec-once = easyeffects --gapplication-service # start AGS exec-once = ags # Udiskie exec-once = udiskie & # Update checker exec-once = ~/dotfiles/scripts/update_timer.sh Config File: /home/mrdan/dotfiles/hypr/conf/environment.conf: Read Succeeded env = XCURSOR_SIZE,24 env = XDG_CURRENT_DESKTOP,Hyprland env = XDG_SESSION_TYPE,wayland env = XDG_SESSION_DESKTOP,Hyprland env = QT_QPA_PLATFORM,wayland;xcb env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 env = QT_AUTO_SCREEN_SCALE_FACTOR,1 env = QT_QPA_PLATFORMTHEME,qt5ct env = MOZ_ENABLE_WAYLAND,1 env = GDK_SCALE,1 env = SDL_VIDEODRIVER,wayland env = ELECTRON_ENABLE_WAYLAND, 1 env = ELECTRON_OZONE_PLATFORM_HINT, wayland Config File: /home/mrdan/dotfiles/hypr/conf/custom/environment.conf: Read Succeeded # https://wiki.hyprland.org/Configuring/Environment-variables/ Config File: /home/mrdan/dotfiles/hypr/conf/custom/input.conf: Read Succeeded input { kb_layout = us, ru kb_variant = kb_model = kb_options = grp:alt_shift_toggle numlock_by_default = true follow_mouse = 1 touchpad { natural_scroll = false } sensitivity = 0 } Config File: /home/mrdan/.cache/material/colors-hyprland.conf: Read Succeeded $background = rgb(1a1110) $foreground = rgb(f1dfdb) $border_color_active = rgb(ffb4a7) $border_color_inactive = rgb(7f5a53) # Config File: /home/mrdan/dotfiles/hypr/conf/window.conf: Read Succeeded general { gaps_in = 5 gaps_out = 14 border_size = 0 col.active_border = $border_color_active col.inactive_border = $border_color_inactive layout = dwindle } Config File: /home/mrdan/dotfiles/hypr/conf/decoration.conf: Read Succeeded decoration { rounding = 20 blur { enabled = false } active_opacity = 1 inactive_opacity = 1 fullscreen_opacity = 1 drop_shadow = true shadow_range = 10 shadow_render_power = 3 col.shadow = 0x66000000 } Config File: /home/mrdan/dotfiles/hypr/conf/layout.conf: Read Succeeded dwindle { pseudotile = true preserve_split = true } master { smart_resizing = true new_on_active = true drop_at_cursor = true } gestures { workspace_swipe = false } Config File: /home/mrdan/dotfiles/hypr/conf/misc.conf: Read Succeeded misc { vfr = 1 vrr = 1 # layers_hog_mouse_focus = true animate_manual_resizes = false animate_mouse_windowdragging = false enable_swallow = false swallow_regex = (foot|kitty|allacritty|Alacritty) disable_splash_rendering = true disable_hyprland_logo = true force_default_wallpaper = 0 new_window_takes_over_fullscreen = 2 allow_session_lock_restore = true initial_workspace_tracking = false } gestures { workspace_swipe = true workspace_swipe_distance = 700 workspace_swipe_fingers = 4 workspace_swipe_cancel_ratio = 0.2 workspace_swipe_min_speed_to_force = 5 workspace_swipe_direction_lock = true workspace_swipe_direction_lock_threshold = 10 workspace_swipe_create_new = true } Config File: /home/mrdan/dotfiles/hypr/conf/keybinding.conf: Read Succeeded # SUPER KEY $mainMod = SUPER $scriptsDir = $HOME/dotfiles/hypr/scripts # Categories (for script) #! @actions: Actions #! @tools: Tools #! @apps: Applications #! @windows: Windows #! @workspaces: Workspaces #! @misc: Misc # Applications bind = $mainMod, RETURN, exec, $scriptsDir/apps.sh terminal #! @description: "Terminal"; @apps; bind = $mainMod, B, exec, $scriptsDir/apps.sh browser #! @description: "Browser"; @apps; bind = $mainMod, H, exec, pamac-manager #! @description: "Pamac-manager (if installed)"; @apps; bind = $mainMod SHIFT, M, exec, gnome-system-monitor #! @description: "Gnome system monitor"; @apps; bind = $mainMod, E, exec, $scriptsDir/apps.sh filemanager #! @description: "File Manager"; @apps; # Windows bind = $mainMod, Q, killactive #! @description: "Close window"; @windows; bind = $mainMod, F, fullscreen #! @description: "Open window in full screen mode"; @windows; bind = $mainMod, T, togglefloating #! @description: "Toggle floating"; @windows; bind = $mainMod SHIFT, T, exec, ~/dotfiles/hypr/scripts/toggleallfloat.sh #! @description: "Toggle all float windows"; @windows; bind = $mainMod, J, togglesplit #! @description: "Toggle split"; @windows; bind = $mainMod, left, movefocus, l bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:273, resizewindow bind = $mainMod SHIFT, right, resizeactive, 100 0 bind = $mainMod SHIFT, left, resizeactive, -100 0 bind = $mainMod SHIFT, up, resizeactive, 0 -100 bind = $mainMod SHIFT, down, resizeactive, 0 100 bind = $mainMod, G, togglegroup #! @description: "Toggle group"; @windows; # Actions bind = $mainMod SHIFT, A, exec, ~/dotfiles/hypr/scripts/toggle-animations.sh #! @description: "Toggle animations"; @actions; bind = $mainMod SHIFT, S, exec, ~/dotfiles/hypr/scripts/screenshot.sh #! @description: "Screenshot"; @actions; bind = $mainMod CTRL, S, exec, ~/dotfiles/hypr/scripts/screenshot.sh --window #! @description: "Window screenshot"; @actions; bind = $mainMod ALT, S, exec, ~/dotfiles/hypr/scripts/screenshot.sh --active #! @description: "Active screen screenshot"; @actions; bind = $mainMod SHIFT, W, exec, python -O ~/dotfiles/hypr/scripts/wallpaper.py -R -n #! @description: "Random wallpaper"; @actions; bind = $mainMod, L, exec, hyprlock #! @description: "Lock screen"; @actions; # Tools bind = $mainMod, Z, exec, ags -r "toggleMediaWindow()" #! @description: "Players"; @tools; bind = $mainMod, period, exec, ags -r 'OpenEmojiPicker()' #! @description: "Emoji Picker"; @tools; bind = $mainMod CTRL, C, exec, ags -t cliphist bind = $mainMod, V, exec, ags -t cliphist #! @description: "Clipboard history"; @tools; bind = $mainMod, SLASH, exec, ags -t cheatsheet #! @description: "List of keybindings"; @tools; bind = $mainMod CTRL, W, exec, ags -r "OpenSettings('wallpaper')" #! @description: "Change wallpaper"; @tools; bind = $mainMod, X, exec, ags -r "toggleAppsWindow()" #! @description: "App Launcher"; @tools; bind = SUPER, SUPER_L, exec, ags -t sidebar #! @description: "Sidebar"; @tools; # Workspaces bind = $mainMod, 1, workspace, 1 #! @description: "Switch workspace"; @workspaces; @replace "1" > "0-9"; 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 bind = $mainMod SHIFT, 1, movetoworkspace, 1 #! @description: "Move window to workspace"; @workspaces; @replace "1" > "0-9"; 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 bind = $mainMod, mouse_down, workspace, e+1 bind = $mainMod, mouse_up, workspace, e-1 bind = $mainMod CTRL, down, workspace, empty #! @description: "Switch to empty workspace"; @workspaces; # Fn keys bind = , XF86MonBrightnessUp, exec, brightnessctl -q s +10% bind = , XF86MonBrightnessDown, exec, brightnessctl -q s 10%- bind = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5% bind = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5% bind = , XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bind = , XF86AudioPlay, exec, playerctl play-pause bind = , XF86AudioPause, exec, playerctl pause bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioPrev, exec, playerctl previous bind = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle bind = , XF86Calculator, exec, qalculate-gtk bind = , XF86Lock, exec, hyprlock bind = , XF86Tools, exec, ags -r 'OpenSettings()' # misc bind = $mainMod, P, submap, passthru #! @description: "Passthrough $mainMod key to Virtual Machine"; @misc; submap = passthru bind = SUPER, Escape, submap, reset #! @description: "Cancel passthrough"; @misc; submap = reset Config File: /home/mrdan/dotfiles/hypr/conf/windowrule.conf: Read Succeeded # ######## Window rules ######## windowrule = tile,^(Microsoft-edge)$ windowrule = tile,^(Brave-browser)$ windowrule = tile,^(Chromium)$ windowrule = float,^(blueman-manager)$ windowrule = float, ^(blueberry.py)$ windowrule = float,^(nm-connection-editor)$ windowrule = float,^(qalculate-gtk)$ windowrule = float, ^(steam)$ windowrule = float, ^(com.github.Aylur.ags)$ windowrulev2 = stayfocused, title:^()$,class:^(steam)$ windowrulev2 = minsize 1 1, title:^()$,class:^(steam)$ windowrule = center 1,floating:1 windowrule=float,title:^(Volume Control)(.*)$ # Xwaylandvideobridge (if installed) windowrulev2 = opacity 0.0 override,class:^(xwaylandvideobridge)$ windowrulev2 = noanim,class:^(xwaylandvideobridge)$ windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$ windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$ windowrulev2 = noblur,class:^(xwaylandvideobridge)$ # Dialogs windowrule=float,title:^(Open File)(.*)$ windowrule=float,title:^(Select a File)(.*)$ windowrule=float,title:^(Choose wallpaper)(.*)$ windowrule=float,title:^(Open Folder)(.*)$ windowrule=float,title:^(Save As)(.*)$ windowrule=float,title:^(Library)(.*)$ windowrule=float,title:^(File Upload)(.*)$ # Tearing windowrule=immediate,.*\.exe windowrulev2=immediate,class:(steam_app)455 # ######## Layer rules ######## # layerrule = xray 1, .* # layerrule = noanim, .* layerrule = noanim, walker layerrule = noanim, selection layerrule = noanim, overview layerrule = noanim, anyrun layerrule = noanim, popup.* layerrule = noanim, hyprpicker layerrule = noanim, noanim layerrule = blur, gtk-layer-shell layerrule = ignorezero, gtk-layer-shell layerrule = blur, launcher layerrule = ignorealpha 0.5, launcher layerrule = blur, notifications layerrule = ignorealpha 0.69, notifications layerrule = noanim, notifications Config File: /home/mrdan/dotfiles/hypr/conf/animation.conf: Read Succeeded animations { enabled = true # Animation curves bezier = linear, 0, 0, 1, 1 bezier = md3_standard, 0.2, 0, 0, 1 bezier = md3_decel, 0.05, 0.7, 0.1, 1 bezier = md3_accel, 0.3, 0, 0.8, 0.15 bezier = overshot, 0.05, 0.9, 0.1, 1.1 bezier = crazyshot, 0.1, 1.5, 0.76, 0.92 bezier = hyprnostretch, 0.05, 0.9, 0.1, 1.0 bezier = menu_decel, 0.1, 1, 0, 1 bezier = menu_accel, 0.38, 0.04, 1, 0.07 bezier = easeInOutCirc, 0.85, 0, 0.15, 1 bezier = easeOutCirc, 0, 0.55, 0.45, 1 bezier = easeOutExpo, 0.16, 1, 0.3, 1 bezier = softAcDecel, 0.26, 0.26, 0.15, 1 bezier = md2, 0.4, 0, 0.2, 1 # use with .2s duration # Animation configs animation = windows, 1, 3, md3_decel, popin 60% animation = windowsIn, 1, 3, md3_decel, popin 60% animation = windowsOut, 1, 3, md3_accel, popin 60% animation = border, 1, 10, default animation = fade, 1, 3, md3_decel animation = layers, 1, 2, md3_decel, slide animation = layersIn, 1, 3, menu_decel, slide animation = layersOut, 1, 1.6, menu_accel animation = fadeLayersIn, 1, 2, menu_decel animation = fadeLayersOut, 1, 4.5, menu_accel animation = workspaces, 1, 7, menu_decel, slide # animation = workspaces, 1, 2.5, softAcDecel, slide # animation = workspaces, 1, 7, menu_decel, slidefade 15% # animation = specialWorkspace, 1, 3, md3_decel, slidefadevert 15% animation = specialWorkspace, 1, 3, md3_decel, slidevert } Config File: /home/mrdan/dotfiles/hypr/conf/apps.conf: Read Succeeded env = BROWSER, firefox #! -@browser env = TERMINAL, alacritty #! -@terminal env = EDITOR, code #! -@editor env = FILEMANAGER, nautilus #! -@filemanager env = XDG_UTILS_TERMINAL, alacritty #! -@terminal env = XDG_UTILS_BROWSER, firefox #! -@browser env = XDG_UTILS_FILEMANAGER, nautilus #! -@filemanager Config File: /home/mrdan/dotfiles/hypr/conf/custom/general.conf: Read Succeeded input { kb_layout = us, ru } windowrule = noblur, kando windowrule = size 100% 100%, kando windowrule = noborder, kando windowrule = noanim, kando windowrule = float, kando windowrule = pin, kando bind = $mainMod, A, global, kando:1 exec-once = hyprpm reload -n Config File: /home/mrdan/dotfiles/hypr/conf/custom/cursor.conf: Read Succeeded exec-once = hyprctl setcursor Bibata-Modern-Ice 24 ======Config-End======== ```

Description

When the discord window is in another workspace sometimes notifications don't come and voice may not work, everything works if close discord and it will be in the tray

How to reproduce

put the discord window in another workspace and wait

Crash reports, logs, images, videos

No response

solomonton commented 3 months ago

what kind of discord are you using?

koeqaife commented 3 months ago

Vencord

RyanDwyer commented 3 months ago

This is happening because Discord is an XWayland client and Hyprland doesn't appear to be sending keyboard leave events to XWayland clients. Discord thinks it still has focus so it doesn't raise any notifications. You can see this because the blinking cursor in Discord remains even when the window doesn't have focus.

A workaround is to make Discord use Wayland by starting it with --enable-features=UseOzonePlatform --ozone-platform=wayland.

The same thing occurs with Slack, and the workaround is the same for that too.

vaxerski commented 3 months ago

if you know why that happens feel free to make a MR, I thought we do, but I am pretty sure the issue has existed for as long as hyprland was around.

koeqaife commented 3 months ago

I noticed that when the program in another workspace drops fps to 1 I think this may be the problem, when the discord window on the other screen everything is ok

koeqaife commented 3 months ago

sometimes I get kicked out of voice and have to go back to workspace with discord

s0m3th1ng-r4nd0m commented 3 months ago

i don't know if it's related but I'm using Vesktop client and I've set it to open up with Super + D and from Vesktop settings I've set it up to close it to tray when i Alt + F4, my problem is that after it goes back to tray and when i open up Vesktop again with Super + D, the autofocus doesn't work and i have to move my mouse to focus on it again which is kinda frustrating because my hands have to leave the keyboard. All my other apps get focused correctly depending on the position of the mouse when i open them. I think closing it to tray is causing the issue. I'm on Hyprland 0.42.0

Memoframe commented 3 months ago

A workaround is to make Discord use Wayland by starting it with --enable-features=UseOzonePlatform --ozone-platform=wayland.

The same thing occurs with Slack, and the workaround is the same for that too.

Offtop @RyanDwyer How to use pass or sendshortcut to Discord when it's in Wayland mode?

Ghosthree3 commented 2 months ago

https://github.com/hyprwm/Hyprland/issues/7435#issuecomment-2301468786

This is happening because Discord is an XWayland client and Hyprland doesn't appear to be sending keyboard leave events to XWayland clients. Discord thinks it still has focus so it doesn't raise any notifications. You can see this because the blinking cursor in Discord remains even when the window doesn't have focus.

A workaround is to make Discord use Wayland by starting it with --enable-features=UseOzonePlatform --ozone-platform=wayland.

The same thing occurs with Slack, and the workaround is the same for that too.

It's the same issue I reported here #6468, and it's not just the keyboard. Try hovering on a link/object in discord then moving focus to a Wayland window with the keyboard.

This bug unfortunately means that if Discord is your only XWayland application getting desktop notifications is impossible, because it is always focused. The inability to get Discord and/or idle game notifications is a daily problem for me. I try to remember to reset focus to an XWayland window without alerts (I use Brave for it) as often as possible.