Skip to content

maririn312/dotfiles

Repository files navigation

Maririn312 DotConfig files

Maririn312

Full and clean configurations for development environment on GNU Linux, macOS and Cygwin.

Prerequisite

  • GNU Linux, macOS, Windows, Cygwin
  • Git, Zsh/Powershell, curl/wget
  • Recommend: GNU Emacs, tmux
  • Optional: Vim

Quickstart

Linux, macOS and Cygwin

sh -c "$(curl -fsSL https://github.com/maririn312/dotfiles/raw/main/install.sh)"

or

sh -c "$(wget https://github.com/maririn312/dotfiles/raw/main/install.sh -O -)"

or

git clone https://github.com/maririn312/dotfiles.git ~/.dotfiles  # or download the zip package
cd ~/.dotfiles
./install.sh

Windows (Powershell)

git clone [https://github.com/maririn312/dotfiles.git ](https://github.com/maririn312/dotfiles.git)~/.dotfiles  # or download the zip package
cd ~/.dotfiles
install_scoop.ps1  # or install_choco.ps1

Docker

cd ~/.dotfiles
docker build -t centaur/ubuntu .
docker run -it centaur/ubuntu zsh

Shortcuts

  • Alt-c: cd into the selected directory.
  • Ctrl-r: Paste the selected command from history into the command line.
  • Ctrl-t: Paste the selected file path(s) into the command line.
  • TAB: To completions.

That's it. Enjoy!

Customization

ZSH ENV

Add your zsh environments in ~/.zshenv. This is recommended by ZSH officially. For example:

export PATH=/usr/local/sbin:$PATH
export PATH=$HOME/.rbenv/shims:$PATH
export PYTHONPATH=/usr/local/lib/python2.7/site-packages

ZSH local config

Ste your personal zsh configurations in ~/.zshrc.local. For example:

# Oh-my-zsh plugin
zinit snippet OMZP::golang
zinit snippet OMZP::python
zinit snippet OMZP::ruby

# Github plugin
zinit light ptavares/zsh-direnv

See details on zinit.

Git local config

Set your git configurations in ~/.gitconfig.local, e.g. user credentials.

[commit]
    # Sign commits using GPG.
    # https://help.github.com/articles/signing-commits-using-gpg/
    gpgsign = true

[user]
    name = John Doe
    email = [email protected]
    signingkey = XXXXXXXX

Contents

  • vim (NeoVim) config
  • tmux config
  • git config
  • fish config
  • PowerShell config

Desktop

  • System Preferences > Desktop and Dock (bold is required):
    • Mission Control: uncheck "Automatically rearrange Spaces based on most recent use"
  • Some advanced features of yabai requires SIP to be disabled. However, disabling SIP will also disable Apple Pay on your Mac. For my setup, I left SIP enabled. My configs doesn't use any advanced feature from yabai

SketchyBar Features:

  • I am using the excellent sketchybar-app-font to display the active applications in the spaces.

  • Left clicking a space will focus it, right clicking a space will destroy that space; clicking in the separator (>) will create a new space (all using yabai SIP disabled; optional)

  • Mousing over the music icon in the center gives a small Spotify player widget with player controls:

spotify

  • The volume icon on the right side can be clicked to toggle the volume slider and animates volume changes:
slider.mp4
  • The volume icon on the right side can be right-clicked to show and select the audio output device: Screenshot 2022-12-11 at 12 46 48

  • The bell can be hovered to view github notifications

  • Clicking the date/time toggles a "zen" mode, hiding all distracting items in the bar:

Screenshot 2022-11-11 at 18 01 32

  • The battery indicator is only shown when below 60%:

battery

SketchyBar Setup

brew install --cask sf-symbols
brew install jq
brew install gh
brew install switchaudio-osx
curl -L https://github.com/kvndrsslr/sketchybar-app-font/releases/download/v1.0.4/sketchybar-app-font.ttf -o $HOME/Library/Fonts/sketchybar-app-font.ttf
  • (optional) gh auth login for GitHub notifications
  • (optional) If you don't use yabai you can safely remove the yabai item from items/yabai.sh or sketchybarrc
  • (optional; needed for yabai window state and running application icons) yabai events:
yabai -m signal --add event=window_focused action="sketchybar --trigger window_focus"
yabai -m signal --add event=window_created action="sketchybar --trigger windows_on_spaces"
yabai -m signal --add event=window_destroyed action="sketchybar --trigger windows_on_spaces"
  • System Preferences > Keyboard > Keyboard Shortcuts... (bold is required):
    • For each of the item on the left side bar > click "Restore Defaults"
    • Mission Control > Make sure everything under Mission Control is checked (Move left/right, switch to desktop 1/2/etc.)

Terminal Emulator + Shell + Package Manager

Git Manager

File Manager

Finder.app

  • cmd + 3 to View as Columns
  • cmd + shift + . to Show Hidden files

Web Browser

  • Firefox Onebar theme with the following about:config:
    • onebar.disable-autohide-of-URLbar-icons : false
    • onebar.disable-centering-of-URLbar : false
    • onebar.disable-https-truncate : false
    • onebar.disable-single-tab : true
    • onebar.hide-all-URLbar-icons : true
    • onebar.hide-navigation-buttons : false
  • Color and layout tweaks to Browser XUL and :about pages to match Gruvbox Dark (Hard) color (Firefox Onebar included)
    • Only Dark theme is supported, no light theme or high-contrast theme support
  • System Preferences > Desktop and Dock > Default web browser: Firefox

Other tools

Neovim setup

Requires Neovim (>= 0.8)

Shell setup (macOS & Linux)

  • Fish shell
  • Fisher - Plugin manager
  • Tide - Shell theme. Use version 5: fisher install ilancosman/tide@v5
  • Nerd fonts - Powerline-patched fonts. I use Hack.
  • z for fish - Directory jumping
  • Exa - ls replacement
  • ghq - Local Git repository organizer
  • fzf - Interactive filtering

PowerShell setup (Windows)

Screenshots

Main (with Tmux)

main

Git Log

git_log