feat(hyprland): use UWSM for hyprland now

This commit is contained in:
Mohammad Rafiq 2025-04-04 23:16:22 +08:00
parent 4d32434982
commit 0bc109c6a9
No known key found for this signature in database

View file

@ -1,46 +1,51 @@
{ {
environment.loginShellInit = # sh environment.loginShellInit = # sh
'' ''
if [ -z "$WAYLAND_DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then if uwsm check may-start; then
dbus-run-session Hyprland exec uwsm start hyprland-uwsm.desktop
fi fi
''; '';
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
withUWSM = true;
}; };
home-manager.users.rafiq = { home-manager.users.rafiq = {
home.sessionVariables.NIXOS_OZONE_WL = "1"; xdg.configFile."uwsm/env".text = # sh
''
export XCURSOR_SIZE=32
# Nvidia Settings
export LIBVA_DRIVER_NAME=nvidia
export __GLX_VENDOR_LIBRARY_NAME=nvidia
export NVD_BACKEND=direct # needed for running vaapi-driver on later drivers"
export NIXOS_OZONE_WL=1
'';
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
package = null; package = null;
portalPackage = null; portalPackage = null;
systemd.enable = false;
settings = { settings = {
"$mainMonitor" = "desc:OOO AN-270W04K"; "$mainMonitor" = "desc:OOO AN-270W04K";
"$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086"; "$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086";
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";
"$terminal" = "kitty -1";
"$multiplexer" = "$terminal -e zellij"; "$terminal" = "uwsm app -- kitty -1";
"$browser" = "firefox"; "$browser" = "uwsm app -- firefox";
"$music" = "spotify"; "$launcher" = "uwsm app -- fuzzel";
"$launcher" = "fuzzel"; "$lockscreen" = "uwsm app -- hyprlock";
"$clipboard" = "$terminal --class clipse -e clipse"; "$clipboard" = "$terminal --class clipse -e clipse";
"$multiplexer" = "$terminal -e zellij";
# Programs to run at startup # Programs to run at startup
exec-once = [ exec-once = [
"hyprlock" "uwsm app -- hyprlock"
"clipse -listen" "uwsm app -- clipse -listen"
"hyprcloser" "uwsm app -- hyprcloser"
"hyprshade auto" "uwsm app -- hyprshade auto"
];
env = [
"XCURSOR_SIZE,32"
# Nvidia Settings
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"NVD_BACKEND,direct # needed for running vaapi-driver on later drivers"
]; ];
# Monitors # Monitors
@ -78,15 +83,16 @@
# Keybinds # Keybinds
bind = [ bind = [
"$mainMod, return, exec, $multiplexer"
"$mainMod, W, killactive" "$mainMod, W, killactive"
"$mainMod, O, exec, $browser" "$mainMod, M, exec, uwsm stop"
"$mainMod, Escape, exec, hyprlock"
"$mainMod, Space, exec, $launcher"
# Launch utilities # Launch utilities
"$mainMod_SHIFT, A, exec, hyprpicker -a" "$mainMod, return, exec, $multiplexer"
"$mainMod, O, exec, $browser"
"$mainMod, Escape, exec, $lockscreen"
"$mainMod, Space, exec, $launcher"
"$mainMod, V, exec, $clipboard" "$mainMod, V, exec, $clipboard"
"$mainMod_SHIFT, A, exec, hyprpicker -a"
# move between windows # move between windows
"$mainMod, H, cyclenext, visible" "$mainMod, H, cyclenext, visible"