build core, basic and go variants and add template
This commit is contained in:
7
core/shell/inputrc
Normal file
7
core/shell/inputrc
Normal file
@@ -0,0 +1,7 @@
|
||||
set editing-mode vi
|
||||
|
||||
$if mode=vi
|
||||
set keymap vi-insert
|
||||
Control-l: clear-screen
|
||||
Control-r: vi-put
|
||||
$endif
|
||||
24
core/shell/profile
Normal file
24
core/shell/profile
Normal file
@@ -0,0 +1,24 @@
|
||||
# Set editor
|
||||
EDITOR='nvim'
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
|
||||
# Configure history
|
||||
HISTCONTROL=ignoreboth
|
||||
unset HISTFILE
|
||||
|
||||
# Handy aliases
|
||||
alias la='ls -A'
|
||||
alias ll='la -l'
|
||||
alias ..='cd ..'
|
||||
alias e='exit'
|
||||
|
||||
# Git branch helper
|
||||
git_branch_prompt() {
|
||||
local branch="$(git branch --show-current 2> /dev/null)"
|
||||
[[ -z "$branch" ]] || echo "[${branch}]"
|
||||
}
|
||||
|
||||
# Colorful command prompt
|
||||
PS1='\[\e[33m\][\[\e[0m\]\W\[\e[33m\]]\[\e[32m\]$(git_branch_prompt)\[\e[33m\]\$\[\e[37m\] '
|
||||
trap 'printf \\e[0m' DEBUG
|
||||
83
core/shell/tmux.conf
Normal file
83
core/shell/tmux.conf
Normal file
@@ -0,0 +1,83 @@
|
||||
# Set default shell
|
||||
set -g default-shell /bin/bash
|
||||
|
||||
# Increase history size
|
||||
set -g history-limit 50000
|
||||
|
||||
# Disable escape delay
|
||||
set-option -sg escape-time 0
|
||||
|
||||
# Enable mouse and focus events
|
||||
set -g mouse on
|
||||
set -g focus-events on
|
||||
|
||||
################
|
||||
# Key bindings #
|
||||
################
|
||||
|
||||
# Change prefix
|
||||
set-option -g prefix C-a
|
||||
|
||||
# Remap split commands
|
||||
unbind '"'
|
||||
unbind %
|
||||
bind s split-window -v
|
||||
bind v split-window -h
|
||||
|
||||
# Remap pane selection
|
||||
unbind Up
|
||||
unbind Down
|
||||
unbind Left
|
||||
unbind Right
|
||||
|
||||
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
|
||||
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|l?n?vim?x?)(diff)?$'"
|
||||
bind-key -n 'M-h' if-shell "$is_vim" { send-keys M-h } { if-shell -F '#{pane_at_left}' {} { select-pane -L } }
|
||||
bind-key -n 'M-j' if-shell "$is_vim" { send-keys M-j } { if-shell -F '#{pane_at_bottom}' {} { select-pane -D } }
|
||||
bind-key -n 'M-k' if-shell "$is_vim" { send-keys M-k } { if-shell -F '#{pane_at_top}' {} { select-pane -U } }
|
||||
bind-key -n 'M-l' if-shell "$is_vim" { send-keys M-l } { if-shell -F '#{pane_at_right}' {} { select-pane -R } }
|
||||
|
||||
# Remap resize
|
||||
unbind C-Up
|
||||
unbind C-Down
|
||||
unbind C-Left
|
||||
unbind C-Right
|
||||
unbind M-Up
|
||||
unbind M-Down
|
||||
unbind M-Left
|
||||
unbind M-Right
|
||||
bind -nr M-K resize-pane -U
|
||||
bind -nr M-J resize-pane -D
|
||||
bind -nr M-H resize-pane -L
|
||||
bind -nr M-L resize-pane -R
|
||||
|
||||
##########
|
||||
# Design #
|
||||
##########
|
||||
|
||||
# Borders
|
||||
set -g pane-border-style 'fg=colour12'
|
||||
set -g pane-active-border-style 'fg=colour12'
|
||||
|
||||
# Statusbar
|
||||
set -g status-position bottom
|
||||
set -g status-justify left
|
||||
set -g status-style 'bg=colour235'
|
||||
set -g status-left ''
|
||||
|
||||
# Command line and messages
|
||||
set -g message-style 'bg=color235'
|
||||
set -g display-time 4000
|
||||
|
||||
# Tabs
|
||||
setw -g window-status-current-style 'bg=colour238 bold'
|
||||
setw -g window-status-current-format ' #[fg=color245]#I#[fg=colour250] #W '
|
||||
setw -g window-status-style 'bg=colour236'
|
||||
setw -g window-status-format ' #[fg=colour240]#I#[fg=colour245] #W '
|
||||
|
||||
# Clock
|
||||
set -g status-right '#[fg=colour0,bg=colour240] %H:%M '
|
||||
set -g status-interval 10
|
||||
|
||||
# Scroll number
|
||||
setw -g mode-style 'fg=colour240'
|
||||
Reference in New Issue
Block a user