mirror of
https://github.com/balkian/dotfiles.git
synced 2024-11-21 11:42:28 +00:00
Several changes
* Compton improvements * Add a wide screen layout * Set termite as the default terminal * Update spacemacs * Add script to copy bibtex entries from zotero
This commit is contained in:
parent
6f07d96ea0
commit
f0202964ec
@ -1,6 +1,7 @@
|
||||
# echo "pasado(xprofile)" $(date) >> /tmp/LOG
|
||||
setxkbmap us altgr-intl -option ctrl:nocaps
|
||||
setxkbmap "us,es" "altgr-intl," -option "ctrl:nocaps,grp:shift_toggle,terminate:ctrl_alt_bksp"
|
||||
#xmodmap ~/.Xmodmap
|
||||
#source ~/.xinitrc
|
||||
export XTERMINAL=termite
|
||||
export TERMINAL=termite
|
||||
export TERMCMD=termite
|
||||
|
@ -23,13 +23,13 @@ shadow-exclude = [
|
||||
|
||||
# Opacity
|
||||
mark-override-focused = true;
|
||||
menu-opacity = 0.9;
|
||||
inactive-opacity = 0.9;
|
||||
#menu-opacity = 0.9;
|
||||
#inactive-opacity = 0.9;
|
||||
# active-opacity = 0.8;
|
||||
frame-opacity = 0.7;
|
||||
# frame-opacity = 0.7;
|
||||
inactive-opacity-override = true;
|
||||
alpha-step = 0.06;
|
||||
# inactive-dim = 0.2;
|
||||
inactive-dim = 0.2;
|
||||
# inactive-dim-fixed = true;
|
||||
# blur-background = true;
|
||||
# blur-background-frame = true;
|
||||
|
@ -13,7 +13,7 @@
|
||||
'(global-hl-line-mode t)
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(yafolding origami-mode highlight-indent-guides indent-guide go-dlv quelpa avy avy-mode github-theme base16-theme hlinum glab neotree evil-magit docker password-store gitlab flycheck-cask ensime scala-mode yasnippet yaml-mode slime quelpa-use-package ob-ipython nose n3-mode monokai-theme markdown-mode magit jedi helm-swoop helm-projectile helm-descbinds helm-ag guide-key go-mode go-autocomplete gist flymake-go flycheck exec-path-from-shell evil-surround evil-smartparens evil-paredit evil-org evil-nerd-commenter evil-mu4e evil-matchit evil-leader evil-jumper ein clojure-mode auctex ace-jump-mode)))
|
||||
(package-build yafolding origami-mode highlight-indent-guides indent-guide go-dlv quelpa avy avy-mode github-theme base16-theme hlinum glab neotree evil-magit docker password-store gitlab flycheck-cask ensime scala-mode yasnippet yaml-mode slime quelpa-use-package ob-ipython nose n3-mode monokai-theme markdown-mode magit jedi helm-swoop helm-projectile helm-descbinds helm-ag guide-key go-mode go-autocomplete gist flymake-go flycheck exec-path-from-shell evil-surround evil-smartparens evil-paredit evil-org evil-nerd-commenter evil-mu4e evil-matchit evil-leader evil-jumper ein clojure-mode auctex ace-jump-mode)))
|
||||
'(safe-local-variable-values (quote ((TeX-command-extra-options . "-shell-escape")))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
|
@ -152,8 +152,8 @@ values."
|
||||
dotspacemacs-colorize-cursor-according-to-state t
|
||||
;; Default font, or prioritized list of fonts. `powerline-scale' allows to
|
||||
;; quickly tweak the mode-line size to make separators look not too crappy.
|
||||
dotspacemacs-default-font '("Inconsolata"
|
||||
:size 16
|
||||
dotspacemacs-default-font '("DejaVu Sans Mono"
|
||||
:size 14
|
||||
:weight normal
|
||||
:width normal
|
||||
:powerline-scale 1.5)
|
||||
@ -358,7 +358,7 @@ you should place your code here."
|
||||
'(evil-want-Y-yank-to-eol nil)
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(csv-mode web-beautify livid-mode skewer-mode simple-httpd json-mode json-snatcher json-reformat js2-refactor multiple-cursors js2-mode js-doc company-tern dash-functional tern coffee-mode yaml-mode helm-company helm-c-yasnippet fuzzy company-web web-completion-data company-statistics company-go company-anaconda company auto-yasnippet yasnippet ac-ispell auto-complete web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link evil-magit magit magit-popup xterm-color shell-pop org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-download multi-term mmm-mode markdown-toc markdown-mode htmlize gnuplot git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-commit with-editor git-gutter gh-md flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip flycheck eshell-z eshell-prompt-extras esh-help diff-hl auto-dictionary yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode helm-pydoc cython-mode anaconda-mode pythonic go-guru go-eldoc go-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint info+ indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation hide-comnt help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed dash aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
|
||||
(auctex-latexmk company-auctex auctex csv-mode web-beautify livid-mode skewer-mode simple-httpd json-mode json-snatcher json-reformat js2-refactor multiple-cursors js2-mode js-doc company-tern dash-functional tern coffee-mode yaml-mode helm-company helm-c-yasnippet fuzzy company-web web-completion-data company-statistics company-go company-anaconda company auto-yasnippet yasnippet ac-ispell auto-complete web-mode tagedit slim-mode scss-mode sass-mode pug-mode less-css-mode helm-css-scss haml-mode emmet-mode smeargle orgit magit-gitflow helm-gitignore gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger git-link evil-magit magit magit-popup xterm-color shell-pop org-projectile org-category-capture org-present org-pomodoro alert log4e gntp org-download multi-term mmm-mode markdown-toc markdown-mode htmlize gnuplot git-gutter-fringe+ git-gutter-fringe fringe-helper git-gutter+ git-commit with-editor git-gutter gh-md flyspell-correct-helm flyspell-correct flycheck-pos-tip pos-tip flycheck eshell-z eshell-prompt-extras esh-help diff-hl auto-dictionary yapfify pyvenv pytest pyenv-mode py-isort pip-requirements live-py-mode hy-mode helm-pydoc cython-mode anaconda-mode pythonic go-guru go-eldoc go-mode ws-butler winum which-key volatile-highlights vi-tilde-fringe uuidgen use-package toc-org spaceline powerline restart-emacs request rainbow-delimiters popwin persp-mode pcre2el paradox spinner org-plus-contrib org-bullets open-junk-file neotree move-text macrostep lorem-ipsum linum-relative link-hint info+ indent-guide hydra hungry-delete hl-todo highlight-parentheses highlight-numbers parent-mode highlight-indentation hide-comnt help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flx helm-descbinds helm-ag google-translate golden-ratio flx-ido flx fill-column-indicator fancy-battery eyebrowse expand-region exec-path-from-shell evil-visualstar evil-visual-mark-mode evil-unimpaired evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-ediff evil-args evil-anzu anzu evil goto-chg undo-tree eval-sexp-fu highlight elisp-slime-nav dumb-jump f s diminish define-word column-enforce-mode clean-aindent-mode bind-map bind-key auto-highlight-symbol auto-compile packed dash aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
@ -268,8 +268,8 @@ for_window [class="^termite"] border 1px
|
||||
for_window [class="^lxterminal"] border 1px
|
||||
for_window [class="^xfce4-terminal"] border 1px
|
||||
for_window [title="^scratch"] move to scratchpad
|
||||
for_window [class="^Nemo|Thunar|Ranger"] move to scratchpad;
|
||||
for_window [title="filemanager"] move to scratchpad;
|
||||
assign [class="^Nemo|Thunar|Ranger"] 5: Files
|
||||
for_window [title="^filemanager$"] move to scratchpad;
|
||||
#KDE
|
||||
for_window [class="Plasma-desktop"] border none
|
||||
for_window [class="krunner"] border none
|
||||
@ -323,6 +323,7 @@ exec --no-startup-id syndaemon -i 0.5 -d
|
||||
exec --no-startup-id i3-sensible-terminal --title=scratch -e 'tmux attach'
|
||||
exec --no-startup-id i3-exit.sh autolock
|
||||
exec --no-startup-id xfce4-power-manager
|
||||
exec --no-startup-id xfsettingsd --sm-client-disable &
|
||||
#exec --no-startup-id xfsettingsd --sm-client-disable &
|
||||
exec --no-startup-id clipit -n
|
||||
exec --no-startup-id owncloud
|
||||
exec --no-startup-id udiskie --no-notify --tray --use-udisks2
|
||||
|
@ -1,3 +1,10 @@
|
||||
':/home/j
|
||||
F:/home/j
|
||||
f:/home/j
|
||||
m:/home/j/Downloads
|
||||
p:/home/j/Doctorado/Papers
|
||||
s:/home/j/Doctorado/Papers/SocialContext
|
||||
d:/home/j/Downloads
|
||||
D:/home/j/Doctorado
|
||||
o:/home/j/ownCloud
|
||||
g:/home/j/git/balkian
|
||||
G:/home/j/GSI
|
||||
|
@ -1,50 +1,50 @@
|
||||
set colorscheme snow
|
||||
set colorscheme solarized
|
||||
set colorscheme jungle
|
||||
set status_bar_on_top true
|
||||
set draw_borders true
|
||||
set line_numbers
|
||||
|
||||
find Mu
|
||||
find
|
||||
find Des
|
||||
find H
|
||||
find des
|
||||
find d
|
||||
find git
|
||||
find gi
|
||||
map f console scout -ftsea%space
|
||||
scout -ftsea mes
|
||||
scout -ftsea sf
|
||||
scout -ftsea s
|
||||
scout -ftsea test
|
||||
scout -ftsea
|
||||
filter
|
||||
scout -ftsea te
|
||||
scout -ftsea dot
|
||||
scout -ftsea i3
|
||||
map dC chain mark_files all=True val=True; get_cumulative_size
|
||||
delete
|
||||
find loc
|
||||
search loc
|
||||
find Pu
|
||||
scout -aefiklst
|
||||
scout -aefiklst
|
||||
scout -ftse Docu
|
||||
scout -ftse Docum
|
||||
scout -ftse dotfi
|
||||
scout -ftse own
|
||||
scout -ftse ownclo
|
||||
scout -ftse sys
|
||||
scout -ftse Desk
|
||||
scout -ftse vid
|
||||
scout -ftse vi
|
||||
scout -fts id
|
||||
find
|
||||
shell y
|
||||
find dotfi
|
||||
find GSI
|
||||
find vid
|
||||
find Pic
|
||||
find musi
|
||||
rename parameterized_plugin.py
|
||||
rename basic_plugin
|
||||
rename basic_analyse_entry_plugin.py
|
||||
rename basic_plugin.py
|
||||
rename sklearn
|
||||
filter
|
||||
open_with svg
|
||||
search svg
|
||||
open_with inkscape
|
||||
find owncl
|
||||
find some
|
||||
find socialcon
|
||||
find download
|
||||
find paced
|
||||
rename PACED.png
|
||||
search paced
|
||||
delete
|
||||
terminal
|
||||
shell
|
||||
shell echo $TERM
|
||||
shell
|
||||
shell -i
|
||||
|
||||
terminal
|
||||
|
||||
search joya
|
||||
search factu
|
||||
search pdf
|
||||
search juan
|
||||
find wetran
|
||||
find git
|
||||
mkdir photos
|
||||
execute_command
|
||||
search
|
||||
rename SNA
|
||||
mkdir bundle-functiona
|
||||
rename bundle-functional
|
||||
find
|
||||
filter *.mobi
|
||||
mkdir mobi
|
||||
filter .mobi
|
||||
filter
|
||||
rename
|
||||
bulkrename
|
||||
bulkrename vim
|
||||
:eval fm.source(fm.confpath('rc.conf'))
|
||||
eval fm.source(fm.confpath('rc.conf'))
|
||||
bulkrename
|
||||
open_with
|
||||
open_with 1
|
||||
|
@ -163,6 +163,7 @@ set padding_right true
|
||||
# instances but leads to *slight* performance loss.
|
||||
# When false, bookmarks are saved when ranger is exited.
|
||||
set autosave_bookmarks true
|
||||
set save_backtick_bookmark false
|
||||
|
||||
# You can display the "real" cumulative size of directories by using the
|
||||
# command :get_cumulative_size or typing "dc". The size is expensive to
|
||||
@ -191,7 +192,7 @@ set cd_bookmarks true
|
||||
|
||||
# Avoid previewing files larger than this size, in bytes. Use a value of 0 to
|
||||
# disable this feature.
|
||||
set preview_max_size 0
|
||||
set preview_max_size 10000000
|
||||
|
||||
# Add the highlighted file to the path in the titlebar
|
||||
set show_selection_in_titlebar true
|
||||
@ -412,6 +413,8 @@ map cc search_next order=ctime
|
||||
map cm search_next order=mtime
|
||||
map ca search_next order=atime
|
||||
|
||||
|
||||
map <C-t> terminal
|
||||
# Tabs
|
||||
map <C-n> tab_new ~
|
||||
map <C-w> tab_close
|
||||
|
@ -83,9 +83,9 @@ ext x?html?, has w3m, terminal = w3m "$@"
|
||||
# Misc
|
||||
#-------------------------------------------
|
||||
# Define the "editor" for text files as first action
|
||||
mime ^text, label editor = $EDITOR -- "$@"
|
||||
mime ^text, label editor = myemacs "-nc" -- "$@"
|
||||
mime ^text, label pager = "$PAGER" -- "$@"
|
||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
||||
!mime ^text, label editor, ext xml|json|csv|tex|py|pl|rb|js|sh|php = myemacs "-nc" -- "$@"
|
||||
!mime ^text, label pager, ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
ext 1 = man "$1"
|
||||
@ -204,7 +204,7 @@ label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1"
|
||||
|
||||
# Define the editor for non-text files + pager as last action
|
||||
!mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = $EDITOR -- "$@"
|
||||
label editor, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = myemacs "-nc" -- "$@"
|
||||
label pager, !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = "$PAGER" -- "$@"
|
||||
|
||||
# The very last action, so that it's never triggered accidentally, is to execute a program:
|
||||
|
@ -58,8 +58,8 @@ if [ "$preview_images" = "True" ]; then
|
||||
image/*)
|
||||
exit 7;;
|
||||
# Image preview for video, disabled by default.:
|
||||
###video/*)
|
||||
### ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
|
||||
video/*)
|
||||
ffmpegthumbnailer -i "$path" -o "$cached" -s 0 && exit 6 || exit 1;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
@ -0,0 +1,3 @@
|
||||
/home/j/git/lab.gsi/senpy/senpy/img/header.png
|
||||
::/home/j/NextCloud/Videos/salsa/DamiYNina/VID-20180107-WA0011.mp4
|
||||
/home/j/Doctorado/Papers/SocialContext
|
2
screenlayouts/.screenlayout/dual-wide.sh
Executable file
2
screenlayouts/.screenlayout/dual-wide.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
xrandr --output VIRTUAL1 --off --output eDP1 --mode 1920x1080 --pos 328x1080 --rotate normal --output DP1 --primary --mode 2560x1080 --pos 0x0 --rotate normal --output HDMI2 --off --output HDMI1 --off --output DP2 --off
|
4
scripts/.bin/copybib
Executable file
4
scripts/.bin/copybib
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
cat ~/Exported\ Items.bib | sed -n 's/@.*{\(.*\),/\\cite{\1}/p' | xclip -selection clipboard
|
||||
sleep 1
|
||||
cat ~/Exported\ Items.bib | xclip -selection clipboard
|
@ -36,9 +36,12 @@ bind b set-window-option synchronize-panes
|
||||
set -g status-bg black
|
||||
set -g status-fg white
|
||||
set -g status-left '#[fg=green]#H'
|
||||
set -g status-right '#[fg=yellow]#(uptime | sed -e "s/load average/load/g\;s/ / /g")' # | cut -d "," -f 2-)'
|
||||
set -g status-right '#[fg=yellow]#(uptime | sed -e "s/load average/load/g" -e "s/ / /g")' # | cut -d "," -f 2-)'
|
||||
set -g status-right-length 50
|
||||
|
||||
set -g pane-border-status bottom
|
||||
set -g pane-border-format '#(ps --no-headers -t #{pane_tty} -o args -O-c)'
|
||||
|
||||
# Highlight active window
|
||||
set-window-option -g window-status-current-bg red
|
||||
|
||||
@ -47,7 +50,9 @@ setw -g monitor-activity on
|
||||
set -g visual-activity on
|
||||
|
||||
# Automatically set window title
|
||||
set -g automatic-rename off
|
||||
set-option -g status-interval 5
|
||||
set-option -g automatic-rename on
|
||||
set-option -g automatic-rename-format '#(basename "#{pane_current_path}")'
|
||||
|
||||
# Mouse and panes
|
||||
#set -g mouse-utf8 on
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 221c6cd1283654ba77db052ee27aef613395321c
|
||||
Subproject commit e021adeb4a628387e853004427e3ea373207ee5a
|
@ -1,64 +0,0 @@
|
||||
#
|
||||
# Executes commands at login pre-zshrc.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
#
|
||||
# Less
|
||||
#
|
||||
|
||||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
# Remove -X and -F (exit if the content fits on one screen) to enable it.
|
||||
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
||||
|
||||
# Set the Less input preprocessor.
|
||||
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||
fi
|
||||
|
||||
#
|
||||
# Temporary Files
|
||||
#
|
||||
|
||||
if [[ ! -d "$TMPDIR" ]]; then
|
||||
export TMPDIR="/tmp/$LOGNAME"
|
||||
mkdir -p -m 700 "$TMPDIR"
|
||||
fi
|
||||
|
||||
# Handy aliases
|
||||
alias fail="less +F"
|
||||
|
||||
# Docker goodies
|
||||
alias da="docker_start_attach"
|
||||
alias drm="docker rm"
|
||||
alias drun="docker run"
|
||||
alias drmi="docker rmi"
|
||||
|
||||
alias kg='kubectl --context="kubernetes-admin@kubernetes"'
|
||||
|
||||
kube(){
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Wrapper for kubectl"
|
||||
echo ""
|
||||
echo "Usage: $0 <namespace> ... kubectl args"
|
||||
return 1
|
||||
fi
|
||||
context=$1
|
||||
shift
|
||||
kubectl --context="$context" "$@"
|
||||
}
|
||||
|
||||
TMPPREFIX="${TMPDIR%/}/zsh"
|
||||
|
||||
if command -v pyenv >/dev/null 2>&1 ; then
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
export PATH="$PYENV_ROOT/bin:$PATH"
|
||||
eval "$(pyenv init -)"
|
||||
pyenv virtualenvwrapper
|
||||
fi
|
||||
|
||||
setopt interactivecomments
|
@ -17,6 +17,7 @@ export EDITOR='vim'
|
||||
export VISUAL="myemacs -c"
|
||||
export ALTERNATE_EDITOR=""
|
||||
export PAGER='less'
|
||||
export TERMCMD='i3-sensible-terminal'
|
||||
|
||||
#
|
||||
# Language
|
||||
|
87
zsh/.zshrc
87
zsh/.zshrc
@ -5,6 +5,11 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zshenv" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zshenv"
|
||||
fi
|
||||
|
||||
# Source Prezto.
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
@ -12,21 +17,42 @@ fi
|
||||
|
||||
# Customize to your needs...
|
||||
|
||||
eval $(dircolors ~/.dircolors)
|
||||
#
|
||||
# Less
|
||||
#
|
||||
|
||||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
# Remove -X and -F (exit if the content fits on one screen) to enable it.
|
||||
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
||||
|
||||
# Handy alias
|
||||
alias fail="less +F"
|
||||
|
||||
|
||||
# Set the Less input preprocessor.
|
||||
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
|
||||
if (( $#commands[(i)lesspipe(|.sh)] )); then
|
||||
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
|
||||
fi
|
||||
|
||||
#
|
||||
# Temporary Files
|
||||
#
|
||||
|
||||
if [[ ! -d "$TMPDIR" ]]; then
|
||||
export TMPDIR="/tmp/$LOGNAME"
|
||||
mkdir -p -m 700 "$TMPDIR"
|
||||
fi
|
||||
|
||||
TMPPREFIX="${TMPDIR%/}/zsh"
|
||||
|
||||
|
||||
if which pyenv >/dev/null ; then
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
fi
|
||||
|
||||
alias dps="docker ps"
|
||||
alias dpi="docker images"
|
||||
alias dc="docker-compose"
|
||||
alias dcr="compose-run"
|
||||
alias da="docker_start_attach"
|
||||
alias daa="docker_apply_all_containers"
|
||||
alias dci="docker_clean_images"
|
||||
alias dcc="docker_clean_containers"
|
||||
alias dac="docker_apply_containers"
|
||||
# Docker goodies
|
||||
|
||||
function docker_start_attach () {
|
||||
docker start $1 && docker attach $1
|
||||
@ -84,8 +110,47 @@ function docker_nuke () {
|
||||
docker rmi $(docker images -q)
|
||||
}
|
||||
|
||||
alias da="docker_start_attach"
|
||||
alias daa="docker_apply_all_containers"
|
||||
alias dac="docker_apply_containers"
|
||||
alias dc="docker-compose"
|
||||
alias dcc="docker_clean_containers"
|
||||
alias dci="docker_clean_images"
|
||||
alias dcr="compose-run"
|
||||
alias dpi="docker images"
|
||||
alias dps="docker ps"
|
||||
alias drm="docker rm"
|
||||
alias drmi="docker rmi"
|
||||
alias drun="docker run"
|
||||
|
||||
|
||||
# GSI
|
||||
alias gsicluster='ssh balkian@shannon.gsi.dit.upm.es -p 1337'
|
||||
|
||||
function gsiclustercopy(){
|
||||
scp -P 1337 $1 balkian@shannon.gsi.dit.upm.es:/shared/balkian/$2
|
||||
scp -P 1337 $1 balkian@shannon.gsi.dit.upm.es:/shared/balkian/$2
|
||||
}
|
||||
|
||||
# Kubernetes (k8s)
|
||||
|
||||
alias kg='kubectl --context="kubernetes-admin@kubernetes"'
|
||||
|
||||
function kube (){
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Wrapper for kubectl"
|
||||
echo ""
|
||||
echo "Usage: $0 <namespace> ... kubectl args"
|
||||
return 1
|
||||
fi
|
||||
context=$1
|
||||
shift
|
||||
kubectl --context="$context" "$@"
|
||||
}
|
||||
|
||||
# Dircolors for termite
|
||||
|
||||
if [[ -s "$HOME/.dircolors" ]]; then
|
||||
eval $(dircolors ~/.dircolors)
|
||||
fi
|
||||
|
||||
setopt interactivecomments
|
||||
|
Loading…
Reference in New Issue
Block a user