The method syntax uses to set default apps will remove other defaults #5

Open
opened 2023-12-30 19:11:49 -06:00 by MojaveMF · 0 comments
MojaveMF commented 2023-12-30 19:11:49 -06:00 (Migrated from github.com)

let mimeapps_list_path = dirs::config_dir().unwrap().join("mimeapps.list");
            let mimeapps_list = format!(
"[Default Applications]
x-scheme-handler/syntax-player=syntax-player.desktop
");
            std::fs::write(mimeapps_list_path, mimeapps_list).unwrap();
            // We also have to write a mimeapps.list file to ~/.local/share
            let mimeapps_list_path = dirs::data_local_dir().unwrap().join("mimeapps.list");
            let mimeapps_list = format!(
"[Default Applications]
x-scheme-handler/syntax-player=syntax-player.desktop
");
            std::fs::write(mimeapps_list_path, mimeapps_list).unwrap();

``` let mimeapps_list_path = dirs::config_dir().unwrap().join("mimeapps.list"); let mimeapps_list = format!( "[Default Applications] x-scheme-handler/syntax-player=syntax-player.desktop "); std::fs::write(mimeapps_list_path, mimeapps_list).unwrap(); // We also have to write a mimeapps.list file to ~/.local/share let mimeapps_list_path = dirs::data_local_dir().unwrap().join("mimeapps.list"); let mimeapps_list = format!( "[Default Applications] x-scheme-handler/syntax-player=syntax-player.desktop "); std::fs::write(mimeapps_list_path, mimeapps_list).unwrap(); ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Syntax/syntax-bootstrapper#5
No description provided.