Focus Mode plugin

Plugins for SynWrite and CudaText...
Post Reply
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Focus Mode plugin

Post by Stefan »

I love FocusMode. Great feature :D
Under certain circumstances, however, it can be distracting, like say, when I select paragraphs, or when I move text around.
Could I get a toggle command?
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Post by main Alexey »

it was easy to change the plugin. updated in AddonsManager (call 'plugins / addons manager / update').

2023.02.13
+ add: command "Toggle" in "Plugins / Focus Mode" menu
* change: config file is changed to (CudaText)/settings/plugins.ini (section is changed too)
Stefan
Posts: 112
Joined: 06.10.2012 15:06

Post by Stefan »

Thank you. Much appreciated!
Random Void User
Posts: 22
Joined: 13.07.2024 21:19

Focus Mode Plugin Startup State Should Be INI Field

Post by Random Void User »

I do not want Focus Mode to be toggled on when I start CudaText. I will only use it if I want it. I had to change __init.py__ because there was no option for the plugin INI stanza.

Code: Select all

class Command:
    def __init__(self):
        self.load_opt()
        self.active = False # hard-wired value, changed to False
This choice should be an INI setting:

Code: Select all

[focus_mode]
file_extensions=txt,fountain
dim_value=150
active=false
PS Watch capitalization issues with the INI read, either "false" or "False" or even "FALSE" should be valid.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Focus Mode Plugin Startup State Should Be INI Field

Post by main Alexey »

ok, I will add the option 'active'. INI format means it must be 0 or 1. not 'false'!
will update plugin in 1-2 hours.

EDIT: updated.
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Focus Mode: how to toggle

Post by main Alexey »

merged topic to old topic from 2023 year.
Random Void User
Posts: 22
Joined: 13.07.2024 21:19

Re: Focus Mode Plugin Startup State Should Be INI Field

Post by Random Void User »

main Alexey wrote: 24.08.2024 05:52 INI format means it must be 0 or 1. not 'false'!
INI does not specify.
TOML does.

Thank you for the very quick update!
main Alexey
Posts: 2245
Joined: 25.08.2021 18:15

Re: Focus Mode plugin

Post by main Alexey »

yes, but as i remember Win3x times, OS had ini files with values 0 / 1. CudaText plugins usually use 0 / 1.
Post Reply