2

I use Code a lot, and I know that restoring apps' state is a core elementary OS design principle. But I find myself bugged by the fact that every time I open Code I am presented with a huge list of tabs containing all the files I've previously opened. Any other new file I open just gets added to the list of tabs, and I often find myself having to close a huge number of tabs. Take a look at the tabs bar in the below image:

enter image description here

Is there a way to configure Code to not restore the previously opened files? I used dconf-editor to explore Code's gsettings, but any change there is overwritten. I've also added Code to the Do not collect data for the following: apps list under the Security and Privacy Settings plug, all without any effect on Code's behavior.

  • I created a habit of closing Code using a keyboard shortcuts combo: Ctrl+W to close a file, followed by Ctrl+Q to quit. It's not ideal, but it's quite fast. There is also the option to right-click a tab and select "close all other tabs". – jena Nov 15 '19 at 15:42
2

Unfortunately I don't believe this is possible currently, Code calls restore_opened_documents in the activate function whenever there is no currently opened window without checking any gsettings key that would give an option. However there is a pull request to Code (https://github.com/elementary/code/pull/612) that would change it to respect the privacy settings, I expect a future update will bring this functionality.

  • Thank you for bringing this pull request to my attention, I will keep an eye on it. – Vlad Pop Nov 14 '19 at 18:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.