Neither one nor Many
Software engineering blog about my projects, geometry, visualization and music.
When navigating directories, every now and then pushd .
and popd
just aren't sufficient.
When directory structures tend to become quite deep, I get really annoyed with typing change-directory
’s and wish I had some bookmarks.
That's why some time while ago I created a simple tool for usage within (GNU) screen:
CTRL+X pops up a menu for selecting common directories and files ("bookmarks"!).
This makes switching between those long directory structures a lot more pleasant !
// Configuration file ($HOME/.launcher) [ {"Websites, configuration" : [ {"dir" : "/srv/www/vhosts/ray.burgemeestre.net"}, {"dir" : "/srv/www/vhosts/www.burgemeestre.net"}, {"dir" : "/usr/local/src/mongoose/am"}, {"dir" : "/usr/local/src/mongoose/am/output/ray-blog-burgemeestre-net"}, {"file" : "/etc/apache2/vhosts.d/www-burgemeestre-net.conf"}, {"file" : "/etc/apache2/vhosts.d/ray-blog-burgemeestre-net.conf"}, {"file" : "/etc/apache2/vhosts.d/ray-burgemeestre-net.conf"} ]}, {"Common Lisp" : [ {"dir" : "/var/chroot/lispbot/home/trigen"}, {"file" : "/var/chroot/lispbot/home/trigen/bot.lisp"} ]}, {"C++ projects" : [ {"dir" : "/usr/local/src/launcher"}, {"dir" : "/usr/local/src/launcher/src"}, {"file" : "/usr/local/src/launcher/src/parser.cpp"} ]} ]
Choosing a directory in the menu opens it in a new screen tab. Choosing a file opens a new menu which allows you to dispatch it to specific editors or e-mail it (options currently all hardcoded in the source).
Most of the code is still from 2007, but these last two days I refactored the code a bit. And added some build scripts. (Needless to say I didn't get to implementing all features I had in mind.) It's all on github for download.
It installs /usr/local/bin/launcher
and two helper bash scripts (/usr/local/bin/launch_scr.sh
and /usr/local/bin/launch_scr2.sh
).
You bind it to screen in your .screenrc
with this line: bindkey ^x exec /usr/local/bin/launch_scr.sh
.
(Also for your .screenrc
I recommend using a caption if you don't already with:
caption always "%{Yb} %D %Y-%02m-%02d %0c %{k}|%{G} %l %{k}|%{W} %-w%{+b}%n %t%{-b}%+w"
)