07 Sep 2008
Research Desktop Workspace

This is the “research”[*] desktop workspace I’ve settled on after trying several configurations and procedures for organizing things. Firefox takes up the majority of the workspace, with two Nautilus windows to the side, one for today’s folder and one for my notes folder. You’ll notice that the icons in the Nautilus windows are different sizes; I use ctrl/+ and ctrl/- as needed to scale them to fit the content. I’ve used xclock windows to obscure a couple areas — I’m not really that obsessive about watching the clock. Below the screenshot I describe how I use it and the scripts that set it up.

full-size image (1920×1200, 360KB) on Flickr

The Today folder is my working folder. It always has softlinks to Notes, Yesterday, and Tomorrow; these change dynamically, automated by a script described later. Whenever I run across interesting web pages I want to review or refer to later, I drag a link into the Today folder; I’ve found that this is much more convenient that using bookmarks. Today is also my default download location. I’ll usually clean it out by the end of the day by dragging any left-over items into the Tomorrow folder (which becomes the next day’s Today), but I’ll sometimes leave items there for later retrieval or historical context.

The Notes folder contains some of my long-term projects and reference material. I’ll also drag items from Today into Notes if I won’t be using them for several days, although I usually just drag them into Tomorrow.

So that they’ll be conveniently at hand from other workspaces, my Desktop folder also has softlinks to Notes, Yesterday, Today, and Tomorrow, automated by the same script to keep them relative to the current calendar date.

All these softlinks point into a permanent “diary” tree: $HOME/diary/YYYY/MM/DD; Notes is in $HOME/diary/Notes. I’ve played with both Google Desktop and Beagle to index content, but the performance overhead far outweighed their utility to me. I’ll sometimes use recursive grep to scan the diary tree for content, but most often I can find what I want with the locate command or a quick Nautilus perusal. As with bookmarking, I’ve found this structure to be the most convenient for me, moreso than trying to create some meta-structure and keep things arranged there. I do have a separate reference tree where I’ve organized some long term information, but it doesn’t play much in day to day work like the diary tree does.

If you have suggestions for improvements, or would like to mention alternatives, feel free to do so in a comment. However, if you include too many links your comment may automatically be held for approval. I’ll try to catch those as soon as I can.

[*] “Research” in the sense that this is the workspace where I do 99% of my web browsing and I couldn’t come up with another concise term for it. I mentioned it back in April 2008 while describing some problems I was having after replacing Fedora Core 6 with Fedora 8. If you’re curious, that post has links to the Nautilus bug reports I made. I’ll see if they go away when I install Fedora 9, Real Soon Now.

The Scripts

If you want to copy the code, use the “text” links rather than cut/paste in case the formatting plugin trashed the scripts. Update: I just noticed that the plugin adds line numbers to the scripts in the RSS feed; sorry about that.

bx (text) is run from the Command Line applet (visible in the top center of the screenshot) to open the workspace windows; it could be run from a desktop link or a shell window if you prefer. I named it “bx” because the 2nd (“B”) workspace is the one I use for this; in the lower right of the screenshot you can see I have 5 workspaces, which I call “A” through “E”. The --geometry options were added to overcome a problem I had with Nautilus after moving from Fedora Core 6 to Fedora 8.

  1. #!/bin/bash
  2. nautilus –geometry 376×650+1+28 $HOME/Desktop/Today &
  3. nautilus –geometry 376×442+1-28 $HOME/Desktop/Today/Notes &
  4. firefox  –geometry 1531×1120-0+28 &
  5. # end

diary/cleanup (text) is run ad hoc. It goes through the diary tree to remove any empty directories, then calls diary-setup to make sure today’s relevant directories and softlinks are set up. Note the -depth option to find, so that subdirectories are deleted first, potentially leaving parent directories empty and deletable.

  1. #!/bin/bash
  2. cd ~/diary && find ./ -depth –type d –exec rmdir –ignore-fail-on-non-empty {} \;
  3. diary-setup.sh
  4. # end

diary-setup (text) is run at 00:01 each morning by cron. I also run it from $HOME/.bash_profile for those rare occasions when my laptop may have been down when the cron job would have run. It creates the directories in the diary tree for the relevant dates, removes the old softlinks from the day before yesterday, and sets up the new softlinks. As a sanity check, it aborts unless the Desktop and diary folders already exist.

  1. #!/bin/bash
  3. # —————————————————————————-
  4. # c o n f i g u r a t i o n
  5. # —————————————————————————-
  7. DIARY=$HOME/diary
  8. NOTES=$DIARY/Notes
  9. DESKTOP=$HOME/Desktop
  11. # —————————————————————————-
  12. # s e t u p
  13. # —————————————————————————-
  15. ABS_OLD_YESTERDAY=$DIARY/`date +%Y/%m/%d -d '2 days ago'`
  16. ABS_YESTERDAY=$DIARY/`date +%Y/%m/%d -d 'yesterday'`
  17. ABS_TODAY=$DIARY/`date +%Y/%m/%d -d 'today'`
  18. ABS_TOMORROW=$DIARY/`date +%Y/%m/%d -d 'tomorrow'`
  20. if [ ! -d $DIARY ]; then
  21.         echo "? Diary root directory does not exist"
  22.         exit 1
  23. fi
  25. if [ ! -d $DESKTOP ]; then
  26.         echo "? Desktop directory does not exist"
  27.         exit 2
  28. fi
  30. # —————————————————————————-
  31. # m a i n
  32. # —————————————————————————-
  34. mkdir –parents –mode 0700 \
  35.   $NOTES \
  36.   $ABS_YESTERDAY \
  37.   $ABS_TODAY \
  40. for LINK in Yesterday Today Tomorrow Notes
  41. do
  43.     if [ -L $FILE ]; then
  44.         rm $FILE
  45.     fi
  46. done
  48. LN_CMD="ln –symbolic –force –no-dereference"
  50. $LN_CMD $NOTES         $ABS_TODAY/Notes
  55. $LN_CMD $ABS_TODAY     $DESKTOP/Today
  58. # —————————————————————————-
  59. # end
  60. # —————————————————————————-
Category: Daily-Grind
Tags: , , ,
(comments closed) | (trackbacks closed) | Permalink | Subscribe to comments |

Site last updated 2015-01-12 @ 13:31:07; This content last updated 2008-09-07 @ 05:35:07