My dotfiles for dual boot manjaro + Windows 11, and how to setup/migrate to new system.
Disable bitlocker & secure boot in Windows 11.
In the old system, run python backup.py
to create latest dotfile backup.
Burn the manjaro to usb and boot from usb (using open-source driver).
Current partition configuration
300MB -- fat32 filesystem, tag=boot, mount=/boot/efi
8GB -- tag=linuxswap
Rest -- ext4 filesystem, tag=root/home
Change /etc/fstab
to mount windows files automatically. To find the UUID, first lsblk
to find the name of the disk to mount, then sudo blkid <device name>
to find the UUID.
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=55EB-B69C /boot/efi vfat umask=0077 0 2
UUID=0fa32516-2bc5-48a6-b37b-cb94ada096e8 / ext4 noatime 0 1
UUID=7bb5848e-3288-4540-9a42-c0ce2ccc2217 /home ext4 noatime 0 2
# examples
UUID=74680090680052F2 /home/jxu/Data ntfs-3g rw,permissions,user,exec,mode=1777 0 0
dev/nvme0n1p6 /home/timeshift ext4 defaults 0 0
Run i3+plasma (match in heaven) by this repo. Using Option 2: New XSession
regardless of plasma version so that can switch between plasma and i3 easily.
If there are some issues, use pure i3
login session to debug.
Install nvidia driver and cuda.
First use sudo mhwd -a pci nonfree 0300
to install the latest driver (note if latest driver is not installed second monitor might not work).
Then sudo pacman -S cuda
Install all required softwares.
-
install via
./install.sh
. -
config git
git config --global credential.helper store git config --global user.name "Jianxu Xu" git config --global user.email "[email protected]"
-
config zsh and oh-my-zsh
# change default shell to zsh chsh -s /bin/zsh # install oh-my-zsh sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" # install powerlevel10k git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k p10k configure # configure 10k # other custom plugins git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting git clone https://github.com/TamCore/autoupdate-oh-my-zsh-plugins.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/autoupdate git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf-tab git clone https://github.com/supercrabtree/k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/k git clone https://github.com/MichaelAquilina/zsh-you-should-use.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/you-should-use git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-completions.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-completions git clone https://github.com/KulkarniKaustubh/fzf-dir-navigator.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fzf-dir-navigator
-
Install anaconda and python libraries
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh; chmod u+x Miniconda*; ./Miniconda*; # after install, zsh still can't use conda # but can init in bash ./miniconda/bin/conda init # init for bash
After conda is installed, can install python libraries (examples are
ds.py
andfun.py
) -
Install neovim's plugin and latex.
Follow instructions from lua plugins and setup inkscape plugin.
-
Restore all dotfiles from backup.
python restore.py
Use bindkey
to bind key map to function.
Use bindkey "^Q"
to see the current bindings for <Ctrl-Q>
; "^[f
for <Alt-f>
ls
replaced by eza
. Notably,
-
ls -T -L <level>
is similar totree
w/ max level -
ls -R
list all files including subdir -
ls --hyperlink
gives hyperlink for all files
cat
replaced by bat
diff
replaced by delta
duf
for better df
alt+.
will paste last argument of previous command, useful to change the script name with the same argument.
extract
to extract files: usex <file>
to extract filefasd
to navigate: usev
(file) ando
(dir) to edit/open in file managerdirhistory
to navigate directory:<Alt-Left>
and<Alt-Right>
for prev/next;<Alt-Up>
and<Alt-Down>
for parent/childzoxide
to navigate:z <dir>
to navigate to dir;zoxide query <dir>
to search dir e.g.echo $( zoxide query dot )
zmv
to smart renameCtrl-k
to launch rangerrand-quote
to generate random quote: useCtrl-Q
to generate onemcfly
to view history: useCtrl-R
to search historyfancy-ctrl-z
:Ctrl-z
twice to bring back bg jobs; nofg
needed anymoresudo
: press<ESC>
twice to prepend sudok
: usek
to list files, replacels -l
fzf-dir-navigator
usefzf
to cd to dir,alt-f
to toggle
For autostart, see Auto Start section in i3/config
.
Other than basic movement (see config for details):
-
mod+Tab
cycle through workspaces -
mod+o
back and forth workspaces, usemod+shift+o
to move focused container to opposite workspace -
mod+a/z
focus on parent/child container -
mod+x
show scratchpad (floating window),mod+shift+x
move focused to scratchpad;mod+m
show all scratchpads;mod+u
focus on desired scratchpad -
mod+mouse scroll
to resize scratchpad -
currently
i3-grid
is broken -
alt + c
to remove newlines in selected highlight text (e.g. copy from pdf) -
mod+c
to one-quick mode;mod+r
resize mode