Skip to content

jack828/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

Some stolen from:

Huge thank you's to the vim-ers and tmux-ers at Clock Limited for the support in getting my setup working smoothly.

Setup

Compile the statusline binary: (you will need gcc and strip)

$ make

Deploy dotfiles

$ make deploy

Updating dotfiles

After making a change in the repo, you can redeploy the changes simply with:

$ make deploy

Tools/Package Managers

  • Font: FiraCode Nerd Font Nerd Fonts - put files in ~/.local/share/fonts
  • go (apt is probably good enough)
  • rust (for cargo) - Installation
  • eza - ls replacement Installation (exa is unmaintained exa - ls replacement Installation)
  • fzf Installation - NOTE neovim might install this for you in ~/.fzf so check that first and ./install from there
  • pip sudo apt install python3-pip

Shell

Programs

  • Kitty - Installation, then follow the Desktop Integration for Linux
  • gnome-tweaks (apt install) - Keyboard -> Additional Layout Options
    • -> Caps Lock Behaviour -> Make Caps Lock an additional Esc
    • -> Ctrl Position -> Swap Left Alt with Left Ctrl
    • -> Key sequence to kill the X server -> untick
  • If using budgie, make it so workspaces are across all monitors gsettings set org.gnome.mutter workspaces-only-on-primary false
  • Lazygit Installation (use "pull from github releases" if below 25.04)
  • Docker Use the script
  • VLC - apt install
  • Obsidian Installation - flatpack was used last time
  • Mullvad VPN Installation
  • Flameshot Download
    • Download appimage, chmod, move to ~/.local/bin/flameshot
    • Disable screenshot keyboard shortcuts
    • Add custom shortcut /home/jack/.local/bin/flameshot gui
    • Add a startup program in the whatever place /home/jack/.local/bin/flameshot
  • xclip
  • Android SDK
    • Download the command line tools
    • Extract to /home/jack/android-sdk, so that the structure is like /home/jack/android-sdk/cmdline-tools/latest/bin/sdkmanager
    • Run $ANDROID_HOME/cmdline-tools/bin/sdkmanager --licenses
    • Run $ANDROID_HOME/cmdline-tools/bin/sdkmanager "platform-tools" "platforms;android-33" "build-tools;30.0.3"
  • yarn Installation, make sure to use --no-install-recommends to prevent nodejs package installed - handled with nave
  • Java 18
    • download OpenJDK 18 from the archive https://jdk.java.net/archive/ wget https://download.java.net/java/GA/jdk18.0.2/f6ad4b4450fd4d298113270ec84f30ee/9/GPL/openjdk-18.0.2_linux-x64_bin.tar.gz
    • tar xvf openjdk-18.0.2_linux-x64_bin.tar.gz
    • sudo mv jdk-18.0.2 /usr/lib/jvm/java-18-openjdk-amd64
  • google-drive-ocamlfuse install using ppa
    • copy the systemd unit file and enable

TMUX

Now with >=3.4 support! When transferring, do NOT copy ~/.tmux/plugins, only the ~/.tmux/resurrect directory!

Install TPM

$ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

Inside TMUX, run prefix + I to install plugins.

NVIM

Install neovim nightly (>=0.8.1) and required packages

  • apt: silversearcher-ag
  • pip: neovim msgpack
  • github: bat@^0.18.0
  • snap: go
$ chmod u+x ./nvim.appimage
$ mv ./nvim.appimage ~/.local/bin/nvim
$ sudo apt install -y silversearcher-ag python3-pip
$ pip3 install neovim msgpack --upgrade
$ sudo snap install go --classic
$ <download and install github packages>

Once in vim, the language servers should be installed automatically. If not, refer to lsp.lua, and manually install using:

:LspInstall tsserver cssls yamlls clangd bashls html jsonls vimls arduino_language_server
...etc...

# This one is for linting
:LspInstall efm

LSP External Dependencies

A number of programs supplement LSP setup in either linting or formatting:

  • apt: shellcheck
  • go: mvdan.cc/sh/v3/cmd/shfmt@latest

For arduino_language_server:

  • Set up the arduino-cli
  • Add a Makefile like this project
  • Run make compile, and it will use the output for LSP

LSP usage

<CTRL>+<SPACE> whilst in insert mode to show autocomplete.

Hover and press K to view definition

Secrets

To use the wp function you'll need to copy .secrets.tpl to .secrets and edit accordingly.

Statusline

This assumes the following files are available and match the format expected:

File Use
/sys/class/power_supply/AC/online '1' if AC is connected
/sys/class/power_supply/BAT0/capacity Battery %
/sys/class/hwmon/hwmon5/temp1_input CPU Temp (make sure this is the right one)
/proc/acpi/ibm/fan Fan info, RPM on line 2
/proc/net/dev_snmp6/wg0 Used to infer VPN status, using WireGuard

In addition to this you must be on Linux with:

  • a wireless driver compatible with:
    • ioctl SIOCGIWESSID to obtain ESSID
    • ioctl SIOCGIWSTATS to obtain signal level
  • A kernel that utilises sys/sysinfo.h correctly

If you want accurate sunrise/sunset clock colours, edit LAT and LNG in statusline.c.

Cheatsheet

Awww sheet, you want to use my dotfiles?

TMUX

prefix is set to C-a.

Plugins:

  • tmux-plugins/tpm (plugins)
  • tmux-plugins/tmux-sensible (sensible defaults)
  • tmux-plugins/tmux-resurrect (setup persistence pt 1)
  • tmux-plugins/tmux-continuum (setup persistence pt 2)
  • tmux-plugins/tmux-sessionist (session management)
  • tmux-plugins/tmux-pain-control (easy pane bindings)
  • christoomey/vim-tmux-navigator (vim & tmux navigation)
Command Action
prefix + I Install plugins
prefix + r Reload .tmux.conf
prefix + g Switch session with fuzzy matcher
prefix + s View session list
prefix + S Swap to most recent session
prefix + C Create new session
prefix + c Create new window
prefix + X Kill current session
prefix + # Switch to window no. # (where # is a number)
prefix + - Split window horizontally
prefix + | Split window vertically
prefix + z Zoom/unzoom a pane
prefix + C-s Save sessions
prefix + C-r Restore sessions
prefix + [ Swap split right
prefix + ] Swap split left
prefix + todo...

Arduino Setup

Install CLI arduino-cli - I set BINDIR=~/.local/bin

Update and install boards:

arduino-cli core update-index
arduino-cli core install esp32:esp32

Allow serial monitor access

sudo usermod -aG dialout $USER

About

Home sweet ~/.*

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •