From 79d29be22b0d1302fb9c5a3fe36041d2efa08676 Mon Sep 17 00:00:00 2001 From: riley Date: Wed, 22 Sep 2021 21:38:18 -0400 Subject: [PATCH] add files --- .tmux.conf | 6 ++++++ .vimrc | 21 +++++++++++++++++---- .xonshrc | 55 ++++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 62 insertions(+), 20 deletions(-) create mode 100644 .tmux.conf diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..c5dff42 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,6 @@ +set -g terminal-overrides ',xterm-256color:Tc' +set -g default-terminal "tmux-256color" +set -as terminal-overrides ',xterm*:sitm=\E[3m' + +unbind -n Tab +unbind -n C-i diff --git a/.vimrc b/.vimrc index d02e64d..edda9c2 100644 --- a/.vimrc +++ b/.vimrc @@ -2,14 +2,26 @@ let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' if empty(glob(data_dir . '/autoload/plug.vim')) - silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' - autocmd VimEnter * PlugInstall --sync | source $MYVIMRC + silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' + autocmd VimEnter * PlugInstall --sync | source $MYVIMRC endif +if exists('$TMUX') + " Colors in tmux + let &t_8f = "\033[38;2;%lu;%lu;%lum" + let &t_8b = "\033[48;2;%lu;%lu;%lum" +endif + +packadd! dracula +set termguicolors +set background=dark +syntax enable +colorscheme dracula + " Install vim-plug if not found if empty(glob('~/.vim/autoload/plug.vim')) - silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs - \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim + silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs + \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim endif " Run PlugInstall if there are missing plugins @@ -55,5 +67,6 @@ Plug 'preservim/nerdtree' Plug 'ycm-core/YouCompleteMe', { 'do': './install.py' } Plug 'chiel92/vim-autoformat' Plug 'natebosch/vim-lsc' +Plug 'https://tildegit.org/sloum/gemini-vim-syntax' call plug#end() diff --git a/.xonshrc b/.xonshrc index 58c4d4e..59ed08c 100644 --- a/.xonshrc +++ b/.xonshrc @@ -1,16 +1,29 @@ -# XONSH WEBCONFIG START +# general shit $PROMPT = '{RED} <3 {RESET}| {BOLD_GREEN}{cwd_base}{RESET} ) ' $XONSH_COLOR_STYLE = 'fruity' xontrib load apt_tabcomplete argcomplete autovox jedi z -# XONSH WEBCONFIG END # path stuff -import sys -sys.path.insert(0, '') -sys.path.append(Path("~/addins").resolve()) +$PATH.insert(0, '') +$PATH.extend([ + '~/addins', + '~/.local/bin', + '~/bin', +]) -import addins +import addins # my extra stuffs :p + +def _colortest(): + import sys + for i in range(256): + sys.stdout.write(f"\033[48;5;{i}m ") + if (i+1) % 16 == 0: + sys.stdout.write("\033[0m\n") + +# tmux +if !(which tmux) and $TERM != 'tmux-256color': + tmux -2 new-session -A -s main # debug def _debug(): @@ -21,24 +34,34 @@ def _debug(): $XONSH_SHOW_TRACEBACK = True print("Debug mode enabled.") -aliases['debug'] = _debug - # bitwarden shit def _bwc(object : str, id : str): if p'~/.bw_session'.exists(): if $XONSH_SHOW_TRACEBACK: print("loaded .bw_session") source ~/.bw_session + else: + raise FileNotFoundError("~/.bw_session") output = $(bw get @(object) @(id)) $(echo @(output) | xclip -sel clipboard) return output -aliases['bwg'] = _bwc # legacy alias -aliases['bwc'] = _bwc +# aliases +aliases.update({ + 'bwg': _bwc, + 'bwc': _bwc, + 'colortest': _colortest, + 'config': '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME', + 'debug': _debug, + 'ls': 'ls -alhs --color=auto', + ':q': 'exit', +}) -# dots - -aliases['config'] = '/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' - -# ls -aliases['ls'] = 'ls -alhs --color=auto' +# man page colors :O +$LESS_TERMCAP_mb = "\033[01;31m" # begin blinking +$LESS_TERMCAP_md = "\033[01;31m" # begin bold +$LESS_TERMCAP_me = "\033[0m" # end mode +$LESS_TERMCAP_so = "\033[01;44;36m" # begin standout-mode (bottom of screen) +$LESS_TERMCAP_se = "\033[0m" # end standout-mode +$LESS_TERMCAP_us = "\033[00;36m" # begin underline +$LESS_TERMCAP_ue = "\033[0m" # end underline