Add scripts dir, tmuxsess and updatevimplugins

This commit is contained in:
Rob Watson 2021-03-31 11:14:51 +02:00
parent 23cc4cae45
commit f1317adff8
5 changed files with 26 additions and 11 deletions

10
script/tmuxsess Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
cwd=$(pwd)
sessionname=$(basename $cwd)
tmux new -d -s $sessionname
tmux rename-window -t $sessionname:1 cli
tmux new-window -t $sessionname -n vim vim
tmux select-window -t $sessionname:1
tmux attach -t $sessionname

14
script/updatevimplugins Executable file
View File

@ -0,0 +1,14 @@
#/usr/bin/env bash
set -e
pluginhome=$HOME/.vim/pack/git-plugins
cd $pluginhome
find . -mindepth 2 -maxdepth 2 -type d -print0 | while read -d $'\0' pluginpath
do
cd $pluginpath
basename=$(basename $pluginpath)
printf "In $basename.. "
git pull --rebase
cd $pluginhome
done

View File

@ -1,9 +0,0 @@
#!/usr/bin/env ruby
#
# frozen_string_literal: true
msg = File.read(ARGV[0])
unless /\A[[:upper:]]/.match?(msg)
puts 'Commit message does not start with an uppercase character'
exit 1
end

1
zshenv
View File

@ -33,5 +33,6 @@ export PATH=$HOME/local/sbin:$PATH
export PATH=$HOME/local/bin:$PATH
export PATH=$HOME/bin:$PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/script:$PATH
source "$HOME/.cargo/env"

3
zshrc
View File

@ -72,10 +72,9 @@ alias ll="exa -l --group-directories-first --git"
alias ls="exa --color=auto"
alias pg="pgrep -fa"
alias pk="pkill -fc"
alias rez="source $ZDOTDIR/.zshrc"
alias rez="source $HOME/.zshenv && source $ZDOTDIR/.zshrc"
alias sc="systemctl"
alias sysc="systemctl"
alias updatevimplugins="cd $HOME/.vim/pack/git-plugins && find . -mindepth 2 -maxdepth 2 -type d | xargs -I{} bash -c 'cd {} ; printf \"In {}...\"; git pull --rebase' ; cd -"
alias zzz="sudo systemctl hibernate"
# recursive grep with line numbers and colour, ignoring binary files: