Skip to content

meinzer1899/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

dotfiles

My Linux dotfiles.

โ–ถ zsh-bench
==> benchmarking login shell of user meinzer1899...
creates_tty=0
has_compsys=0
has_syntax_highlighting=0
has_autosuggestions=0
has_git_prompt=0
first_prompt_lag_ms=26.164
first_command_lag_ms=113.705
command_lag_ms=2.420
input_lag_ms=4.630
exit_time_ms=106.416

Although showing 0 for has_syntax_highlighting, has_git_prompt, has_autosuggestions, has_compsys, these are enabled.

Work Environment

Setup new machine

  1. Install git
  2. Setup WSL
  3. mkdir -p $HOME/.config (otherwise, .config is a symlink to $HOME/dotfiles/.config).
  4. Install zsh and zi
  5. Install stow, run stow .
  6. Install tmux

pip

apt install python3.XX-venv # (e.g. 10)
apt install xclip #zsh-system-clipboard

Don't upgrade system to use other python version than that available in apt. Can cause other commands (e.g. apt-get) to break.

Remap CAPSLOCK to ctrl

https://askubuntu.com/questions/33774/how-do-i-remap-the-caps-lock-and-ctrl-keys#comment1154797_521734 sudo vi /etc/default/keyboard and change XKBOPTIONS="ctrl:nocaps" setxkbmap -option ctrl:nocaps

https://superuser.com/questions/949385/map-capslock-to-control-in-windows-10

VirtualBox

Update GuestAdditions after updating VirtualBox via https://help.ubuntu.com/community/VirtualBox/GuestAdditions.

sudo apt-get install virtualbox-guest-additions-iso

wsl

zsh and zi

https://github.com/zsh-users/zsh/blob/master/INSTALL

$ZPFX: https://wiki.zshell.dev/docs/guides/customization#ZPFX

Install zsh to $HOME/.zi/polaris, where no sudo is needed.

mkdir -p $HOME/.zi/polaris
./configure --prefix=$HOME/.zi/polaris

zi loader is included in dotfiles (.config/zi); if not, see https://wiki.zshell.dev/docs/getting_started/installation => loader.

misc

zshrcs

git

For Ubuntu, this PPA provides the latest stable upstream Git version: https://git-scm.com/download/linux.

Add .gitconfig.local for user private global entries https://git-scm.com/docs/user-manual.html#telling-git-your-name

Add ssh key so that you can push to dotfiles repository with correct user.

In dotfiles repository, change local email to noreply email from Github (preferences, email) https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address#setting-your-email-address-for-a-single-repository

ssh keys: ~/.ssh/config specify, which key belongs to which host (https://stackoverflow.com/a/69764024)

๐ŸฆŽ Githooks: per-repo and shared Git hooks with version control and auto update. interactive git with the help of fzf Protect and discover secrets using Gitleaks ๐Ÿ”‘ Command-line Git information tool

alacritty

https://github.com/alacritty/alacritty/blob/master/INSTALL.md

cargo build --release

Windows: download executable

TMUX

https://github.com/tmux/tmux/wiki/Installing#from-version-control

sh autogen.sh
./configure
make -j$(nproc) && sudo make install

tmux new -s tmux

.tmux.conf:

cargo and rust

Search rust book via cli:

https://github.com/0xhiro/thebook

fzf

To auto-accept entry on Enter when searching with CTRL-R, use junegunn/fzf#477 (comment)

Vim Integration: https://github.com/junegunn/fzf/blob/master/README-VIM.md

docker

analyze image size, vulnerabilities and more: https://github.com/wagoodman

vim

https://learnvimscriptthehardway.stevelosh.com/

https://github.com/mattmc3/neovim-cheatsheet

Important infos about editing .vimrc: https://vi.stackexchange.com/a/7723/30978

lua support

apt install luaX.X libluaX.X-dev luajit
./configure --enable-luainterp=yes

devcontainer

Login to dev container via ssh; install zsh and copy dotfiles https://github.com/dpetersen/dev-container-base

linter

https://github.com/caramelomartins/awesome-linters

https://github.com/iamcco/diagnostic-languageserver/wiki/Linters All of them are configured via coc-diagnostic. Activate them by mapping the linter to the desired filetype in coc-settings.json. https://github.com/iamcco/coc-diagnostic/blob/master/src/config.ts

bash-language-server

volta install bash-language-server

vint

VimL linter https://github.com/Vimjas/vint

hadolint (Dockerfile linter)

https://github.com/hadolint/hadolint

C++ cpp

https://github.com/HappyCerberus/daily-bite-cpp (especially Modern-only C++ Course) Playlist: Modern C++ Series - Mike Shah https://akrzemi1.wordpress.com/ https://www.meetingcpp.com/blog/blogroll/

playground HU print chunks 0001'0203'...'0e0f

ccls

CMake

Use install-cmake.sh from foonathan to install to /usr/local. May remove "old" cmake versions, check via which -a cmake.

https://blog.feabhas.com/category/build-systems/ with https://github.com/feabhas/cmake-presets-blog

misc

cmake4vim cmake-language-server

Determine the minimal required CMake version of a project: cmake_min_version

llvm, clang, clangd

https://github.com/google/sanitizers/wiki/AddressSanitizerFlags

message(STATUS "Address sanitizer enabled")
add_compile_options(-fsanitize=address,undefined)
add_compile_options(-fno-sanitize=signed-integer-overflow)
add_compile_options(-fno-sanitize-recover=all)
add_compile_options(-fno-omit-frame-pointer)
add_link_options(-fsanitize=address,undefined -fuse-ld=gold)

Installation description: https://apt.llvm.org/ -> Automatic installation script installs all llvm packages (also clangd, clang-tidy, include-cleaner etc) at /bin. Also adds apt.llvm.org to apt package list to automatically get updates.

Need to update alternatives for clang-format, clangd, clang-tidy.

sudo update-alternatives --install /bin/clang-format clang-format /bin/clang-format-17 20

Cache for clang-tidy static analysis results: https://github.com/matus-chochlik/ctcache/tree/main

https://stackoverflow.com/questions/51582604/how-to-use-cpplint-code-style-checking-with-cmake

https://github.com/lmapii/run-clang-tidy

https://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm

GDB

:packadd termdebug
:Termdebug

asynctask

dotfiles management

mold

CC="clang" CXX="clang++" LDFLAGS="{LDFLAGS} -fuse-ld=mold" cmake ...

neovim nvim

The Laziest Neovim (NeovimConf 2023) | Speed Up Neovim Neovim for Newbs. FREE COURSE The Only Video You Need to Get Started with Neovim The perfect Neovim setup for C++ C++ Coding with Neovim - Prateek Raman - CppCon 2022 Neovim for C++: https://www.youtube.com/watch?v=lsFoZIg-oDs

Use FZF instead of telescope

Tridactyl

:mktridactylrc => saves settings to rc (location see below)

location of tridactylrc

other

https://hackingcpp.com/dev/command_line_tools.html

https://github.com/tummychow/git-absorb

https://github.com/jarun/ddgr with https://github.com/tats/w3m/blob/master/doc/README

Whiteboards with https://tldraw.dev/. https://github.com/casey/just https://github.com/NoahTheDuke/vim-just (Plug 'NoahTheDuke/vim-just', { 'for': 'just' })

offline documentation