Compare commits

..

14 commits

Author SHA1 Message Date
13ec6ed600
zsh: Fix fzf-tab to make use of refactored options
Use new option structure for fzf-tab, see fzf-tab wiki for more
information.
2022-07-08 23:54:39 +02:00
aad5d67aab
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.
2022-07-08 23:53:06 +02:00
7356d8c58f
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.
2022-07-08 23:52:51 +02:00
cbb5256e27
task: Refactor personal contexts
Moved contexts to a separate, gitignored file in case they contain
private information.
2022-07-08 22:44:44 +02:00
7973b606b9
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.
2022-07-08 22:37:06 +02:00
300bb572b3
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.
2022-07-08 22:28:00 +02:00
b20e011b66
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.
2022-07-08 22:27:47 +02:00
03ec445076
sh: Fix XDG directory use for an array of apps 2022-06-28 11:30:46 +02:00
4bff036d1d
bash: Fix loading bash specific profile and env files 2022-06-28 10:24:57 +02:00
e25ce19719
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
2022-06-28 10:21:14 +02:00
4f1bc97977
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).
2022-06-13 19:31:56 +02:00
c0443dad35
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.
2022-06-13 19:30:43 +02:00
6c20ac04b1
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).
2022-06-13 17:50:36 +02:00
a0968bcf93
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.
2022-06-13 17:49:25 +02:00
17 changed files with 127 additions and 90 deletions

1
.gitignore vendored
View file

@ -40,3 +40,4 @@ colorscheme.yml
# taskwarrior # taskwarrior
taskwarrior/.config/task/task-sync.rc taskwarrior/.config/task/task-sync.rc
taskwarrior/.config/task/contexts

View file

@ -15,6 +15,13 @@ if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
done done
unset _env unset _env
fi 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 # load profile files vars
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile" [ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile"
@ -24,6 +31,13 @@ if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then
done done
unset _profile unset _profile
fi 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 # shellcheck disable=SC1090
[[ -f ~/.bashrc ]] && . ~/.bashrc [[ -f ~/.bashrc ]] && . ~/.bashrc

View file

@ -1,3 +1,4 @@
#!/usr/bin/env bash
# #
# ~/.bashrc # ~/.bashrc
# #

View file

@ -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

View file

@ -61,7 +61,14 @@ set sort = threads
set sort_re # thread based on regex below set sort_re # thread based on regex below
set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*"
set quote_regex = "^( {0,4}[>|:#%]| {0,4}[A-Za-z0-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 = "%z/%m/%d %I:%M%p"
# set date_format = "%m/%d" # set date_format = "%m/%d"
# set index_format = "%4C [%Z] %{%y/%b %d} %-20.20F %s" # 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 set tilde # show tildes for blank lines
unset markers # no + markers for wrapped stuff unset markers # no + markers for wrapped stuff
set wrap = 90 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 # hide headers except for those explicitly unignored
ignore * ignore *
unignore From To Cc Bcc Date Subject Message-ID unignore From To Cc Bcc Date Subject Message-ID

View file

@ -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 -- https://github.com/elianiva/dotfiles/ - with much gratitude
local augroup = require("helpers.augroup")
local api = vim.api local api = vim.api
require('settings') require('settings')
@ -9,34 +8,28 @@ require('look')
require('maps') require('maps')
-- Highlight whatever is being yanked -- Highlight whatever is being yanked
augroup({ vim.api.nvim_create_autocmd({ "TextYankPost" }, {
{ command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
'TextYankPost', '*', desc = "Highlight yanked text whenevery yanking something",
'silent! lua require"vim.highlight".on_yank{timeout=500}' group = vim.api.nvim_create_augroup('highlightyanks', { clear = true }),
} })
}, 'highlightyanks')
-- Compile on plugin edits
augroup({{'BufWritePost', 'plugins.lua', 'PackerCompile'}}, 'compilepackages')
-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to -- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
augroup({ vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, {
{ pattern = { "/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt", "$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt" },
'BufNewFile,BufRead', '/dev/shm/gopass.*', command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=',
'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 }),
'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')
api.nvim_exec('runtime abbrev.vim', false) 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 }),
})

View file

