clsid2 / mpc-hc

Media Player Classic
GNU General Public License v3.0
11.21k stars 494 forks source link

Feature Request: Keyboard shortcut for "Remember last window size" & "Open options". #788

Closed hellishvictor closed 3 years ago

hellishvictor commented 3 years ago

Hi, since mpc-hc it does have something like profile selector for playback, it would be awesome if were possible to switch ON-OFF with a keyboard shortcut the following options: · Remember last window size · Open options ("Use the same player for each media file" & "Open a new player for each media file played")

Cheers.

clsid2 commented 3 years ago

I am not going to add shortcuts for such options.

If you want to open an extra instance of the player you can do that easily through the Windows Start menu. Or pin it onto the Windows task bar.

hellishvictor commented 3 years ago

So there's a command-line parameter for ON-OFF which can be added with a shortcut to mpc-hc.exe? I mostly double-click on the files than load the player and then the file, but that will be something better than open the player->press O->on-off.

clsid2 commented 3 years ago

Clicking on the .exe (or shortcut) will open a new instance. You can also use command line parameter /new. You could add a shortcut with that parameter in the Windows "Send To" menu. Then you can right-click on a file and use that shortcut in the menu.

%appdata%\Microsoft\Windows\SendTo

hellishvictor commented 3 years ago

Man, I know how to do that stuff (ty anyway), but what I mostly wanted was to make the player starting with the different options enabled (or toggle them easily through a keyboard shortcut or command-line parameter), and I finally found a way: since it stores the settings on a .ini file (which is AWESOME), I duplicate it but with the name "profile1.ini", then I open the player, active the options "Remember last window size" and "Use the same player" and close it, renaming the settings file to "profile2.ini". Finally, I've created a batch file on the desktop which ask me which profile I want, and depending of the option, it will create a copy the profile selected but named as "mpc-hc64.ini". After that, double-click directly on any multimedia file will load the player with the settings of the profile selected :)

butterw commented 3 years ago

It's possible to have multiple portable versions of mpc-hc on the same PC in different folders (renaming the .ini in a single program folder as you are doing also works). To my knowledge, there is currently no startup option allowing you to specify the mpc.ini location.

hellishvictor commented 3 years ago

To my knowledge, there is currently no startup option allowing you to specify the mpc.ini location.

By default it looks for mpc-hc64.ini (I'm using the 64-bit) on the program folder, so after of select with the batch file one of the two profiles I have created (profile1.ini and profile2.ini), it stores the number on a previously defined variable and use it here: copy profile%choice%.ini mpc-hc64.ini

(renaming the .ini in a single program folder as you are doing also works)

It works like a charm :)

clsid2 commented 3 years ago

Be aware that Program Files is a protected folder in Windows, meaning that programs can't write to it unless they are elevated as admin. So you need to adjust access permissions on the INI files to allow write access for the "USERS" group. Otherwise setting changes won't save properly.

hellishvictor commented 3 years ago

Be aware that Program Files is a protected folder in Windows, meaning that programs can't write to it unless they are elevated as admin. So you need to adjust access permissions on the INI files to allow write access for the "USERS" group. Otherwise setting changes won't save properly.

Good that you mention that; in my case, it don't affect me at all since I have an Administrator account with full privileges.

clsid2 commented 3 years ago

Logging in as administrator is not enough. Windows runs applications with reduced privileges by default for security reasons.

butterw commented 3 years ago

One of the reasons portable mpc-hc +mpc.ini is compelling is that you can have multiple installs or configuration files. Another is that you don't use "C:\Program Files" as default program dir.

clsid2 commented 3 years ago

Using INI inside ProgramFiles can be done if desired. It just requires that the file (or folder) access permissions are modified.

Using multiple portable copies of the player does have downsides. For example file associations don't work nicely.

hellishvictor commented 3 years ago

Logging in as administrator is not enough. Windows runs applications with reduced privileges by default for security reasons.

Yeah, which is something I solved right after the creation of the Adminitrator account, don't want to see pop-up warnings constantly xD

hellishvictor commented 3 years ago

Another is that you don't use "C:\Program Files" as default program dir.

Correct, I use instead "D:\MyProgramFiles64" as my program directory.

hellishvictor commented 3 years ago

Using multiple portable copies of the player does have downsides. For example file associations don't work nicely.

Exactly.

butterw commented 3 years ago

True, but installing to a directory with write access (and a shorter path and no spaces) rather than Program Files is easier. You then just switch to using mpc.ini (allows to backup settings) and subsequent versions can all be portable.

Ex: mpv comes only has a portable version + an optional .bat to setup windows association.

hellishvictor commented 3 years ago

True, but installing to a directory with write access (and a shorter path and no spaces) rather than Program Files is easier. You then just switch to using mpc.ini (allows to backup settings) and subsequent versions can all be portable.

Definelly; I love the freedom it gives being portable :)

Ex: mpv comes only has a portable version + an optional .bat to setup windows association.

Yeah, I have MPV also on there, but now I don't use it all.

hellishvictor commented 3 years ago

It's more simple this way:

Enhancement

:)

clsid2 commented 3 years ago

I am not interested in implementing that, or any other new functionality.