The main purpose of this post is that I don’t forget how I set up my workspace whenever I swap distros, and tend to do that a lot. But I’ve had people asking me what my work system is like, so I thought it would be a good idea to put everything out in the open, hopefully I would be of some assistance. I have recently switched from Ubuntu to Manjaro, and here is how I set everything up for this new environment. I tried setting up Arch Linux for this laptop, but I thought I don’t need that much of a bleeding edge distro and stability is a concern for me, so I settled for Manjaro. There are a couple of priorities when it comes to setting up a workspace for me, cross-platform (sync feature), version-controlled and flexibility. Also, everything here is free per say, but donating to FOSS projects is really important to keep this culture going.
Enabling AUR
Some of the packages that are used here requires packages from Arch User Repository (AUR), if you’re not comfortable using packages from here, you will not be able to get everything all set up.
Enabling AUR is really simple. Go ahead and open up add/remove software
, go to the AUR
tab and toggle Enable AUR Support
. Please use AUR at your own risk.
Code and Git
Visual studio code
VScode is arguably the most versatile development environment I have used. I use this pretty much for all kinds of editing I do, scripts, documentation, notes, even this site. Needless to say, what makes it great are the plugins and customizability.
Installing
If you have already enabled AUR, then you can simply install it using the add/remove software GUI to install . Otherwise, you could also clone the official binary from the AUR directly. However, you will have to manually install VSCode again whenever there’s a new update.
Set up a directory for your manually installed binaries, something like /home/your_name/bin/
.
Under your selected directory,
1
2
git clone https://aur.archlinux.org/visual-studio-code-bin.git
makepkg -i
And you’re good to go! You can read the official Arch wiki for more details about VSCode on Arch.
Plugins for VS Codes
Current plugin list incase my incompetent self deleted everything and lost them.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
10F.laetus
aaron-bond.better-comments
ajshort.latex-preview
gerane.Theme-VibrantInk
ginfuru.ginfuru-vscode-jekyll-syntax
ginfuru.vscode-jekyll-snippets
Ikuyadeu.r
James-Yu.latex-workshop
KnisterPeter.vscode-github
ms-vscode-remote.remote-containers
ms-vscode-remote.remote-ssh
ms-vscode-remote.remote-ssh-edit
ms-vscode-remote.remote-wsl
ms-vscode-remote.vscode-remote-extensionpack
streetsidesoftware.code-spell-checker
tomoki1207.pdf
torn4dom4n.latex-support
Plugins on servers:
1
2
3
4
5
bierner.markdown-mermaid-1.8.1 grapecity.gc-excelviewer-3.0.40 streetsidesoftware.code-spell-checker-1.9.2
christian-kohler.path-intellisense-2.3.0 ikuyadeu.r-1.5.1 tomoki1207.pdf-1.1.0
donjayamanne.githistory-0.6.12 jithurjacob.nbpreviewer-1.2.2 yzhang.markdown-all-in-one-3.3.0
eamodio.gitlens-10.2.2 ms-python.python-2020.9.114305
felipecaputo.git-project-manager-1.7.1 reditorsupport.r-lsp-0.1.11
Update (2020-01-15): I recently discovered a plugin called TODO tree, it scans keywords such as “TODO”, “FIXME” and pulls everything together in a single list. This is INCREDIBLY handy and I wished I had found out about this earlier.
R on remote server
If you want to give your server terminal steroids, you may consider getting radian. It is a Python front for R and provides a syntax-highlighted console and auto completion among other things. I recommend checking out Ren Kun’s blog as to how to set up your VScode and remote server for radian.
Installing your own R on the remote server
- wget linux distro to directory
- setup shortcut if you don’t have the permission to sudo install a system wide version in /usr/lib/bin Setting up your PATH
.bash_profile and .bashrc are files containing shell commands that are run when Bash is invoked. .bash_profile is read and executed on interactive login shells, while .bashrc on non-login shells. ()[https://linuxize.com/post/bashrc-vs-bash-profile/]
so you need to put this in your .bashrc or .bash_profile (if you’re using a logged in terminal) since our VS code runs directly on remote, we will not invoke the –login mode -> put PATH setting in .bashrc export PATH="/home/alex/R-4.0.2/bin:$PATH"
Citation and document production
Setting up a good literature management tool will be tremendously helpful if you read a lot of literature on a regular basis, which you should if you’re in academia. This is a system that has worked for me over the years and has helped a hopeless procrastinator churning out last minute reports without spending time formatting all the cited items. As Bill Gates put it:
I choose a lazy person to do a hard job. Because a lazy person will find an easy way to do it.
😉
I use Zotero + MEGA drive to keep my personal academic library synced across all devices for a couple of reasons:
- Plugins to automatically update .bib library
- Free account with cloud sync feature (I will address the size limitation later)
- PDF attachment manager
Zotero
- Download tar
- extract
- set up launcher
- sync with external drive (MEGA)
- Example: generate biblatex .bib file
Latex, Better Bibtex latex workshop
Texlive on Arch linux
Following the Arch linux wiki
Install texlive-core, -bin, biber
Install tllocalmgr
so far I haven’t managed to install anything manually using this tool yet…
native directory of tllocalmgr is located at: /usr/local/share/texmf/tex/latex
VScode as Tex editor
Plugins
Zotero integration with Bibtex
Download better bibtex plug-in https://github.com/retorquere/zotero-better-bibtex/releases/tag/v5.2.144 , install within Zotero Set cite key Generate collection automatic update .bib file
Zotfile
https://www.nrel.colostate.edu/set-up-best-reference-manager/
- set Zotfile source folder, location of files
- general setting custom data directory
Megasync
In order to get the files to sync automatically the moment you save a pacman install: megasync, dolphin-megasync-git
Mathcha
For equations and det
Git journal (Android)
It’s super handy to have a raw ‘idea’ notebook where you can immediately dot down interesting ideas worth exploring later. Paper based systems are fine, but I often get random ideas in the middle of nowhere with no access to pen and paper.
Project and time management
Even though a clean directory and codes are essential