From a0968bcf93a9529e86e51c5edd043ea18b9feadb Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 13 Jun 2022 17:49:25 +0200 Subject: [PATCH 01/14] nvim: Change init autocmds to lua versions With neovim 0.7 bringing autocmd bindings in lua, we can now rely on a built-in api instead of having to use our own helper function. Last missing migration is the lsp formatting autogroup. --- nvim/.config/nvim/init.lua | 51 ++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3001dfc..ad79d2c 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -1,6 +1,5 @@ --- much of this config comes from +-- many ideas for this config come from -- https://github.com/elianiva/dotfiles/ - with much gratitude -local augroup = require("helpers.augroup") local api = vim.api require('settings') @@ -9,34 +8,28 @@ require('look') require('maps') -- Highlight whatever is being yanked -augroup({ - { - 'TextYankPost', '*', - 'silent! lua require"vim.highlight".on_yank{timeout=500}' - } -}, 'highlightyanks') - --- Compile on plugin edits -augroup({{'BufWritePost', 'plugins.lua', 'PackerCompile'}}, 'compilepackages') +vim.api.nvim_create_autocmd({ "TextYankPost" }, { + command = 'silent! lua require"vim.highlight".on_yank{timeout=500}', + desc = "Highlight yanked text whenevery yanking something", + group = vim.api.nvim_create_augroup('highlightyanks', { clear = true }), +}) -- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to -augroup({ - { - 'BufNewFile,BufRead', '/dev/shm/gopass.*', - 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' - }, { - 'BufNewFile,BufRead', '/dev/shm/pass.?*/?*.txt', - 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' - }, { - 'BufNewFile,BufRead', '$TMPDIR/pass.?*/?*.txt', - 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' - }, { - 'BufNewFile,BufRead', '/tmp/pass.?*/?*.txt', - 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' - } -}, 'passnoleak') - --- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330) -augroup({{'VimEnter', '*', 'silent exec "!kill -s SIGWINCH $PPID"'}}, 'fixsize') +vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { + pattern = { "/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt", "$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt" }, + command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=', + desc = "Don't leak any information when editing potential password files", + group = vim.api.nvim_create_augroup('passnoleak', { clear = true }), +}) api.nvim_exec('runtime abbrev.vim', false) + +-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330) +vim.api.nvim_create_autocmd({ "VimEnter" }, { + callback = function() + local pid, WINCH = vim.fn.getpid(), vim.loop.constants.SIGWINCH + vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20) + end, + desc = "Fix neovim sizing issues if opening same time as alacritty", + group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true }), +}) From 6c20ac04b1ed29c69c3913c7b26b9c4b301213ef Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 13 Jun 2022 17:50:36 +0200 Subject: [PATCH 02/14] sh: Group directories first in ls views Switch ls (exa) views to group any folders in current view and display them before any files (works for l, L, ll, LL). --- sh/.config/sh/alias | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/.config/sh/alias b/sh/.config/sh/alias index 2a28d55..a6a247c 100644 --- a/sh/.config/sh/alias +++ b/sh/.config/sh/alias @@ -24,12 +24,12 @@ alias :q="exit" # ls defaults if exist exa; then - alias l="exa -l --git --git-ignore" - alias L="exa -hal --grid --git" + alias l="exa -l --git --git-ignore --group-directories-first" + alias L="exa -hal --grid --git --group-directories-first" # a recursive tree # - usually want to change levels recursed with -L2 -L3 or similar - alias ll="exa --tree -L2" - alias LL="exa -a --tree -L2" + alias ll="exa --tree -L2 --group-directories-first" + alias LL="exa -a --tree -L2 --group-directories-first" else alias l="ls -lhF" alias L="ls -lAhF" From c0443dad35fc16c236a8aa610afff803462c386d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 13 Jun 2022 19:30:43 +0200 Subject: [PATCH 03/14] nvim: Change remaining augroups to lua autocmds Changed formatting and plugin self-compilation to make use of the new neovim 0.7 autcmd api function. --- nvim/.config/nvim/lua/plug/_format.lua | 13 ++++++++----- nvim/.config/nvim/lua/plugins.lua | 15 ++++++++------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_format.lua b/nvim/.config/nvim/lua/plug/_format.lua index 815e837..85021e8 100644 --- a/nvim/.config/nvim/lua/plug/_format.lua +++ b/nvim/.config/nvim/lua/plug/_format.lua @@ -54,9 +54,12 @@ local formatters = { require('formatter').setup({logging = false, filetype = formatters}) +-- Format on save: -- gather filetypes to autocorrect for each activated formatter above -local filetype = "" -for k, _ in pairs(formatters) do filetype = filetype .. "," .. k end -augroup({ - {'FileType', filetype, 'autocmd', 'BufWritePost', '', 'FormatWrite'} -}, 'formatonsave') +for k, _ in pairs(formatters) do + vim.api.nvim_create_autocmd({"Filetype " .. k}, { + command = "autocmd BufWritePost FormatWrite", + desc = "Automatically format on write", + group = vim.api.nvim_create_augroup('formatonsave', {clear = true}) + }) +end diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 770b1c0..a9ad28b 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -2,15 +2,16 @@ local install_path = vim.fn.stdpath("data") .. "/pack/packer/start/packer.nvim" if vim.fn.empty(vim.fn.glob(install_path)) > 0 then vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. - install_path) + install_path) end -vim.api.nvim_exec([[ - augroup Packer - autocmd! - autocmd BufWritePost plugins.lua PackerCompile - augroup END -]], false) +-- Compile on plugin edits +vim.api.nvim_create_autocmd({ "BufWritePost" }, { + pattern = "plugins.lua", + command = "PackerCompile", + desc = "Compile plugins after editing plugin list", + group = vim.api.nvim_create_augroup('compilepackages', { clear = true }) +}) local use = require("packer").use require("packer").startup(function() From 4f1bc9797727e8092a47c7826ebc541f9e1c044c Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 13 Jun 2022 19:31:56 +0200 Subject: [PATCH 04/14] mail: Change neomutt thread internal ordering Threads used to display in reverse order within themselves, now they should display the newest thread message first (as the one displayed when hovering over the whole thread entry in the message list). --- mail/.config/neomutt/settings | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/mail/.config/neomutt/settings b/mail/.config/neomutt/settings index 735c43a..0ad0317 100644 --- a/mail/.config/neomutt/settings +++ b/mail/.config/neomutt/settings @@ -61,7 +61,14 @@ set sort = threads set sort_re # thread based on regex below set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" set quote_regex = "^( {0,4}[>|:#%]| {0,4}[A-Za-z0-9]+[>|]+)+" -set sort_aux = reverse-last-date-received +set sort_aux = last-date-received +#### Thread ordering +set use_threads=reverse +set sort='last-date' +set collapse_all = yes +set uncollapse_new = no +set thread_received = yes +set narrow_tree=no # set date_format = "%z/%m/%d %I:%M%p" # set date_format = "%m/%d" # set index_format = "%4C [%Z] %{%y/%b %d} %-20.20F %s" @@ -88,13 +95,6 @@ set menu_scroll = yes set tilde # show tildes for blank lines unset markers # no + markers for wrapped stuff set wrap = 90 -#### Thread ordering -set use_threads=reverse -set sort='last-date' -set collapse_all = yes -set uncollapse_new = no -set thread_received = yes -set narrow_tree=no # hide headers except for those explicitly unignored ignore * unignore From To Cc Bcc Date Subject Message-ID From e25ce19719dc973253a2fa00c02dadb8131a9200 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 28 Jun 2022 10:20:57 +0200 Subject: [PATCH 05/14] sh: Add new XDG_STATE_HOME env var from spec The XDG BASE DIRECTORY spec now includes a provision for 'state' stuff, that does not quite fit into either the permanent nature of XDG_DATA_HOME, nor into the impermanence and deletable nature of XDG_CACHE_HOME - i.e. longer running logs or history files. Things you don't necessarily need backed up at all times, but things that should also not change every time the tmpfs is flushed, should you run your .cache directory under one. More here: https://teddit.net/r/linux/comments/ny34vs/new_xdg_state_home_in_xdg_base_directory_spec/ and here: https://wiki.debian.org/XDGBaseDirectorySpecification#state --- sh/.config/sh/xdg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index bfac400..470404a 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -18,12 +18,12 @@ test "$XDG_CACHE_HOME" || export XDG_CACHE_HOME="$HOME/.cache" test "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME="$HOME/.config" test "$XDG_DATA_HOME" || export XDG_DATA_HOME="$HOME/.local/share" +test "$XDG_STATE_HOME" || export XDG_STATE_HOME="$HOME/.local/state" # Desktop environment XDG variables - mimics `xdg-user-dirs` settings, only lowercased and not localized test "$XDG_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop" test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents" test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads" -test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects" export XDG_MUSIC_DIR="$HOME/media/audio/music" export XDG_PICTURES_DIR="$HOME/pictures" @@ -32,6 +32,7 @@ export XDG_VIDEOS_DIR="$HOME/videos" ## Non-Standard additions # non-standard, is added to path to enable execution of any files herein test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" +test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects" xdg_isThere() { if [ -e "$1" ] || [ -h "$1" ]; then @@ -67,3 +68,5 @@ unset -f xdg_isThere xdg_makeForUser export NVM_DIR="$XDG_DATA_HOME/nvm" export TMUX_PLUGIN_MANAGER_PATH="$XDG_DATA_HOME/tmux" export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export ANDROID_HOME="$XDG_DATA_HOME/android" +export ATOM_HOME="$XDG_DATA_HOME/atom" From 4bff036d1dd40e4eb52525804d7b4b0d6ed687d1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 28 Jun 2022 10:24:57 +0200 Subject: [PATCH 06/14] bash: Fix loading bash specific profile and env files --- bash/.bash_profile | 30 +++++++++++++++------ bash/.bashrc | 1 + bash/.config/bash/env.d/bash-history-xdg.sh | 6 +++++ 3 files changed, 29 insertions(+), 8 deletions(-) create mode 100644 bash/.config/bash/env.d/bash-history-xdg.sh diff --git a/bash/.bash_profile b/bash/.bash_profile index c6c4f2a..483d4e6 100644 --- a/bash/.bash_profile +++ b/bash/.bash_profile @@ -10,19 +10,33 @@ export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} # load global sh env vars [ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env" if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then - for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do - . "$_env" - done - unset _env + for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do + . "$_env" + done + unset _env +fi +[ -f "$XDG_CONFIG_HOME/bash/env" ] && source "$XDG_CONFIG_HOME/bash/env" +if [ -d "$XDG_CONFIG_HOME/bash/env.d" ]; then + for _env in "$XDG_CONFIG_HOME/bash/env.d"/*.sh; do + . "$_env" + done + unset _env fi # load profile files vars [ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile" if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then - for _profile in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do - . "$_profile" - done - unset _profile + for _profile in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do + . "$_profile" + done + unset _profile +fi +[ -f "$XDG_CONFIG_HOME/bash/profile" ] && source "$XDG_CONFIG_HOME/bash/profile" +if [ -d "$XDG_CONFIG_HOME/bash/profile.d" ]; then + for _profile in "$XDG_CONFIG_HOME/bash/profile.d"/*.sh; do + . "$_profile" + done + unset _profile fi # shellcheck disable=SC1090 diff --git a/bash/.bashrc b/bash/.bashrc index 28ee5e6..230b896 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # # ~/.bashrc # diff --git a/bash/.config/bash/env.d/bash-history-xdg.sh b/bash/.config/bash/env.d/bash-history-xdg.sh new file mode 100644 index 0000000..4484941 --- /dev/null +++ b/bash/.config/bash/env.d/bash-history-xdg.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +export HISTFILE="${XDG_STATE_HOME}/bash/history" + +# bashrc, bash_profile, bash_logout currently unsupported +# see https://savannah.gnu.org/support/?108134 From 03ec445076e11096a3aae396a408bbcc3f776fc8 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 28 Jun 2022 11:10:34 +0200 Subject: [PATCH 07/14] sh: Fix XDG directory use for an array of apps --- sh/.config/sh/env | 3 --- sh/.config/sh/xdg | 33 +++++++++++++++++++++++++++++---- zsh/.zshenv | 2 +- 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/sh/.config/sh/env b/sh/.config/sh/env index 8e8a25f..db99a4e 100644 --- a/sh/.config/sh/env +++ b/sh/.config/sh/env @@ -6,9 +6,6 @@ # shellcheck source=xdg [ -f ~/.config/sh/xdg ] && . ~/.config/sh/xdg -# anything on BIN_HOME should be executable form anywhere -export PATH="$PATH:$XDG_BIN_HOME" - ############################### ## BEGIN GLOBAL ENV VARS ## ############################### diff --git a/sh/.config/sh/xdg b/sh/.config/sh/xdg index 470404a..8738649 100644 --- a/sh/.config/sh/xdg +++ b/sh/.config/sh/xdg @@ -31,8 +31,10 @@ export XDG_VIDEOS_DIR="$HOME/videos" ## Non-Standard additions # non-standard, is added to path to enable execution of any files herein -test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects" +test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" +# anything on BIN_HOME should be executable form anywhere +export PATH="$PATH:$XDG_BIN_HOME" xdg_isThere() { if [ -e "$1" ] || [ -h "$1" ]; then @@ -65,8 +67,31 @@ xdg_isThere "$XDG_PROJECTS_DIR" || xdg_makeForUser "$XDG_PROJECTS_DIR" unset -f xdg_isThere xdg_makeForUser ## Applications that can be set through environment variables -export NVM_DIR="$XDG_DATA_HOME/nvm" -export TMUX_PLUGIN_MANAGER_PATH="$XDG_DATA_HOME/tmux" -export ZDOTDIR="$XDG_CONFIG_HOME/zsh" export ANDROID_HOME="$XDG_DATA_HOME/android" export ATOM_HOME="$XDG_DATA_HOME/atom" +export CARGO_HOME="$XDG_DATA_HOME/cargo" +export DOCKER_CONFIG="$XDG_CONFIG_HOME/docker" +export GEM_HOME="$XDG_DATA_HOME/gem" +export GEM_SPEC_CACHE="$XDG_CACHE_HOME/gem" +export GNUPGHOME="$XDG_DATA_HOME/gnupg" +export GRADLE_USER_HOME="$XDG_DATA_HOME/gradle" +export GRIPHOME="$XDG_CONFIG_HOME/grip" +export IMAPFILTER_HOME="$XDG_CONFIG_HOME/imapfilter" +export IPYTHONDIR="$XDG_CONFIG_HOME/ipython" +export KDEHOME="$XDG_CONFIG_HOME/kde" +export KODI_DATA="$XDG_DATA_HOME/kodi" +export LESSHISTFILE="XDG_STATE_HOME/lesshst" +export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer" +export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl_history" +export NVM_DIR="$XDG_DATA_HOME/nvm" +export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc" +export SQLITE_HISTORY="$XDG_STATE_HOME/sqlite_history" +export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var" +export TMUX_PLUGIN_MANAGER_PATH="$XDG_DATA_HOME/tmux" +export VAGRANT_HOME="$XDG_DATA_HOME/vagrant" +export WINEPREFIX="$XDG_DATA_HOME/wine" +export ZDOTDIR="$XDG_CONFIG_HOME/zsh" +export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java + +alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME/yarn/config"' +alias wget='wget --hsts-file="$XDG_STATE_HOME/wget-hsts"' diff --git a/zsh/.zshenv b/zsh/.zshenv index 0f2caf2..dd930d3 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -3,4 +3,4 @@ # make zsh source the correct directory export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} -ZDOTDIR="$XDG_CONFIG_HOME/zsh" +ZDOTDIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh" From b20e011b669afe16b386c80e6c79fdbe6825107b Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 22:25:38 +0200 Subject: [PATCH 08/14] qutebrowser: Remove outline readability alias Removed alias to invoke sending a page to outline to make it more readable. Two reasons: First, outline seems gone. The website is hogged by advertisements. Second, when I really need a page in readability mode, I can just send it to my personal wallabag instance and as a bonus even get it archived automatically. --- qutebrowser/.config/qutebrowser/alias.py | 3 --- qutebrowser/.config/qutebrowser/maps.py | 1 - 2 files changed, 4 deletions(-) diff --git a/qutebrowser/.config/qutebrowser/alias.py b/qutebrowser/.config/qutebrowser/alias.py index 60c6a18..0968d5a 100644 --- a/qutebrowser/.config/qutebrowser/alias.py +++ b/qutebrowser/.config/qutebrowser/alias.py @@ -14,9 +14,6 @@ c.aliases["add-shaarli"] = "spawn --userscript shaarli_add.sh" # re-opens the current page on the web archive overview page c.aliases["send-to-archive"] = "open https://web.archive.org/web/{url}" -# sends current page to outline and thus through readability mode -c.aliases["send-to-outline"] = "open https://outline.com/{url}" - # save current page to pdf file c.aliases["save_to_pdf"] = "spawn --userscript pagetopdf.sh" diff --git a/qutebrowser/.config/qutebrowser/maps.py b/qutebrowser/.config/qutebrowser/maps.py index 56061d3..6c09877 100644 --- a/qutebrowser/.config/qutebrowser/maps.py +++ b/qutebrowser/.config/qutebrowser/maps.py @@ -68,7 +68,6 @@ config.bind(";w", "hint links userscript wallabag_add.sh") # add link to wallab config.bind('"s', "add-shaarli", mode="normal") config.bind('"a', "send-to-archive", mode="normal") -config.bind('"o', "send-to-outline", mode="normal") config.bind('"t', "translate-page-google", mode="normal") config.bind('"T', "translate-selection-google", mode="normal") From 300bb572b3bc9ee3b67e3712e9b426b3a9b31907 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 22:28:00 +0200 Subject: [PATCH 09/14] task: Fix taskopen note naming regression Fixed taskopen looking for `.txt` extension notes when so far we only used `.md` extension notes instead. This switches it back. --- taskwarrior/.config/task/taskopenrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskwarrior/.config/task/taskopenrc b/taskwarrior/.config/task/taskopenrc index 7b5466d..d711088 100644 --- a/taskwarrior/.config/task/taskopenrc +++ b/taskwarrior/.config/task/taskopenrc @@ -4,7 +4,7 @@ path_ext = /usr/share/taskopen/scripts [Actions] notes.regex = "Note" -notes.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.txt" +notes.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.md" [CLI] From 7973b606b9ba8e3994f6950c0308eaaa909e9362 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 22:37:06 +0200 Subject: [PATCH 10/14] task: Change blocking/blocked task coefficients Up to now tasks that were blocking other tasks would just get a bump in urgency in taskwarrior. Vice versa for tasks being blocked. However, this could still lead to situations in which a task A blocking task B would appear in the list (sorted by urgency) BEHIND task B. If one task is blocking another, I can not reasonably assume to be able to complete the one blocked, right? So this lead to more confusion that anything and now, any task that blocks another task simply inherits its urgency, appearing directly before the other task in the list. Should solve the problem, though they may not be able to receive their own urgencies anymore, should that be important. --- taskwarrior/.config/task/taskrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/taskwarrior/.config/task/taskrc b/taskwarrior/.config/task/taskrc index 1077e86..3af855e 100644 --- a/taskwarrior/.config/task/taskrc +++ b/taskwarrior/.config/task/taskrc @@ -60,6 +60,12 @@ urgency.annotations.coefficient=0 urgency.user.tag.maybe.coefficient=-100.0 urgency.user.tag.next.coefficient=5.0 +# things that are blocking simply have to be done before +# being able to do the blocked thing. This ensures that. +urgency.blocked.coefficient=0.0 +urgency.blocking.coefficient=0.0 +urgency.inherit=1 + # Holidays for calendar include /usr/share/doc/task/rc/holidays.de-DE.rc From cbb5256e27b294d4cf1c35435f24556dba5c32c7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 22:44:44 +0200 Subject: [PATCH 11/14] task: Refactor personal contexts Moved contexts to a separate, gitignored file in case they contain private information. --- .gitignore | 1 + taskwarrior/.config/task/taskrc | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 18eb675..625a96c 100644 --- a/.gitignore +++ b/.gitignore @@ -40,3 +40,4 @@ colorscheme.yml # taskwarrior taskwarrior/.config/task/task-sync.rc +taskwarrior/.config/task/contexts diff --git a/taskwarrior/.config/task/taskrc b/taskwarrior/.config/task/taskrc index 3af855e..2b2f55d 100644 --- a/taskwarrior/.config/task/taskrc +++ b/taskwarrior/.config/task/taskrc @@ -75,6 +75,9 @@ include colorscheme # Taskserver sync settings include task-sync.rc +# My personal tw contexts (e.g. work/personal) +include contexts + # try to fix some color weirdness, especially in tmux # color.scheduled=on grey @@ -88,8 +91,4 @@ report._reviewed.columns=uuid report._reviewed.sort=reviewed+,modified+ report._reviewed.filter=( reviewed.none: or reviewed.before:now-6days ) and ( +PENDING or +WAITING ) -# different life contexts -context.arbeit.read=project:arbeit -context.arbeit.write=project:arbeit -context.personal.read=project.hasnt:arbeit news.version=2.6.0 From 7356d8c58f46b85e74ddb4700d46be9d06d14322 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 23:50:10 +0200 Subject: [PATCH 12/14] zsh: Use fzf for c-r, c-t and a-c binds Make fzf the default for searching history with c-r in zsh. The incremental history searfch has been moved to c-o instead. Also can insert a directory path at cursor position with binding c-t using fzf, and cd into a directory using alt-c. Will use these less often but they're part of the package and should not be in the way as well. --- zsh/.config/zsh/.zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 62be501..c2b21d9 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -21,6 +21,7 @@ compinit PLUG_FOLDER="/usr/share/zsh/plugins" source /usr/share/oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.zsh +source /usr/share/fzf/key-bindings.zsh #source /usr/share/nvm/init-nvm.sh [ -e $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh ] && source $PLUG_FOLDER/fzf-tab/fzf-tab.plugin.zsh # these need to be sourced after fzf-tab @@ -171,7 +172,7 @@ bindkey '^P' history-beginning-search-backward bindkey '^N' history-beginning-search-forward # search history backwards -bindkey '^r' history-incremental-search-backward +bindkey '^o' history-incremental-search-backward # cycle through history results bindkey -M isearch '^P' history-incremental-search-backward bindkey -M isearch '^N' history-incremental-search-forward From aad5d67aab9af43b33ad066c58a020936f4111f7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 23:53:06 +0200 Subject: [PATCH 13/14] zsh: Make c-e always send zle to editor Whereas previously, zsh needed to be in vi mode to enter the editor with current zle now we can *always* enter the mode with c-e. Since the combination is not used for going to the end of the line or anything anymore anyway, we can make it a bit easier to get into vim from the zle. --- zsh/.config/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index c2b21d9..f090c0b 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -179,7 +179,7 @@ bindkey -M isearch '^N' history-incremental-search-forward # Send command to editor and back for execution zle -N edit-command-line -bindkey -M vicmd '^e' edit-command-line +bindkey '^e' edit-command-line # Deduplicate PATH - remove any duplicate entries from PATH # from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command From 13ec6ed6003fcea66abf490f7bae4f1f4f39dc13 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 8 Jul 2022 23:54:39 +0200 Subject: [PATCH 14/14] zsh: Fix fzf-tab to make use of refactored options Use new option structure for fzf-tab, see fzf-tab wiki for more information. --- zsh/.config/zsh/.zshrc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index f090c0b..efd8c82 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -31,21 +31,12 @@ source /usr/share/fzf/key-bindings.zsh unset PLUG_FOLDER # simple fzf-tab settings -FZF_TAB_COMMAND=( - fzf - --ansi # Enable ANSI color support, necessary for showing groups - --expect='$continuous_trigger,$print_query' # For continuous completion and print query - '--color=hl:$(( $#headers == 0 ? 108 : 255 ))' - --nth=2,3 --delimiter='\x00' # Don't search prefix - --layout=reverse --height='${FZF_TMUX_HEIGHT:=75%}' - --tiebreak=begin -m --bind=tab:down,btab:up,change:top,ctrl-space:toggle --cycle - '--query=$query' # $query will be expanded to query string at runtime. - '--header-lines=$#headers' # $#headers will be expanded to lines of headers at runtime - --print-query -) -zstyle ':fzf-tab:*' command $FZF_TAB_COMMAND +zstyle ":fzf-tab:*" fzf-flags "--ansi" "--expect='$continuous_trigger,$print_query'" "--color=hl:$(($#headers == 0 ? 108 : 255))" "--nth=2,3" "--layout=reverse" "--height=${FZF_TMUX_HEIGHT:-75%}" "--tiebreak=begin" "-m" "--bind=tab:down,btab:up,change:top,ctrl-space:toggle" "--cycle" "--query=$query" "--header-lines=$#headers" "--print-query" + +zstyle ':fzf-tab:*' fzf-command fzf # format colorful groups for different completion actions zstyle ':completion:*:descriptions' format '[%d]' +zstyle ':fzf-tab:*' show-group brief # use input as query string when completing zlua zstyle ':fzf-tab:complete:_zlua:*' query-string input # (experimental, may change in the future)