File tree Expand file tree Collapse file tree
modules/home/programs/graphical/wms/hyprland Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 config ,
33 lib ,
4+ pkgs ,
45
56 osConfig ? { } ,
67 ...
78} :
89let
9- inherit ( lib ) mkIf getExe ;
10+ inherit ( lib ) mkIf getExe getExe' ;
1011
1112 cfg = config . khanelinix . programs . graphical . wms . hyprland ;
1213in
7273 # ++ lib.optionals config.programs.vesktop.enable [
7374 # (mkStartCommand { slice = "b"; } "${getExe config.programs.vesktop.package}")
7475 # ]
75- ++ lib . optionals ( osConfig . programs . steam . enable or false ) [
76- ( mkStartCommand { slice = "b" ; } "steam" )
77- ]
7876 ++ lib . optionals config . khanelinix . suites . social . enable [
7977 ( mkStartCommand { slice = "b" ; } "element-desktop" )
8078 ]
10199 lib . mkBefore (
102100 if ( osConfig . programs . uwsm . enable or false ) then [ "uwsm finalize" ] ++ appCommands else appCommands
103101 ) ;
102+
103+ systemd . user . services . hyprland-start-steam = mkIf ( osConfig . programs . steam . enable or false ) {
104+ Unit = {
105+ Description = "Start Steam after Hyprland session" ;
106+ After = [ "graphical-session.target" ] ;
107+ PartOf = [ "graphical-session.target" ] ;
108+ ConditionEnvironment = "WAYLAND_DISPLAY" ;
109+ } ;
110+
111+ Install . WantedBy = [ "graphical-session.target" ] ;
112+
113+ Service = {
114+ Type = "oneshot" ;
115+ ExecStartPre = "${ getExe' pkgs . coreutils "sleep" } 5" ;
116+ ExecStart =
117+ if ( osConfig . programs . uwsm . enable or false ) then
118+ "${ getExe pkgs . uwsm } app -s b -a steam -p TimeoutStopSec=10s -- steam"
119+ else
120+ "steam" ;
121+ } ;
122+ } ;
104123 } ;
105124}
You can’t perform that action at this time.
0 commit comments