Skip to content

jazzabeanie/dotfiles

 
 

Repository files navigation

dotfiles

Ansible is not free anymore. Consider using salt - https://docs.saltproject.io/en/getstarted/

Prerequisites

Do I still need to do this?

touch ~/.gitconfig.local
# input your personal GitHub details into .gitconfig.local:
##################################
#[github]
#    user = GitHubUserName
#[user]
#    name = Your Name
#    email = youremail@gmail.com
##################################

Installing

OS X:

  • Install Homebrew.
  • Install xcode-select --install (if required. It maybe installed with Homebrew)
    • this should install git. Check with git --version
  • Change CAPS to Ctrl
  • Enable touch to click and 3 finger drag
    • do this in Accessability
  • Setup git SSH keys
  • git clone git@github.com:jazzabeanie/dotfiles.git ~/.dotfiles
  • Install iTerm2
  • install oh-my-zsh
  • Following Powerlevel10k getting started
  • Install zsh-autosuggestions
    • git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • Install fzf-tab git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
    • git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab
  • run scirpts:
    • setup_dotfiles.sh
    • setup_vim.sh
      • setup neovim instead git clone git@github.com:jazzabeanie/lazyvim-config.git ~/.config/nvim
    • install_homebrew_packages.sh
  • sync my cheat fork
    • go to ()[https://github.com/jazzabeanie/cheatsheets] and sync fork
    • git clone https://github.com/jazzabeanie/cheatsheets.git ~/.config/cheat/cheatsheets/community/
    • the cheat config file (.dotfiles/home/cheat_config.yml) will need updating with the correct directory paths for the cheatsheets
  • use cheat.sh instead
  • Install SteerMouse - https://plentycom.jp/en/steermouse/download.php
  • Install 1password
  • setup mountain duck (should have been installed by homebrew)
  • setup Joplin (should have been installed by homebrew)
    • TODO: write the details of the settings
  • consider installing BCLM to limit max battery charge. Once installed:
    • sudo bclm write 77
    • bclm read
    • make it persist with sudo bclm persist. Unpersist with sudo bclm unpersist

Linux:

  • SSH keys:

    • Copy existing keys, or create new ssh key and add to github
    • may also need to start the agent and add them there too.
      • eval "$(ssh-agent -s)"
      • ssh-add ~/.ssh/KEY_NAME
  • install git sudo apt install git curl zsh

  • git clone git@github.com:jazzabeanie/dotfiles.git ~/.dotfiles

  • Make Zsh the default shell chsh -s $(which zsh)

  • log out and log back in

  • install oh-my-zsh

  • Following Powerlevel10k getting started

  • reverse scroll direction

    • xfce: Mouse and Touchpad -> Reverse scroll direction
    • gnome
      • xinput --list to get ID of the mouse.
      • xinput set-prop pointer:"Logitech G300s Optical Gaming Mouse" "libinput Natural Scrolling Enabled" 1 to reverse the direction
      • Add this to startup applications so that it runs every time.
      • Make this run on startup by adding to ~/.profile?
    • Ubuntu 24 - See Mouse & Touchpad settings
  • install homebrew

  • run scirpts: (note, sudo not required)

    • ./setup_dotfiles.sh
    • ./setup_vim.sh
    • ./install_packages.sh
  • manually install packages form ./install_homebrew_packages.sh that aren't already installed from ./install_packages.sh

  • Swap CAPS and Ctrl, either:

  • install node (required for neovim):

    • install nvm
    • nvm install --lts
    • nvm use --lts
  • setup neovim: # TODO: put into homebrew script

    • git clone git@github.com:jazzabeanie/lazyvim-config.git ~/.config/nvim
    • brew install neovim
    • setup neovim: open neovim and run :h nvim-from-vim then follow the instructions.
      • Setup LazyVim
        • install tree-sitter sudo npm install -g tree-sitter-cli
        • Not sure if I want to use LazyVim
    • Another option is https://github.com/jdhao/nvim-config
  • Install alacritty

  • Install zsh-autosuggestions

    • git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  • Install fzf: https://github.com/junegunn/fzf?tab=readme-ov-file#using-homebrew

  • Install fzf-tab git clone https://github.com/Aloxaf/fzf-tab ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-tab

  • setup link to S3 bucket.

    • I'm using mountainduck on MacOS
  • install lazygit

    • brew install jesseduffield/lazygit/lazygit
  • install gron

    • download latest verion to /tmp/gron.tgz
    • extract with tar -xvzf /tmp/gron.tgz
    • move to /usr/local/bin: sudo mv /tmp/gron /usr/local/bin
  • install pip:

    • install with get-pip.py script.
    • download the script to tmp, then run it with python3 /tmp/get-pip.py
    • sudo apt install python3-pip
  • install Joplin: wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash

  • Install 1Password

    • Also configure Ctrl+Shift+Space to open 1password instead of the quick access to enable password ignoring below.
  • setup CopyQ clipboard manager to ignore passwords:

    [Commands]
    1\Automatic=true
    1\Command="
        copyq ignore"
    1\Icon=\xf069
    1\Name=Ignore *1Password* windows
    1\Remove=true
    1\Window=.*1Password.*
    2\Automatic=true
    2\Command="
        copyq ignore"
    2\Icon=\xf069
    2\Input=x-kde-passwordManagerHint
    2\Name=Ignore Keepass window
    2\Remove=true
    size=2
    
  • sync my cheat fork

    • go to ()[https://github.com/jazzabeanie/cheatsheets] and sync fork
    • git clone https://github.com/jazzabeanie/cheatsheets.git ~/.config/cheat/cheatsheets/community/
    • the cheat config file (.dotfiles/home/cheat_config.yml) will need updating with the correct directory paths for the cheatsheets

Random Linux box:

  • this sets up .bashrc, aliases, and .vimrc. Run:
    • curl -o quick_setup.sh https://raw.githubusercontent.com/jazzabeanie/dotfiles/master/quick_basic_setup.sh
    • sudo chmod 755 quick_setup.sh
    • ~/quick_setup.sh
    • source ~/.bashrc

Windows:

  • reverse mouse scroll:
    • I think you can do this in native settings now.
$devices = Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Enum\HID\*\*\Device Parameters" -ErrorAction SilentlyContinue | Where-Object { $_.FlipFlopWheel -ne $null }
foreach ($device in $devices) {
    # Reverse the scroll direction
    if ($device.FlipFlopWheel -eq 1) {
        Set-ItemProperty -Path $device.PSPath -Name "FlipFlopWheel" -Value 0
    } else {
        Set-ItemProperty -Path $device.PSPath -Name "FlipFlopWheel" -Value 1
    }
}
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
  • install wsl: wsl --install

    • Fix the DNS
      • in cmd: ipconfig/all
        • usually 10.10.32.50 in the office
      • update /etc/resolv.conf with the correct nameserver ip address (look for the fields labeled "DNS SERVERS" in the step above)
      • add the following to /etc/wsl.conf:
        • true means it will generate /etc/resolv.conf, but gives it the wrong nameserver so you have to change it manually every reboot. false means it will not generate the file and. Set it to false and copy the file sudo cp ~/.dotfiles/set_nameserver.sh /etc/profile.d/set_nameserver.sh
  • install winget packages

winget install --id Git.Git -e --source winget --interactive
winget install --id Joplin.Joplin -e --source winget --interactive
winget install --id Neovim.Neovim -e --source winget
winget install Microsoft.PowerToys -s winget
# QGIS?
sudo tee /usr/local/bin/xdg-open <<EOF
#!/bin/sh

powershell.exe -c start "'\$@'"
EOF
sudo chmod +x /usr/local/bin/xdg-open

Other tasks (not scripted)

About

Dotfiles

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 83.9%
  • Vim Script 7.7%
  • Python 6.9%
  • JavaScript 1.3%
  • Other 0.2%