@@ -10,13 +10,13 @@ mod service;
10
10
mod systemd;
11
11
12
12
use async_signals:: Signals ;
13
- use color_eyre:: { eyre:: WrapErr , Result } ;
13
+ use color_eyre:: { Result , eyre:: WrapErr } ;
14
14
use comp:: create_privileged_socket;
15
15
use cosmic_notifications_util:: { DAEMON_NOTIFICATIONS_FD , PANEL_NOTIFICATIONS_FD } ;
16
16
use futures_util:: StreamExt ;
17
17
#[ cfg( feature = "autostart" ) ]
18
18
use itertools:: Itertools ;
19
- use launch_pad:: { process:: Process , ProcessManager } ;
19
+ use launch_pad:: { ProcessManager , process:: Process } ;
20
20
use service:: SessionRequest ;
21
21
#[ cfg( feature = "autostart" ) ]
22
22
use std:: collections:: HashSet ;
@@ -35,14 +35,15 @@ use systemd::{get_systemd_env, is_systemd_used, spawn_scope};
35
35
use tokio:: {
36
36
net:: UnixStream ,
37
37
sync:: {
38
+ Mutex ,
38
39
mpsc:: { self , Receiver , Sender } ,
39
- oneshot, Mutex ,
40
+ oneshot,
40
41
} ,
41
42
time:: Duration ,
42
43
} ;
43
44
use tokio_util:: sync:: CancellationToken ;
44
- use tracing:: { metadata:: LevelFilter , Instrument } ;
45
- use tracing_subscriber:: { fmt, prelude:: * , EnvFilter } ;
45
+ use tracing:: { Instrument , metadata:: LevelFilter } ;
46
+ use tracing_subscriber:: { EnvFilter , fmt, prelude:: * } ;
46
47
47
48
use crate :: notifications:: notifications_process;
48
49
const XDP_COSMIC : Option < & ' static str > = option_env ! ( "XDP_COSMIC" ) ;
@@ -166,7 +167,6 @@ async fn start(
166
167
) ;
167
168
168
169
// now that cosmic-comp is ready, set XDG_SESSION_TYPE=wayland for new processes
169
- std:: env:: set_var ( "XDG_SESSION_TYPE" , "wayland" ) ;
170
170
env_vars. push ( ( "XDG_SESSION_TYPE" . to_string ( ) , "wayland" . to_string ( ) ) ) ;
171
171
systemd:: set_systemd_environment ( "XDG_SESSION_TYPE" , "wayland" ) . await ;
172
172
@@ -189,7 +189,7 @@ async fn start(
189
189
&& systemd_env. key != "SHELL"
190
190
&& systemd_env. key != "SHLVL"
191
191
{
192
- std :: env :: set_var ( systemd_env. key , systemd_env. value ) ;
192
+ env_vars . push ( ( systemd_env. key , systemd_env. value ) ) ;
193
193
}
194
194
}
195
195
}
@@ -456,8 +456,8 @@ async fn start(
456
456
info ! ( "looking for autostart folders" ) ;
457
457
let mut directories_to_scan = Vec :: new ( ) ;
458
458
459
- // we start by taking user specific directories, so that we can deduplicate and ensure
460
- // user overrides are respected
459
+ // we start by taking user specific directories, so that we can deduplicate and
460
+ // ensure user overrides are respected
461
461
462
462
// user specific directories
463
463
if let Some ( user_config_dir) = dirs:: config_dir ( ) {
0 commit comments