@ -54,9 +54,12 @@ local formatters = {
require('formatter').setup({logging = false, filetype = formatters}) require('formatter').setup({logging = false, filetype = formatters})
-- Format on save:
-- gather filetypes to autocorrect for each activated formatter above -- gather filetypes to autocorrect for each activated formatter above
local filetype = "" for k, _ in pairs(formatters) do
for k, _ in pairs(formatters) do filetype = filetype .. "," .. k end vim.api.nvim_create_autocmd({"Filetype " .. k}, {
augroup({ command = "autocmd BufWritePost <buffer> FormatWrite",
{'FileType', filetype, 'autocmd', 'BufWritePost', '<buffer>', 'FormatWrite'} desc = "Automatically format on write",
}, 'formatonsave') group = vim.api.nvim_create_augroup('formatonsave', {clear = true})
})
end

View file

@ -5,12 +5,13 @@ if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
install_path) install_path)
end end
vim.api.nvim_exec([[ -- Compile on plugin edits
augroup Packer vim.api.nvim_create_autocmd({ "BufWritePost" }, {
autocmd! pattern = "plugins.lua",
autocmd BufWritePost plugins.lua PackerCompile command = "PackerCompile",
augroup END desc = "Compile plugins after editing plugin list",
]], false) group = vim.api.nvim_create_augroup('compilepackages', { clear = true })
})
local use = require("packer").use local use = require("packer").use
require("packer").startup(function() require("packer").startup(function()

View file

@ -14,9 +14,6 @@ c.aliases["add-shaarli"] = "spawn --userscript shaarli_add.sh"
# re-opens the current page on the web archive overview page # re-opens the current page on the web archive overview page
c.aliases["send-to-archive"] = "open https://web.archive.org/web/{url}" 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 # save current page to pdf file
c.aliases["save_to_pdf"] = "spawn --userscript pagetopdf.sh" c.aliases["save_to_pdf"] = "spawn --userscript pagetopdf.sh"

View file

@ -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('"s', "add-shaarli", mode="normal")
config.bind('"a', "send-to-archive", 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-page-google", mode="normal")
config.bind('"T', "translate-selection-google", mode="normal") config.bind('"T', "translate-selection-google", mode="normal")

View file

@ -24,12 +24,12 @@ alias :q="exit"
# ls defaults # ls defaults
if exist exa; then if exist exa; then
alias l="exa -l --git --git-ignore" alias l="exa -l --git --git-ignore --group-directories-first"
alias L="exa -hal --grid --git" alias L="exa -hal --grid --git --group-directories-first"
# a recursive tree # a recursive tree
# - usually want to change levels recursed with -L2 -L3 or similar # - usually want to change levels recursed with -L2 -L3 or similar
alias ll="exa --tree -L2" alias ll="exa --tree -L2 --group-directories-first"
alias LL="exa -a --tree -L2" alias LL="exa -a --tree -L2 --group-directories-first"
else else
alias l="ls -lhF" alias l="ls -lhF"
alias L="ls -lAhF" alias L="ls -lAhF"

View file

@ -6,9 +6,6 @@
# shellcheck source=xdg # shellcheck source=xdg
[ -f ~/.config/sh/xdg ] && . ~/.config/sh/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 ## ## BEGIN GLOBAL ENV VARS ##
############################### ###############################

View file

@ -18,12 +18,12 @@
test "$XDG_CACHE_HOME" || export XDG_CACHE_HOME="$HOME/.cache" test "$XDG_CACHE_HOME" || export XDG_CACHE_HOME="$HOME/.cache"
test "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME="$HOME/.config" test "$XDG_CONFIG_HOME" || export XDG_CONFIG_HOME="$HOME/.config"
test "$XDG_DATA_HOME" || export XDG_DATA_HOME="$HOME/.local/share" 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 # 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_DESKTOP_DIR" || export XDG_DESKTOP_DIR="$HOME/desktop"
test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents" test "$XDG_DOCUMENTS_DIR" || export XDG_DOCUMENTS_DIR="$HOME/documents"
test "$XDG_DOWNLOAD_DIR" || export XDG_DOWNLOAD_DIR="$HOME/downloads" 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_MUSIC_DIR="$HOME/media/audio/music"
export XDG_PICTURES_DIR="$HOME/pictures" export XDG_PICTURES_DIR="$HOME/pictures"
@ -31,7 +31,10 @@ export XDG_VIDEOS_DIR="$HOME/videos"
## Non-Standard additions ## Non-Standard additions
# non-standard, is added to path to enable execution of any files herein # non-standard, is added to path to enable execution of any files herein
test "$XDG_PROJECTS_DIR" || export XDG_PROJECTS_DIR="$HOME/projects"
test "$XDG_BIN_HOME" || export XDG_BIN_HOME="$HOME/.local/bin" 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() { xdg_isThere() {
if [ -e "$1" ] || [ -h "$1" ]; then if [ -e "$1" ] || [ -h "$1" ]; then
@ -64,6 +67,31 @@ xdg_isThere "$XDG_PROJECTS_DIR" || xdg_makeForUser "$XDG_PROJECTS_DIR"
unset -f xdg_isThere xdg_makeForUser unset -f xdg_isThere xdg_makeForUser
## Applications that can be set through environment variables ## Applications that can be set through environment variables
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 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 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 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"'

View file

@ -4,7 +4,7 @@ path_ext = /usr/share/taskopen/scripts
[Actions] [Actions]
notes.regex = "Note" 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] [CLI]

View file

@ -60,6 +60,12 @@ urgency.annotations.coefficient=0
urgency.user.tag.maybe.coefficient=-100.0 urgency.user.tag.maybe.coefficient=-100.0
urgency.user.tag.next.coefficient=5.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 # Holidays for calendar
include /usr/share/doc/task/rc/holidays.de-DE.rc include /usr/share/doc/task/rc/holidays.de-DE.rc
@ -69,6 +75,9 @@ include colorscheme
# Taskserver sync settings # Taskserver sync settings
include task-sync.rc include task-sync.rc
# My personal tw contexts (e.g. work/personal)
include contexts
# try to fix some color weirdness, especially in tmux # try to fix some color weirdness, especially in tmux
# color.scheduled=on grey # color.scheduled=on grey
@ -82,8 +91,4 @@ report._reviewed.columns=uuid
report._reviewed.sort=reviewed+,modified+ report._reviewed.sort=reviewed+,modified+
report._reviewed.filter=( reviewed.none: or reviewed.before:now-6days ) and ( +PENDING or +WAITING ) 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 news.version=2.6.0

View file

@ -21,6 +21,7 @@ compinit
PLUG_FOLDER="/usr/share/zsh/plugins" 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/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/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 #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 [ -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 # these need to be sourced after fzf-tab
@ -30,21 +31,12 @@ source /usr/share/oh-my-zsh/plugins/command-not-found/command-not-found.plugin.z
unset PLUG_FOLDER unset PLUG_FOLDER
# simple fzf-tab settings # simple fzf-tab settings
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"
fzf
--ansi # Enable ANSI color support, necessary for showing groups zstyle ':fzf-tab:*' fzf-command fzf
--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
# format colorful groups for different completion actions # format colorful groups for different completion actions
zstyle ':completion:*:descriptions' format '[%d]' zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':fzf-tab:*' show-group brief
# use input as query string when completing zlua # use input as query string when completing zlua
zstyle ':fzf-tab:complete:_zlua:*' query-string input zstyle ':fzf-tab:complete:_zlua:*' query-string input
# (experimental, may change in the future) # (experimental, may change in the future)
@ -171,14 +163,14 @@ bindkey '^P' history-beginning-search-backward
bindkey '^N' history-beginning-search-forward bindkey '^N' history-beginning-search-forward
# search history backwards <c-r> # search history backwards <c-r>
bindkey '^r' history-incremental-search-backward bindkey '^o' history-incremental-search-backward
# cycle through history results # cycle through history results
bindkey -M isearch '^P' history-incremental-search-backward bindkey -M isearch '^P' history-incremental-search-backward
bindkey -M isearch '^N' history-incremental-search-forward bindkey -M isearch '^N' history-incremental-search-forward
# Send command to editor and back for execution # Send command to editor and back for execution
zle -N edit-command-line 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 # Deduplicate PATH - remove any duplicate entries from PATH
# from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command # from: https://unix.stackexchange.com/questions/40749/remove-duplicate-path-entries-with-awk-command

View file

@ -3,4 +3,4 @@
# make zsh source the correct directory # make zsh source the correct directory
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
ZDOTDIR="$XDG_CONFIG_HOME/zsh" ZDOTDIR="${XDG_CONFIG_HOME:-"$HOME/.config"}/zsh"