desk is a lightweight workspace manager in console.
Install
Install desk as a oh-my-zsh plugin:
curl https://raw.githubusercontent.com/jamesob/desk/master/desk > ~/.local/bin/desk
chmod u+x ~/.local/bin/desk
desk init
Add alias d.='desk .'
into ~/.bash_aliases.
Usage
You can define a desk with command desk edit <desk-name>
,
which create a shell script containing working directory, environment variables,
alias, functions, etc.
List the activated desk (if any) or all existing desks with desk
.
Activate a desk with desk . <desk-name>
.
All elements defined in desk config file will be loaded into the current console.
Quit a desk with Ctrl-d.
A working flow demo:
$ desk edit ucts
$ cat ~/.desk/desks/ucts.sh
# ucts.sh
#
# Description: Workspace for UCTS: UnUnderstanding Computation by Tom Stuart
#
cd ~/Documents/books
rifle 'Understanding computation_From simple machines to impossible programs-Tom Stuart(2013).pdf'
cd ~/Documents/temp/UnderstandingComputation
nvim chapter2.rb
$ desk . ucts