Add zshrc and tmux config
This commit is contained in:
+51
@@ -0,0 +1,51 @@
|
|||||||
|
# ===== PERUSASETUKSET =====
|
||||||
|
set -g default-terminal "tmux-256color"
|
||||||
|
set -g base-index 1
|
||||||
|
setw -g pane-base-index 1
|
||||||
|
set -g renumber-windows on
|
||||||
|
set -g mouse on
|
||||||
|
set -sg escape-time 0
|
||||||
|
set -g extended-keys off
|
||||||
|
set -g allow-passthrough off
|
||||||
|
|
||||||
|
# Prefix Ctrl+A
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix C-a
|
||||||
|
bind C-a send-prefix
|
||||||
|
|
||||||
|
# Reload config
|
||||||
|
bind r source-file ~/.tmux.conf \; display "Config reloaded!"
|
||||||
|
|
||||||
|
# Split panes
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# Pane navigation
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# ===== NORD-VÄRIT =====
|
||||||
|
set -g pane-border-style fg='#4c566a'
|
||||||
|
set -g pane-active-border-style fg='#88c0d0'
|
||||||
|
set -g message-style bg='#3b4252',fg='#88c0d0'
|
||||||
|
|
||||||
|
# ===== STATUSBAR YLÖS =====
|
||||||
|
set -g status on
|
||||||
|
set -g status-position top
|
||||||
|
set -g status-interval 5
|
||||||
|
set -g status-style bg='#2e3440',fg='#d8dee9'
|
||||||
|
|
||||||
|
# Vasen: sessio + käyttäjä@host
|
||||||
|
set -g status-left-length 50
|
||||||
|
set -g status-left "#[bg=#88c0d0,fg=#2e3440,bold] #S #[bg=#3b4252,fg=#88c0d0]#[bg=#3b4252,fg=#d8dee9] #(whoami)@#h #[bg=#2e3440,fg=#3b4252] "
|
||||||
|
|
||||||
|
# Oikea: sää(60s) | verkko | CPU load | muisti | aika
|
||||||
|
set -g status-right-length 150
|
||||||
|
set -g status-right "#[bg=#2e3440,fg=#3b4252]#[bg=#3b4252,fg=#d8dee9] #($HOME/bin/tmux-weather.sh) #[bg=#3b4252,fg=#4c566a]#[bg=#4c566a,fg=#d8dee9] #($HOME/bin/tmux-network.sh) #[bg=#4c566a,fg=#81a1c1]#[bg=#81a1c1,fg=#2e3440] #(awk '{print $1}' /proc/loadavg) #[bg=#81a1c1,fg=#5e81ac]#[bg=#5e81ac,fg=#d8dee9] #(awk '/MemTotal/{t=$2} /MemAvailable/{a=$2} END{printf \"%.0fMB/%.0fMB\", (t-a)/1024, t/1024}' /proc/meminfo) #[bg=#5e81ac,fg=#88c0d0]#[bg=#88c0d0,fg=#2e3440,bold] %d.%m.%Y %H:%M "
|
||||||
|
|
||||||
|
# Ikkunat
|
||||||
|
set -g status-justify left
|
||||||
|
setw -g window-status-format "#[bg=#2e3440,fg=#4c566a] #I #[fg=#d8dee9]#W "
|
||||||
|
setw -g window-status-current-format "#[bg=#2e3440,fg=#3b4252]#[bg=#3b4252,fg=#88c0d0,bold] #I #W #[bg=#2e3440,fg=#3b4252]"
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
|
||||||
|
# Powerlevel10k instant prompt
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
COLORTERM=truecolor
|
||||||
|
fastfetch
|
||||||
|
|
||||||
|
# ===== HISTORIA-ASETUKSET =====
|
||||||
|
HISTFILE=~/.zsh_history
|
||||||
|
HISTSIZE=10000
|
||||||
|
SAVEHIST=10000
|
||||||
|
setopt APPEND_HISTORY
|
||||||
|
setopt SHARE_HISTORY
|
||||||
|
setopt HIST_IGNORE_ALL_DUPS
|
||||||
|
setopt HIST_FIND_NO_DUPS
|
||||||
|
setopt HIST_SAVE_NO_DUPS
|
||||||
|
bindkey '^[[A' history-beginning-search-backward
|
||||||
|
bindkey '^[[B' history-beginning-search-forward
|
||||||
|
|
||||||
|
# Zinit
|
||||||
|
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
|
||||||
|
if [[ ! -f $ZINIT_HOME/zinit.zsh ]]; then
|
||||||
|
print -P "%F{33}Installing Zinit...%f"
|
||||||
|
command mkdir -p "$(dirname $ZINIT_HOME)"
|
||||||
|
command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME"
|
||||||
|
fi
|
||||||
|
source "${ZINIT_HOME}/zinit.zsh"
|
||||||
|
|
||||||
|
# Zinit annexes
|
||||||
|
zinit light-mode for \
|
||||||
|
zdharma-continuum/zinit-annex-as-monitor \
|
||||||
|
zdharma-continuum/zinit-annex-bin-gem-node \
|
||||||
|
zdharma-continuum/zinit-annex-patch-dl \
|
||||||
|
zdharma-continuum/zinit-annex-rust
|
||||||
|
|
||||||
|
# Pluginit
|
||||||
|
zinit light zsh-users/zsh-completions
|
||||||
|
zinit light zsh-users/zsh-autosuggestions
|
||||||
|
zinit light zsh-users/zsh-syntax-highlighting
|
||||||
|
zinit light Aloxaf/fzf-tab
|
||||||
|
zinit light MichaelAquilina/zsh-you-should-use
|
||||||
|
|
||||||
|
# Oh-My-Zsh snippets
|
||||||
|
zinit snippet OMZP::colored-man-pages
|
||||||
|
zinit snippet OMZP::systemd
|
||||||
|
zinit snippet OMZP::git
|
||||||
|
zinit snippet OMZP::podman
|
||||||
|
|
||||||
|
# Completions
|
||||||
|
autoload -Uz compinit
|
||||||
|
compinit
|
||||||
|
|
||||||
|
# Powerlevel10k theme
|
||||||
|
source ~/powerlevel10k/powerlevel10k.zsh-theme
|
||||||
|
|
||||||
|
# PATH
|
||||||
|
typeset -U PATH path
|
||||||
|
export PATH="$HOME/.cargo/bin:$HOME/.local/bin:/opt/nvim-linux-x86_64/bin:$PATH"
|
||||||
|
|
||||||
|
# eza aliases
|
||||||
|
alias ls="eza --icons"
|
||||||
|
alias ll="eza -lah --icons"
|
||||||
|
alias la="eza -a --icons"
|
||||||
|
alias lt="eza --tree --icons"
|
||||||
|
|
||||||
|
# Modern CLI tools
|
||||||
|
alias cat="bat"
|
||||||
|
alias grep="rg"
|
||||||
|
alias find="fd"
|
||||||
|
|
||||||
|
# fzf
|
||||||
|
source /usr/share/fzf/shell/key-bindings.zsh
|
||||||
|
|
||||||
|
# zoxide
|
||||||
|
eval "$(zoxide init zsh --cmd z)"
|
||||||
|
alias cd="z"
|
||||||
|
|
||||||
|
# p10k config
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
[ -s "/home/mikko/.jabba/jabba.sh" ] && source "/home/mikko/.jabba/jabba.sh"
|
||||||
Reference in New Issue
Block a user