From 8d9d3406411819295e0244eb9adfdc1c3a964ebb Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Tue, 3 Nov 2020 11:09:30 +0100 Subject: [PATCH] Various smaller changes modified: .config/nvim/init.vim modified: .config/shortcutrc modified: .config/zsh/.zshrc modified: .local/bin/statusbar/pacpackages modified: .local/bin/tools/startmpv --- .config/nvim/init.vim | 2 +- .config/shortcutrc | 25 ------------------------- .config/zsh/.zshrc | 2 +- .local/bin/statusbar/pacpackages | 3 ++- .local/bin/tools/startmpv | 12 ++++++------ 5 files changed, 10 insertions(+), 34 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index d23d81b..88c4258 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -20,9 +20,9 @@ Plug 'bling/vim-airline' Plug 'tpope/vim-commentary' Plug 'kovetskiy/sxhkd-vim' Plug 'ap/vim-css-color' +Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'lervag/vimtex' Plug 'terryma/vim-multiple-cursors' -Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'dense-analysis/ale' Plug 'arcticicestudio/nord-vim' Plug 'tpope/vim-fugitive' diff --git a/.config/shortcutrc b/.config/shortcutrc index bb21b10..c40f433 100644 --- a/.config/shortcutrc +++ b/.config/shortcutrc @@ -1,26 +1 @@ # vim: filetype=sh -alias h="cd ~/ && ls -a" \ -d="cd ~/Documents && ls -a" \ -D="cd ~/Downloads && ls -a" \ -m="cd ~/Music && ls -a" \ -pp="cd ~/Pictures && ls -a" \ -vv="cd ~/Videos && ls -a" \ -cf="cd ${XDG_CONFIG_HOME:-$HOME/.config} && ls -a" \ -cac="cd ${XDG_CACHE_HOME:-$HOME/.cache} && ls -a" \ -sc="cd ~/.local/bin && ls -a" \ -mn="cd /mnt && ls -a" \ -bf="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/files" \ -bd="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/directories" \ -bw="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/bookmarks" \ -cfa="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc" \ -cfz="$EDITOR $ZDOTDIR/.zshrc" \ -cfv="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/init.vim" \ -cfm="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/mutt/muttrc" \ -cfx="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/Xresources" \ -cfu="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/urls" \ -cfn="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/newsboat/config" \ -cfmb="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/bindings" \ -cfmc="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/ncmpcpp/config" \ -cfk="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/sxhkd/sxhkdrc" \ -cfi="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3/config" \ -cfb="$EDITOR ${XDG_CONFIG_HOME:-$HOME/.config}/i3blocks/config" \ diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 5558ea2..b05fb72 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -107,7 +107,7 @@ bindkey '^' autosuggest-accept bindkey '^x' autosuggest-execute zmodload zsh/zpty #needed for tab completion autosuggest ZSH_AUTOSUGGEST_USE_ASYNC=1 #can be set to anything, as long as it's set it will work asynchronously -#ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 #Might be useful for large buffers, but async might be enough +ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20 #Might be useful for large buffers, but async might be enough ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) # completion strategy, possible values: history, completion, match_prev_cmd or a combination of those ZLE_PROMPT_INDENT=0 diff --git a/.local/bin/statusbar/pacpackages b/.local/bin/statusbar/pacpackages index 2f1beba..633713d 100755 --- a/.local/bin/statusbar/pacpackages +++ b/.local/bin/statusbar/pacpackages @@ -6,4 +6,5 @@ # When clicked, it will run an upgrade via pacman. no="$( pacman -Qu | grep -Fcv "[ignored]" )" -echo "$no" | sed "s/^/📦/;s/^📦0$//g" +[ "$no" -gt 0 ] && ( echo "$no" | sed "s/^/📦/"; exit ) +printf '\n' diff --git a/.local/bin/tools/startmpv b/.local/bin/tools/startmpv index d4239f5..ae31da5 100755 --- a/.local/bin/tools/startmpv +++ b/.local/bin/tools/startmpv @@ -1,11 +1,11 @@ #!/bin/zsh -# this script uses https://github.com/maxime-aknin/youtube-playlist-video-ids to gather video ids -# please install this first and specify the path to this cloned repo below -js_playlist_index_loc="$HOME/src/youtube-playlist-video-ids" -# The above mentioned script needs Youtube API access, (see the repo for more info on that) -# I've saved my API key in my password manager, I reccomend you to do something similar. -API_key="$(pass show 'Misc/Youtube Data API v3')" if echo "$1" | grep -qE 'youtube.*list'; then + # this script uses https://github.com/maxime-aknin/youtube-playlist-video-ids to gather video ids + # please install this first and specify the path to this cloned repo below + js_playlist_index_loc="$HOME/src/youtube-playlist-video-ids" + # The above mentioned script needs Youtube API access, (see the repo for more info on that) + # I've saved my API key in my password manager, I reccomend you to do something similar. + API_key="$(pass show 'Misc/Youtube Data API v3')" playlist_id="$( echo "$1" | perl -pe "s|^.*?(\?\|&)list=(.*?)|\2|; s|&index=[0-9]+||" )" notify-send "startmpv" "Searching for all videos in playlist..." npm start --prefix "$js_playlist_index_loc" -- --api-key "$API_key" --playlist-id $playlist_id | sed 's/^/https:\/\/www.youtube.com\/watch?v=/' | xargs mpv || notify-send "startmpv" "An error has occured with playlist $playlist_id"