From a74ebb7e0dd87714e3c47acfb2789ef3f9b66519 Mon Sep 17 00:00:00 2001 From: berserk2046 Date: Wed, 1 Feb 2023 22:47:48 -0500 Subject: [PATCH] dot --- .tmux.conf | 28 ++++++++++++++++++++++++++++ .vimrc | 35 +++++++++++++++++++++++++++++++++++ .yashrc | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+) create mode 100644 .tmux.conf create mode 100644 .vimrc create mode 100644 .yashrc diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..95f68e8 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,28 @@ +unbind C-b +set-option -g prefix C-o +set -g base-index 1 +set -g pane-base-index 1 +bind -n C-t new-window +bind -n C-k next-window +bind -n C-j previous-window +bind -n C-1 select-window -t 0 +bind -n C-2 select-window -t 1 +bind -n C-3 select-window -t 2 +bind -n C-4 select-window -t 3 +bind -n C-5 select-window -t 4 +bind -n C-6 select-window -t 5 +bind -n C-7 select-window -t 6 +bind -n C-8 select-window -t 7 +bind -n C-w kill-window +bind -n C-q kill-session +bind -n C-s split-window -h +bind -n C-h split-window -v + +set -g status-style "bg=default" +set -g window-status-current-style "bg=default,reverse" +set -g window-status-separator '' +set -g window-status-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } " +set -g window-status-current-format "#{?window_start_flag,, }#I:#W#{?window_flags,#F, } " +set -g status-position top +set -g status-left '' +set -g status-right '' diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..d04dc21 --- /dev/null +++ b/.vimrc @@ -0,0 +1,35 @@ +" Configure +syntax on +set number +set ttyfast +set cc=200 +set shiftwidth=4 +set noswapfile +set nobackup +set clipboard=unnamedplus +set encoding=utf-8 +set tabstop=4 +set softtabstop=4 +set smartindent +set autoindent + +" Plugins +call plug#begin() + +Plug 'jiangmiao/auto-pairs' + +call plug#end() + +" Keybinds +inoremap lkj +map +map h +map l + +" Terminal Colors +set t_Co=256 " Enable 256 colors +set termguicolors " Enable GUI colors for the terminal to get truecolor + +" Compile And Run +autocmd filetype c nnoremap :w !tcc % -Wall -O2 -o %:r && ./%:r +autocmd filetype cpp nnoremap :w !g++ % -o %:r && ./%:r diff --git a/.yashrc b/.yashrc new file mode 100644 index 0000000..a8a96e0 --- /dev/null +++ b/.yashrc @@ -0,0 +1,52 @@ +COMMAND_NOT_FOUND_HANDLER=() + +alias ls='ls --color' +alias la='ls -la' + +_update_vcs_info(){ + typeset type branch + { + read --raw-mode type + read --raw-mode _vcs_root + read --raw-mode branch + } <( + exec 2>/dev/null + typeset COMMAND_NOT_FOUND_HANDLER= + while true; do + if [ -e .git ] || [ . -ef "$GIT_WORK_TREE-" ]; then + printf 'git\n%s\n' "$GIT_WORK_TREE-$PWD" + git branch --no-color | sed -n '/^\*/s/^..//p' + exit + elif [ -d .hg ]; then + printf 'hg\n%s\n' "$PWD" + exec cat .hg/branch + elif [ -d .svn ]; then + printf 'svn\n' + _vcs_root=$(svn info --show-item=wc-root) + printf '%s\n' "$_vcs_root" + path=$(svn info --show-item=relative-url) + case $path in + (*/branches/*) + printf '%s\n' "${${path#*/branches/}%%/*}" + esac + exit + fi + if [ / -ef . ] || [ . -ef .. ]; then + exit + fi + \command cd -P .. + done + ) + case "$type#$branch" in + (hg#default) _vcs_info='hg';; + (git#master) _vcs_info='git';; + (*# ) _vcs_info="$type";; + (* ) _vcs_info="$type@$branch";; + esac +} + +# Update $_vcs_info on each prompt +PROMPT_COMMAND=("$PROMPT_COMMAND" '_update_vcs_info') + +YASH_PS1='[$(uname -n)] ${${${PWD:/~/\~}##*/}:-$PWD} ${{?:/0/}:+\\fr.$?\\fd. } > ' +YASH_PS1R='\fc.${_vcs_info}'