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

Session: only dispatch udev in dispatchPendingEventsAsync if on linux #86

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

vaxerski
Copy link
Member

@vaxerski vaxerski commented Sep 23, 2024

Dispatches libinput events when onReady is called. Prevents unread events on start

fixes hyprwm/Hyprland#7855 hyprwm/Hyprland#7391

@vaxerski
Copy link
Member Author

hyprland without hyprwm/Hyprland@34e4a60 will crash with this change

@vaxerski
Copy link
Member Author

@jbeich this shouldn't block on BSD, can we get a short 👍 or 👎? IIRC it was only udev.

@alba4k
Copy link

alba4k commented Sep 23, 2024

Doesn't seem to work

hyprctl systeminfo -c
Hyprland, built from branch main at commit 508bde1f61b1264c9621b937657088f09f318ce0  (core: add HYPRLAND_CONFIG environment variable (7851)).
Date: Mon Sep 23 17:40:19 2024
Tag: v0.43.0-52-g508bde1f, commits: 5248
built against aquamarine 0.4.1


flags: (if any)


System Information:
System name: Linux
Node name: dell-xps
Release: 6.6.52-1-lts
Version: #1 SMP PREEMPT_DYNAMIC Wed, 18 Sep 2024 19:02:04 +0000


GPU information: 
00:02.0 VGA compatible controller [0300]: Intel Corporation Alder Lake-P GT2 [Iris Xe Graphics] [8086:46a6] (rev 0c) (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:

======Config-Start======


Config File: /home/alba4k/.config/hypr/hyprland.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# Dependencies:
#
#  System Tray:
#   - blueman (bluetooth manager)
#   - nm-applet (network manager)
#   - kdeconnect (phone - computer interface)
#
#  Stuff I use:
#   - custom scripts and sounds
#   - i3-battery-popup (battery warning)
#   - waybar (bar)
#   - dunst (notifications)
#   - rofi (Launcher)
#   - libinput-gestures (trackpad gestures)
#   - hyprpaper (background)
#   - lxsession (policy kit)
#   - wl-clip-persist (persistent clipboard)
#   - wlogout (logout menu)
#   - cliphist (clipboard manager)
#   - flameshot (screenshots)
#   - grimblast (screenshots but working)
#   - hypridle (session management)
#   - hyprlock (lockscreen)
#   - xwaylandvideobridge (currently disabled, screensharing) 
#
#  Keybinds:
#   - pactl (volume control)
#   - light (brightness)
#   - playerctl (media controls)
#   - emote (emoji selector)
#   - systemd (poweroff, suspend, ...)

# ##############################################
# ###                 COLORS                 ###
# ##############################################

source = ~/.config/hypr/include/colors.conf

# ##############################################
# ###                 PLUGINS                ###
# ##############################################

source = ~/.config/hypr/hyprland/plugins.conf
# ##############################################
# ###               BASIC SETUP              ###
# ##############################################

source = ~/.config/hypr/hyprland/basic.conf

# ##############################################
# ###                AUTOSTART               ###
# ##############################################

source = ~/.config/hypr/hyprland/autostart.conf

# ##############################################
# ###              ENVIRONNMENT              ###
# ##############################################

source = ~/.config/hypr/hyprland/environnment.conf

# ##############################################
# ###                  SETUP                 ###
# ##############################################

source = ~/.config/hypr/hyprland/setup.conf

# ##############################################
# ###               ANIMATIONS               ###
# ##############################################

source = ~/.config/hypr/hyprland/animations.conf

# ##############################################
# ###     WINDOW AND WORKSPACE MANAGMENT     ###
# ##############################################

source = ~/.config/hypr/hyprland/management.conf

# ##############################################
# ###                KEYBINDS                ###
# ##############################################

source = ~/.config/hypr/hyprland/keybinds.conf

# ##############################################
# ###               WINDOWRULES              ###
# ##############################################

source = ~/.config/hypr/hyprland/windowrules.conf



Config File: /home/alba4k/.config/hypr/include/colors.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                 COLORS                 ###
# ##############################################

# Only used for accents (light purple)
$C_PRIMARY = rgb(8957b0)
$C_PRIMARY_DARK = rgb(7949d8)

# Inactive borders
$C_INACTIVE = rgba(6e73b090)

# Background objects
$C_BACKGROUND = rgb(1e1e2e)

# Text
$C_FOREGROUND = rgb(cba6f7)
$C_PALE_FOREGROUND = rgb(5b6997)


Config File: /home/alba4k/.config/hypr/hyprland/plugins.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                PLUGINS                 ###
# ##############################################

# Loading them may help lol
exec-once = hyprpm -n reload

# Hyprexpo
# https://github.com/hyprwm/hyprland-plugins/tree/main/hyprexpo
# Hyprspace
# https://github.com/KZDKM/Hyprspace

# Open Hyprexpo using a keybing
# hyprlang noerror true
bind = SUPER, W, hyprexpo:expo, toggle
# bind = SUPER, W, overview:toggle
# hyprlang noerror false

plugin {
    hyprexpo {
        columns = 3
        gap_size = 0
        bg_col = $C_BACKGROUND
        workspace_method = first 1

        enable_gesture = true
        gesture_distance = 100
        gesture_positive = false
    }
    overview {
        gapsIn = 5
        gapsOut = 10
    }
}



Config File: /home/alba4k/.config/hypr/hyprland/basic.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###              BASIC SETUP               ###
# ##############################################

input {
    kb_layout = ch
    kb_variant = de
    # kb_options = caps:escape

    numlock_by_default = true

    follow_mouse = true

    natural_scroll = false

    sensitivity = -0.3

    touchpad {
        disable_while_typing = false
        natural_scroll = true
    }
}

xwayland {
    force_zero_scaling = true
}

debug {
    # overlay = true
    disable_logs = false
}



Config File: /home/alba4k/.config/hypr/hyprland/autostart.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               AUTOSTART                ###
# ##############################################

# Login manager
exec-once = hyprlock -c ~/.config/hypr/hyprlock/hyprlogin.conf || hyprctl dispatch exit

# Bar
# exec = killall -9 waybar; waybar
# Can also be started by systemd (systemctl)
exec = pidof waybar || waybar && pkill -SIGUSR2 waybar

# Just in case I might get them to autoconnect
exec = bluetoothctl connect 18:26:54:3C:0F:AD # Galaxy S23
exec = bluetoothctl connect 80:9F:F5:BF:C4:80 # Galaxy Buds Pro

# Keyboard backlight
exec = sudo /usr/bin/g413-led -a 770000

# Background (different config, ~/.config/hypr/hyprpaper.conf)
exec-once = hyprpaper

# Starting dunst (different config, can be started automatically by d-bus)
 exec-once = dunst

# PolKit Agent
exec-once = lxpolkit

# Cliphist
# exec-once = wl-paste --type text --watch cliphist store
exec-once = wl-paste --watch cliphist store

# Daemons
exec-once = thunar --daemon
exec = flameshot
exec-once = while true; do kdeconnect-indicator; done
exec-once = ~/.config/hypr/scripts/volbright.sh --brightness --keyboard --volume
exec-once = ~/.config/hypr/scripts/ac_detect.sh
exec-once = ~/.config/hypr/scripts/capslock.sh
exec-once = i3-battery-popup -n -D -L 20 -m 'Battery is getting low!' -t 3m -s ~/.config/hypr/assets/click.ogg -v 50

# System Tray stuff used in waybar
exec-once = nm-applet
# exec-once = blueman-applet
exec-once = sleep 1 && bitwarden-desktop

# Clipboard manager
exec-once = wl-clip-persist -c both

# Manage logind events
# Can also be started by systemd (systemctl)
exec = killall hypridle; hypridle --quiet

# XDG Desktop Portal workarounds (QT Style, Restart)
exec-once = systemctl --user import-environment QT_QPA_PLATFORMTHEME
#exec-once = sleep 2 && ~/.config/hypr/scripts/xdg-desktop-portal.sh

# XWayland Video Bridge
# While this may be useful, I keep it disabled because it keeps a window in the 1st workspace.
#exec-once = xwaylandvideobridge


Config File: /home/alba4k/.config/hypr/hyprland/environnment.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###              ENVIRONNMENT              ###
# ##############################################

# https://wiki.hyprland.org/Configuring/Environment-variables

# XDG session info
env = XDG_CURRENT_DESKTOP, Hyprland
env = XDG_DESKTOP_SESSION, Hyprland
env = XDG_SESSION_TYPE, wayland
env = XDG_SESSION_DESKTOP, Hyprland

# Explicitly set some dirs, just in case
env = XDG_CONFIG_HOME, /home/alba4k/.config
env = XDG_CACHE_HOME, /home/alba4k/.cache
env = XDG_DATA_HOME, /home/alba4k/.local/share

# Qt
env = QT_QPA_PLATFORMTHEME, qt5ct
env = QT_QPA_PLATFORM, wayland;xcb
env = QT_WAYLAND_DISABLE_WINDOWDECORATION, 1

# Other platforms
env = GDK_BACKEND, wayland,x11
env = SDL_VIDEODRIVER, wayland,x11,windows
env = CLUTTER_BACKEND, wayland
# env = GTK_THEME, Catppuccin-purple
env = ELECTRON_OZONE_PLATFORM_HINT, wayland

# Random stuff
env = MAKEFLAGS, -j14
env = MANPAGER, bat -pl man
env = SSH_AUTH_SOCK, /run/user/1000/ssh-agent.socket



Config File: /home/alba4k/.config/hypr/hyprland/setup.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                 SETUP                  ###
# ##############################################

# Monitor configuration (The random numbers are for 1920x1080@72, and my monitors appear as DP-[6,9] after hibernating instead of DP-[5,7])
#monitor = eDP-1, modeline 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync, 0x0, 1
#monitor = DP-5, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-6, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 0x0, 1
#monitor = DP-7, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
#monitor = DP-9, modeline 210.25 1920 2056 2256 2592 1080 1083 1088 1128 -hsync +vsync, 1920x0, 1
monitor = DP-5, 1920x1080@72, 0x0, 1
monitor = DP-6, 1920x1080@72, 0x0, 1
monitor = DP-7, 1920x1080@72, 1920x0, 1
monitor = DP-9, 1920x1080@72, 1920x0, 1
exec = hyprctl monitors all | grep "DP-5\|DP-6" && hyprctl keyword monitor "eDP-1, disabled" || hyprctl keyword monitor "eDP-1, 1920x1200, 0x0, 1"
monitor = , preferred, auto, 1

bind = SUPERCTRL, X, exec, hyprctl keyword monitor eDP-1,1920x1200@60,0x0,1
#exec-once = kanshi
#exec = ~/.screenlayout/W-auto.sh

# Hyprland settings
general {
    gaps_in = 5
    gaps_out = 10
    border_size = 5
    col.active_border = $C_PRIMARY $C_PRIMARY_DARK 0deg
    col.inactive_border = $C_INACTIVE

    resize_on_border = true

    allow_tearing = false # Ty Intel, https://wiki.hyprland.org/Configuring/Tearing/#apps-that-should-tear-freeze
}

gestures {
    workspace_swipe = true
    workspace_swipe_fingers = 3

    workspace_swipe_create_new = true
    workspace_swipe_forever = true
    workspace_swipe_direction_lock = false
}
exec-once = libinput-gestures

# Window decorations
decoration {
    rounding = 12

    active_opacity = 1
    inactive_opacity = 0.8
    fullscreen_opacity = 1
    
    blur {
        enabled = true
        size = 5
        passes = 3
        ignore_opacity = true
    }

    drop_shadow = true
}

misc {
    disable_hyprland_logo = true
    disable_splash_rendering = false

    disable_autoreload = false # hyprctl reload to manually reload

    animate_manual_resizes = true
    animate_mouse_windowdragging = true

    mouse_move_enables_dpms = true
    key_press_enables_dpms = true

    initial_workspace_tracking = 0

    enable_swallow = true
    swallow_regex = kitty

    vfr = true
    vrr = true

    allow_session_lock_restore = true
}

# Session management
bind = SUPERSHIFT, Q, exit,
bind = SUPERSHIFT, R, exec, hyprctl reload && hyprctl notify 1 2000 0 "fontsize:17 Configurazione ricaricata!"
bind = SUPERCTRL, L, exec, loginctl lock-session
bind = SUPERCTRL, K, exec, loginctl lock-session && systemctl suspend

# I have a custom macro for it on my laptop so why not use it :)
# https://bit.ly/3NMpzlK (Fn+F9)
bindl = SUPER, P, exec, systemctl suspend-then-hibernate


Config File: /home/alba4k/.config/hypr/hyprland/animations.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               ANIMATIONS               ###
# ##############################################

animations {
    enabled = true
}

# Rotating border gradient
bezier = linear, 0.0, 0.0, 1.0, 1.0
animation = borderangle, 1, 100, linear, loop

# Default animations
animation = windows, 1, 7, default
animation = workspaces, 1, 6, default, slide
#animation = workspaces, 1, 6, default, slidevert

# Windowrules
windowrule = animation slide, Lxpolkit
windowrulev2 = animation slide, class:(flameshot), title:(flameshot)
windowrulev2 = animation slide, class:(org.telegram.desktop), title:(Visualizzatore multimediale)

# Layerrules
layerrule = animation slide, notifications
layerrule = animation popin, rofi
layerrule = animation slide, waybar
layerrule = animation slide, logout_dialog



Config File: /home/alba4k/.config/hypr/hyprland/management.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###     WINDOW AND WORKSPACE MANAGMENT     ###
# ##############################################

# Workspace-related keybinds
binds {
    workspace_back_and_forth = true
    allow_workspace_cycles = true
    movefocus_cycles_fullscreen = false
}

bind = SUPER, Q, killactive,

bind = SUPER, F, fullscreen, 0
bind = SUPERSHIFT, F, togglefloating,

# Moving windows with the mouse
bindm = SUPER, mouse:272, movewindow
bindm = SUPER, mouse:273, resizewindow

# Moving window focus
bind = SUPER, left, movefocus, l
bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u
bind = SUPER, down, movefocus, d
bind = SUPER, H, movefocus, l
bind = SUPER, L, movefocus, r
bind = SUPER, K, movefocus, 
bind = SUPER, J, movefocus, d

# Moving windows
bind = SUPERSHIFT, left, movewindow, l
bind = SUPERSHIFT, right, movewindow, r
bind = SUPERSHIFT, up, movewindow, u
bind = SUPERSHIFT, down, movewindow, d
bind = SUPERSHIFT, H, movewindow, l
bind = SUPERSHIFT, L, movewindow, r
bind = SUPERSHIFT, K, movewindow, u
bind = SUPERSHIFT, J, movewindow, d

# Resizing windows
bind = SUPERALT, H, resizeactive, -50 0
bind = SUPERALT, L, resizeactive, 50 0
bind = SUPERALT, J, resizeactive, 0 50
bind = SUPERALT, K, resizeactive, 0 -50
bind = SUPERALT, left, resizeactive, -50 0
bind = SUPERALT, right, resizeactive, 50 0
bind = SUPERALT, down, resizeactive, 0 50
bind = SUPERALT, up, resizeactive, 0 -50

bind = SUPER, R, exec, ~/.config/hypr/scripts/resize.sh

# Switching workspaces
bind = SUPER, 1, workspace, 1
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3
bind = SUPER, 4, workspace, 4
bind = SUPER, 5, workspace, 5
bind = SUPER, 6, workspace, 6
bind = SUPER, 7, workspace, 7
bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
# bind = SUPER, 0, workspace, 10

# Moving window to workspace
bind = SUPERSHIFT, 1, movetoworkspace, 1
bind = SUPERSHIFT, 2, movetoworkspace, 2
bind = SUPERSHIFT, 3, movetoworkspace, 3
bind = SUPERSHIFT, 4, movetoworkspace, 4
bind = SUPERSHIFT, 5, movetoworkspace, 5
bind = SUPERSHIFT, 6, movetoworkspace, 6
bind = SUPERSHIFT, 7, movetoworkspace, 7
bind = SUPERSHIFT, 8, movetoworkspace, 8
bind = SUPERSHIFT, 9, movetoworkspace, 9
# bind = SUPERSHIFT, 0, movetoworkspace, 10

# Windowrules
# windowrule = workspace 3, org.telegram.desktop
windowrule = workspace 3, discord
#windowrule = workspace 4, code-oss
windowrulev2 = workspace 5, title:(Spotify Premium)


Config File: /home/alba4k/.config/hypr/hyprland/keybinds.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###                KEYBINDS                ###
# ##############################################

# Actions on lid switch (cause logind only sometimes works
bindl = , switch:on:Lid Switch, exec, systemctl suspend-then-hibernate

# Opening a terminal
bind = SUPER, return, exec, kitty --title Kitty
bind = SUPER, T, exec, kitty --title Kitty

# Just QOL lol
bind = SUPER, B, exec, buds

# Power manager
bind = SUPER, backspace, exec, pidof wlogout || wlogout

# Brightness
bindlei = , XF86MonBrightnessUp, exec, fish -c "for i in (seq 50); light -A .1; end; sleep .1; light -G"
bindlei = , XF86MonBrightnessDown, exec, fish -c "for i in (seq 50); light -U .1; end; sleep .1; light -G"

# Media
bindli = , XF86AudioPlay, exec, playerctl play-pause
bindli = , XF86AudioPause, exec, playerctl play-pause
bindli = , XF86AudioNext, exec, playerctl next
bindli = , XF86AudioPrev, exec, playerctl previous

# Volume
bindlei = , XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +10% && pactl set-sink-mute @DEFAULT_SINK@ 0 && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindlei = , XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -10% && pactl set-sink-mute @DEFAULT_SINK@ 0 && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindli = , XF86AudioMute, exec, pactl set-sink-mute @DEFAULT_SINK@ toggle && paplay --volume 65536 ~/.config/hypr/assets/click.ogg
bindli = , XF86AudioMicMute, exec, pactl set-source-mute @DEFAULT_SOURCE@ toggle

# Rofi
bind = SUPER, D, exec, rofi -show drun 
# bindr = SUPER,Super_L,exec, rofi -show drun
bind = SUPER, C, exec, rofi -show calc
bind = SUPERSHIFT, D, exec, rofi -show run
#bind = SUPER, V, exec, sh -c "str=$(~/.config/rofi/clipboard.sh | rofi -dmenu -display-columns 2 -p ' Appunti' | cliphist decode) && wl-copy -n \$str && wtype \$str"
bind = SUPER, V, exec, ~/.config/rofi/clipboard.sh | rofi -dmenu -display-columns 2 -p ' Appunti' | cliphist decode | wl-copy && wtype $(wl-paste)
bind = SUPERSHIFT, V, exec, cliphist wipe
bind = SUPER, period, exec, echo -n $(rofimoji) | wl-copy && wtype $(wl-paste)

# Half grimblast half flameshot baucase flameshot is so much better but sometimes breaks (https://github.com/flameshot-org/flameshot/issues/2978)
bind = SUPERSHIFT, S, exec, grimblast --freeze copy area && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bind = SUPERSHIFTCTRL, S, exec, flameshot gui 2>&1 | grep aborted || hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = , Print, exec, grimblast --cursor copy output && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = SHIFT, Print, exec, grimblast --cursor copy screen && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bindl = CTRL, Print, exec, grimblast --cursor copy screen && hyprctl notify 5 3000 0 "fontsize:17 Immagine copiata negli appunti!"
bind = SUPER, Print, exec, flameshot launcher

# Moving workspaces around
bind = SUPER, X, exec, /home/alba4k/.config/hypr/scripts/movetomonitor.sh
bind = SUPERSHIFT, X, exec, /home/alba4k/.config/hypr/scripts/movetomonitor.sh

# Global Keybinds
bind = SUPER, F10, pass, com\.obsproject\.Studio 



Config File: /home/alba4k/.config/hypr/hyprland/windowrules.conf: Read Succeeded
#  HYPRLAND - alba4k
#
# Documentation: https://wiki.hyprland.org
#
# ##############################################
# ###               WINDOWRULES              ###
# ##############################################

# Disable idle when there's a fullscreen window
# windowrulev2 = idleinhibit fullscreen, title:.*

# Random apps that I want to float
windowrule = float, seahorse
windowrule = float, qalculate-gtk
windowrule = float, org.prismlauncher.PrismLauncher
windowrule = float, onedriver-launcher
windowrule = float, org.kde.kdeconnect.handler
windowrule = float, python3
#windowrule = float, Bitwarden

# Random apps that I DON'T want to float
windowrule = tile, discord
windowrule = tile, ONLYOFFICE Desktop Editors

# Games
windowrule = tile, hollow_knight.x86_64
windowrule = tile, hexceed
windowrule = tile, steam_app_271590 # GTA V
windowrule = tile, steam_app_312520 # Rain World
#windowrule = tile, steam_app_322170 # Geometry Dash
windowrule = tile, steam_app_387290 # Ori And The Blind Forest: Definitive Edition
windowrule = tile, steam_app_1172620 # Sea of Thieves
# windowrule = tile, Minecraft.*

# Border correction - Windows with rounded corners that don't match mine
windowrule = rounding 15, Rofi # (For default Rofi)

# Settings
windowrule = float, pavucontrol
windowrule = float, blueman-manager
windowrule = float, system-config-printer
windowrule = float, cpupower-gui

# Flameshot
windowrulev2 = suppressevent fullscreen, class:(flameshot), title:(flameshot)
windowrulev2 = rounding 0, class:(flameshot), title:(flameshot)
windowrulev2 = noborder, class:(flameshot), title:(flameshot)
#windowrulev2 = monitor DP-5, class:(flameshot), title:(flameshot)
#windowrulev2 = monitor DP-6, class:(flameshot), title:(flameshot)
windowrulev2 = float, class:(flameshot), title:(flameshot)
windowrulev2 = fullscreenstate, class:(flameshot), title:(flameshot)
windowrulev2 = move 0 0, class:(flameshot), title:(flameshot)
windowrulev2 = monitor DP-5, class:(flameshot), title:(flameshot)
windowrulev2 = monitor DP-6, class:(flameshot), title:(flameshot)
windowrulev2 = move 0 0, class:(flameshot), title:(flameshot)
windowrulev2 = stayfocused, class:(flameshot), title:(flameshot)
windowrulev2 = size 3840 1200, class:(flameshot), title:(flameshot)
windowrulev2 = float, class:(flameshot), title:(Upload image)
windowrulev2 = float, class:(flameshot), title:(Configuration)
windowrulev2 = float, class:(flameshot), title:(Capture Launcher)
windowrulev2 = float, class:(flameshot), title:(Save screenshot)

# Firefox stuff
windowrulev2 = float, class:(firefox), title:(Picture-in-Picture)
windowrulev2 = keepaspectratio, class:(firefox), title:(Picture-in-Picture)
windowrulev2 = float, class:(firefox), title:(Bitwarden Password Manager)

# Emote (closes when it loses focus)
windowrule = stayfocused, emote

# Various authentication stuff
windowrule = stayfocused, Lxpolkit
windowrulev2 = move 634 120, class:(Lxpolkit), title:(Autenticazione)
windowrulev2 = move 830 189, class:(Lxpolkit), title:(Informazione)
windowrulev2 = move 809 189, class:(Lxpolkit), title:(Errore)
windowrulev2 = stayfocused, class:(nm-applet), title:(Richiesta autenticazione rete Wi-Fi)

# XWayland Video Bridge (https://wiki.hyprland.org/Useful-Utilities/Screen-Sharing)
windowrule = opacity 0.0 override 0.0 override, xwaylandvideobridge
windowrule = noanim, xwaylandvideobridge
windowrule = noinitialfocus, xwaylandvideobridge
windowrule = maxsize 1 1, xwaylandvideobridge
windowrule = noblur, xwaylandvideobridge

# Rofi (official client)
# windowrule = stayfocused, Rofi

# Bugged telegram media viewer
windowrulev2 = fullscreen, class:(org.telegram.desktop), title:(Visualizzatore multimediale)
windowrulev2 = float, class:(org.telegram.desktop), title:(Visualizzatore multimediale)

# LAYERRULES

# Rofi (lbonn Wayland fork)
layerrule = blur, rofi
layerrule = ignorezero, rofi

# Dunst
layerrule = blur, notifications
layerrule = ignorezero, notifications

# Wlogout
layerrule = blur, logout_dialog
layerrule = ignorezero, logout_dialog

# Waybar
layerrule = blur, waybar
#layerrule = ignorezero, waybar
layerrule = ignorealpha 0.1, waybar
layerrule = blurpopups, waybar

# Sway Notification Center
layerrule = blur, swaync-control-center
layerrule = ignorealpha 0.2, swaync-control-center

======Config-End========

@PaideiaDilemma
Copy link
Contributor

session->onReady(); is missing in CBackend::start i think. It is not called anywhere.

@vaxerski
Copy link
Member Author

oopsie

@PaideiaDilemma
Copy link
Contributor

also below in that function input device add events like newKeyboard are emitted. But they are also handled via CLibinputDevice::init, which is called by handleLibinputEvent on LIBINPUT_EVENT_DEVICE_ADDED. Is that intended?

@vaxerski
Copy link
Member Author

now that you mention it

@PaideiaDilemma
Copy link
Contributor

I think we need CSeatManager as well

stack trace
#0  0x00007fab5c5b57dc in __pthread_kill_implementation ()
   from /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6
#1  0x00007fab5c563516 in raise ()
   from /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6
#2  0x00007fab5c54b935 in abort ()
   from /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6
#3  0x000000000108df64 in handleUnrecoverableSignal(int) ()
#4  <signal handler called>
#5  0x00000000010e21da in Hyprutils::Memory::CWeakPointer<IKeyboard>::valid() const ()
#6  0x00000000010cf762 in Hyprutils::Memory::CWeakPointer<IKeyboard>::operator bool() const
    ()
#7  0x00000000013af5bb in CSeatManager::updateActiveKeyboardData() ()
#8  0x0000000001279ecf in IKeyboard::setKeymap(IKeyboard::SStringRuleNames const&) ()
#9  0x00000000013f4c54 in CInputManager::applyConfigToKeyboard(Hyprutils::Memory::CSharedPoin
ter<IKeyboard>) ()
#10 0x00000000013f3b3c in CInputManager::setupKeyboard(Hyprutils::Memory::CSharedPointer<IKey
board>) ()
#11 0x00000000013f2b0b in CInputManager::newKeyboard(Hyprutils::Memory::CSharedPointer<Aquama
rine::IKeyboard>) ()
#12 0x00000000010905ec in CCompositor::initAllSignals()::{lambda(void*, std::any)#3}::operato
r()(void*, std::any) const ()
#13 0x00000000010af771 in void std::__invoke_impl<void, CCompositor::initAllSignals()::{lambd
a(void*, std::any)#3}&, void*, std::any>(std::__invoke_other, CCompositor::initAllSignals()::
{lambda(void*, std::any)#3}&, void*&&, std::any&&) ()
#14 0x00000000010ad967 in std::enable_if<is_invocable_r_v<void, CCompositor::initAllSignals()
::{lambda(void*, std::any)#3}&, void*, std::any>, void>::type std::__invoke_r<void, CComposit
or::initAllSignals()::{lambda(void*, std::any)#3}&, void*, std::any>(CCompositor::initAllSign
als()::{lambda(void*, std::any)#3}&, void*&&, std::any&&) ()
#15 0x00000000010abedf in std::_Function_handler<void (void*, std::any), CCompositor::initAll
Signals()::{lambda(void*, std::any)#3}>::_M_invoke(std::_Any_data const&, void*&&, std::any&&
) ()
#16 0x00007fab5d2d5a63 in std::function<void(void*, std::any)>::operator() (__args#1=..., 
    __args#0=<optimized out>, this=0x4094b98)
    at /nix/store/6mmwy4jcnqnhms3i56r1hbdn656akg1d-gcc-13.3.0/include/c++/13.3.0/bits/std_fun
ction.h:591
#17 Hyprutils::Signal::CStaticSignalListener::emit (this=this@entry=0x4094b90, data=...)
    at /build/40kzah9gdqc20hfvfgv3i0qbccw7b9s3-source/src/signal/Listener.cpp:21
#18 0x00007fab5d2d60d0 in Hyprutils::Signal::CSignal::emit (this=<optimized out>, data=...)
    at /build/40kzah9gdqc20hfvfgv3i0qbccw7b9s3-source/src/signal/Signal.cpp:35
#19 0x00007fab5d5b139a in Aquamarine::CLibinputDevice::init (this=0x4f8fe80)
    at /nix/store/6mmwy4jcnqnhms3i56r1hbdn656akg1d-gcc-13.3.0/include/c++/13.3.0/bits/move.h:
189
#20 0x00007fab5d5b222c in Aquamarine::CSession::handleLibinputEvent (
    this=this@entry=0x4011780, e=e@entry=0x406b340)
    at /build/kbf5cv3q34c0lz7asll0p762mzwn121y-source/src/backend/Session.cpp:397
#21 0x00007fab5d5b450b in Aquamarine::CSession::dispatchLibinputEvents (this=0x4011780)
    at /build/kbf5cv3q34c0lz7asll0p762mzwn121y-source/src/backend/Session.cpp:351
#22 0x00007fab5d5b4552 in Aquamarine::CSession::onReady (this=<optimized out>)
    at /build/kbf5cv3q34c0lz7asll0p762mzwn121y-source/src/backend/Session.cpp:268
#23 0x00007fab5d5a76db in Aquamarine::CBackend::start (this=0x40113d0)
    at /build/kbf5cv3q34c0lz7asll0p762mzwn121y-source/src/backend/Backend.cpp:170
#24 0x000000000108fa62 in CCompositor::initServer(std::__cxx11::basic_string<char, std::char_
traits<char>, std::allocator<char> >, int) ()
#25 0x000000000131d9b4 in main ()
#26 0x00007fab5c54d14e in __libc_start_call_main ()
   from /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6
#27 0x00007fab5c54d209 in __libc_start_main_impl ()
   from /nix/store/3dyw8dzj9ab4m8hv5dpyx7zii8d0w6fi-glibc-2.39-52/lib/libc.so.6
#28 0x000000000101d065 in _start ()

@vaxerski
Copy link
Member Author

done

@alba4k
Copy link

alba4k commented Sep 23, 2024

Hyprland? more like Hyprcrash

hyprlandCrashReport142398.txt

@PaideiaDilemma
Copy link
Contributor

not latest hl git commit @alba4k

@jbeich
Copy link
Contributor

jbeich commented Sep 23, 2024

Crashes on FreeBSD (even with empty config). Tested version: aquamarine v0.4.1-5-gf40d6ce + hyprland v0.43.0-56-g2121ff77

backtrace
(lldb) bt
* thread #1, name = 'Hyprland', stop reason = signal SIGABRT
  * frame #0: 0x00000008475e352a libsys.so.7`__sys_thr_kill at thr_kill.S:4
    frame #1: 0x00000008361954d4 libc.so.7`__raise(s=6) at raise.c:48:10
    frame #2: 0x0000000836257899 libc.so.7`abort at abort.c:61:8
    frame #3: 0x0000000000c3900c Hyprland`handleUnrecoverableSignal(sig=11) at Compositor.cpp:73:5
    frame #4: 0x0000000832fa7a3f libthr.so.3`handle_signal(actp=0x0000000821e9ddc0, sig=11, info=0x0000000821e9e1b0, ucp=0x0000000821e9de40) at thr_sig.c:299:3
    frame #5: 0x0000000832fa6f1a libthr.so.3`thr_sighandler(sig=11, info=0x0000000821e9e1b0, _ucp=0x0000000821e9de40) at thr_sig.c:243:2
    frame #6: 0x000000082230f2d3
    frame #7: 0x00000000010b8562 Hyprland`CSeatManager::updateActiveKeyboardData(this=0x000017cf8b043800) at SeatManager.cpp:103:18
    frame #8: 0x0000000000edcc4a Hyprland`IKeyboard::setKeymap(this=0x000017cf8b129c00, rules=0x0000000821e9ec18) at IKeyboard.cpp:140:21
    frame #9: 0x0000000001118bc0 Hyprland`CInputManager::applyConfigToKeyboard(this=0x000017cf8b129300, pKeyboard=(impl_ = 0x000017cf8b0bf040)) at InputManager.cpp:979:16
    frame #10: 0x0000000001116ec5 Hyprland`CInputManager::setupKeyboard(this=0x000017cf8b129300, keeb=(impl_ = 0x000017cf8b0bf040)) at InputManager.cpp:923:5
    frame #11: 0x000000000111689d Hyprland`CInputManager::newKeyboard(this=0x000017cf8b129300, keyboard=(impl_ = 0x000017cf8b0bf1c0)) at InputManager.cpp:842:5
    frame #12: 0x0000000000c5f436 Hyprland`CCompositor::initAllSignals()::$_2::operator()(this=0x000017cf8b04c258, data=0x0000000000000000, d=any @ 0x0000000821e9f3d8) const at Compositor.cpp:348:30
    frame #13: 0x0000000000c5f314 Hyprland`decltype(std::declval<CCompositor::initAllSignals()::$_2&>()(std::declval<void*>(), std::declval<std::__1::any>())) std::__1::__invoke[abi:se180100]<CCompositor::initAllSignals()::$_2&, void*, std::__1::any>(__f=0x000017cf8b04c258, __args=0x0000000821e9f4e0, __args=0x0000000821e9f548) at invoke.h:344:25
    frame #14: 0x0000000000c5f295 Hyprland`void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:se180100]<CCompositor::initAllSignals()::$_2&, void*, std::__1::any>(__args=0x000017cf8b04c258, __args=0x0000000821e9f4e0, __args=0x0000000821e9f548) at invoke.h:419:5
    frame #15: 0x0000000000c5f25d Hyprland`std::__1::__function::__alloc_func<CCompositor::initAllSignals()::$_2, std::__1::allocator<CCompositor::initAllSignals()::$_2>, void (void*, std::__1::any)>::operator()[abi:se180100](this=0x000017cf8b04c258, __arg=0x0000000821e9f4e0, __arg=0x0000000821e9f548) at function.h:169:12
    frame #16: 0x0000000000c5e4f9 Hyprland`std::__1::__function::__func<CCompositor::initAllSignals()::$_2, std::__1::allocator<CCompositor::initAllSignals()::$_2>, void (void*, std::__1::any)>::operator()(this=0x000017cf8b04c250, __arg=0x0000000821e9f4e0, __arg=0x0000000821e9f548) at function.h:311:10
    frame #17: 0x0000000832356982 libhyprutils.so.1`std::__1::__function::__value_func<void (void*, std::__1::any)>::operator()[abi:se180100](this=0x000017cf8b04c250, __args=0x0000000821e9f4e0, __args=0x0000000821e9f548) const at function.h:428:12
    frame #18: 0x000000083235657f libhyprutils.so.1`std::__1::function<void (void*, std::__1::any)>::operator()(this=0x000017cf8b04c250, __arg=0x0000000000000000, __arg=any @ 0x0000000821e9f548) const at function.h:981:10
    frame #19: 0x00000008323563c2 libhyprutils.so.1`Hyprutils::Signal::CStaticSignalListener::emit(this=0x000017cf8b04c240, data=any @ 0x0000000821e9f698) at Listener.cpp:21:5
    frame #20: 0x0000000832356d48 libhyprutils.so.1`Hyprutils::Signal::CSignal::emit(this=0x000017cf8b1152e0, data=any @ 0x0000000821e9fad0) at Signal.cpp:35:12
    frame #21: 0x00000008291f3a82 libaquamarine.so.3`Aquamarine::CLibinputDevice::init(this=0x000017cf8ea96580) at Session.cpp:807:50
    frame #22: 0x00000008291ef134 libaquamarine.so.3`Aquamarine::CSession::handleLibinputEvent(this=0x000017cf8b108280, e=0x000017cf8b188370) at Session.cpp:397:14
    frame #23: 0x00000008291ed468 libaquamarine.so.3`Aquamarine::CSession::dispatchLibinputEvents(this=0x000017cf8b108280) at Session.cpp:351:9
    frame #24: 0x00000008291ed002 libaquamarine.so.3`Aquamarine::CSession::onReady(this=0x000017cf8b108280) at Session.cpp:268:5
    frame #25: 0x00000008291c98b0 libaquamarine.so.3`Aquamarine::CBackend::start(this=0x000017cf8b115280) at Backend.cpp:170:18
    frame #26: 0x0000000000c3b0ad Hyprland`CCompositor::initServer(this=0x000017cf8b043600, socketName="", socketFd=-1) at Compositor.cpp:260:24
    frame #27: 0x0000000000fe5960 Hyprland`main(argc=3, argv=0x0000000821ea1fc8) at main.cpp:172:20
    frame #28: 0x00000008361670fa libc.so.7`__libc_start1(argc=<unavailable>, argv=<unavailable>, env=<unavailable>, cleanup=<unavailable>, mainX=<unavailable>) at libc_start1.c:157:7
    frame #29: 0x0000000000c38c30 Hyprland`_start at crt1_s.S:83

@PaideiaDilemma
Copy link
Contributor

PaideiaDilemma commented Sep 23, 2024

ups, we also don't have ProtocolManager yet xD

@PaideiaDilemma
Copy link
Contributor

But moving that introduces other problems as well.

@MahouShoujoMivutilde
Copy link

Crashes for me too hyprlandCrashReport380335.txt, that's on hyprwm/Hyprland@2121ff7 and aqua with this pr.

Doesn't even get out of tty.

@vaxerski
Copy link
Member Author

hm... right. I'll try to come up with a better solution tmr

@vaxerski vaxerski changed the title Session: dispatch libinput events on ready Session: only dispatch udev in dispatchPendingEventsAsync if on linux Sep 23, 2024
@vaxerski vaxerski merged commit 8b72861 into main Sep 23, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants