This commit is contained in:
Tyrel Souza 2022-10-05 00:48:38 -04:00
parent 79b37243c3
commit 10cbc455d0
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
10 changed files with 10 additions and 346 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
vim/bundle/
tags
tags*
vim/view
.netrwhist
chromedriver

View File

View File

View File

@ -1,65 +0,0 @@
#!/usr/local/bin/zsh
export EDITOR=nvim
export VISUAL=nvim
export PYENV_ROOT=/Users/tyrel/.pyenv
# Aliases
alias ag='\ag --pager="less"'
alias c='\cat'
alias cat='bat'
alias cg='cd "$(git rev-parse --show-toplevel)"'
alias ctags="`brew --prefix`/bin/ctags"
alias dots="cd $(dirname `readlink ~/.vim`)"
alias g='git'
alias gp='git push -u'
alias ppjson="python -m json.tool"
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
alias httpie="http"
alias fuckingip="curl https://wtfismyip.com/json"
alias ls="exa -lhBgUm --git --time-style long-iso --icons"
# Functions
function cpbr () {
if branch=$(git symbolic-ref --short -q HEAD)
then
printf "$branch" | pbcopy
osascript -e "display notification \"$branch copied to clipboard\" with title \"cpbr\""
else
echo "no branch, can't copy"
fi
}
function hidden() { ls -a "$@" | grep '^\.'; }
function h () {
if [ -z "$*" ]
then
history
else
history | egrep "$@"
fi
}
function pulldep() { git pull; bundle; bundle exec rake db:migrate; }
settitle () {
echo -ne "\033]0;"$*"\007"
}
tide() {
for var in "$@"
do
open -a iTerm ~/code/tidelift/$var
settitle $var
done
}
# options
#export LESS=-RFX
#export PAGER="less"
pullall (){
for d in ./*/ ; do (cd "$d" && pwd && git pull); done
}
new_dock_space (){
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock
}

View File

@ -5,7 +5,8 @@ SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fish
SETUVAR _fisher_jorgebucaran_2F_hydro_files:\x7e/\x2econfig/fish/functions/fish_mode_prompt\x2efish\x1e\x7e/\x2econfig/fish/functions/fish_prompt\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/hydro\x2efish
SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/hydro
SETUVAR _fisher_upgraded_to_4_4:\x1d
SETUVAR _hydro_git_42718:main\u2022\x20
SETUVAR _hydro_git_69626:main\u2022\x20\u21911\x20
SETUVAR _hydro_git_72501:main\u2022\x20\u21911\x20
SETUVAR fish_color_autosuggestion:555\x1ebrblack
SETUVAR fish_color_cancel:\x2dr
SETUVAR fish_color_command:005fd7

View File

@ -56,6 +56,7 @@ set background=dark
set autoindent
set preserveindent
set copyindent
set mouse=
" Set Colors
if (has("termguicolors"))

116
emacs
View File

@ -1,116 +0,0 @@
(require 'package)
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(setq package-enable-at-startup nil)
(setq sml/theme 'light)
(package-initialize)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (smart-mode-line-respectful)))
'(custom-safe-themes
(quote
("8aebf25556399b58091e533e455dd50a6a9cba958cc4ebb0aab175863c25b9a4" "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa" "c74e83f8aa4c78a121b52146eadb792c9facc5b1f02c917e3dbb454fca931223" "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e" default)))
'(package-selected-packages
(quote
(color-theme-solarized neotree smart-mode-line powerline use-package helm evil-visual-mark-mode))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;; Git interface
(use-package magit)
;; VIM IN EMACS
(use-package evil
:ensure t
:config
(evil-mode 1)
;; More configuration goes here
)
; Solariazed Configurations
(load-theme 'solarized t)
(set-terminal-parameter nil 'background-mode 'dark)
(add-hook 'after-make-frame-functions
(lambda (frame)
(let ((mode (if (display-graphic-p frame) 'light 'dark)))
(set-frame-parameter frame 'background-mode mode)
(set-terminal-parameter frame 'background-mode mode))
(enable-theme 'solarized)))
; Mode Line configurations to make powerliner better
(use-package smart-mode-line
:ensure t
:config
(sml/setup)
;; Powerline
(use-package powerline
:ensure t
:config
(powerline-center-evil-theme)
)
;; Set Powerline Configuration
(setq powerline-arrow-shape 'curve)
(setq powerline-default-separator-dir '(right . left))
)
; https://www.emacswiki.org/emacs/NeoTree
(use-package neotree
:ensure t
:config
(global-set-key [f8] 'neotree-toggle)
(setq neo-smart-open t)
)
<<<<<<< HEAD
;; Set Powerline Configuration
(setq powerline-arrow-shape 'curve)
(setq powerline-default-separator-dir '(right . left))
;; Projectile
(add-hook 'python-mode-hook 'projectile-mode)
;; rebind neotree in evil-mode
=======
>>>>>>> 0c4d4a216c50c05346f138e4c5e8e73ac8f4c81a
(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter)
(evil-define-key 'normal neotree-mode-map (kbd "SPC") 'neotree-enter)
(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide)
(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter)
;; Jedi - Python autocomplete
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
(add-hook 'python-mode-hook 'jedi:setup)
;; Virtualenv stuff
;; https://github.com/porterjamesj/virtualenvwrapper.el
(require 'virtualenvwrapper)
(venv-initialize-interactive-shells) ;; if you want interactive shell support
(venv-initialize-eshell) ;; if you want eshell support
;; Projectile and Virtualenv
(setq projectile-switch-project-action 'venv-projectile-auto-workon)
(setq venv-dirlookup-names '(".venv" "pyenv" ".virtual"))
;; keybindings
;; Magit!
(global-set-key (kbd "C-x g") 'magit-status)
;; buffer list
(global-set-key (kbd "C-x C-l") 'list-buffers)
(set-terminal-parameter nil 'background-mode 'dark)
(add-hook 'after-make-frame-functions
(lambda (frame)
(let ((mode (if (display-graphic-p frame) 'light 'dark)))
(set-frame-parameter frame 'background-mode mode)
(set-terminal-parameter frame 'background-mode mode))
(enable-theme 'solarized-dark)))

View File

@ -3,19 +3,13 @@ set -x EDITOR nvim
set -x VISUAL nvim
# Aliases
alias ag='\ag --pager="less -r"'
alias c='\cat'
#alias ag='ag --pager="less -r"'
alias cat='bat'
alias cg='cd "(git rev-parse --show-toplevel)"'
alias dots='cd ~/code/dotfiles/'
alias fuckingip="curl https://wtfismyip.com/json"
alias g='git'
alias gp='git push -u'
alias httpie="http"
alias ls="exa -lhFgxUm --git --time-style long-iso --group-directories-first"
alias pg='pushd "(git rev-parse --show-toplevel)"'
alias ppjson="python -m json.tool"
alias shrug="echo -n '¯\_(ツ)_/¯' | pbcopy"
alias vimini="vim ~/.config/nvim/init.vim"
alias vim=nvim
@ -24,6 +18,11 @@ function httpdiff
diff --color -r -c <(curl -s "$1" 2>&1) <(curl -s "$2" 2>&1)
end
function cg
set _dir_ (git rev-parse --show-toplevel)
cd $_dir_
end
function cpbr
set branch (git symbolic-ref --short -q HEAD)
if test branch

View File

@ -1,156 +0,0 @@
# ported from https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/jonathan.zsh-theme
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`')'
}
function theme_precmd {
local TERMWIDTH
(( TERMWIDTH = ${COLUMNS} - 1 ))
###
# Truncate the path if it's too long.
PR_FILLBAR=""
PR_PWDLEN=""
local promptsize=${#${(%):---(%n@%m:%l)---()--}}
local pythonprompt=`virtualenv_info`
local pythonpromptsize=${#${pythonprompt}}
local pwdsize=${#${(%):-%~}}
if [[ "$promptsize + $pythonpromptsize + $pwdsize" -gt $TERMWIDTH ]]; then
((PR_PWDLEN=$TERMWIDTH - $promptsize))
else
PR_FILLBAR="\${(l.(($TERMWIDTH - ($promptsize + $pythonpromptsize + $pwdsize)))..${PR_HBAR}.)}"
fi
}
setopt extended_glob
theme_preexec () {
if [[ "$TERM" == "screen" ]]; then
local CMD=${1[(wr)^(*=*|sudo|-*)]}
echo -n "\ek$CMD\e\\"
fi
}
setprompt () {
###
# Need this so the prompt will work.
setopt prompt_subst
###
# See if we can use colors.
autoload zsh/terminfo
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do
eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
(( count = $count + 1 ))
done
PR_NO_COLOUR="%{$terminfo[sgr0]%}"
###
# Modify Git prompt
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚"
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹"
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖"
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
###
# See if we can use extended characters to look nicer.
# UTF-8 Fixed
if [[ $(locale charmap) == "UTF-8" ]]; then
PR_SET_CHARSET=""
PR_SHIFT_IN=""
PR_SHIFT_OUT=""
PR_HBAR="─"
PR_ULCORNER="┌"
PR_LLCORNER="└"
PR_LRCORNER="┘"
PR_URCORNER="┐"
else
typeset -A altchar
set -A altchar ${(s..)terminfo[acsc]}
# Some stuff to help us draw nice lines
PR_SET_CHARSET="%{$terminfo[enacs]%}"
PR_SHIFT_IN="%{$terminfo[smacs]%}"
PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
PR_HBAR='$PR_SHIFT_IN${altchar[q]:--}$PR_SHIFT_OUT'
PR_ULCORNER='$PR_SHIFT_IN${altchar[l]:--}$PR_SHIFT_OUT'
PR_LLCORNER='$PR_SHIFT_IN${altchar[m]:--}$PR_SHIFT_OUT'
PR_LRCORNER='$PR_SHIFT_IN${altchar[j]:--}$PR_SHIFT_OUT'
PR_URCORNER='$PR_SHIFT_IN${altchar[k]:--}$PR_SHIFT_OUT'
fi
###
# Decide if we need to set titlebar text.
case $TERM in
xterm*)
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
;;
screen)
PR_TITLEBAR=$'%{\e_screen \005 (\005t) | %(!.-=[ROOT]=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\e\\%}'
;;
*)
PR_TITLEBAR=''
;;
esac
###
# Decide whether to set a screen title
if [[ "$TERM" == "screen" ]]; then
PR_STITLE=$'%{\ekzsh\e\\%}'
else
PR_STITLE=''
fi
###
# Finally, the prompt.
PROMPT='$PR_SET_CHARSET$PR_STITLE${(e)PR_TITLEBAR}\
$PR_CYAN$PR_ULCORNER$PR_HBAR$PR_GREY(\
$PR_GREEN%$PR_PWDLEN<...<%~%<<\
$PR_GREY)`virtualenv_info`$PR_CYAN$PR_HBAR$PR_HBAR${(e)PR_FILLBAR}$PR_HBAR$PR_GREY(\
$PR_CYAN%(!.%SROOT%s.%n)$PR_GREY@$PR_GREEN%m:%l\
$PR_GREY)$PR_CYAN$PR_HBAR$PR_URCORNER\
$PR_CYAN$PR_LLCORNER$PR_BLUE$PR_HBAR(\
$PR_YELLOW%D{%H:%M:%S}\
$PR_LIGHT_BLUE%{$reset_color%}`git_prompt_info``git_prompt_status`$PR_BLUE)$PR_CYAN$PR_HBAR\
$PR_HBAR\
>$PR_NO_COLOUR '
# display exitcode on the right when >0
return_code="%(?..%{$fg[red]%}%? ↵ %{$reset_color%})"
RPROMPT=' $return_code$PR_CYAN$PR_HBAR$PR_BLUE$PR_HBAR\
($PR_YELLOW%D{%a,%b%d}$PR_BLUE)$PR_HBAR$PR_CYAN$PR_LRCORNER$PR_NO_COLOUR'
PS2='$PR_CYAN$PR_HBAR\
$PR_BLUE$PR_HBAR(\
$PR_LIGHT_GREEN%_$PR_BLUE)$PR_HBAR\
$PR_CYAN$PR_HBAR$PR_NO_COLOUR '
}
setprompt
autoload -U add-zsh-hook
add-zsh-hook precmd theme_precmd
add-zsh-hook preexec theme_preexec