Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7bbf9b8c9b | |||
| f1ee5b1aff | |||
| db37bf1d54 | |||
| f2ddfa9590 | |||
| e767ecead0 | |||
| 9a6bc3197e | |||
| b982ecb5a5 | |||
| 7f937a2902 | |||
| 45210b6c8f | |||
| b35bc69b88 | |||
| ec14c1c073 | |||
| 611ab5791f | |||
| 2e567f0a65 | |||
| 409fb9bb4b | |||
| 509ed9956f | |||
| ee50dfd355 | |||
| ef3986e99f | |||
| 30396f438a | |||
|
|
b665d16bc5 | ||
| e2773fcf6c |
8
bashrc
8
bashrc
@@ -62,7 +62,7 @@ if [ "$color_prompt" = yes ]; then
|
||||
else
|
||||
color="\033[1;35m"
|
||||
fi
|
||||
PS1="${color}╭── \u\033[33m::\033[34m\w\033[0m\n${color}╰▶ \033[0m"
|
||||
PS1="${color}┌── \u\033[33m::\033[34m\w\033[0m\n${color}└▷ \033[0m"
|
||||
else
|
||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||
fi
|
||||
@@ -88,6 +88,12 @@ alias ll='ls -alF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
|
||||
export PATH=~/.config/dotfiles/bin/:$PATH
|
||||
alias u=update
|
||||
|
||||
# Add an "alert" alias for long running commands. Use like so:
|
||||
# sleep 10; alert
|
||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||
|
||||
0
bin/compress-pdf
Normal file → Executable file
0
bin/compress-pdf
Normal file → Executable file
19
bin/lmount
Executable file
19
bin/lmount
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo -e >&2 "\x1B[1;31merror:\x1B[0;1m this program expects two arguments\x1B[0m"
|
||||
echo -e >&2 "\x1B[1;33musage:\x1B[0;1m sudo lmount <drive> <mount point>"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$USER" != "root" ]; then
|
||||
echo -e >&2 "\x1B[1;31merror:\x1B[0;1m this program must be run as root\x1B[0m"
|
||||
echo -e >&2 "\x1B[1;33musage:\x1B[0;1m sudo lmount <drive> <mount point>"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Mounts an encrypt external drive to a specified mount point
|
||||
cryptsetup luksOpen $1 external
|
||||
mount /dev/mapper/external $2
|
||||
19
bin/lumount
Executable file
19
bin/lumount
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo -e >&2 "\x1B[1;31merror:\x1B[0;1m this program expects one argument\x1B[0m"
|
||||
echo -e >&2 "\x1B[1;33musage:\x1B[0;1m sudo lumount <mount point>"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$USER" != "root" ]; then
|
||||
echo -e >&2 "\x1B[1;31merror:\x1B[0;1m this program must be run as root\x1B[0m"
|
||||
echo -e >&2 "\x1B[1;33musage:\x1B[0;1m sudo lumount <mount point>"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Mounts an encrypt external drive to a specified mount point
|
||||
umount $1
|
||||
cryptsetup luksClose external
|
||||
15
coc-settings.json
Normal file
15
coc-settings.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"languageserver": {
|
||||
"rust": {
|
||||
"command": "rustup",
|
||||
"args": ["run", "nightly", "rust-analyzer"],
|
||||
"filetypes": ["rust"],
|
||||
"rootPatterns": ["Cargo.toml"]
|
||||
},
|
||||
"elm": {
|
||||
"command": "elm-language-server",
|
||||
"filetypes": ["elm"],
|
||||
"rootPatterns": ["elm.json"]
|
||||
}
|
||||
}
|
||||
}
|
||||
33
init.vim
33
init.vim
@@ -3,35 +3,22 @@ set nocompatible
|
||||
|
||||
" PLUGNIS ###########################################################{{{
|
||||
call plug#begin()
|
||||
if has('nvim')
|
||||
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
|
||||
else
|
||||
Plug 'Shougo/deoplete.nvim'
|
||||
Plug 'roxma/nvim-yarp'
|
||||
Plug 'roxma/vim-hug-neovim-rpc'
|
||||
endif
|
||||
|
||||
" General plugins
|
||||
Plug 'vim-airline/vim-airline'
|
||||
Plug 'vim-airline/vim-airline-themes'
|
||||
Plug 'https://gitea.tforgione.fr/tforgione/peach.git'
|
||||
Plug 'scrooloose/nerdtree'
|
||||
Plug 'w0rp/ale'
|
||||
Plug 'tpope/vim-abolish'
|
||||
|
||||
" Language specific plugins
|
||||
|
||||
" C++
|
||||
Plug 'Shougo/deoplete-clangx'
|
||||
|
||||
" Rust
|
||||
Plug 'rust-lang/rust.vim'
|
||||
Plug 'racer-rust/vim-racer'
|
||||
Plug 'sebastianmarkow/deoplete-rust'
|
||||
|
||||
" Elm
|
||||
Plug 'ElmCast/elm-vim'
|
||||
Plug 'antew/vim-elm-language-server'
|
||||
|
||||
" Toml
|
||||
Plug 'cespare/vim-toml'
|
||||
@@ -39,9 +26,6 @@ Plug 'cespare/vim-toml'
|
||||
" Pug
|
||||
Plug 'digitaltoad/vim-pug'
|
||||
|
||||
" Spandex
|
||||
Plug 'rust-spandex/spandex.vim'
|
||||
|
||||
call plug#end()
|
||||
|
||||
" Line numbers and syntaxic coloration
|
||||
@@ -157,20 +141,11 @@ let g:markdown_composer_browser = 'firefox'
|
||||
let g:instant_markdown_autostart = 0
|
||||
" }}}
|
||||
|
||||
" CODE COMPLETION ###################################################{{{
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~ '\s'
|
||||
endfunction
|
||||
|
||||
" Use deoplete
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
autocmd FileType elm call deoplete#custom#buffer_option('auto_complete', v:false)
|
||||
|
||||
" Autoclose preview
|
||||
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
|
||||
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
|
||||
|
||||
" Complete on tab
|
||||
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
|
||||
" }}}
|
||||
|
||||
" CUSTOM THINGS DEPENDING ON ENV ####################################{{{
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
@@ -51,11 +51,23 @@ alias bat="bat --paging=never"
|
||||
|
||||
alias rg="rg -uu"
|
||||
|
||||
# Aliases for pass
|
||||
alias p="pass"
|
||||
alias pc="pass --clip"
|
||||
|
||||
# mkdir && cd
|
||||
mkcd() {
|
||||
mkdir $1 && cd $1
|
||||
}
|
||||
|
||||
# which && cd
|
||||
cdw() {
|
||||
f=`which $1`
|
||||
if [ $? -eq 0 ]; then
|
||||
cd `dirname $f`
|
||||
fi
|
||||
}
|
||||
|
||||
# Initialize thefuck
|
||||
command -v thefuck > /dev/null 2>&1
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ DISABLE_AUTO_TITLE="true"
|
||||
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
|
||||
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/me
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
plugins=(git myjump)
|
||||
plugins=(git myjump pass)
|
||||
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
||||
@@ -27,3 +27,4 @@ export WINEDEBUG=-all
|
||||
export RUST_BACKTRACE=full
|
||||
|
||||
export TERM=xterm-256color
|
||||
export REPORTTIME=5
|
||||
|
||||
@@ -83,11 +83,13 @@ local PR_TEMP=""
|
||||
|
||||
command -v vcgencmd > /dev/null && PR_TEMP=' ${PR_GREEN}‹$(vcgencmd measure_temp | cut -d = -f 2)›${PR_NO_COLOR}'
|
||||
|
||||
local PR_DATE='${PR_BOLD}${PR_MAGENTA}[%D{%H:%M}]${PR_NO_COLOR}'
|
||||
|
||||
#PROMPT="${user_host} ${current_dir} ${rvm_ruby}${git_branch}$PR_PROMPT "
|
||||
separator='${PR_YELLOW}::${PR_NO_COLOR}'
|
||||
tty | read tty_value
|
||||
if [[ $tty_value == *pts* ]]; then # if in a tty
|
||||
PROMPT="$PR_ARROW_UP${user_host}${separator}${PR_NO_COLOR}${current_dir} ${rvm_ruby}${git_branch}${PR_TEMP}
|
||||
PROMPT="$PR_ARROW_UP${PR_DATE} ${user_host}${separator}${PR_NO_COLOR}${current_dir} ${rvm_ruby}${git_branch}${PR_TEMP}
|
||||
$PR_ARROW_DOWN$PR_PROMPT ${PR_NO_COLOR}"
|
||||
return_code="%(?.%{$PR_GREEN%}%? ↵%{$PR_NO_COLOR%}.%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
|
||||
else
|
||||
@@ -98,3 +100,8 @@ fi
|
||||
RPS1=" ${return_code}"
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="›%{$PR_NO_COLOR%}"
|
||||
|
||||
TMOUT=30
|
||||
TRAPALRM() {
|
||||
zle reset-prompt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user