rice

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 416f6c18e3e4c0cbb4a7190dd6483c6aa202f3dd
parent 1b0a1a4652a4765e4f67f750e067f3f53ad3f370
Author: Mark Feller <mark.feller@member.fsf.org>
Date:   Wed, 25 Sep 2019 13:42:00 -0600

cleanup aliases

Diffstat:
Mdots/.config/aliases | 17++++++-----------
Mdots/.config/zsh/fzf.zsh | 18+++++++++++-------
Mdots/.local/bin/notify-mpd | 4++--
Mdots/.zshenv | 5-----
4 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/dots/.config/aliases b/dots/.config/aliases @@ -1,14 +1,15 @@ alias ls="ls -F" alias l="ls -lah --group-directories-first" -alias emacs="TERM=xterm-256color emacs" alias q="exit" +alias vi=vim + alias neo="clear && neofetch" -alias notify='terminal-notifier -title "Terminal" -message "Done with taks"' -alias weather="curl wttr.in/\~Boulder+Colorado" alias f="fzf --preview=\"head -$LINES {}\"" alias fz="vim \$(f)" -alias vi="vim -i ~/.cache/vim/info" -alias r="ranger" +alias weather="curl wttr.in/\~Boulder+Colorado" + +alias dots="cd $HOME/.config/rice/dots" +alias g="cd $GOPATH/src/gitlab.com/mark.feller" # Kubernetes alias kc="kubectl" @@ -19,9 +20,3 @@ $BOLD$LIGHT_CYAN{{ .Container.Name }}$NONE $DIM{{ .Pod.Name }}$NONE $YELLOW{{ if # Youtube alias yt="youtube-dl" alias yta="youtube-dl --extract-audio --audio-quality 0 --audio-format flac" - -# Dots -alias dots="cd $HOME/.config/rice/dots" - -# Go -alias g="cd $GOPATH/src/gitlab.com/mark.feller" diff --git a/dots/.config/zsh/fzf.zsh b/dots/.config/zsh/fzf.zsh @@ -1,21 +1,26 @@ # A collection of useful fzf wrapper functions +# visual config +export FZF_DEFAULT_OPTS='--height 40% --exact' +export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" +export FZF_CTRL_R_OPTS='--sort --exact' + # repeat history -fh() { +fh() { print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) \ - | fzf +s --tac \ - | sed 's/ *[0-9]* *//') + | fzf +s --tac \ + | sed 's/ *[0-9]* *//') } # copy history fhc() { echo -n $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) \ - | fzf +s --tac | sed 's/ *[0-9]* *//') \ - | pbcopy + | fzf +s --tac | sed 's/ *[0-9]* *//') \ + | pbcopy } # kill a process -fkill() { +fkill() { local pid pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') @@ -24,4 +29,3 @@ fkill() { echo $pid | xargs kill -${1:-9} fi } - diff --git a/dots/.local/bin/notify-mpd b/dots/.local/bin/notify-mpd @@ -2,7 +2,7 @@ # Send notifications when mpd song changes tmp="/tmp/cover.jpg" -form="Artist: %artist%\nAlbum: %album%\nTitle:%title%" +form="Artist: %artist%\nAlbum: %album%\nTitle: %title%" rm -f $tmp @@ -12,7 +12,7 @@ artpath="/home/mjf/Music/$(dirname "$(mpc status -f '%file%' | head -n1)")/cover # generate the cover icon if we find one if [ -f "$artpath" ]; then - convert -resize 84x84 "$artpath" $tmp + convert -resize 84x84 "$artpath" $tmp fi # send out the notication with the cover icon and song information diff --git a/dots/.zshenv b/dots/.zshenv @@ -22,9 +22,4 @@ export PATH=$PATH:$GOPATH/bin # Rust export PATH=$PATH:$HOME/.cargo/bin -# fzf -export FZF_DEFAULT_OPTS='--height 40% --exact' -export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || cat {} || tree -C {}) 2> /dev/null | head -200'" -export FZF_CTRL_R_OPTS='--sort --exact' - export LC_COLLATE="C"