# Here’s what your Desktops look like

As promised (though admittedly a couple weeks late), here are the pictures of your Desktops. Only two screen shots were sent in and a couple text-only descriptions — not quite the level of participation I was hoping for. I guess I should have offered up chocolate peanut butter instead of MATLAB t-shirts!

Brett Shoelson, using 7.8 (R009a)

I have several layouts, and I toggle between them depending on what I’m working on. When I’m playing with images (which is much of the time), I like to give my editor and my figure window prominence. Everything is docked. My Editor and Help windows are stacked; my Workspace Browser, Command History, and Current Directory Browswer are stacked and given little space; and my Figure Window is docked on the top left. That gives me a good way to interact with the images.

Matt Fig, using 7.4 and 7.5 (R007a and R2007b)

Here is my favorite setup for my MATLABing sessions. As you can see, I like it simple. I do use the command history, although maybe only 2-3 times a month. That is the reason it is almost blocked out, I can easily get to it by sliding the command window over yet it is not in my way.

I personally feel that using all of the newer tiled windows is very distracting. These little windows both distract and shrink the available command window size. In my opinion they are not necessary at all, and I get the functionality by writing my own functions to do some of these tasks. For example: for easily loading M-Files, MAT-Files and figures, I wrote WHATS. For dealing with variables, I wrote WHOMS and other functions I haven’t put on the FEX. I much prefer something to be there when I need it, yet NOT be there (at all!) when I don’t.

That being said, the one extra I do use, only on work computers, is the shortcut bar. This is useful for launching GUIs quickly. Even then I probably wouldn’t use this at all if it wasn’t for the fact that I set it up this way when I write a GUI for someone else to use, on their computer. I know many people cannot remember the name of the GUI to launch it, so this little bar is handy in this circumstance.

Christian Peel, using 7.6 (R008a)
(no screen shots)

The only thing that I have Matlab display is the command window. I edit in emacs or xemacs via emacslink, and also use that interface for debugging. Obviously I don’t use R2009a, since emacslink has been disabled in that release; I use 2008a.

You’ve made vague hints in the past about the possibility of scripting the editor; an API or a powerful utility for editor keybindings and macros is even more essential now that you’re dropping emacslink. If I’m to ever use the Matlab edtior, I’d like customizable keybindings for opening files, switching tabs, and every possible thing one could do in the Matlab editor. I don’t want to be required to take my hands off of the keyboard when I’m editing and debugging.

Kevin using 7.8 (R009a)
(no screen shots)

I dual monitor my desktop so I typically have the Matlab editor undocked and taking up the main monitor. On the 2nd monitor I have the Variable Editor and the workspace taking up the upper half of the desktop and the command window and command history on the bottom. I use the variable editor and workspace to dubug a lot of my code and see what exactly is going on with the variables. After reading a prior post I’m going to look into docking the Matlab help, I think that would be very convenient.

Ustun Ozgur (version not specified)
(no screen shots)

I use KDE as my window manager on Linux. I use multiple desktops, and each different application resides in a different desktop.

I keep only MATLAB on Desktop 3 for example, so to switch to MATLAB application, I just press Ctrl-F3. To switch to another application, web browser, for example, I switch to the first desktop etc. So, I rarely need to use Alt-Tab, and that way, I can be sure that I will switch to MATLAB when I press Ctrl-F3.

I use two monitors, a 22′ LCD and a 17′ CRT. I keep the Command window on the right monitor, maximized; and the editor window on the left monitor, again maximized. I don’t use Workspace, Current Directory etc. I sometimes go full screen to get even more space, using Alt-F11 in KDE.

