Swordfish90 / cool-retro-term

A good looking terminal emulator which mimics the old cathode display...
22.42k stars 856 forks source link

Persistent Settings #551

Open xdmtk opened 5 years ago

xdmtk commented 5 years ago

Hi, I can't seem to find any sort of config files for the various prebuilt profiles. The default font-scaling is way too large. I've edited the font scaling in the settings menu, but these settings never persist. I've created new Terminal profiles, but they immediately disappear when I close the application or run a new instance of it.

Am I going crazy? I must be missing something very obvious, I'd be really surprised to find out these profiles are somehow embedded into the binary.

Thanks

sabrehagen commented 5 years ago

Profiles are located in ~/.local/share/cool-retro-term/QML/OfflineStorage/Databases in a sqlite database. It's a shame the author did not follow the unix philosophy of making everything a file. Instead the config is stored as stringified JSON, for example:

[
  {
    "text": "Real Pretty",
    "obj_string": "{\"ambientLight\":0.1109,\"backgroundColor\":\"#000000\",\"bloom\":0.302,\"brightness\":1,\"burnIn\":0.1451,\"chromaColor\":0,\"contrast\":0.5977,\"flickering\":0,\"fontColor\":\"#ff007f\",\"fontName\":\"COMMODORE_64\",\"fontWidth\":1,\"glowingLine\":0.1041,\"horizontalSync\":0,\"jitter\":0,\"margin\":1,\"rasterization\":2,\"rbgShift\":0,\"saturationColor\":0,\"screenCurvature\":0.0256,\"staticNoise\":0,\"windowOpacity\":1,\"version\":2}",
    "builtin": false
  }
]
xdmtk commented 5 years ago

Nice, thank you. Can't say I would have been able to find that myself, as it doesn't seem to be documented anywhere. I could throw up a pull request to document this somewhere if that would be a good idea.

Also just to confirm the persistence issue, is this occurring for anyone else? I find it surprising that sqlite was utilized to be read-only.. That might be another useful feature to contribute, so long as this is indeed a bug..

nublug commented 4 years ago

The only way I've gotten this to work is by creating a new profile with the settings as I want them, exporting the profile to a place of my choosing, then importing that profile on a new instance, and then calling that profile specifically when I open cool-retro-term with the -p option every time from then on. I use i3 so I was able to bind $mod+t to cool-retro-term -p MyProfile, and not have to type that out, but you could also set it up as an alias.