big update
This commit is contained in:
parent
49bdae8bc6
commit
15f7d7fb9e
14 changed files with 104 additions and 10 deletions
16
bin/.local/bin/alm
Executable file
16
bin/.local/bin/alm
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
ISSUE_ID=
|
||||||
|
|
||||||
|
while read line; do
|
||||||
|
if [[ "$line" == X-Redmine-Issue-Id:* ]]; then
|
||||||
|
ISSUE_ID=${line##*: }
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ $ISSUE_ID = "" ]]; then
|
||||||
|
echo No issue id found
|
||||||
|
exit 2
|
||||||
|
else
|
||||||
|
nohup xdg-open "https://alm.waarp.fr/issues/$ISSUE_ID" 1>/dev/null 2>&1 &
|
||||||
|
fi
|
48
bin/.local/bin/git-f
Executable file
48
bin/.local/bin/git-f
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#set -x
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat <<EOT
|
||||||
|
Usage: git f [COMMAND]
|
||||||
|
|
||||||
|
Available commands:
|
||||||
|
|
||||||
|
workon Switch to a branch for the given issue
|
||||||
|
help Shows this message
|
||||||
|
|
||||||
|
EOT
|
||||||
|
}
|
||||||
|
|
||||||
|
t_workon() {
|
||||||
|
if [[ $1 == "" ]]; then
|
||||||
|
cat <<EOT
|
||||||
|
ERROR: No issue given
|
||||||
|
|
||||||
|
Usage: git f workon [ISSUE]
|
||||||
|
EOT
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
git fetch -p
|
||||||
|
local branch=$(git branch -r | grep $1 | cut -d'/' -f2)
|
||||||
|
|
||||||
|
if [[ $branch == "" ]]; then
|
||||||
|
echo ERROR: no branch found for this issue
|
||||||
|
return 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
git checkout $branch
|
||||||
|
}
|
||||||
|
|
||||||
|
ACTION=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
case $ACTION in
|
||||||
|
workon)
|
||||||
|
t_workon $1
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
|
esac
|
|
@ -157,11 +157,11 @@ function fish_command_timer_postexec -e fish_postexec
|
||||||
set -l HOUR 3600000
|
set -l HOUR 3600000
|
||||||
set -l DAY 86400000
|
set -l DAY 86400000
|
||||||
|
|
||||||
set -l num_days (math "$CMD_DURATION / $DAY")
|
set -l num_days (math -s0 $CMD_DURATION / $DAY)
|
||||||
set -l num_hours (math "$CMD_DURATION % $DAY / $HOUR")
|
set -l num_hours (math -s0 $CMD_DURATION % $DAY / $HOUR)
|
||||||
set -l num_mins (math "$CMD_DURATION % $HOUR / $MIN")
|
set -l num_mins (math -s0 $CMD_DURATION % $HOUR / $MIN)
|
||||||
set -l num_secs (math "$CMD_DURATION % $MIN / $SEC")
|
set -l num_secs (math -s0 $CMD_DURATION % $MIN / $SEC)
|
||||||
set -l num_millis (math "$CMD_DURATION % $SEC")
|
set -l num_millis (math -s0 $CMD_DURATION % $SEC)
|
||||||
set -l time_str ""
|
set -l time_str ""
|
||||||
if [ $num_days -gt 0 ]
|
if [ $num_days -gt 0 ]
|
||||||
set time_str {$time_str}{$num_days}"d "
|
set time_str {$time_str}{$num_days}"d "
|
||||||
|
|
|
@ -87,10 +87,14 @@ function __bcarlin_prompt_venv
|
||||||
end
|
end
|
||||||
|
|
||||||
function fish_prompt --description 'Write out the prompt'
|
function fish_prompt --description 'Write out the prompt'
|
||||||
|
set -l last_status $status
|
||||||
set -l _pwd (set_color $fish_color_cwd) (prompt_pwd)
|
set -l _pwd (set_color $fish_color_cwd) (prompt_pwd)
|
||||||
|
|
||||||
echo -n -s (__bcarlin_prompt_venv)
|
echo -n -s (__bcarlin_prompt_venv)
|
||||||
echo -n -s "$USER" @ (prompt_hostname) ' ' $_pwd
|
echo -n -s "$USER" @ (prompt_hostname) ' ' $_pwd
|
||||||
echo -n -s (__bcarlin_prompt_git)
|
echo -n -s (__bcarlin_prompt_git)
|
||||||
|
if test $last_status -ne 0
|
||||||
|
echo -n -s (set_color red --bold)" [$last_status]" (set_color normal)
|
||||||
|
end
|
||||||
echo -n -s (__bcarlin_prompt_suffix)
|
echo -n -s (__bcarlin_prompt_suffix)
|
||||||
end
|
end
|
||||||
|
|
4
fish/.config/fish/functions/ll.fish
Normal file
4
fish/.config/fish/functions/ll.fish
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Defined in - @ line 1
|
||||||
|
function ll --description 'alias ll=exa -l'
|
||||||
|
exa -l $argv;
|
||||||
|
end
|
4
fish/.config/fish/functions/ls.fish
Normal file
4
fish/.config/fish/functions/ls.fish
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Defined in /tmp/fish.pziIOt/ls.fish @ line 2
|
||||||
|
function ls --description 'alias ls=exa'
|
||||||
|
exa $argv;
|
||||||
|
end
|
4
fish/.config/fish/functions/tree.fish
Normal file
4
fish/.config/fish/functions/tree.fish
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Defined in - @ line 1
|
||||||
|
function tree --description 'alias tree=exa --tree'
|
||||||
|
exa --tree $argv;
|
||||||
|
end
|
|
@ -21,3 +21,6 @@
|
||||||
cl = !git branch -d $(git branch --format '%(refname:lstrip=2)' --merged master | grep -v master)
|
cl = !git branch -d $(git branch --format '%(refname:lstrip=2)' --merged master | grep -v master)
|
||||||
pushmerge = push -o merge_request.merge_when_pipeline_succeeds
|
pushmerge = push -o merge_request.merge_when_pipeline_succeeds
|
||||||
pushmr = git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
|
pushmr = git push -o merge_request.create -o merge_request.merge_when_pipeline_succeeds
|
||||||
|
uncommit = reset --soft HEAD^
|
||||||
|
[url "ssh://git@code.waarp.fr:2222"]
|
||||||
|
insteadOf = https://code.waarp.fr
|
||||||
|
|
|
@ -172,9 +172,10 @@ bindsym Mod4+r mode "resize"
|
||||||
|
|
||||||
|
|
||||||
# Screen display
|
# Screen display
|
||||||
set $mode_display Display (b) Bureau, (s) single
|
set $mode_display Display (b) Bureau, (s) single, (h) HDMI
|
||||||
mode "$mode_display" {
|
mode "$mode_display" {
|
||||||
bindsym b exec xrandr --output DP2-1 --auto --right-of eDP1 --output DP1-2 --auto --right-of DP2-1
|
bindsym b exec xrandr --output DP2-1 --auto --right-of eDP1 --output DP1-2 --auto --right-of DP2-1
|
||||||
|
bindsym h exec xrandr --output DP3 --auto --right-of eDP1
|
||||||
bindsym s exec xrandr --output DP2-1 --off --output DP1-2 --off
|
bindsym s exec xrandr --output DP2-1 --off --output DP1-2 --off
|
||||||
|
|
||||||
# back to normal: Enter or Escape
|
# back to normal: Enter or Escape
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
image/*; feh %s
|
image/*; feh %s
|
||||||
video/*; vlc %s
|
video/*; vlc %s
|
||||||
application/pdf; zathura %s
|
application/pdf; zathura %s
|
||||||
|
text/html; w3m -I %{charset} -T text/html; copiousoutput;
|
||||||
|
text/calendar; mutt-ics; copiousoutput
|
||||||
|
application/ics; mutt-ics; copiousoutput
|
||||||
*/*; xdg-open "%s"
|
*/*; xdg-open "%s"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
set editor=vim
|
set editor=vim
|
||||||
set send_charset="utf-8"
|
set send_charset="utf-8"
|
||||||
|
set sig_on_top=yes
|
||||||
|
|
||||||
set index_format="%4C %Z %8{%b %d} %-15.15L %y [%E] %s"
|
set index_format="%4C %Z %8{%b %d} %-15.15L %y [%E] %s"
|
||||||
set sort=threads
|
set sort=threads
|
||||||
|
@ -21,6 +22,8 @@ set uncollapse_jump # don't collapse on an unread message
|
||||||
set pager_stop # don't go to next message automatically
|
set pager_stop # don't go to next message automatically
|
||||||
set menu_scroll # scroll in menus
|
set menu_scroll # scroll in menus
|
||||||
|
|
||||||
|
unset wait_key
|
||||||
|
|
||||||
## other
|
## other
|
||||||
source mutt-color-solarized.muttrc
|
source mutt-color-solarized.muttrc
|
||||||
source muttrc.forgotten-attachment
|
source muttrc.forgotten-attachment
|
||||||
|
|
|
@ -4,3 +4,5 @@ Bruno Carlin
|
||||||
Waarp SAS
|
Waarp SAS
|
||||||
01 56 38 51 08
|
01 56 38 51 08
|
||||||
06 67 21 99 14
|
06 67 21 99 14
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -236,9 +236,9 @@ filetype *.[1-8] man ./%c
|
||||||
fileviewer *.[1-8] man ./%c | col -b
|
fileviewer *.[1-8] man ./%c | col -b
|
||||||
|
|
||||||
" Images
|
" Images
|
||||||
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm
|
filextype *.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm,*.svg
|
||||||
\ {View in feh}
|
\ {View in feh}
|
||||||
\ feh --borderless --scale-down --draw-filename --draw-exif --draw-tinted --auto-rotate %"f &,
|
\ feh --conversion-timeout 10 --borderless --scale-down --draw-filename --draw-exif --draw-tinted --auto-rotate %"f &,
|
||||||
\ {View in sxiv}
|
\ {View in sxiv}
|
||||||
\ sxiv %f,
|
\ sxiv %f,
|
||||||
\ {View in gpicview}
|
\ {View in gpicview}
|
||||||
|
|
|
@ -10,6 +10,7 @@ runtime! archlinux.vim
|
||||||
syntax on
|
syntax on
|
||||||
set background=dark
|
set background=dark
|
||||||
let g:solarized_termcolors = 16
|
let g:solarized_termcolors = 16
|
||||||
|
let g:solarized_hitrail=1
|
||||||
colorscheme solarized
|
colorscheme solarized
|
||||||
|
|
||||||
" have Vim load indentation rules and plugins
|
" have Vim load indentation rules and plugins
|
||||||
|
@ -92,10 +93,10 @@ let g:syntastic_java_javac_config_file_enabled = 1
|
||||||
let g:go_fmt_command = "goimports"
|
let g:go_fmt_command = "goimports"
|
||||||
let g:go_fmt_autosave = 1
|
let g:go_fmt_autosave = 1
|
||||||
let g:go_metalinter_command = "golangci-lint"
|
let g:go_metalinter_command = "golangci-lint"
|
||||||
let g:go_metalinter_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'unused', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
|
let g:go_metalinter_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
|
||||||
let g:go_metalinter_autosave = 1
|
let g:go_metalinter_autosave = 1
|
||||||
"let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck']
|
"let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck']
|
||||||
let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'unused', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
|
let g:go_metalinter_autosave_enabled = ['govet', 'golint', 'errcheck', 'staticcheck', 'gosimple', 'structcheck', 'varcheck', 'ineffassign', 'deadcode', 'gosec', 'unconvert', 'dupl', 'goconst', 'gocyclo', 'misspell', 'unparam', 'lll', 'interfacer', 'nakedret', 'scopelint']
|
||||||
let g:go_list_type = "quickfix"
|
let g:go_list_type = "quickfix"
|
||||||
let g:go_highlight_functions = 1
|
let g:go_highlight_functions = 1
|
||||||
let g:go_highlight_function_parameters = 1
|
let g:go_highlight_function_parameters = 1
|
||||||
|
@ -168,6 +169,7 @@ call plug#begin('~/.vim/plugged')
|
||||||
Plug 'dag/vim-fish'
|
Plug 'dag/vim-fish'
|
||||||
Plug 'glench/vim-jinja2-syntax'
|
Plug 'glench/vim-jinja2-syntax'
|
||||||
Plug 'mattn/emmet-vim'
|
Plug 'mattn/emmet-vim'
|
||||||
|
Plug 'ollykel/v-vim'
|
||||||
|
|
||||||
Plug 'scrooloose/syntastic'
|
Plug 'scrooloose/syntastic'
|
||||||
Plug 'mtscout6/syntastic-local-eslint.vim'
|
Plug 'mtscout6/syntastic-local-eslint.vim'
|
||||||
|
|
Loading…
Add table
Reference in a new issue