fix(hypr): get rid of logs shown on the TTY right before Hyprland launches
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2025-02-06 19:08:56 -05:00
parent a504422ca8
commit 5b1c564e72
2 changed files with 12 additions and 16 deletions

View file

@ -7,7 +7,7 @@ self: {
inherit (self.inputs) hyprland;
inherit (self.lib.hypr) mkBind mkMonitor;
inherit (lib) attrValues concatStringsSep mkIf optionals;
inherit (lib) attrValues concatStringsSep mkIf optionals removeSuffix;
cfg = config.roles.desktop;
@ -83,11 +83,14 @@ in {
wayland.windowManager.hyprland = {
enable = true;
package =
hyprland
.packages
.${pkgs.system}
.default;
# Get rid of logs shown on the TTY right before Hyprland launches
package = hyprland.packages.${pkgs.system}.default.overrideAttrs (o: {
postInstall = ''
${removeSuffix "\n\n" o.postInstall} \
--append-flags '&>/dev/null'
'';
});
systemd.variables = ["-all"];

View file

@ -1,10 +1,9 @@
self: {
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (lib) getExe mkIf;
cfg = config.roles.desktop;
@ -17,12 +16,6 @@ self: {
.windowManager
.hyprland
.finalPackage;
# Hide TTY on launch
cmd = toString (pkgs.writeShellScript "hyprland-wrapper" ''
trap 'systemctl --user stop hyprland-session.target; sleep 1' EXIT
exec Hyprland >/dev/null
'');
in {
imports = [
(import ./ags self)
@ -37,12 +30,12 @@ in {
enable = true;
settings = {
default_session = {
command = cmd;
command = getExe hyprland;
user = "greeter";
};
initial_session = {
command = cmd;
command = getExe hyprland;
user = cfg.user;
};
};