Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.64k stars 580 forks source link

Feature request: Additive configuration launch option #1970

Open ZeekDaGeek opened 5 years ago

ZeekDaGeek commented 5 years ago

Versions

ConEmu build: 190714 x64 OS version: Windows 10 x64

Problem description

Would it all be possible to have an additive configuration launch option for configurations? At the moment I have to keep two different configurations and attempt to keep them in sync with each other instead of a config system similar to many modern applications of a base config plus the user defined changes only.

Something like a conemu.exe -Config ./base_config.xml -ConfigMod ./config_specific_to_task.xml

Desired affects

My main ConEmu instance is Quake mode that I will use for vim, ssh, etc. I want this one to have tabs always on, a theme suited to what I'm doing, saved size and window position and so on.

My default ConEmu config for opening things like .bat files, however that means that every boring script would be opening as a giant full screen quake style thing instead of just a small throw away window, with no tabs, no saved position etc.

It would be nice if I could set a base ConEmu.xml and then when launching my main window layer just the additional settings on top of the base config without having to manage and keep both in sync.

It would also be very nice if saving window and size was more context aware as well saving the size and pos for the script ran.

Maximus5 commented 5 years ago

I had that idea in mind but forgot about it completely. Actually, there is an Import button in the settings dialog and it does exactly what do you want. So, the only thing (I hope) to implement is to create dedicated startup switch.

It will be for example

ConEmu.exe -LoadCfgFile ./base.xml -ImportCfgFile ./file1.xml -ImportCfgFile ./colors.xml

Ref: gh-375

ZeekDaGeek commented 5 years ago

The command structure sounds exactly like what I would want!

However, at the moment it seems like Import doesn't quiet work properly?

Here's the config I attempted to import, using just the "Import" button in the settings:

<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
    <key name="ConEmu">
        <key name=".Vanilla" modified="2019-08-21 19:45:13" build="190714">
            <value name="QuakeStyle" type="hex" data="01"/>
        </key>
    </key>
</key>

The only thing changed specifically being Quake Style, however, it appears that a lot of features got set back to default -- single instance mode gets turned on, zoom gets reset (Ctrl+Scroll wheel zoom) etc.

It also appears like some settings don't get applied with an import until the next restart. For example the font size of the tab bar doesn't update until after a restart. Maybe features drifted on and import got left behind? I'm not quiet sure.

Maximus5 commented 5 years ago

Ah, that's why I have not released the feature. Moreover, there may be problems with merging palettes and tasks...