I use the window switching shortcuts a lot (Ctrl-0 for command window, Ctrl-Shift-0 for the editor, Ctrl-4 for the doc). I usually use common commands like cd, pwd to navigate through directories, and use the edit command extensively to open files, rather than rely on the GUI. Sometimes I have several files, and rather than trying to select the correct file from the tab bar, I simply type ‘edit filename.m’ to switch to it. (Actually, I rarely type that whole thing thanks to auto completion by the up arrow key, I usually simply type ‘ed’ and then press Up.) To open a particular file in which I remember which variable was used, I use a function ‘g’ to search for that variable, it finds the file using ‘grep’ in File Exchange, and I simply click the hyperlink to open the file in the Editor.

The g function is below. I use the grep created by us here but made the following modifications to ignore case by default, and print line numbers by default:
———–
Change line 84 from
‘-i’ true 0 [] 0 ‘ignore case’
Change line 89 from
‘-n’ true 0 [] 0 ‘print line number’
———–

function g(string,r)
% Searches for the string in m files
% Usage:
% "g snr" searches for snr in the current dir
% "g snr 1" searches for snr in the current dir and subdirs

if ~exist('r'), r = 0; end
if r
grep('-r', string,'*.m')
else
grep(string,'*.m')
end


I use emacs-style keybindings, and smarttab. Other than these, I have some shortcuts, but use them rarely. I use emacs when I’m not programming a GUI, and when I don’t debug.

One last tip for KDE users is that when I press F1 to read documentation in command window, Alt-F5 which maximizes the window works for that little documentation window, so I don’t have to switch to Doc viewer, or I can view two Docs simultaneously.

Yair Altman using 7.4 and 7.5 (R007b and R2008a)

I normally use R2007b. I have access to R2008a, but my largest client uses 7b so I usually use that version. I find that except for the improved code-folding on later versions (and the new java EDT functions), there aren’t many features I really miss in 7b, so it suits me fine.

I keep my Editor in a separate window from the desktop. The reason for this is because I typically write large m-files – large both in width (my code/comment lines often reach 100+ chars) and in length – some files are thousands of lines long. I know that coding extremely large source-code files goes against several important software-engineering practices, but I find that for me it is much easier to code and maintain a well-commented large file than dozens of small files. Anyway, I need plenty of real-estate for my editor, and so it gets its own large window. In it, I typically arrange all the file tabs on the left – this is handier than the default bottom layout, since it enables easy document switching when I have several dozens of files open as I typically do (just imagine the difficulty in managing the same number times 20-50 if I didn’t use large files in the first place…

My desktop usually has the workspace on the left side, with #bytes and class information replacing the default Min-Max fields. This is very useful in my work, which often uses Java and Matlab class objects, complex data structures, and more memory issues than I would care to have. the majority of the desktop area is reserved for the Command Window, which I heavily use for debugging. I often list (‘disp’) the complex data structures there, and so I want to have a large area to easily display the data and pinpoint what I need. The history and profiler panels often reside next to the Command Window, hidden from view until summoned (see attached screenshot). Like Ken, I too use the shortcuts menu for often used projects/tasks. I typically reduce the desktop font to 8-9 pixels (depending on the display), in order to cram more data into my desktop & editor. Setting the font face/size, setting compact format, and increasing the history from 5K to the maximum are usually some of my very first actions when setting up a new environment.

For documentation, I usually use the Command-Window ‘help’ or simply open the file (via Ctrl-D in the Editor) to read its help section(s). I find this to be much faster than the ‘doc’ command, or even worse – the online documentation. Sometimes I use them when the text-based help is insufficient, but the help text is usually good enough for me. When I do open doc, via the help links, or via the ‘docsearch’ command (which is surprisingly better/faster than the standard ‘doc’ command), I use a separate window since the doc window seems too crowded when docked in the desktop.

I do not use docking for my figures – each has a separate window, which is often maximized. The reason is that I typically display figures heavily-laden with data plots and/or uicontrols, and they also seem crowded when docked. When I don’t need them, I simply minimize them to the Windows task bar.

My favorite desktop feature is undoubtedly the debugging integration between the editor and the desktop.

Thanks to all those who sumbited their Desktop configurations!

|