Merge remote-tracking branch 'refs/remotes/origin/main'
This commit is contained in:
commit
9cd2d75890
1 changed files with 1 additions and 0 deletions
|
|
@ -166,6 +166,7 @@ pub fn switch_by_name(profiles_config: Vec<Profile>,name: String,preserve_keyboa
|
|||
pub fn active_profile_index() -> usize {
|
||||
let base_directories = BaseDirectories::new();
|
||||
let active_profile_cache_json = base_directories.get_runtime_directory().expect("xdg dirs do not exist?").join("sway-de-utils/active-profile.json");
|
||||
|
||||
if active_profile_cache_json.exists() {
|
||||
fs::File::open(active_profile_cache_json).ok()
|
||||
.and_then(|f|serde_json::from_reader::<fs::File,usize>(f).ok())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue