Fixed Hyprland crashes

This commit is contained in:
soraefir 2023-11-17 03:29:35 +01:00
parent 63941b5c44
commit 22c68c169c
Signed by: sora
GPG Key ID: A362EA0491E2EEA0
6 changed files with 237 additions and 231 deletions

View File

@ -7,6 +7,6 @@
username = "${config.homecfg.username}"; username = "${config.homecfg.username}";
homeDirectory = "/home/${config.homecfg.username}"; homeDirectory = "/home/${config.homecfg.username}";
stateVersion = "23.05"; stateVersion = "23.11";
}; };
} }

View File

@ -26,6 +26,7 @@
criteria = "LG Display 0x060A Unknown"; criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020"; mode = "1920x1080@60.020";
position = "0,0"; position = "0,0";
scale = 1.0;
status = "enable"; status = "enable";
}]; }];
}; };
@ -41,6 +42,7 @@
criteria = "LG Display 0x060A Unknown"; criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020"; mode = "1920x1080@60.020";
position = "2560,0"; position = "2560,0";
scale = 1.0;
status = "enable"; status = "enable";
} }
]; ];
@ -58,6 +60,7 @@
criteria = "LG Display 0x060A Unknown"; criteria = "LG Display 0x060A Unknown";
mode = "1920x1080@60.020"; mode = "1920x1080@60.020";
position = "1920,0"; position = "1920,0";
scale = 1.0;
status = "enable"; status = "enable";
} }
]; ];

View File

