forked from poz/niksos
make hyprland work without a startupSound path
This commit is contained in:
parent
20e59ce3ac
commit
5578e7560a
1 changed files with 4 additions and 3 deletions
|
@ -22,8 +22,9 @@ in {
|
|||
options.myOptions.programs.hypr.land = {
|
||||
enable = mkEnableOption "enable hiper ląd";
|
||||
startupSound = mkOption {
|
||||
type = types.path;
|
||||
type = with types; nullOr path;
|
||||
description = "sound to play on hyprland startup";
|
||||
default = null;
|
||||
};
|
||||
tearing = mkOption {
|
||||
type = types.bool;
|
||||
|
@ -78,7 +79,7 @@ in {
|
|||
# adds an equivalent of hm's settings to this module
|
||||
#imports = [ inputs.hyprland.homeManagerModules.default ];
|
||||
|
||||
xdg.dataFile."hypr/startup_sound".source = cfg.startupSound;
|
||||
xdg.dataFile = mkIf (cfg.startupSound != null) { "hypr/startup_sound".source = cfg.startupSound; };
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
@ -94,7 +95,7 @@ in {
|
|||
extraConfig = ''
|
||||
bind=$mainMod, W, exec, ${removeSuffix " %U" hmCfg.xdg.desktopEntries.firefox-schizo.exec}
|
||||
bind=$mainMod SHIFT, W, exec, ${removeSuffix " %U" hmCfg.xdg.desktopEntries.firefox-unschizo.exec}
|
||||
${if (cfg.startupSound != "") then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ${hmCfg.xdg.dataHome}/hypr/startup_sound" else ""}
|
||||
${if (cfg.startupSound != null) then "exec-once=${pkgs.mpv}/bin/mpv --no-video --volume=100 ${hmCfg.xdg.dataHome}/hypr/startup_sound" else ""}
|
||||
'';
|
||||
settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
|
|
Loading…
Reference in a new issue