slab: autostart Hyprland on tty1
This commit is contained in:
parent
9bd949604b
commit
c183023606
@ -1,4 +1,4 @@
|
|||||||
{ lib, pkgs, osConfig, ... }:
|
{ lib, pkgs, osConfig, config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../home
|
../../home
|
||||||
@ -10,6 +10,16 @@
|
|||||||
};
|
};
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
|
# auto start Hyprland on tty1
|
||||||
|
programs.zsh.initExtraFirst = let
|
||||||
|
hyprland="${config.wayland.windowManager.hyprland.finalPackage}/bin/Hyprland";
|
||||||
|
tty="${pkgs.coreutils}/bin/tty";
|
||||||
|
in lib.mkIf config.wayland.windowManager.hyprland.enable ''
|
||||||
|
if [[ "$(${tty})" == "/dev/tty1" && -z "''${WAYLAND_DISPLAY:+x}" ]] ; then
|
||||||
|
${hyprland}
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
monitor = ",preferred,auto,1.25";
|
monitor = ",preferred,auto,1.25";
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user