From a608dc0f69cb91872040d3c785b2e1ec335330a3 Mon Sep 17 00:00:00 2001 From: Heinrich Thaler Date: Mon, 14 Oct 2024 12:46:41 +0200 Subject: [PATCH] Initial commit --- .config/alacritty/alacritty.toml | 104 +++++++++++++++++++++++++++++++ .config/tmux/tmux.conf | 36 +++++++++++ .zshrc | 81 ++++++++++++++++++++++++ README.md | 26 ++++++++ 4 files changed, 247 insertions(+) create mode 100644 .config/alacritty/alacritty.toml create mode 100644 .config/tmux/tmux.conf create mode 100644 .zshrc create mode 100644 README.md diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..ea1cfb5 --- /dev/null +++ b/.config/alacritty/alacritty.toml @@ -0,0 +1,104 @@ +live_config_reload = true + +[window] +opacity = 1 +decorations = "full" +dynamic_title = true +startup_mode = "Maximized" + +[window.dimensions] +columns = 160 +lines = 40 + +[window.padding] +x = 4 +y = 4 + +[window.class] +general = "Alacritty" +instance = "Alacritty" + +[scrolling] +history = 10000 +multiplier = 3 + +[font] +size = 11 + +[font.normal] +family = "JetBrainsMono Nerd Font" +style = "Medium" + +[font.bold] +family = "JetBrainsMono Nerd Font" +style = "Bold" + +[font.italic] +family = "JetBrainsMono Nerd Font" +style = "MediumItalic" + +[font.bold_italic] +family = "JetBrainsMono Nerd Font" +style = "BoldItalic" + +[font.glyph_offset] +x = 0 +y = 0 + +[colors] +draw_bold_text_with_bright_colors = true + +#[colors.primary] +#foreground = "#a9b1d6" +#background = "#11121D" + +[[colors.indexed_colors]] +color = "0xF8BD96" +index = 16 + +[[colors.indexed_colors]] +color = "0xF5E0DC" +index = 17 + +[colors.bright] +black = "0x988BA2" +blue = "0x96CDFB" +cyan = "0x89DCEB" +green = "0xABE9B3" +magenta = "0xF5C2E7" +red = "0xF28FAD" +white = "0xD9E0EE" +yellow = "0xFAE3B0" + +[colors.cursor] +cursor = "0xF5E0DC" +text = "0x1E1D2F" + +[colors.normal] +black = "0x6E6C7E" +blue = "0x96CDFB" +cyan = "0x89DCEB" +green = "0xABE9B3" +magenta = "0xF5C2E7" +red = "0xF28FAD" +white = "0xD9E0EE" +yellow = "0xFAE3B0" + +[colors.primary] +background = "0x1E1D2F" +foreground = "0xD9E0EE" + +[cursor] +blink_interval = 750 + +[cursor.style] +blinking = "Always" + +[mouse] +hide_when_typing = true + +[shell] +program = "/bin/zsh" + +[env] +TERM = "xterm-256color" diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf new file mode 100644 index 0000000..6c2c93f --- /dev/null +++ b/.config/tmux/tmux.conf @@ -0,0 +1,36 @@ +# Set true color +set-option -sa terminal-overrides ",xterm*:Tc" + +# Enable Mouse +set -g mouse on + +# Start windows and panes at 1, not 0 +set -g base-index 1 +set -g pane-base-index 1 +set-window-option -g pane-base-index 1 +set-option -g renumber-windows on + +# Set prefix +unbind C-b +set -g prefix C-Space +bind C-Space send-prefix + +# Plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'christoomey/vim-tmux-navigator' +set -g @plugin 'dreamsofcode-io/catppuccin-tmux' +set -g @plugin 'tmux-pligins/tmux-yank' + +# set vi-mode +set-window-option -g mode-keys vi +# keybinings +bind-key -T copy-mode-vi v send-keys -X begin-selection +bind-key -T copy-mode-vi C-v send-keys -X rectagle-toggle +bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel + +# Open panes in current directory +bind '"' split-window -v -c "#{pane_current_path}" +bind % split-window -h -c "#{pane-current_path}" + +run '~/.tmux/plugins/tpm/tpm' diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..4e5b956 --- /dev/null +++ b/.zshrc @@ -0,0 +1,81 @@ +# Set the directory we want to store zinit and plugins +ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" + +# Download Zinit, if it's not there yet +if [ ! -d "$ZINIT_HOME" ]; then + mkdir -p "$(dirname $ZINIT_HOME)" + git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" +fi + +# Source/Load zinit +source "${ZINIT_HOME}/zinit.zsh" + +# Add in zsh plugins +zinit light zsh-users/zsh-syntax-highlighting +zinit light zsh-users/zsh-completions +zinit light zsh-users/zsh-autosuggestions +zinit light Aloxaf/fzf-tab + +# Add in snippets +zinit snippet OMZL::git.zsh +zinit snippet OMZP::git +zinit snippet OMZP::sudo +zinit snippet OMZP::archlinux +zinit snippet OMZP::aws +zinit snippet OMZP::kubectl +zinit snippet OMZP::kubectx +zinit snippet OMZP::command-not-found + +# Load completions +autoload -Uz compinit && compinit + +zinit cdreplay -q + +# Prompt +eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/zen.toml)" + +# Keybindings +bindkey -e +bindkey '^p' history-search-backward +bindkey '^n' history-search-forward +bindkey "^[[1;5C" forward-word +bindkey "^[[1;5D" backward-word +# Ohne Tmux +#bindkey "^[[H" beginning-of-line +#bindkey "^[[F" end-of-line +#bindkey "^[[2~" delete-char +# Mit Tmux +bindkey "^[[1" beginning-of-line +bindkey "^[[4~" end-of-line +bindkey "^[[3~" delete-char + +# History +HISTSIZE=10000 +HISTFILE=~/.zsh_history +SAVEHIST=$HISTSIZE +setopt appendhistory +setopt sharehistory +setopt hist_ignore_space +setopt hist_ignore_all_dups +setopt hist_find_no_dups + +# Completion styling +zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' +zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" +zstyle ':completion:*' menu no +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' +zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath' + +# Aliases +alias ls='ls --color' +alias v='nvim' +alias c='clear' + +# Shell integrations +eval "$(fzf --zsh)" +eval "$(zoxide init --cmd cd zsh)" + +# Automatically start Tmux +if [ -x "$(command -v tmux)" ] && [ -n "${DISPLAY}" ] && [ -z "${TMUX}" ]; then + exec tmux new-session -A -s ${USER} >/dev/null 2>&1 +fi diff --git a/README.md b/README.md new file mode 100644 index 0000000..a434278 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# My dotfiles + +This directory contains the dotfiles for my system + +## Requirements + +Ensure you have the following installed on your system + +``` +pacman -S git stow --needed +``` + +## Installation + +First, check out the dotfiles repo in your $HOME directory using git + +``` +git clone ... +cd dotfiles +``` + +then use GNU stow to create symlinks + +``` +$ stow . +```