move home configs to root
This commit is contained in:
69
home/common/dotfiles/tmux/tmux.conf
Normal file
69
home/common/dotfiles/tmux/tmux.conf
Normal file
@@ -0,0 +1,69 @@
|
||||
# vim: ft=tmux
|
||||
# original from bl1nk
|
||||
# Styles
|
||||
setw -g mode-style "fg=yellow,bg=default,bright"
|
||||
setw -g window-status-style "fg=default,bg=default,dim"
|
||||
setw -g window-status-current-style "fg=yellow,bg=default,dim"
|
||||
set -g message-style "fg=red,bg=default,bright"
|
||||
set -g status-style "fg=default,bg=black,bright"
|
||||
set -g pane-active-border-style "fg=blue,bg=black"
|
||||
set -g allow-passthrough 1
|
||||
set-option -g set-titles on
|
||||
set-option -g focus-events on
|
||||
# set set-titles-string "#{session_name}"
|
||||
|
||||
# Options
|
||||
set -g bell-action any
|
||||
set -g history-limit 50000
|
||||
set -g status on
|
||||
#set -g status-keys vi
|
||||
#set -g status-utf8 on
|
||||
set -g set-titles on
|
||||
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -as terminal-features ",foot*:RGB,alacritty*:RGB,gnome*:RGB"
|
||||
set -g set-titles-string "tmux:#I [ #W ]"
|
||||
set -g base-index 1
|
||||
set -g pane-base-index 1
|
||||
set -g @plugin 'base16-project/base16-tmux'
|
||||
|
||||
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY BASE16_SHELL"
|
||||
|
||||
set -g status-left-length 30
|
||||
set -g status-left '[#[fg=white]#S]#[fg=black,bright] #[default]'
|
||||
set -sg escape-time 0
|
||||
|
||||
#setw -g utf8 on
|
||||
setw -g automatic-rename on
|
||||
setw -g clock-mode-style 24
|
||||
#setw -g mode-keys vi
|
||||
setw -g mouse on
|
||||
|
||||
bind-key q confirm kill-pane
|
||||
bind-key Q confirm kill-session
|
||||
bind-key Tab next-window
|
||||
|
||||
bind-key > switchc -n
|
||||
bind-key > switchc -p
|
||||
|
||||
bind-key C-n new-window -c "#{pane_current_path}"
|
||||
bind-key C-t new-window -c "#{pane_current_path}" "~/bin/share-tty $(tmux display -p '#S')"
|
||||
|
||||
bind-key u run tmux-url-select
|
||||
|
||||
bind-key o split-window -h -c '#{pane_current_path}'
|
||||
bind-key u split-window -v -c '#{pane_current_path}'
|
||||
bind-key C-o split-window -h -c '#{pane_current_path}'
|
||||
bind-key C-u split-window -v -c '#{pane_current_path}'
|
||||
|
||||
bind-key -r C-h select-pane -L
|
||||
bind-key -r C-j select-pane -D
|
||||
bind-key -r C-k select-pane -U
|
||||
bind-key -r C-l select-pane -R
|
||||
|
||||
bind-key f resize-pane -Z
|
||||
bind-key r source-file ~/.config/tmux/tmux.conf
|
||||
|
||||
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i"
|
||||
bind -T root MouseDown2Pane select-pane -t =\; run -b "xclip -o | tmux load-buffer - && tmux paste-buffer -s ' '"
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
1953
home/common/dotfiles/zsh/.zcompdump
Normal file
1953
home/common/dotfiles/zsh/.zcompdump
Normal file
File diff suppressed because it is too large
Load Diff
30
home/common/dotfiles/zsh/completion
Normal file
30
home/common/dotfiles/zsh/completion
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/zsh
|
||||
# The following lines were added by compinstall
|
||||
|
||||
zstyle ':completion:*' completer _expand _complete _ignored _approximate
|
||||
zstyle ':completion:*' completions 1
|
||||
zstyle ':completion:*' expand prefix
|
||||
zstyle ':completion:*' format '%BCompleting %d%b'
|
||||
zstyle ':completion:*' glob 1
|
||||
zstyle ':completion:*' group-name ''
|
||||
zstyle ':completion:*' ignore-parents parent pwd
|
||||
zstyle ':completion:*' insert-unambiguous true
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
|
||||
zstyle ':completion:*' list-suffixes true
|
||||
zstyle ':completion:*' matcher-list '' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**' 'l:|=* r:|=*'
|
||||
zstyle ':completion:*' max-errors 1
|
||||
zstyle ':completion:*' menu select=3
|
||||
zstyle ':completion:*' original true
|
||||
zstyle ':completion:*' preserve-prefix '//[^/]##/'
|
||||
zstyle ':completion:*' prompt 'Did you mean...'
|
||||
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
|
||||
zstyle ':completion:*' squeeze-slashes true
|
||||
zstyle ':completion:*' substitute 1
|
||||
zstyle ':completion:*' verbose true
|
||||
zstyle ':completion:*' word true
|
||||
zstyle :compinstall filename "$ZDOTDIR/completion"
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
# End of lines added by compinstall
|
||||
64
home/common/dotfiles/zsh/functions
Normal file
64
home/common/dotfiles/zsh/functions
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/zsh
|
||||
|
||||
scratch () {
|
||||
nvim -c ":set ft=$1" $(mktemp)
|
||||
}
|
||||
|
||||
tsessions() {
|
||||
tmux list-sessions -F '#{session_name} #{?session_attached,,not_attached}' | \
|
||||
awk '/not_attached/{print $1}'
|
||||
}
|
||||
|
||||
tkill() {
|
||||
tsessions | fzf | xargs tmux kill-session -t
|
||||
}
|
||||
|
||||
tswitch() {
|
||||
tsessions | fzf | xargs tmux switch-client -t
|
||||
}
|
||||
|
||||
tnew() {
|
||||
tmux new -d -s "$@"
|
||||
tmux switch-client -t $1
|
||||
}
|
||||
|
||||
asciirec() {
|
||||
local tempfile=$(mktemp /tmp/asciirec.XXXXX.asciinema.json)
|
||||
asciinema rec "$tempfile"
|
||||
fb "$tempfile"
|
||||
rm "$tempfile"
|
||||
}
|
||||
|
||||
fbs() {
|
||||
local url=$1
|
||||
local time=${2-5}
|
||||
|
||||
fb <<-HTML | rev | cut -c 2- | rev | xclip
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="${time}; url=${url}" />
|
||||
</head>
|
||||
<body>
|
||||
<h3>Redirect</h3>
|
||||
<p>Redirecting you to <a href="${url}">${url}</a></p>
|
||||
</body>
|
||||
</html>
|
||||
HTML
|
||||
|
||||
xclip -o
|
||||
}
|
||||
|
||||
qrshow() {
|
||||
local url=$1
|
||||
[[ -z "$url" ]] && read url
|
||||
qrencode -o - "$url" | feh -
|
||||
}
|
||||
|
||||
envy() {
|
||||
env $(cat .env | sed '/^\s*#/d') "$@"
|
||||
}
|
||||
|
||||
add-hash() {
|
||||
hash -d "$@=$PWD"
|
||||
echo "hash -d '$@=$PWD'" >> "$ZDOTDIR/hashes"
|
||||
}
|
||||
79
home/common/dotfiles/zsh/init
Normal file
79
home/common/dotfiles/zsh/init
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/bin/zsh
|
||||
|
||||
# History {{{
|
||||
HISTFILE="$XDG_CACHE_HOME/zsh/history"
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
setopt share_history
|
||||
setopt autopushd
|
||||
|
||||
mkdir -p $(dirname "$HISTFILE")
|
||||
# }}}
|
||||
|
||||
# Various options {{{
|
||||
setopt autocd extendedglob nomatch notify histfindnodups
|
||||
unsetopt beep
|
||||
setopt interactive_comments
|
||||
# }}}
|
||||
|
||||
# Vim mode
|
||||
bindkey -v
|
||||
|
||||
# Keybindings {{{
|
||||
bindkey '^?' backward-delete-char
|
||||
bindkey '^h' backward-delete-char
|
||||
bindkey '^w' backward-kill-word
|
||||
bindkey '^r' history-incremental-pattern-search-backward
|
||||
bindkey '^k' history-beginning-search-backward
|
||||
bindkey '^j' history-beginning-search-forward
|
||||
bindkey '^p' push-input
|
||||
bindkey '^ ' fzf-cd-widget
|
||||
# }}}
|
||||
|
||||
# Prompt {{{
|
||||
autoload -Uz vcs_info
|
||||
precmd_functions+=( vcs_info )
|
||||
setopt prompt_subst
|
||||
PROMPT="%#$([ -n "$IN_NIX_SHELL" ] && echo '%F{blue}ns%f') %1~%(0?..%F{red})>%f "
|
||||
RPROMPT=\$vcs_info_msg_0_
|
||||
zstyle ':vcs_info:git:*' check-for-changes true
|
||||
zstyle ':vcs_info:git:*' formats '<%b> [%u%c]'
|
||||
# }}}
|
||||
|
||||
# Safe rm {{{
|
||||
alias rm='rm -I '
|
||||
setopt rm_star_silent
|
||||
# }}}
|
||||
|
||||
for file in completion functions; do
|
||||
[ -f "$XDG_CONFIG_HOME/zsh/$file" ] || touch "$XDG_CONFIG_HOME/zsh/$file"
|
||||
. "$XDG_CONFIG_HOME/zsh/$file"
|
||||
done
|
||||
|
||||
# GPG Agent {{{
|
||||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
# }}}
|
||||
|
||||
# Base16 {{{
|
||||
export BASE16_SHELL="$HOME/.config/base16-shell/"
|
||||
[ -n "$PS1" ] && \
|
||||
[ -s "$BASE16_SHELL/profile_helper.sh" ] && \
|
||||
eval "$("$BASE16_SHELL/profile_helper.sh")"
|
||||
# }}}
|
||||
|
||||
|
||||
# NVM {{{
|
||||
#if [ -f /usr/share/nvm/init-nvm.sh ]; then
|
||||
# source /usr/share/nvm/init-nvm.sh
|
||||
#fi
|
||||
# }}}
|
||||
|
||||
# ENVS {{{
|
||||
#eval "$(rbenv init -)"
|
||||
#. /usr/share/nvm/nvm.sh
|
||||
# }}}
|
||||
|
||||
# vim: set foldmethod=marker
|
||||
Reference in New Issue
Block a user