diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-09-07 10:00:17 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-09-07 10:00:17 +0100 |
commit | 8db49bfcf22e75a8ff732cadd351ffce3e71b452 (patch) | |
tree | a8aef5e1007c49048975218d2f3f001962252aad | |
parent | f8feeb66613867ca177333c70a553e12b3365b52 (diff) | |
parent | 3197e19a738c17aa7abb02fe2e4f24a0ba9b9ec1 (diff) |
Merge branch 'master' of github.com:yulqen/openbsddotfiles
-rw-r--r-- | fish/completions/task.sh | 194 | ||||
-rw-r--r-- | fish/config.fish | 3 | ||||
-rw-r--r-- | fish/functions/mutt.fish | 2 | ||||
-rw-r--r-- | fish/functions/push.fish | 3 | ||||
-rw-r--r-- | fish/functions/venvact.fish | 2 | ||||
-rw-r--r-- | irssi_config | 13 | ||||
-rw-r--r-- | newsboat/config | 2 | ||||
-rw-r--r-- | taskrc_x1 | 7 | ||||
-rw-r--r-- | vim/vimrc | 4 |
9 files changed, 217 insertions, 13 deletions
diff --git a/fish/completions/task.sh b/fish/completions/task.sh new file mode 100644 index 0000000..7b33e39 --- /dev/null +++ b/fish/completions/task.sh @@ -0,0 +1,194 @@ +################################################################################ +# +# Copyright 2006 - 2021, Tomas Babej, Paul Beckingham, Federico Hernandez. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# https://www.opensource.org/licenses/mit-license.php +# +################################################################################ +# +# The routines will do completion of: +# +# *) task subcommands +# *) project names +# *) tag names +# *) aliases +# +# To use these routines: +# +# 1) Copy this file to somewhere (e.g. ~/.bash_completion.d/task.sh). +# 2) Add the following line to your .bashrc: +# source ~/.bash_completion.d/task.sh +# +# OR +# +# 3) Copy the file to /etc/bash_completion.d +# 4) source /etc/bash_completion +# +# To submit patches/bug reports: +# +# *) Go to the project's website at +# +# https://taskwarrior.org +# +################################################################################ +#the following variable is substituted for by ../../test/bash_completion.t +taskbin='task' +taskrc='' +taskcommand="rc.verbose:nothing rc.confirmation:no rc.hooks:off ${taskrc}" + +_task_get_tags() { + "$taskbin" $taskcommand _tags +} + +_task_get_config() { + "$taskbin" $taskcommand _config +} + +_task_offer_priorities() { + COMPREPLY=( $(compgen -W "L M H" -- ${cur/*:/}) ) +} + +_task_offer_projects() { + COMPREPLY=( $(compgen -W "$("$taskbin" $taskcommand _projects)" -- ${cur/*:/}) ) +} + +_task_offer_contexts() { + COMPREPLY=( $(compgen -W "$("$taskbin" $taskcommand _context) define delete list none show" -- $cur) ) +} + +_task_context_alias=$("$taskbin" $taskcommand show | grep 'alias.*context' | cut -d' ' -f1 | cut -d. -f2) + +_task() +{ + local cur prev opts base + + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + if [ ${#COMP_WORDS[*]} -gt 2 ] + then + prev2="${COMP_WORDS[COMP_CWORD-2]}" + else + prev2="" + fi +# useful for debugging: +# echo -e "\ncur='$cur'" +# echo "prev='$prev'" +# echo "prev2='$prev2'" + + abbrev_min=$("$taskbin" $taskcommand show | grep "abbreviation.minimum" | awk {'print $2'}) + commands_aliases=$(echo $("$taskbin" $taskcommand _commands; "$taskbin" $taskcommand _aliases) | tr " " "\n"|sort|tr "\n" " ") + opts="$commands_aliases $("$taskbin" $taskcommand _columns)" + + case "${prev}" in + $_task_context_alias|cont|conte|contex|context) + _task_offer_contexts + return 0 + ;; + :) + case "${prev2}" in + pri|prior|priori|priorit|priority) + if [ ${#prev2} -ge $abbrev_min ]; then + _task_offer_priorities + fi + return 0 + ;; + pro|proj|proje|projec|project) + if [ ${#prev2} -ge $abbrev_min ]; then + _task_offer_projects + fi + return 0 + ;; + rc) + # not activated when only "rc:" but is activated if anything after "rc:" + _filedir + return 0 + ;; + rc.data.location) + _filedir -d + return 0 + ;; + esac + ;; + *) + case "${cur}" in + pro:*|proj:*|proje:*|projec:*|project:*) + _task_offer_projects + return 0 + ;; + :) + case "${prev}" in + pri|prior|priori|priorit|priority) + if [ ${#prev} -ge $abbrev_min ]; then + _task_offer_priorities + fi + return 0 + ;; + pro|proj|proje|projec|project) + if [ ${#prev} -ge $abbrev_min ]; then + _task_offer_projects + fi + return 0 + ;; + rc) + # activated only when "rc:" + cur="" # otherwise ":" is passed. + _filedir + return 0 + ;; + rc.data.location) + cur="" + _filedir -d + return 0 + ;; + esac + ;; + +*) + local tags=$(_task_get_tags | sed 's/^/+/') + COMPREPLY=( $(compgen -W "${tags}" -- ${cur}) ) + return 0 + ;; + -*) + local tags=$(_task_get_tags | sed 's/^/-/') + COMPREPLY=( $(compgen -W "${tags}" -- ${cur}) ) + return 0 + ;; + rc.*) + local config=$(_task_get_config | sed -e 's/^/rc\./' -e 's/$/:/') + COMPREPLY=( $(compgen -W "${config}" -- ${cur}) ) + return 0 + ;; + *) + case "${prev}" in + import) + COMPREPLY=( $(compgen -o "default" -- ${cur}) ) + return 0 + ;; + esac + ;; + esac + ;; + esac + + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 +} +complete -o nospace -F _task task diff --git a/fish/config.fish b/fish/config.fish index 1a74450..ffe7355 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -29,7 +29,8 @@ set -gx BOOKMARK_PY_SMTP_HOST smtp.fastmail.com set -gx BOOKMARK_PY_FROM mrlemon@mailforce.net set -gx BOOKMARK_PY_EMAIL bookmark@matthewlemon.com # set this when needed in shells: -# BOOKMARK_PY_SMTP_PWD="$(pass AppPasswords/mbsync_fastmail_may2022)" +#BOOKMARK_PY_SMTP_PWD="$(pass AppPasswords/mbsync_fastmail_may2022)" +set -gx BOOKMARK_PY_SMTP_PWD TBC set -gx PATH ~/.fzf/bin $PATH set -gx FZF_DEFAULT_COMMAND 'ag --nocolor -g ""' set -gx FZF_CTRL_T_COMMAND $FZF_DEFAULT_COMMAND diff --git a/fish/functions/mutt.fish b/fish/functions/mutt.fish index 2e23366..72c6a50 100644 --- a/fish/functions/mutt.fish +++ b/fish/functions/mutt.fish @@ -1,3 +1,3 @@ function mutt --wraps='neomutt -f Mail/fastmail/INBOX/' --description 'alias mutt=neomutt -f Mail/fastmail/INBOX/' - neomutt -f Mail/fastmail/INBOX/ $argv; + cd ~/Downloads && neomutt -f Mail/fastmail/INBOX/ $argv; end diff --git a/fish/functions/push.fish b/fish/functions/push.fish new file mode 100644 index 0000000..636213c --- /dev/null +++ b/fish/functions/push.fish @@ -0,0 +1,3 @@ +function push --description 'alias push=git push' + git push $argv; +end diff --git a/fish/functions/venvact.fish b/fish/functions/venvact.fish index 01bf050..b099648 100644 --- a/fish/functions/venvact.fish +++ b/fish/functions/venvact.fish @@ -1,3 +1,3 @@ function venvact --wraps='. ./.venv/bin/activate' --description 'alias venvact=. ./.venv/bin/activate' - . ./.venv/bin/activate $argv; + . ./.venv/bin/activate.fish $argv; end diff --git a/irssi_config b/irssi_config index 2f1cba2..049c9c4 100644 --- a/irssi_config +++ b/irssi_config @@ -67,7 +67,7 @@ servers = ( address = "16693433.xyz"; chatnet = "liberachat"; port = "5989"; - password = "yulqen/liberachat:bobbins2001"; + password = REFER TO PASSWORD MANAGER FOR THIS use_tls = "yes"; tls_verify = "no"; autoconnect = "yes"; @@ -330,18 +330,17 @@ ignores = ( "#debian", "#plaintextaccounting", "#irssi", + "#qutebrowser", "#vim", + "##cycling", "#fsf", - "#perl" + "#perl", + "#freenode" ); } ); settings = { - core = { - real_name = "Matthew Lemon"; - user_name = "lemon"; - nick = "lemon"; - }; + core = { real_name = "Lemon"; user_name = "lemon"; nick = "yulqen"; }; "fe-text" = { actlist_sort = "refnum"; }; }; logs = { }; diff --git a/newsboat/config b/newsboat/config index 6f2a242..f0962a7 100644 --- a/newsboat/config +++ b/newsboat/config @@ -38,7 +38,7 @@ notify-program "notify-send" notify-screen yes notify-xterm yes -max-items 20 +max-items 40 download-path "~/Downloads" player mpv @@ -102,7 +102,7 @@ report.in.labels = ID,Description urgency.uda.priority.L.coefficient=-1.8 # some UDAs for me -urgency.user.tag.trivial.coefficient=-3.0 +urgency.user.tag.trivial.coefficient=-5.5 urgency.user.tag.bug.coefficient=+1.5 urgency.user.tag.reference.coefficient=-3.2 urgency.user.tag.idea.coefficient=-3.0 @@ -119,6 +119,8 @@ urgency.user.tag.waiting.coefficient=-2.0 # UDA for bash script (inspection_planning.sh) uda.wb.type=date uda.wb.label=Week Beginning +# killlist is everything that should be removed - bottom +urgency.user.tag.killlist.coefficient=-5.1 # F*ck annotations having any effect on urgency! urgency.annotations.coefficient=0 @@ -127,6 +129,7 @@ urgency.annotations.coefficient=0 #urgency.annotations.coefficient=0.5 urgency.tags.coefficient=0 urgency.blocking.coefficient=+2.0 +urgency.due.coefficient=1.1 #urgency.project.coefficient=1 #urgency.age.coefficient=1 @@ -136,6 +139,7 @@ urgency.project.coefficnent=1.0 # Colours #color.project.code.dbasik=green #color.tag.next=black on bright yellow +color.tag.killlist=rgb104 on black #color.due.today=red on yellow #color.overdue=bold red ##color.active=bold yellow @@ -308,4 +312,3 @@ report.ml_deleted_last_month.filter=end.after:today-30day status:deleted regex=on news.version=2.6.0 -context=work @@ -144,6 +144,7 @@ autocmd BufLeave * call s:copy_filename_as_mdlink() " vim-plug call plug#begin('~/.vim/plugged') Plug 'morhetz/gruvbox' +Plug 'alok/notational-fzf-vim' Plug 'sheerun/vim-polyglot' "Plug 'neoclide/coc.nvim', {'branch': 'release'} Plug 'tpope/vim-commentary' @@ -188,6 +189,9 @@ let test#go#runner = 'gotest' " To run mypy using vim-dispath -with Dispatch autocmd FileType python let b:dispatch = 'mypy --ignore-missing-imports' +" notational-fzf-vim +let g:nv_search_paths = ['~/Notes', '~/Notes/Archive'] + " jedo-vim let g:jedi#goto_command = "<leader>d" let g:jedi#goto_assignments_command = "<leader>g" |