summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zsh-powerline.sh82
-rw-r--r--.zshrc71
-rwxr-xr-xbin/update_kernel_host5
3 files changed, 5 insertions, 153 deletions
diff --git a/.zsh-powerline.sh b/.zsh-powerline.sh
deleted file mode 100644
index e3f05f1..0000000
--- a/.zsh-powerline.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-# Colorscheme
-readonly COLOR_CWD='blue'
-readonly COLOR_GIT='cyan'
-#readonly COLOR_SUCCESS='green'
-readonly COLOR_SUCCESS='blue'
-readonly COLOR_FAILURE='red'
-#readonly COLOR_TIME='cyan'
-
-readonly SYMBOL_GIT_BRANCH='⑂'
-readonly SYMBOL_GIT_MODIFIED='*'
-readonly SYMBOL_GIT_PUSH='↑'
-readonly SYMBOL_GIT_PULL='↓'
-readonly PS_SYMBOL='$'
-
-_git_info() {
- hash git 2>/dev/null || return # git not found
-
- # get current branch
- local ref=$(git symbolic-ref --short HEAD 2>/dev/null)
-
- if [[ -n "$ref" ]]; then
- # prepend branch symbol
- ref=$SYMBOL_GIT_BRANCH$ref
- else
- # get most recent tag or abbreviated unique hash
- ref=$(git describe --tags --always 2>/dev/null)
- fi
-
- [[ -n "$ref" ]] || return # not a git repo
-
- local marks
-
- # scan first two lines of output from `git status`
- while IFS= read -r line; do
- if [[ $line =~ ^## ]]; then # header line
- [[ $line =~ ahead\ ([0-9]+) ]] && marks+=" $SYMBOL_GIT_PUSH$match[1]"
- [[ $line =~ behind\ ([0-9]+) ]] && marks+=" $SYMBOL_GIT_PULL$match[1]"
- else # branch is modified if output contains more lines after the header line
- marks="$SYMBOL_GIT_MODIFIED$marks"
- break
- fi
- done < <(git status --porcelain --branch 2>/dev/null) # note the space between the two <
-
- # print without a trailing newline
- printf " $ref$marks"
-}
-
-
-_config_prompt() {
- # Color coding based on exit code of the previous command. Note this must
- # be dealt with in the beginning of the function, otherwise the $? will not
- # match the right command executed.
-
- if [[ $? -eq 0 ]]; then
- local symbol="%F{$COLOR_SUCCESS}$PS_SYMBOL%f"
- else
- local symbol="%F{$COLOR_FAILURE}$PS_SYMBOL%f"
- fi
-
- #local cwd="%F{$COLOR_CWD}%~%f"
- local cwd="%F{$COLOR_CWD}%2~%f"
- local git="%F{$COLOR_GIT}$(_git_info)%f"
- #local time="%F{$COLOR_TIME}%D{%H:%M:%S}%f"
-
- PROMPT="$cwd$git $symbol "
- #RPROMPT="$time"
-}
-
-
-# useful zsh hook functions
-
-precmd() { # run before each prompt
- _config_prompt
-}
-
-
-preexec() { # run after user command is read and about to execute
-}
-
-
-chpwd() { # run when changing current working directory
-}
diff --git a/.zshrc b/.zshrc
deleted file mode 100644
index fc3b9f9..0000000
--- a/.zshrc
+++ /dev/null
@@ -1,71 +0,0 @@
-# Environment
-export YAEGI_DOT_CMD='dotty -'
-export YAEGI_UNSAFE=1
-export YAEGI_UNRESTRICTED=1
-export YAEGI_SYSCALL=1
-
-# gnuplot display in terminal
-export GNUTERM='sixelgd enhanced truecolor font "arial,9"'
-
-# Terraform-perf
-export TFP=$HOME/src/github.com/traefik/terraform-perf
-
-# Auto completion
-FPATH=/opt/homebrew/share/zsh-completions:/opt/homebrew/share/zsh/site-functions:$FPATH
-autoload -Uz compinit && compinit
-
-setopt share_history
-
-# Aliases
-alias pt='sudo port -v'
-alias pu='pt selfupdate && pt upgrade outdated'
-
-alias by='go build ./cmd/yaegi'
-alias cy='cd ~/go/src/github.com/traefik/yaegi'
-alias dotfiles='git --git-dir=$HOME/dotfiles --work-tree=$HOME'
-#alias git='hub'
-alias ll='ls -AFGl'
-alias ls='ls -AG'
-alias ya='rlwrap yaegi'
-
-# Functions
-man() {
- local width=''
- [ $(tput cols) -gt 88 ] && width='MANWIDTH=88'
- env $width man "$@"
-}
-
-meteo() {
- local request="wttr.in/${1-Toulouse}?F&T"
- [ "$(tput cols)" -lt 125 ] && request+='&n'
- curl -H "Accept-Language: fr" --compressed "$request"
-}
-
-p() { [ -f "$1" -a ! -x "$1" ] && less -XF $1 || "$@" 2>&1 | less -XF ; }
-
-ty() { go test -v -short ./interp; }
-
-# Term title management
-function set-term-title-precmd() {
- emulate -L zsh
- print -rn -- $'\e]0;'${(V%):-'%~'}$'\a' >$TTY
-}
-
-function set-term-title-preexec() {
- emulate -L zsh
- print -rn -- $'\e]0;'${(V)1}$'\a' >$TTY
-}
-
-autoload -Uz add-zsh-hook
-add-zsh-hook preexec set-term-title-preexec
-add-zsh-hook precmd set-term-title-precmd
-set-term-title-precmd
-
-# Prompt
-source ~/.zsh-powerline.sh
-
-[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
-
-
-# test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
-
diff --git a/bin/update_kernel_host b/bin/update_kernel_host
index 6180921..d159417 100755
--- a/bin/update_kernel_host
+++ b/bin/update_kernel_host
@@ -2,6 +2,11 @@
# After 'apk upgrade', update kernel and initrd on VM host
+if [ -f /etc/arch-release ]; then
+ scp /boot/Image /boot/Image /boot/initramfs-linux.img marc@m1:.vm/a1
+ exit
+fi
+
sudo cp /boot/initramfs-virt /tmp
sudo chmod a+r /tmp/initramfs-virt
gunzip < /boot/vmlinuz-virt > /tmp/vmlinux