From 8a462e6eece655738ef1245b547d7b56805a0e18 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Sat, 30 Mar 2019 02:09:16 -0400 Subject: [PATCH] Fix Spotify i3block ampersand, 309 proj. aliases --- aliases/key_aliases | 15 +++++++++++---- fish/.config/fish/functions/grep-kuhn.fish | 4 ++++ fish/.config/fish/functions/wc-pdf.fish | 3 +++ i3blocks/.config/i3blocks/i3blocks.conf | 7 +------ i3blocks/.config/i3blocks/sam-i3blocks.conf | 11 +++++++---- i3blocks/.config/i3blocks/scripts/spotify | 4 +++- i3blocks/.config/i3blocks/scripts/time_short | 4 ---- txt/key_dirs.txt | 14 +++++++++----- txt/key_files.txt | 2 +- vim/.vimrc | 2 ++ 10 files changed, 41 insertions(+), 25 deletions(-) create mode 100644 fish/.config/fish/functions/grep-kuhn.fish create mode 100644 fish/.config/fish/functions/wc-pdf.fish delete mode 100755 i3blocks/.config/i3blocks/scripts/time_short diff --git a/aliases/key_aliases b/aliases/key_aliases index 103a2a6..543bce8 100644 --- a/aliases/key_aliases +++ b/aliases/key_aliases @@ -52,6 +52,7 @@ udu "udisksctl unmount -b" udub "udisksctl unmount -b /dev/sdc2" tc "touch" +vdr "vidir" # directory-related {{{ # ls "lsd" @@ -159,7 +160,6 @@ kt "killall thunderbird" mp "mpv --volume=50" mra "man ranger" n "nvim" -nd "node" p3 "python3" pipes "pipes.sh -t 3" py "python" @@ -229,7 +229,7 @@ gbm "git branch --merged" # }}} branch # -gr "git remote" +gr "git remote -v" gro "git remote show origin" # add/remove {{{ # @@ -416,10 +416,17 @@ hl "valgrind --tool=helgrind ./carsim light 10 20" # }}} 369 # # 309 -0ht "cd ~/school/309-proj && python3 -m http.server" wl0 "watson log --all --project=309 --tag=e3" wr0 "watson report --all --project=309 --tag=e3" -e3t "node test-app.js" +nd "node" +ndm "nodemon" +mg "mongo" +mgd "mongod --dbpath mongo-data" +0ht "cd ~/school/309-proj && python3 -m http.server" + +hr "heroku" +hrt "heroku ps" +hrl "heroku logs --dyno web -n 1500 | rg up | awk '{ system(\"date -d \" \$1); \$1 = \"\"; print \$0 }' | paste -s -d' \n'" # }}} school # diff --git a/fish/.config/fish/functions/grep-kuhn.fish b/fish/.config/fish/functions/grep-kuhn.fish new file mode 100644 index 0000000..ddcaf47 --- /dev/null +++ b/fish/.config/fish/functions/grep-kuhn.fish @@ -0,0 +1,4 @@ +function grep-kuhn + pdfgrep -n $argv[1] -B $argv[2] -A $argv[3] /home/kevin/school/hps/w5-6-historicism/*/kuhn*.pdf > $argv[1].txt + and nvim $argv[1].txt -c "/$argv[1]" +end diff --git a/fish/.config/fish/functions/wc-pdf.fish b/fish/.config/fish/functions/wc-pdf.fish new file mode 100644 index 0000000..fc106c8 --- /dev/null +++ b/fish/.config/fish/functions/wc-pdf.fish @@ -0,0 +1,3 @@ +function wc-pdf + pdftotext $argv[1] - | wc -w +end diff --git a/i3blocks/.config/i3blocks/i3blocks.conf b/i3blocks/.config/i3blocks/i3blocks.conf index b4e866f..912b125 100644 --- a/i3blocks/.config/i3blocks/i3blocks.conf +++ b/i3blocks/.config/i3blocks/i3blocks.conf @@ -28,7 +28,7 @@ interval=60 [calendar] interval=30 label= -DATEFMT=+%H:%M.%a-%m-%d +DATEFMT=+%H:%M # SHORTFMT=+%H:%M:%S HEIGHT=180 WIDTH=220 @@ -60,12 +60,7 @@ interval=5 # interval=10 [name] -# label=🎅 label= -# color=#ba50a9 -# color=#1e5b99 -# color="$foreground" -# interval=6000 interval=30 # unused blocks {{{ # diff --git a/i3blocks/.config/i3blocks/sam-i3blocks.conf b/i3blocks/.config/i3blocks/sam-i3blocks.conf index b9e12fa..16fcc70 100644 --- a/i3blocks/.config/i3blocks/sam-i3blocks.conf +++ b/i3blocks/.config/i3blocks/sam-i3blocks.conf @@ -25,8 +25,11 @@ interval=once signal=1 interval=60 -[time_short] -# label=🕓 -# command=echo "$(date '+%H:%M')" +[calendar] interval=30 -# color=#acc0cd +label= +DATEFMT=+%H:%M.%a-%m-%d +# SHORTFMT=+%H:%M:%S +HEIGHT=180 +WIDTH=220 + diff --git a/i3blocks/.config/i3blocks/scripts/spotify b/i3blocks/.config/i3blocks/scripts/spotify index 7e0e4f0..3f00f86 100755 --- a/i3blocks/.config/i3blocks/scripts/spotify +++ b/i3blocks/.config/i3blocks/scripts/spotify @@ -7,4 +7,6 @@ case "$BLOCK_BUTTON" in esac . "/home/kevin/.cache/wal/colors.sh" -printf "$(spotify-now -i '%artist - %title' -p '' -e '')\n$(spotify-now -i '%title' -p '' -e '')\n%s\n" "$color7" +long_title=$(spotify-now -i '%artist - %title' -p '' -e '' | sed 's/&/&/g') +short_title=$(spotify-now -i '%title' -p '' -e '' | sed 's/&/&/g') +printf "$long_title\n$short_title\n%s\n" "$color7" diff --git a/i3blocks/.config/i3blocks/scripts/time_short b/i3blocks/.config/i3blocks/scripts/time_short deleted file mode 100755 index 809ec13..0000000 --- a/i3blocks/.config/i3blocks/scripts/time_short +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -. "/home/kevin/.cache/wal/colors.sh" -printf "$(date '+%H:%M')\n\n%s\n" "$color7" diff --git a/txt/key_dirs.txt b/txt/key_dirs.txt index 3882f24..9d5ba8d 100644 --- a/txt/key_dirs.txt +++ b/txt/key_dirs.txt @@ -24,7 +24,7 @@ lfv /mnt/linux-files/Videos b1 /home/kevin/coding/mf-site/themes/base16 cn /home/kevin/coding -ib /home/kevin/linux-config/configs/i3blocks-scripts +ib /home/kevin/linux-config/i3blocks/.config/i3blocks/scripts j /home/kevin/Documents/journal lh /home/kevin/Documents/listening-history ms /home/kevin/coding/mf-site @@ -43,15 +43,18 @@ wo /home/kevin/Documents/workout-logs/11 # sch {{{ * -# 309 +lt /home/kevin/school/latex-notes + +# 309{{{ sc /home/kevin/school 0c /home/kevin/school/309-proj/css 0d /home/kevin/school/309 0l /home/kevin/school/309/l 0p /home/kevin/school/309-proj -e3 /home/kevin/school/309/e3 +e4 /home/kevin/school/309/e4 +# }}} -# 369 +# 369{{{ 6 /home/kevin/school/369 6l /home/kevin/school/369/notes/lectures 6m /mnt/369-a4 @@ -59,8 +62,9 @@ e3 /home/kevin/school/309/e3 6f /home/kevin/linux-config/fish/.config/fish/functions/369/a3 a4d /home/kevin/school/369/a4/a4 a43 /home/kevin/school/369/a4-3/fs3 +#}}} hp /home/kevin/school/hps -lt /home/kevin/school/latex-notes +hpe /home/kevin/school/latex-notes/hps # }}} sch * diff --git a/txt/key_files.txt b/txt/key_files.txt index 8b9aa5b..f6aa3e3 100644 --- a/txt/key_files.txt +++ b/txt/key_files.txt @@ -19,7 +19,7 @@ z /home/kevin/linux-config/aliases/zsh_aliases # cdn {{{ * -cm ./commit-msg.txt +cm /tmp/commit-msg.txt hlg /home/kevin/coding/spotify-lib-vis/src/api/management/commands/update-history.log id /home/kevin/coding/project-ideas/ideas.md ig ./.gitignore diff --git a/vim/.vimrc b/vim/.vimrc index e29625d..2427ac4 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -23,6 +23,8 @@ set tabstop=4 " set timeoutlen=500 set timeoutlen=350 set tw=80 +set undodir=~/.vim/undo +set undofile set updatetime=1000 autocmd VimResized * wincmd =