DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Manage Multiple Working Environments in Console


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


Published

May 30, 2019

Last Updated

Jul 15, 2020

Category

Tech

Tags

  • desk 1
  • workspace 2

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor