Djot v0.4.6 - Multi-Window Support
Today Djot v0.4.6 is being released with a couple of rather useful quality-of-life features that should improve both the djot editor and player to make them more useful and function in a more intuitive sense.
Head to djot.dev to download the latest version and play around with it
Multi-Window Support
Working with Djot is becoming a better and better experience in terms of performance and usability, but one thing really bugged me is that I was only limited to one Editor window.
With this version Djot will now both allow you to open additional Editor windows and it will remember any open Editor windows along with any open Player windows when restarting the app.
To create a new Editor window simply click the New Window in the file menu (File -> New Window
, and you can also use the hotkey Ctrl+Shift+N
or Cmd+Shift+N
, or by double-clicking the Djot dock icon) and a new Djot window will appear allowing you to work on multiple djots at the same time.
Manual Compile & Run Trigger
One of the major things that bugged my when working on a slightly more involved djot such as the Code Reviewer is that the automatically compiling and running the code could be a crutch rather than something useful.
Especially when working with API calls and having various effects that function when the app initially renders this would simply create a nuisance as the demo preview would show errors while the code is obviously isn't in a working condition (such as when you're in a middle of writing a function and the syntax isn't complete yet).
For that I've introduced the Auto-Run toggle option that allows to simply toggle between manual and automatic-as-you-type compilation and execution.
By default the toggle is On, meaning the djot will compile automtically after a short debounce period with every keystroke, but by toggling it off you will now have a small Run
button on the top-left part of the window allowing to manually and intentionally run and compile the code rather than being tied to your keystrokes.
This is still blazing fast compilation and execution, and you don't have to use your mouse to click the button - while focused on the code editor you can use the Control + Enter
or Command + Enter
hotkey to invoke the compilation.
The Run
button will turn blue when there are changes that can be compiled and run, and otherwise will be transparent and won't do much if clicked when there are no new changes (e.g. you haven't made any changes in the editor files).
Additional Changes
As part of this update I've revamped the File menu and improved the hotkeys situation - now you can use Control+W
or Command+W
to close a single djot tab (rather than closing the entire window).
Fixed the File → Save
functionality as previously it would always function as a Save As
functionality (while the Control + S
in the Editor would correctly save the existing djot rather than prompting with a Save As dialog).
Going Further
There are many more features planned for Djot - including but not limited to:
Windows and Web support (Djot actually already works on the web as can be seen in the Hero of the djot.dev front-page, but it needs further development and integration)
Built-in Database - currently I'm using local storage when I need to store some bits of information, and potentially this can be expanded to use IndexedDB or WebSQL - but what I actually want is to provide a firestore database for each user and each djot individually so that they can sync across devices
Custom Window menu and Custom Tray Icon for Djots - allow djots to customize the window menu along with creating custom tray icons - for that I'll need a 'server' file that will run on the NodeJS side of the djot and I haven't fully figured out how I want to encapsulate and sandbox the 'server' functionality
Robust security and custom dependency loading - provide a way to allow/deny djots from loading custom dependencies from NPM (or otherwise)
These are just the tip of the iceberg of the variety and depth of features planned for Djot in the upcoming versions - some will require more effort than others and as I use Djot more and more I find more stuff that I want or need.
If you have any ideas or features you'd like to see in Djot you're more than welcome to join the Discord server, hop in to the Telegram chat, or create a reddit post - I'd love to hear your feedback!
Download Djot v0.4.6 from djot.dev
Subscribe to my newsletter
Read articles from Eli Sklar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Eli Sklar
Eli Sklar
Hacker and tinkerer since 1999, Javascript developer since 2006, Bitcoin afficianado since 2011, AI utilizer since 2022. I build stuff, sometimes for clients, employers, sometimes for myself, sometimes for opensource. I mostly focus on making my life as a developer easier, more productive, and pleasant overall. I help clients and companies make their workflows more robust, make their developers more productive and happier employees, and their final product better and maintable in the long run.