Added list of supported players with flag overrides and checks for support, reformatted code, added .editorconfig

This commit is contained in:
Baldomo
2021-01-20 20:36:44 +01:00
parent 132a258a82
commit 93f7bc29f3
7 changed files with 127 additions and 30 deletions

View File

@@ -11,7 +11,8 @@ using std::string;
const char *help[2] = {
"This program is not supposed to be called from the command line!",
"Call with 'install-protocol' to instal the xdg-compatible protocol file "
"in ~/.local/share/applications/"};
"in ~/.local/share/applications/"
};
bool install_protocol() {
const char *protocol_file = R"([Desktop Entry]
@@ -27,8 +28,8 @@ MimeType=x-scheme-handler/mpv
if (!homedir)
return false;
std::ofstream protfile(string(homedir) +
"/.local/share/applications/open-in-mpv.desktop");
std::ofstream protfile(
string(homedir) + "/.local/share/applications/open-in-mpv.desktop");
protfile << protocol_file;
protfile.flush();
protfile.close();