Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feed in the settings file as a command line argument #1027

Closed
nimafazeli opened this issue May 28, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@nimafazeli
Copy link

commented May 28, 2018

This way we could use different settings using a shortcut files or using a build system from the preferred text editor depending on the situation.

For example I compile from latex using a build system in my editor. However at nights I use a dark theme on my editor and switching between the screens with different luminosity is literally painful to my eyes. I wish I could just run something like SumatraPDF.exe --settings="nightmode.txt" to get my customized dark mode settings or SumatraPDF.exe --settings="presentation.json for my customized presentation mode.

@GitHubRulesOK

This comment has been minimized.

Copy link

commented May 28, 2018

there are several issues with what you propose since over time the settings file has been extended to include file history etc.
there were a few old cli settings that may help (see documentation on -bg-color and -set-color-range

however I guess your best bet is to use windows built-in command editor (edlin.exe from win16bit to Win10x32) or for 32/64 bits the more modern powershell script processor to find and replace those lines of the settings.txt file to your preference

You can place a simple lightweight tool to Find And Replace Text (70 KB for fart199b_win32) in the sumatraPDF directory and would only need alternating shortcuts such as

fart.exe -i SumatraPDF-settings.txt #ffffff #C0ffee & SumatraPDF.exe
and its reverse
fart.exe -i SumatraPDF-settings.txt #C0ffee #FFFFFF & SumatraPDF.exe

in this case if prefixed with cmd /c (and set to minimised) whilst SumatraPDF is kept open on the same file the two shortcuts allow you to toggle the background value on the fly

Alternatively you can run two copies of SumatraPDF in separate directories (e.g installed and portable ?) without a common history

@GitHubRulesOK

This comment has been minimized.

Copy link

commented Jun 9, 2018

As a result of other forum comments this issue re: selecting a user preferred SumatraPDF-settings.txt file
was addressed per #69
For a recent description of how this may be used see https://forum.sumatrapdfreader.org/t/sessions-in-sumatra/1272/2
@kjk @nimafazeli I think this can be closed as achievable with current -appdata behaviour

@kjk

This comment has been minimized.

Copy link
Member

commented Jun 9, 2018

Closing as per suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.