Update dotfiles

This commit is contained in:
2018-08-12 14:31:14 +02:00
parent 4176bff6b2
commit 8783616f54
10 changed files with 52 additions and 2 deletions

View File

@@ -37,6 +37,9 @@ export LC_COLLATE=C
export DOTFILES=~/dotfiles
export GOPATH=~/dev/go
export PATH=$PATH:$(go env GOPATH)/bin
# Start the gpg-agent if not already running
if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then

View File

@@ -9,6 +9,7 @@ alias tma="tmux ls 2>/dev/null && tmux attach-session || tmux"
alias tmn="tmux new-session -A -s"
alias clip="xclip -selection clipboard"
alias clipc="xclip -selection primary"
alias clipo="xclip -out -selection clipboard"
alias rgrep="grep -r"
@@ -68,3 +69,7 @@ alias yaml2js="python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin)
alias currentbranch='git rev-parse --abbrev-ref HEAD'
alias gpush='git push origin $(currentbranch)'
alias pass=mypass
alias issh="ssh -o StrictHostKeyChecking=false -o UserKnownHostsFile=/dev/null"

View File

@@ -181,3 +181,24 @@ b() {
sb() {
echo $(( $1 * $(cat /sys/class/backlight/intel_backlight/max_brightness) / 100)) | sudo tee /sys/class/backlight/intel_backlight/brightness
}
journal() {
journaldir=~/journal/
file=~/journal/$(date +%Y-%m-%d).md
if [[ ! -e $file ]] ; then
cp $journaldir/template.md $file || return
fi
vim +Goyo +PencilSoft $file
}
syncfolder() {
folder=$1
mv $folder ~/sync
ln -s ~/sync/$folder ~/$folder
}
prefix() {
prefix=$2
file=$1
mv $file ${prefix}${file}
}