@ -1,224 +1,226 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, ... }: {
config = lib.mkIf (config.homecfg.wm == "Wayland") { config = lib.mkIf (config.homecfg.wm == "Wayland") {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
extraConfig = '' extraConfig = ''
monitor=,preferred,auto,1 monitor=,preferred,auto,auto
input { input {
kb_layout = us, ru kb_layout = us, ru
kb_variant = intl, phonetic kb_variant = intl, phonetic
kb_options = grp:ctrls_toggle kb_options = grp:ctrls_toggle
follow_mouse = 1 follow_mouse = 1
sensitivity = 0 # -0.5 # -1.0 - 1.0, 0 means no modification. sensitivity = 0 # -0.5 # -1.0 - 1.0, 0 means no modification.
touchpad { touchpad {
natural_scroll=no natural_scroll=no
disable_while_typing=true disable_while_typing=true
scroll_factor=1 scroll_factor=1
disable_while_typing=0 disable_while_typing=0
tap-to-click=0 tap-to-click=0
} }
} }
misc { misc {
disable_hyprland_logo=true disable_hyprland_logo=true
animate_mouse_windowdragging=false animate_mouse_windowdragging=false
animate_manual_resizes=false animate_manual_resizes=false
vrr=1 #Note broken on renoir AMD DRM potentially ? vrr=1
} }
general { general {
gaps_in = 5 gaps_in = 4
gaps_out = 5 gaps_out = 8
border_size = 2 border_size = 2
# col.active_border = rgb(${config.colorScheme.colors.base05}) # col.active_border = rgb(${config.colorScheme.colors.base05})
# col.inactive_border = rgb(${config.colorScheme.colors.base03}) # col.inactive_border = rgb(${config.colorScheme.colors.base03})
layout = dwindle layout = dwindle
}
}
decoration {
decoration { rounding = 4
rounding = 7
blur {
blur { enabled = true
enabled = true size = 2
size = 2 passes = 1
passes = 1 new_optimizations = true
new_optimizations = true }
} #multisample_edges = true
#multisample_edges = true
#opactity
#opactity inactive_opacity = 1.0
inactive_opacity = 1.0 active_opacity = 1.0
active_opacity = 1.0 fullscreen_opacity = 1.0
fullscreen_opacity = 1.0
# shadow
# shadow drop_shadow = no
drop_shadow = no shadow_range = 60
shadow_range = 60 shadow_offset = 0 5
shadow_offset = 0 5 shadow_render_power = 4
shadow_render_power = 4 #col.shadow = rgba(00000099)
#col.shadow = rgba(00000099) }
}
animations {
animations { enabled = true
enabled = false bezier = customcurve, 0.0, 0.9, 0.1, 1.0
}
animation = windows, 1, 4, customcurve
dwindle { animation = windowsOut, 1, 4, customcurve, popin 50%
pseudotile = yes animation = border, 1, 10, customcurve
# force_split = 0 animation = borderangle, 0, 1, customcurve
preserve_split = yes animation = fade, 1, 4, customcurve
} animation = workspaces, 1, 4, customcurve
}
master {
new_is_master = true dwindle {
} pseudotile = yes
preserve_split = yes
gestures { }
workspace_swipe = off
} master {
new_is_master = true
exec-once = eww open bar & dunst }
exec-once = swww init gestures {
workspace_swipe = off
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP }
exec-once = /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 &
exec-once = eww open bar
exec-once = wl-paste --type text --watch cliphist store #Stores only text data exec-once = dunst
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
exec-once = swww init
exec-once = swayidle -w timeout 600 'swaylock' before-sleep 'swaylock'
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
exec-once = /nix/store/$(ls -la /nix/store | grep 'polkit-gnome' | grep '4096' | awk '{print $9}' | sed -n '$p')/libexec/polkit-gnome-authentication-agent-1 &
#windowrules
windowrule = noshadow, floating:0 exec-once = wl-paste --type text --watch cliphist store #Stores only text data
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
windowrule = float, title:^(flying_kitty)$
windowrule = size 1100 600, title:^(flying_kitty)$ exec-once = swayidle -w timeout 600 'swaylock' before-sleep 'swaylock'
windowrule = move center, title:^(flying_kitty)$
windowrule = animation slide, title:^(flying_kitty)$
windowrule = float, title:^(Volume Control)$ #windowrules
windowrule = float, title:^(Picture-in-Picture)$ windowrule = noshadow, floating:0
windowrule = float, title:^(Steam)$
windowrule = fullscreen, title:^(wlogout)$ windowrule = float, title:^(flying_kitty)$
windowrule = float, title:^(wlogout)$ windowrule = size 1100 600, title:^(flying_kitty)$
windowrule = move center, title:^(flying_kitty)$
windowrule = workspace 2 silent, class:^(org.telegram.desktop)$ windowrule = animation slide, title:^(flying_kitty)$
windowrule = workspace 2 silent, class:^(discord)$ windowrule = float, title:^(Volume Control)$
windowrule = float, title:^(Picture-in-Picture)$
windowrule = workspace 8 silent, class:^(org.keepassxc.KeePassXC)$ windowrule = float, title:^(Steam)$
windowrule = workspace 8 silent, title:^(Nextcloud)$ windowrule = fullscreen, title:^(wlogout)$
windowrule = workspace 8 silent, class:^(Tk)$,title:^(Server Configuration)$ windowrule = float, title:^(wlogout)$
#SPECIAL FLOATERS windowrulev2 = workspace 2 silent, class:^(org.telegram.desktop)$
windowrule = float,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$ windowrulev2 = workspace 2 silent, class:^(discord)$
windowrule = pin,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrule = float,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$ windowrulev2 = workspace 8 silent, class:^(org.keepassxc.KeePassXC)$
windowrule = pin,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$ windowrulev2 = workspace 8 silent, title:^(Nextcloud)$
windowrule = float,title:^(Open)$ windowrulev2 = workspace 8 silent, class:^(Tk)$,title:^(Server Configuration)$
windowrule = float,title:^(Choose Files)$
windowrule = float,title:^(Save As)$ #SPECIAL FLOATERS
windowrule = float,title:^(Confirm to replace files)$ windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrule = float,title:^(File Operation Progress)$ windowrulev2 = pin,class:^(org.keepassxc.KeePassXC)$,title:^(KeePassXC - Access Request)$
windowrule = float,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = float,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrule = pin,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = pin,class:^(org.keepassxc.KeePassXC)$,title:^(Unlock Database - KeePassXC)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Picture-in-Picture)$ windowrulev2 = float,title:^(Open)$
windowrule = float,class:^(firefox)$,title:^(Firefox Sharing Indicator)$ windowrulev2 = float,title:^(Choose Files)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Firefox Sharing Indicator)$ windowrulev2 = float,title:^(Save As)$
windowrule = float,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$ windowrulev2 = float,title:^(Confirm to replace files)$
windowrule = nofullscreenrequest,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$ windowrulev2 = float,title:^(File Operation Progress)$
windowrule = float,class:^(org.telegram.desktop)$,title:^(Media viewer)$ windowrulev2 = float,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrule = center,class:^(org.telegram.desktop)$,title:^(Media viewer)$ windowrulev2 = pin,class:^(firefox)$,title:^(Picture-in-Picture)$
windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Picture-in-Picture)$
#binds windowrulev2 = float,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
bind = SUPER, RETURN, exec, kitty windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Firefox Sharing Indicator)$
windowrulev2 = float,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
bind = SUPER_SHIFT, RETURN,togglespecialworkspace, windowrulev2 = nofullscreenrequest,class:^(firefox)$,title:^(Extension:.* Mozilla Firefox)$
# bind = SUPER_SHIFT, RETURN, exec, kitty --title flying_kitty --single-instance windowrulev2 = float,class:^(org.telegram.desktop)$,title:^(Media viewer)$
bind = SUPER, Q, killactive, windowrulev2 = center,class:^(org.telegram.desktop)$,title:^(Media viewer)$
bind = SUPER, T, togglefloating,
bind = SUPER, F, fullscreen, #binds
bind = SUPER, RETURN, exec, kitty
bind = SUPER, D, exec, wofi -modi --show drun
bind = SUPER SHIFT,D,exec, ~/.config/hypr/themes/apatheia/eww/launch_bar bind = SUPER_SHIFT, RETURN,togglespecialworkspace,
# bind = SUPER_SHIFT, RETURN, exec, kitty --title flying_kitty --single-instance
bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy bind = SUPER, Q, killactive,
bind = , Print, exec, grim -g "$(slurp -d)" - | swappy -f - bind = SUPER, T, togglefloating,
bind = SUPER, F, fullscreen,
bind = SUPER, L, exec, swaylock
bind = SUPER, D, exec, wofi -modi --show drun
# bind = SUPER, P, pseudo, # dwindle bind = SUPER SHIFT,D,exec, ~/.config/hypr/themes/apatheia/eww/launch_bar
# bind = SUPER, J, togglesplit, # dwindle
# bind = SUPER, G, togglegroup bind = SUPER, V, exec, cliphist list | wofi -dmenu | cliphist decode | wl-copy
# bind = SUPER, tab, changegroupactive bind = , Print, exec, grim -g "$(slurp -d)" - | swappy -f -
bind = SUPER, left, movefocus, l bind = SUPER, L, exec, swaylock
bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u bind = SUPER, left, movefocus, l
bind = SUPER, down, movefocus, d bind = SUPER, right, movefocus, r
bind = SUPER, up, movefocus, u
bind = SUPER, 1, workspace, 1 bind = SUPER, down, movefocus, d
bind = SUPER, 2, workspace, 2
bind = SUPER, 3, workspace, 3 bind = SUPER, 1, workspace, 1
bind = SUPER, 4, workspace, 4 bind = SUPER, 2, workspace, 2
bind = SUPER, 5, workspace, 5 bind = SUPER, 3, workspace, 3
bind = SUPER, 6, workspace, 6 bind = SUPER, 4, workspace, 4
bind = SUPER, 7, workspace, 7 bind = SUPER, 5, workspace, 5
bind = SUPER, 8, workspace, 8 bind = SUPER, 6, workspace, 6
bind = SUPER, 9, workspace, 9 bind = SUPER, 7, workspace, 7
bind = SUPER, 0, workspace, 10 bind = SUPER, 8, workspace, 8
bind = SUPER, 9, workspace, 9
bind = SUPER SHIFT, 1, movetoworkspacesilent, 1 bind = SUPER, 0, workspace, 10
bind = SUPER SHIFT, 2, movetoworkspacesilent, 2
bind = SUPER SHIFT, 3, movetoworkspacesilent, 3 bind = SUPER SHIFT, 1, movetoworkspacesilent, 1
bind = SUPER SHIFT, 4, movetoworkspacesilent, 4 bind = SUPER SHIFT, 2, movetoworkspacesilent, 2
bind = SUPER SHIFT, 5, movetoworkspacesilent, 5 bind = SUPER SHIFT, 3, movetoworkspacesilent, 3
bind = SUPER SHIFT, 6, movetoworkspacesilent, 6 bind = SUPER SHIFT, 4, movetoworkspacesilent, 4
bind = SUPER SHIFT, 7, movetoworkspacesilent, 7 bind = SUPER SHIFT, 5, movetoworkspacesilent, 5
bind = SUPER SHIFT, 8, movetoworkspacesilent, 8 bind = SUPER SHIFT, 6, movetoworkspacesilent, 6
bind = SUPER SHIFT, 9, movetoworkspacesilent, 9 bind = SUPER SHIFT, 7, movetoworkspacesilent, 7
bind = SUPER SHIFT, 0, movetoworkspacesilent, 10 bind = SUPER SHIFT, 8, movetoworkspacesilent, 8
bind = SUPER SHIFT, 9, movetoworkspacesilent, 9
bind = SUPER, mouse_down, workspace, e+1 bind = SUPER SHIFT, 0, movetoworkspacesilent, 10
bind = SUPER, mouse_up, workspace, e-1
bind = SUPER, mouse_down, workspace, e+1
bindm = SUPER, mouse:272, movewindow bind = SUPER, mouse_up, workspace, e-1
bindm = SUPER, mouse:273, resizewindow
bind = , XF86AudioPlay, exec, playerctl play-pause bindm = SUPER, mouse:272, movewindow
bind = , XF86AudioPrev, exec, playerctl previous bindm = SUPER, mouse:273, resizewindow
bind = , XF86AudioNext, exec, playerctl next bind = , XF86AudioPlay, exec, playerctl play-pause
bind = , XF86AudioRaiseVolume, exec, amixer -q sset 'Master' 5%+ bind = , XF86AudioPrev, exec, playerctl previous
bind = , XF86AudioLowerVolume, exec, amixer -q sset 'Master' 5%- bind = , XF86AudioNext, exec, playerctl next
bind = , XF86AudioMute, exec, amixer -q sset 'Master' toggle bind = , XF86AudioRaiseVolume, exec, amixer -q sset 'Master' 5%+
bind = , XF86MonBrightnessUp, exec, brillo -A 5 bind = , XF86AudioLowerVolume, exec, amixer -q sset 'Master' 5%-
bind = , XF86MonBrightnessDown, exec, brillo -U 5 bind = , XF86AudioMute, exec, amixer -q sset 'Master' toggle
bind = , XF86MonBrightnessUp, exec, brillo -A 5
exec-once = [workspace special silent] kitty --title flying_kitty bind = , XF86MonBrightnessDown, exec, brillo -U 5
exec-once = sh ~/.config/startup.sh
''; exec-once = [workspace special silent] kitty --title flying_kitty
}; exec-once = sh ~/.config/startup.sh
'';
xdg.configFile."startup.sh".text = '' };
#!/bin/sh xdg.configFile."startup.sh".text = ''
sleep 2 #!/bin/sh
keepassxc & sleep 2
firefox & keepassxc &
jellyfin-mpv-shim & firefox &
easyeffects --gapplication-service & jellyfin-mpv-shim &
easyeffects --gapplication-service &
sleep 2
nextcloud & sleep 2
telegram-desktop& nextcloud &
''; #telegram-desktop&
}; #discord&
} '';
};
}

View File

@ -32,5 +32,5 @@
]; ];
}; };
}; };
system.stateVersion = "23.05"; system.stateVersion = "23.11";
} }

View File

@ -3,10 +3,11 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
# wlr.enable = true; # wlr.enable = true;
extraPortals = with pkgs; [ extraPortals = with pkgs;
xdg-desktop-portal-hyprland [
# xdg-desktop-portal-gtk xdg-desktop-portal-hyprland
]; # xdg-desktop-portal-gtk
];
}; };
environment.sessionVariables = rec { environment.sessionVariables = rec {

View File

@ -5,7 +5,7 @@
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "v4l2loopback" "kvm-amd" ]; boot.kernelModules = [ "v4l2loopback" "kvm-amd" ];
#boot.kernelPackages = pkgs.linuxPackages_latest; #boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = with config.boot.kernelPackages; boot.extraModulePackages = with config.boot.kernelPackages;