UWSM Hyprland

Former-commit-id: 5bfd891d39
This commit is contained in:
Hadi
2025-04-18 14:09:24 +02:00
parent 6d4a886acb
commit 24d77739b9
7 changed files with 27 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
# Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
{ pkgs, ... }: {
{ pkgs, lib, ... }: {
services.hypridle = {
enable = true;
settings = {
@@ -24,4 +24,6 @@
];
};
};
systemd.user.services.hypridle.Unit.After =
lib.mkForce "graphical-session.target";
}

View File

@@ -1,16 +1,16 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland.settings = {
bind = [
"$mod,RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod,B, exec, zen" # Zen Browser
"$mod,K, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod,B, exec, uwsm app -- zen-beta" # Zen Browser
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,X, exec, powermenu" # Powermenu
"$mod,SPACE, exec, menu" # Launcher
"$mod,C, exec, quickmenu" # Quickmenu
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod,P, exec, ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
"$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
"$mod,Q, killactive," # Close window
"$mod,T, togglefloating," # Toggle Floating

View File

@@ -47,11 +47,12 @@ in {
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd.enable = true;
# withUWSM = true; # One day, but not today
systemd.variables = [
"--all"
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
systemd = {
enable = false;
variables = [
"--all"
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
};
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;

View File

@@ -1,5 +1,5 @@
# Hyprpaper is used to set the wallpaper on the system
{
{ lib, ... }: {
# The wallpaper is set by stylix
services.hyprpaper = {
enable = true;
@@ -9,4 +9,6 @@
splash_offset = 2.0;
};
};
systemd.user.services.hyprpaper.Unit.After =
lib.mkForce "graphical-session.target";
}

View File

@@ -8,12 +8,12 @@
../../nixos/home-manager.nix
../../nixos/nix.nix
../../nixos/systemd-boot.nix
# ../../nixos/grub.nix
../../nixos/sddm.nix
../../nixos/users.nix
../../nixos/utils.nix
# ../../nixos/docker.nix
../../nixos/tailscale.nix
../../nixos/hyprland.nix
../../nixos/omen.nix # For my laptop only
# You should let those lines as is

6
nixos/hyprland.nix Normal file
View File

@@ -0,0 +1,6 @@
{
programs.hyprland = {
enable = true;
withUWSM = true;
};
}

View File

@@ -105,10 +105,7 @@ in {
hyprland.default = [ "gtk" "hyprland" ];
};
extraPortals = [
pkgs.xdg-desktop-portal-gtk
inputs.hyprland.packages."${pkgs.system}".xdg-desktop-portal-hyprland
];
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
security = {