expand tmux conf and fish aliases
This commit is contained in:
parent
900abe247e
commit
fda2c8f4ba
2 changed files with 87 additions and 23 deletions
|
@ -1,19 +1,19 @@
|
|||
# Convenience function for only setting PATH if the specified directory exists
|
||||
function setpath
|
||||
test -e $argv[1]; and fish_add_path $argv[1]
|
||||
test -e $argv[1]; and fish_add_path $argv[1]
|
||||
end
|
||||
|
||||
# Custom greeting
|
||||
function fish_greeting
|
||||
echo "Welcome to $(hostname -s)!"
|
||||
echo "Welcome to $(hostname -s)!"
|
||||
end
|
||||
|
||||
if test -z "$XDG_RUNTIME_DIR"
|
||||
set -x XDG_RUNTIME_DIR "/tmp/$USER-runtime-dir"
|
||||
if test ! -e "$XDG_RUNTIME_DIR"
|
||||
mkdir "$XDG_RUNTIME_DIR"
|
||||
chmod 0700 "$XDG_RUNTIME_DIR"
|
||||
end
|
||||
set -x XDG_RUNTIME_DIR "/tmp/$USER-runtime-dir"
|
||||
if test ! -e "$XDG_RUNTIME_DIR"
|
||||
mkdir "$XDG_RUNTIME_DIR"
|
||||
chmod 0700 "$XDG_RUNTIME_DIR"
|
||||
end
|
||||
end
|
||||
|
||||
# PATH adjustment
|
||||
|
@ -45,8 +45,8 @@ zoxide init fish | source
|
|||
source ~/.config/fish/private.fish
|
||||
|
||||
# Environment variables
|
||||
set -x EDITOR "nvim"
|
||||
set -x USER "lu"
|
||||
set -x EDITOR nvim
|
||||
set -x USER lu
|
||||
set -x SHELL (which fish)
|
||||
set -x TERM xterm-256color
|
||||
set -x GTK_IM_MODULE ibus
|
||||
|
@ -65,32 +65,54 @@ set -x TZ_LIST "Europe/Berlin;Berlin,America/New_York;US East,America/Los_Angele
|
|||
# General Aliases
|
||||
# Convenience for editing my shell config
|
||||
alias editconfig "chezmoi edit ~/.config/fish/config.fish; and chezmoi apply; and source ~/.config/fish/config.fish"
|
||||
# Some other aliases
|
||||
alias doco "docker-compose"
|
||||
alias czm "chezmoi"
|
||||
alias zy "sudo zypper"
|
||||
alias cvim "chezmoi edit"
|
||||
# General aliases
|
||||
alias c clear
|
||||
alias ll "ls -lahF --color=always"
|
||||
alias e "$EDITOR"
|
||||
alias se sudoedit
|
||||
alias ec 'nvim --cmd ":lua vim.g.noplugins=1"'
|
||||
alias cd.. "cd ../"
|
||||
alias rmrf "rm -rf"
|
||||
alias czm chezmoi
|
||||
|
||||
# overrides of defaults
|
||||
alias mkdir "mkdir -p"
|
||||
alias cp "cp -r"
|
||||
alias scp "scp -r"
|
||||
alias vimdiff 'nvim -d --cmd ":lua vim.g.noplugins=1"'
|
||||
alias apt "sudo apt"
|
||||
alias doc "sudo docker"
|
||||
alias docker "sudo docker"
|
||||
alias systemctl "sudo systemctl"
|
||||
alias doco "sudo docker-compose"
|
||||
|
||||
# z is such a weird key to hit frequently, j is much better
|
||||
alias j "z"
|
||||
alias j z
|
||||
|
||||
# Cargoes and Rust-s
|
||||
alias c "cargo"
|
||||
alias c cargo
|
||||
alias cr "cargo run"
|
||||
alias cb "cargo build"
|
||||
alias ct "cargo test"
|
||||
alias cwr "cargo watch -x run"
|
||||
alias ct "cargo test"
|
||||
alias rp "rustup"
|
||||
alias rp rustup
|
||||
|
||||
# Rubies
|
||||
alias be "bundle exec"
|
||||
|
||||
# cd into a temp directory, very useful!
|
||||
alias mkt "cd (mktemp -d)"
|
||||
|
||||
# tmux aliases
|
||||
alias tx "tmux"
|
||||
alias tx tmux
|
||||
alias txls "tmux list-sessions"
|
||||
alias txa "tmux attach"
|
||||
|
||||
# Git Aliases
|
||||
alias lg "lazygit"
|
||||
alias g "git"
|
||||
alias lg lazygit
|
||||
alias g git
|
||||
alias ga "g add"
|
||||
alias gs "g status --short"
|
||||
alias gl "g log --color --graph --abbrev-commit --oneline"
|
||||
# "git quick push" and "git quick commit". it makes sense in my head
|
||||
|
@ -109,13 +131,13 @@ alias editorigin "git remote set-url origin"
|
|||
|
||||
# Load asdf if it's installed
|
||||
if test -e ~/.asdf
|
||||
. ~/.asdf/asdf.fish
|
||||
. ~/.asdf/asdf.fish
|
||||
end
|
||||
|
||||
# Load nix profile if nix is installed
|
||||
if test -e /nix
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
|
||||
set -x NIX_PATH "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.fish
|
||||
set -x NIX_PATH "$HOME/.nix-defexpr/channels:/nix/var/nix/profiles/per-user/root/channels"
|
||||
end
|
||||
|
||||
# proto
|
||||
|
|
|
@ -1,6 +1,48 @@
|
|||
# shell
|
||||
set -g default-command $SHELL
|
||||
set -g default-shell $SHELL
|
||||
|
||||
# start with window 1 (for keybinds)
|
||||
set -g base-index 1
|
||||
|
||||
# renumber windows after closing
|
||||
set -g renumber-windows on
|
||||
|
||||
# start with pane 1
|
||||
set -g pane-base-index 1
|
||||
|
||||
# vim style
|
||||
setw -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
bind : command-prompt
|
||||
|
||||
# panes
|
||||
set -g pane-border-style "fg=color0"
|
||||
set -g pane-active-border-style "fg=color0"
|
||||
set -g window-active-style "bg=terminal"
|
||||
set -g window-style "bg=color234"
|
||||
|
||||
# status line
|
||||
set -g status-justify left
|
||||
set -g status-style "bg=terminal,fg=color1"
|
||||
set -g status-interval 2
|
||||
|
||||
# window status
|
||||
set-option -g status-position bottom
|
||||
setw -g window-status-format " #[bg=color1,fg=color0,noreverse] #W"
|
||||
setw -g window-status-current-format " #[bg=color6,fg=color0,noreverse] #W"
|
||||
|
||||
# clock
|
||||
set -g clock-mode-color color1
|
||||
|
||||
# mouse mode
|
||||
set -g mouse on
|
||||
|
||||
# rebind prefix to C-a
|
||||
unbind C-b
|
||||
set-option -g prefix C-a
|
||||
bind-key C-a send-prefix
|
||||
|
||||
# easy reloads
|
||||
bind r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue