summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
Diffstat (limited to '.config')
-rw-r--r--.config/dunst/dunstrc149
-rwxr-xr-x.config/fontconfig/fonts.conf1
-rwxr-xr-x.config/lf/cleaner4
-rw-r--r--.config/lf/lfrc57
-rwxr-xr-x.config/lf/scope88
m---------.config/mpv/script_modules/mpvSockets0
-rw-r--r--.config/mpv/scripts/modules.lua4
m---------.config/mpv/scripts/mpvSockets0
-rw-r--r--.config/newsboat/config2
-rw-r--r--.config/newsboat/urls6
-rw-r--r--.config/nvim/init.vim17
-rwxr-xr-x.config/pinentry/preexec5
-rw-r--r--.config/pipewire/pipewire.conf247
-rw-r--r--.config/shell/aliasrc16
-rw-r--r--.config/shell/bm-dirs1
-rwxr-xr-x.config/sxiv/exec/key-handler8
-rwxr-xr-x.config/wal/postrun31
-rw-r--r--.config/wal/templates/dunstrc157
-rwxr-xr-x.config/x11/xprofile22
-rw-r--r--.config/zsh/.zshrc15
20 files changed, 434 insertions, 396 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
index abf5586..d03af62 100644
--- a/.config/dunst/dunstrc
+++ b/.config/dunst/dunstrc
@@ -1,152 +1,27 @@
[global]
monitor = 0
follow = keyboard
- geometry = "350x5-0+24"
- indicate_hidden = yes
- shrink = yes
- transparency = 20
- notification_height = 0
- separator_height = 2
- padding = 0
- horizontal_padding = 8
- frame_width = 3
- frame_color = "#282828"
-
- # Define a color for the separator.
- # possible values are:
- # * auto: dunst tries to find a color fitting to the background;
- # * foreground: use the same color as the foreground;
- # * frame: use the same color as the frame;
- # * anything else will be interpreted as a X color.
- separator_color = frame
-
- # Sort messages by urgency.
- sort = yes
-
- idle_threshold = 120
- font = Monospace 14
- line_height = 0
- markup = full
-
- # The format of the message. Possible variables are:
- # %a appname
- # %s summary
- # %b body
- # %i iconname (including its path)
- # %I iconname (without its path)
- # %p progress value if set ([ 0%] to [100%]) or nothing
- # %n progress value if set without any extra characters
- # %% Literal %
- # Markup is allowed
+ width = 370
+ height = 350
+ offset = 0x19
+ padding = 2
+ horizontal_padding = 2
+ transparency = 25
+ font = Monospace 12
format = "<b>%s</b>\n%b"
- alignment = left
- show_age_threshold = 60
- word_wrap = yes
- ellipsize = middle
- ignore_newline = no
- stack_duplicates = true
- hide_duplicate_count = true
- show_indicators = yes
- icon_position = left
- max_icon_size = 40
- #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/
- sticky_history = yes
- history_length = 20
- dmenu = /usr/bin/dmenu -p dunst:
- browser = /usr/bin/firefox -new-tab
-
- # Always run rule-defined scripts, even if the notification is suppressed
- always_run_script = true
-
- title = Dunst
- class = Dunst
- startup_notification = false
- force_xinerama = false
-[experimental]
- per_monitor_dpi = false
-
-[shortcuts]
- close = ctrl+space
- close_all = ctrl+shift+space
- history = ctrl+grave
- context = ctrl+shift+period
-
[urgency_low]
- # IMPORTANT: colors have to be defined in quotation marks.
- # Otherwise the "#" and following would be interpreted as a comment.
- background = "#282828"
+ background = "#1d2021"
foreground = "#928374"
- timeout = 5
- # Icon for notifications with low urgency, uncomment to enable
- #icon = /path/to/icon
+ timeout = 3
[urgency_normal]
- background = "#458588"
foreground = "#ebdbb2"
+ background = "#458588"
timeout = 5
[urgency_critical]
- background = "#cc2421"
+ background = "#1cc24d"
foreground = "#ebdbb2"
frame_color = "#fabd2f"
- timeout = 0
-
-# Every section that isn't one of the above is interpreted as a rules to
-# override settings for certain messages.
-# Messages can be matched by "appname", "summary", "body", "icon", "category",
-# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
-# "background", "new_icon" and "format".
-# Shell-like globbing will get expanded.
-#
-# SCRIPTING
-# You can specify a script that gets run when the rule matches by
-# setting the "script" option.
-# The script will be called as follows:
-# script appname summary body icon urgency
-# where urgency can be "LOW", "NORMAL" or "CRITICAL".
-#
-# NOTE: if you don't want a notification to be displayed, set the format
-# to "".
-# NOTE: It might be helpful to run dunst -print in a terminal in order
-# to find fitting options for rules.
-
-#[espeak]
-# summary = "*"
-# script = dunst_espeak.sh
-
-#[script-test]
-# summary = "*script*"
-# script = dunst_test.sh
-
-#[ignore]
-# # This notification will not be displayed
-# summary = "foobar"
-# format = ""
-
-#[history-ignore]
-# # This notification will not be saved in history
-# summary = "foobar"
-# history_ignore = yes
-
-#[signed_on]
-# appname = Pidgin
-# summary = "*signed on*"
-# urgency = low
-#
-#[signed_off]
-# appname = Pidgin
-# summary = *signed off*
-# urgency = low
-#
-#[says]
-# appname = Pidgin
-# summary = *says*
-# urgency = critical
-#
-#[twitter]
-# appname = Pidgin
-# summary = *twitter.com*
-# urgency = normal
-#
-# vim: ft=cfg
+ timeout = 10
diff --git a/.config/fontconfig/fonts.conf b/.config/fontconfig/fonts.conf
index 2d58803..be47e01 100755
--- a/.config/fontconfig/fonts.conf
+++ b/.config/fontconfig/fonts.conf
@@ -30,6 +30,7 @@
<prefer>
<family>Noto Sans Mono</family>
<family>Liberation Mono</family>
+ <family>Braille</family>
</prefer>
</alias>
</fontconfig>
diff --git a/.config/lf/cleaner b/.config/lf/cleaner
new file mode 100755
index 0000000..a184d84
--- /dev/null
+++ b/.config/lf/cleaner
@@ -0,0 +1,4 @@
+#!/bin/sh
+if [ -n "$FIFO_UEBERZUG" ]; then
+ printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
+fi
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index b7e8a3c..315ac3f 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -1,28 +1,49 @@
# Luke's lf settings
+
+# Note on Image Previews
+# For those wanting image previews, like this system, there are four steps to
+# set it up. These are done automatically for LARBS users, but I will state
+# them here for others doing it manually.
+#
+# 1. ueberzug must be installed.
+# 2. The scope file (~/.config/lf/scope for me), must have a command similar to
+# mine to generate ueberzug images.
+# 3. A `set cleaner` line as below is a cleaner script.
+# 4. lf should be started through a wrapper script (~/.local/bin/lfub for me)
+# that creates the environment for ueberzug. This command can be be aliased
+# in your shellrc (`alias lf="lfub") or if set to a binding, should be
+# called directly instead of normal lf.
+
# Basic vars
-set shell bash
set shellopts '-eu'
set ifs "\n"
set scrolloff 10
set icons
set period 1
set hiddenfiles ".*:*.aux:*.log:*.bbl:*.bcf:*.blg:*.run.xml"
-
-# Vars that depend on environmental variables
-$lf -remote "send $id set previewer ${XDG_CONFIG_HOME:-$HOME/.config}/lf/scope"
+set cleaner '~/.config/lf/cleaner'
+set previewer '~/.config/lf/scope'
# cmds/functions
cmd open ${{
- case $(file --mime-type $f -b) in
- image/vnd.djvu|application/pdf|application/octet-stream) setsid -f zathura $fx >/dev/null 2>&1 ;;
- text/*) $EDITOR $fx;;
+ case $(file --mime-type "$(readlink -f $f)" -b) in
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet) localc $fx ;;
+ image/vnd.djvu|application/pdf|application/octet-stream|application/postscript) setsid -f zathura $fx >/dev/null 2>&1 ;;
+ text/*|application/json|inode/x-empty) $EDITOR $fx;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
- image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | sxiv -aio 2>/dev/null | lf-select ;;
+ image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" |
+ setsid -f sxiv -aio 2>/dev/null | while read -r file; do
+ [ -z "$file" ] && continue
+ lf -remote "send select \"$file\""
+ lf -remote "send toggle"
+ done &
+ ;;
audio/*) mpv --audio-display=no $f ;;
video/*) setsid -f mpv $f -quiet >/dev/null 2>&1 ;;
application/pdf|application/vnd*|application/epub*) setsid -f zathura $fx >/dev/null 2>&1 ;;
+ application/pgp-encrypted) $EDITOR $fx ;;
*) for f in $fx; do setsid -f $OPENER $f >/dev/null 2>&1; done;;
esac
}}
@@ -35,7 +56,7 @@ cmd extract ${{
printf "%s\n\t" "$fx"
printf "extract?[y/N]"
read ans
- [ $ans = "y" ] && ext $fx
+ [ $ans = "y" ] && aunpack $fx
}}
cmd delete ${{
@@ -51,7 +72,7 @@ cmd moveto ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
clear; echo "Move to where?"
- dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|' )" &&
+ dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
for x in $fx; do
eval mv -iv \"$x\" \"$dest\"
done &&
@@ -62,7 +83,7 @@ cmd copyto ${{
clear; tput cup $(($(tput lines)/3)); tput bold
set -f
clear; echo "Copy to where?"
- dest="$(cut -d' ' -f2- ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|' )" &&
+ dest="$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed 's|~|$HOME|')" &&
for x in $fx; do
eval cp -ivr \"$x\" \"$dest\"
done &&
@@ -73,8 +94,8 @@ cmd setbg "$1"
cmd bulkrename $vidir
# Bindings
-map <c-f> $lf -remote "send $id select '$(fzf)'"
-map J $lf -remote "send $id cd $(cut -d' ' -f2 ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
+map <c-f> $lf -remote "send $id select \"$(fzf)\""
+map J $lf -remote "send $id cd $(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)"
map gh
map g top
map D delete
@@ -93,8 +114,8 @@ map O $mimeopen --ask $f
map A rename # at the very end
map c push A<c-u> # new rename
map I push A<c-a> # at the very beginning
-map i push A<a-b><a-b><a-f> # before extention
-map a push A<a-b> # after extention
+map i push A<a-b><a-b><a-f> # before extension
+map a push A<a-b> # after extension
map B bulkrename
map b $setbg $f
@@ -102,5 +123,9 @@ map <c-e> down
map <c-y> up
map V push :!nvim<space>
+map W $setsid -f $TERMINAL >/dev/null 2>&1
+
+map Y $printf "%s" "$fx" | xclip -selection clipboard
+
# Source Bookmarks
-source "~/.config/lf/shortcutrc" \ No newline at end of file
+source "~/.config/lf/shortcutrc"
diff --git a/.config/lf/scope b/.config/lf/scope
index 45f9f33..180c294 100755
--- a/.config/lf/scope
+++ b/.config/lf/scope
@@ -1,58 +1,44 @@
-#!/bin/bash
+#!/bin/sh
-set -C -f -u
-#IFS=$'\n'
-IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
-
-# ANSI color codes are supported.
-# STDIN is disabled, so interactive scripts won't work properly
-
-# This script is considered a configuration file and must be updated manually.
-
-# Meanings of exit codes:
-# code | meaning | action of ranger
-# -----+------------+-------------------------------------------
-# 0 | success | Display stdout as preview
-# 1 | no preview | Display no preview at all
-# 2 | plain text | Display the plain content of the file
-
-# Script arguments
-FILE_PATH="${1}" # Full path of the highlighted file
-HEIGHT="${2}"
+# File preview handler for lf.
-#FILE_EXTENSION="${FILE_PATH##*.}"
-#FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]')
-
-# Settings
-HIGHLIGHT_SIZE_MAX=262143 # 256KiB
-HIGHLIGHT_TABWIDTH=8
-HIGHLIGHT_STYLE='pablo'
+set -C -f
+IFS="$(printf '%b_' '\n')"; IFS="${IFS%_}"
+image() {
+ if [ -f "$1" ] && [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1; then
+ printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG"
+ else
+ mediainfo "$6"
+ fi
+}
-handle_mime() {
- local mimetype="${1}"
- case "${mimetype}" in
- text/html) w3m -dump "${FILE_PATH}" ;;
- text/troff) man ./ "${FILE_PATH}" | col -b ;;
- text/* | */xml)
- if [ "$( stat --printf='%s' -- "${FILE_PATH}" )" -gt "${HIGHLIGHT_SIZE_MAX}" ]; then
- exit 2
- fi
- if [ "$( tput colors )" -ge 256 ]; then
- local highlight_format='xterm256'
- else
- local highlight_format='ansi'
- fi
- highlight --replace-tabs="${HIGHLIGHT_TABWIDTH}" --out-format="${highlight_format}" \
- --style="${HIGHLIGHT_STYLE}" --force -- "${FILE_PATH}" ;;
- application/zip) atool --list -- "${FILE_PATH}" ;;
- image/*) chafa --fill=block --symbols=block -c 256 -s 80x"${HEIGHT}" "${FILE_PATH}" || exit 1;;
- video/* | audio/*|application/octet-stream) mediainfo "${FILE_PATH}" || exit 1;;
- */pdf) pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - ;;
- *opendocument*) odt2txt "${FILE_PATH}" ;;
- esac
+ifub() {
+ [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ] && command -V ueberzug >/dev/null 2>&1
}
-MIMETYPE="$( file --dereference --brief --mime-type -- "${FILE_PATH}" )"
-handle_mime "${MIMETYPE}"
+# Note that the cache file name is a function of file information, meaning if
+# an image appears in multiple places across the machine, it will not have to
+# be regenerated once seen.
+
+case "$(file --dereference --brief --mime-type -- "$1")" in
+ image/*) image "$1" "$2" "$3" "$4" "$5" "$1" ;;
+ text/html) lynx -width="$4" -display_charset=utf-8 -dump "$1" ;;
+ text/troff) man ./ "$1" | col -b ;;
+ text/* | */xml | application/json) bat --terminal-width "$(($4-2))" -f "$1" ;;
+ application/zip) atool --list -- "$1" ;;
+ audio/* | application/octet-stream) mediainfo "$1" || exit 1 ;;
+ video/* )
+ CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
+ [ ! -f "$CACHE" ] && ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
+ image "$CACHE" "$2" "$3" "$4" "$5" "$1"
+ ;;
+ */pdf)
+ CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
+ [ ! -f "$CACHE.jpg" ] && pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
+ image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
+ ;;
+ *opendocument*) odt2txt "$1" ;;
+ application/pgp-encrypted) gpg -d -- "$1" ;;
+esac
exit 1
diff --git a/.config/mpv/script_modules/mpvSockets b/.config/mpv/script_modules/mpvSockets
new file mode 160000
+Subproject be9b7ca84456466e54331bab59441ac207659c1
diff --git a/.config/mpv/scripts/modules.lua b/.config/mpv/scripts/modules.lua
index 37b69b3..703f372 100644
--- a/.config/mpv/scripts/modules.lua
+++ b/.config/mpv/scripts/modules.lua
@@ -1,3 +1,3 @@
-local mpv_scripts_dir_path = os.getenv("HOME") .. "/.config/mpv/scripts/"
-function load(relative_path) dofile(mpv_scripts_dir_path .. relative_path) end
+local mpv_config_dir_path = require("mp").command_native({"expand-path", "~~/"})
+function load(relative_path) dofile(mpv_config_dir_path .. "/script_modules/" .. relative_path) end
load("mpvSockets/mpvSockets.lua")
diff --git a/.config/mpv/scripts/mpvSockets b/.config/mpv/scripts/mpvSockets
deleted file mode 160000
-Subproject 8415a08d99a46213c918613cfe1e088071018db
diff --git a/.config/newsboat/config b/.config/newsboat/config
index 69d8960..b7a78da 100644
--- a/.config/newsboat/config
+++ b/.config/newsboat/config
@@ -32,7 +32,7 @@ color article white default bold
browser linkhandler
macro , open-in-browser
macro t set browser "qndl" ; open-in-browser ; set browser linkhandler
-macro a set browser "tsp youtube-dl --add-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
+macro a set browser "tsp yt-dlp --embed-metadata -xic -f bestaudio/best" ; open-in-browser ; set browser linkhandler
macro v set browser "setsid -f mpv" ; open-in-browser ; set browser linkhandler
macro w set browser "lynx" ; open-in-browser ; set browser linkhandler
macro d set browser "dmenuhandler" ; open-in-browser ; set browser linkhandler
diff --git a/.config/newsboat/urls b/.config/newsboat/urls
index 9a762a8..73a1f3e 100644
--- a/.config/newsboat/urls
+++ b/.config/newsboat/urls
@@ -1,4 +1,8 @@
https://lukesmith.xyz/rss.xml
-https://notrelated.libsyn.com/rss
+https://lindypress.net/rss
+https://notrelated.xyz/rss
https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "~Luke Smith (YouTube)"
+https://landchad.net/rss.xml
+https://based.cooking/index.xml
+https://artixlinux.org/feed.php "tech"
https://www.archlinux.org/feeds/news/ "tech"
diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim
index ce0db87..5707eae 100644
--- a/.config/nvim/init.vim
+++ b/.config/nvim/init.vim
@@ -14,7 +14,7 @@ Plug 'junegunn/goyo.vim'
Plug 'jreybert/vimagit'
Plug 'lukesmithxyz/vimling'
Plug 'vimwiki/vimwiki'
-Plug 'bling/vim-airline'
+Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-commentary'
Plug 'ap/vim-css-color'
call plug#end()
@@ -96,8 +96,8 @@ set noshowcmd
" Ensure files are read as what I want:
let g:vimwiki_ext2syntax = {'.Rmd': 'markdown', '.rmd': 'markdown','.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'}
- map <leader>v :VimwikiIndex
- let g:vimwiki_list = [{'path': '~/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
+ map <leader>v :VimwikiIndex<CR>
+ let g:vimwiki_list = [{'path': '~/.local/share/nvim/vimwiki', 'syntax': 'markdown', 'ext': '.md'}]
autocmd BufRead,BufNewFile /tmp/calcurse*,~/.calcurse/notes/* set filetype=markdown
autocmd BufRead,BufNewFile *.ms,*.me,*.mom,*.man set filetype=groff
autocmd BufRead,BufNewFile *.tex set filetype=tex
@@ -111,10 +111,12 @@ set noshowcmd
autocmd BufRead,BufNewFile /tmp/neomutt* map ZZ :Goyo\|x!<CR>
autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q!<CR>
-" Automatically deletes all trailing whitespace and newlines at end of file on save.
+" Automatically deletes all trailing whitespace and newlines at end of file on save. & reset cursor position
+ autocmd BufWritePre * let currPos = getpos(".")
autocmd BufWritePre * %s/\s\+$//e
autocmd BufWritePre * %s/\n\+\%$//e
autocmd BufWritePre *.[ch] %s/\%$/\r/e
+ autocmd BufWritePre * cal cursor(currPos[1], currPos[2])
" When shortcut files are updated, renew bash and ranger configs with new material:
autocmd BufWritePost bm-files,bm-dirs !shortcuts
@@ -130,7 +132,7 @@ if &diff
endif
" Function for toggling the bottom statusbar:
-let s:hidden_all = 1
+let s:hidden_all = 0
function! ToggleHiddenAll()
if s:hidden_all == 0
let s:hidden_all = 1
@@ -147,3 +149,8 @@ function! ToggleHiddenAll()
endif
endfunction
nnoremap <leader>h :call ToggleHiddenAll()<CR>
+" Load command shortcuts generated from bm-dirs and bm-files via shortcuts script.
+" Here leader is ";".
+" So ":vs ;cfz" will expand into ":vs /home/<user>/.config/zsh/.zshrc"
+" if typed fast without the timeout.
+source ~/.config/nvim/shortcuts.vim
diff --git a/.config/pinentry/preexec b/.config/pinentry/preexec
new file mode 100755
index 0000000..93603c7
--- /dev/null
+++ b/.config/pinentry/preexec
@@ -0,0 +1,5 @@
+#!/hint/sh
+
+# Define additional functionality for pinentry. For example
+test -e /usr/lib/libgcr-base-3.so.1 && exec /usr/bin/pinentry-gnome3 "$@"
+#test -e /usr/lib/libQt5Widgets.so.5 && exec /usr/bin/pinentry-qt "$@"
diff --git a/.config/pipewire/pipewire.conf b/.config/pipewire/pipewire.conf
new file mode 100644
index 0000000..ae5c76e
--- /dev/null
+++ b/.config/pipewire/pipewire.conf
@@ -0,0 +1,247 @@
+# Daemon config file for PipeWire version "0.3.40" #
+#
+# Copy and edit this file in /etc/pipewire for system-wide changes
+# or in ~/.config/pipewire for local changes.
+
+context.properties = {
+ ## Configure properties in the system.
+ #library.name.system = support/libspa-support
+ #context.data-loop.library.name.system = support/libspa-support
+ #support.dbus = true
+ #link.max-buffers = 64
+ link.max-buffers = 16 # version < 3 clients can't handle more
+ #mem.warn-mlock = false
+ #mem.allow-mlock = true
+ #mem.mlock-all = false
+ #clock.power-of-two-quantum = true
+ #log.level = 2
+ #cpu.zero.denormals = true
+
+ core.daemon = true # listening for socket connections
+ core.name = pipewire-0 # core name and socket name
+
+ ## Properties for the DSP configuration.
+ #default.clock.rate = 48000
+ #default.clock.allowed-rates = [ 48000 ]
+ #default.clock.quantum = 1024
+ #default.clock.min-quantum = 32
+ #default.clock.max-quantum = 8192
+ #default.video.width = 640
+ #default.video.height = 480
+ #default.video.rate.num = 25
+ #default.video.rate.denom = 1
+ #
+ # These overrides are only applied when running in a vm.
+ vm.overrides = {
+ default.clock.min-quantum = 1024
+ }
+}
+
+context.spa-libs = {
+ #<factory-name regex> = <library-name>
+ #
+ # Used to find spa factory names. It maps an spa factory name
+ # regular expression to a library name that should contain
+ # that factory.
+ #
+ audio.convert.* = audioconvert/libspa-audioconvert
+ api.alsa.* = alsa/libspa-alsa
+ api.v4l2.* = v4l2/libspa-v4l2
+ api.libcamera.* = libcamera/libspa-libcamera
+ api.bluez5.* = bluez5/libspa-bluez5
+ api.vulkan.* = vulkan/libspa-vulkan
+ api.jack.* = jack/libspa-jack
+ support.* = support/libspa-support
+ #videotestsrc = videotestsrc/libspa-videotestsrc
+ #audiotestsrc = audiotestsrc/libspa-audiotestsrc
+}
+
+context.modules = [
+ #{ name = <module-name>
+ # [ args = { <key> = <value> ... } ]
+ # [ flags = [ [ ifexists ] [ nofail ] ]
+ #}
+ #
+ # Loads a module with the given parameters.
+ # If ifexists is given, the module is ignored when it is not found.
+ # If nofail is given, module initialization failures are ignored.
+ #
+
+ # Uses RTKit to boost the data thread priority.
+ { name = libpipewire-module-rtkit
+ args = {
+ #nice.level = -11
+ #rt.prio = 88
+ #rt.time.soft = 2000000
+ #rt.time.hard = 2000000
+ }
+ flags = [ ifexists nofail ]
+ }
+
+ # Set thread priorities without using RTKit.
+ #{ name = libpipewire-module-rt
+ # args = {
+ # nice.level = -11
+ # rt.prio = 88
+ # rt.time.soft = 2000000
+ # rt.time.hard = 2000000
+ # }
+ # flags = [ ifexists nofail ]
+ #}
+
+ # The native communication protocol.
+ { name = libpipewire-module-protocol-native }
+
+ # The profile module. Allows application to access profiler
+ # and performance data. It provides an interface that is used
+ # by pw-top and pw-profiler.
+ { name = libpipewire-module-profiler }
+
+ # Allows applications to create metadata objects. It creates
+ # a factory for Metadata objects.
+ { name = libpipewire-module-metadata }
+
+ # Creates a factory for making devices that run in the
+ # context of the PipeWire server.
+ { name = libpipewire-module-spa-device-factory }
+
+ # Creates a factory for making nodes that run in the
+ # context of the PipeWire server.
+ { name = libpipewire-module-spa-node-factory }
+
+ # Allows creating nodes that run in the context of the
+ # client. Is used by all clients that want to provide
+ # data to PipeWire.
+ { name = libpipewire-module-client-node }
+
+ # Allows creating devices that run in the context of the
+ # client. Is used by the session manager.
+ { name = libpipewire-module-client-device }
+
+ # The portal module monitors the PID of the portal process
+ # and tags connections with the same PID as portal
+ # connections.
+ { name = libpipewire-module-portal
+ flags = [ ifexists nofail ]
+ }
+
+ # The access module can perform access checks and block
+ # new clients.
+ { name = libpipewire-module-access
+ args = {
+ # access.allowed to list an array of paths of allowed
+ # apps.
+ #access.allowed = [
+ # /usr/bin/pipewire-media-session
+ #]
+
+ # An array of rejected paths.
+ #access.rejected = [ ]
+
+ # An array of paths with restricted access.
+ #access.restricted = [ ]
+
+ # Anything not in the above lists gets assigned the
+ # access.force permission.
+ #access.force = flatpak
+ }
+ }
+
+ # Makes a factory for wrapping nodes in an adapter with a
+ # converter and resampler.
+ { name = libpipewire-module-adapter }
+
+ # Makes a factory for creating links between ports.
+ { name = libpipewire-module-link-factory }
+
+ # Provides factories to make session manager objects.
+ { name = libpipewire-module-session-manager }
+]
+
+context.objects = [
+ #{ factory = <factory-name>
+ # [ args = { <key> = <value> ... } ]
+ # [ flags = [ [ nofail ] ]
+ #}
+ #
+ # Creates an object from a PipeWire factory with the given parameters.
+ # If nofail is given, errors are ignored (and no object is created).
+ #
+ #{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
+ #{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
+ #{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
+ #{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
+ #{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } }
+ #{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
+
+ # A default dummy driver. This handles nodes marked with the "node.always-driver"
+ # property when no other driver is currently active. JACK clients need this.
+ { factory = spa-node-factory
+ args = {
+ factory.name = support.node.driver
+ node.name = Dummy-Driver
+ node.group = pipewire.dummy
+ priority.driver = 20000
+ }
+ }
+ { factory = spa-node-factory
+ args = {
+ factory.name = support.node.driver
+ node.name = Freewheel-Driver
+ priority.driver = 19000
+ node.group = pipewire.freewheel
+ node.freewheel = true
+ }
+ }
+ # This creates a new Source node. It will have input ports
+ # that you can link, to provide audio for this source.
+ #{ factory = adapter
+ # args = {
+ # factory.name = support.null-audio-sink
+ # node.name = "my-mic"
+ # node.description = "Microphone"
+ # media.class = "Audio/Source/Virtual"
+ # audio.position = "FL,FR"
+ # }
+ #}
+
+ # This creates a single PCM source device for the given
+ # alsa device path hw:0. You can change source to sink
+ # to make a sink in the same way.
+ #{ factory = adapter
+ # args = {
+ # factory.name = api.alsa.pcm.source
+ # node.name = "alsa-source"
+ # node.description = "PCM Source"
+ # media.class = "Audio/Source"
+ # api.alsa.path = "hw:0"
+ # api.alsa.period-size = 1024
+ # api.alsa.headroom = 0
+ # api.alsa.disable-mmap = false
+ # api.alsa.disable-batch = false
+ # audio.format = "S16LE"
+ # audio.rate = 48000
+ # audio.channels = 2
+ # audio.position = "FL,FR"
+ # }
+ #}
+]
+
+context.exec = [
+ #{ path = <program-name> [ args = "<arguments>" ] }
+ #
+ # Execute the given program with arguments.
+ #
+ # You can optionally start the session manager here,
+ # but it is better to start it as a systemd service.
+ # Run the session manager with -h for options.
+ #
+ { path = "/usr/bin/pipewire-media-session" args = "" }
+ #
+ # You can optionally start the pulseaudio-server here as well
+ # but it is better to start it as a systemd service.
+ # It can be interesting to start another daemon here that listens
+ # on another address with the -a option (eg. -a tcp:4713).
+ #
+ { path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
+]
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
index 1f048ed..27d4527 100644
--- a/.config/shell/aliasrc
+++ b/.config/shell/aliasrc
@@ -7,9 +7,9 @@
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
# sudo not required for some system commands
-for x in mount umount sv pacman updatedb su ; do
- alias $x="sudo $x"
-done
+for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
+ alias $command="sudo $command"
+done; unset command
# Verbosity and settings that you pretty much just always are going to want.
alias \
@@ -18,7 +18,7 @@ alias \
rm="rm -vI" \
bc="bc -ql" \
mkd="mkdir -pv" \
- yt="youtube-dl --add-metadata -i" \
+ yt="yt-dlp --embed-metadata -i" \
yta="yt -x -f bestaudio/best" \
ffmpeg="ffmpeg -hide_banner"
@@ -27,7 +27,8 @@ alias \
ls="ls -hN --color=auto --group-directories-first" \
grep="grep --color=auto" \
diff="diff --color=auto" \
- ccat="highlight --out-format=ansi"
+ ccat="highlight --out-format=ansi" \
+ ip="ip -color=auto"
# These common commands are just too long! Abbreviate them.
alias \
@@ -35,16 +36,17 @@ alias \
g="git" \
trem="transmission-remote" \
YT="youtube-viewer" \
- sdn="sudo shutdown -h now" \
+ sdn="shutdown -h now" \
e="$EDITOR" \
v="$EDITOR" \
- p="sudo pacman" \
+ p="pacman" \
xi="sudo xbps-install" \
xr="sudo xbps-remove -R" \
xq="xbps-query" \
z="zathura"
alias \
+ lf="lfub" \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
diff --git a/.config/shell/bm-dirs b/.config/shell/bm-dirs
index b3807cd..9d212ec 100644
--- a/.config/shell/bm-dirs
+++ b/.config/shell/bm-dirs
@@ -4,6 +4,7 @@ cf ${XDG_CONFIG_HOME:-$HOME/.config}
D ${XDG_DOWNLOAD_DIR:-$HOME/Downloads}
d ${XDG_DOCUMENTS_DIR:-$HOME/Documents}
dt ${XDG_DATA_HOME:-$HOME/.local/share}
+rr $HOME/.local/src
h $HOME
m ${XDG_MUSIC_DIR:-$HOME/Music}
mn /mnt
diff --git a/.config/sxiv/exec/key-handler b/.config/sxiv/exec/key-handler
index 3d9565f..4a4f10a 100755
--- a/.config/sxiv/exec/key-handler
+++ b/.config/sxiv/exec/key-handler
@@ -1,15 +1,15 @@
#!/bin/sh
-while read file
+while read -r file
do
case "$1" in
"w") setbg "$file" & ;;
"c")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Copy file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
cp "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file copied to $destdir." &
;;
"m")
- [ -z "$destdir" ] && destdir="$(sed "s/\s.*#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
+ [ -z "$destdir" ] && destdir="$(sed "s/#.*$//;/^\s*$/d" ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | awk '{print $2}' | dmenu -l 20 -i -p "Move file(s) to where?" | sed "s|~|$HOME|g")"
[ ! -d "$destdir" ] && notify-send "$destdir is not a directory, cancelled." && exit
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
@@ -20,7 +20,7 @@ do
"f")
convert -flop "$file" "$file" ;;
"y")
- echo -n "$file" | tr -d '\n' | xclip -selection clipboard &&
+ printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;;
"Y")
readlink -f "$file" | tr -d '\n' | xclip -selection clipboard &&
diff --git a/.config/wal/postrun b/.config/wal/postrun
index 74d551b..61d8a41 100755
--- a/.config/wal/postrun
+++ b/.config/wal/postrun
@@ -1,11 +1,17 @@
#!/bin/bash
-source "${HOME}/.cache/wal/colors.sh"
+dunstconf="${XDG_CONFIG_HOME:-$HOME/.config}/dunst/dunstrc"
+zathuraconf="${XDG_CONFIG_HOME:-$HOME/.config}/zathura/zathurarc"
-mkdir -p "${HOME}/.config/dunst"
-mkdir -p "${HOME}/.config/zathura"
-ln -sf "${HOME}/.cache/wal/dunstrc" "${HOME}/.config/dunst/dunstrc"
-ln -sf "${HOME}/.cache/wal/zathurarc" "${HOME}/.config/zathura/zathurarc"
+source "${XDG_CACHE_HOME:-$HOME/.cache}/wal/colors.sh"
+
+mkdir -p "${dunstconf%/*}" "${zathuraconf%/*}"
+
+mv -n "$dunstconf" "$dunstconf.bak"
+mv -n "$zathuraconf" "$zathuraconf.bak"
+
+ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/dunstrc" "$dunstconf"
+ln -sf "${XDG_CACHE_HOME:-$HOME/.cache}/wal/zathurarc" "$zathuraconf"
fix_sequences() {
e=$'\e'
@@ -14,14 +20,13 @@ fix_sequences() {
background_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]11[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
cursor_color="$(echo -e "${sequences}\c" | grep --color=never -Eo "${e}]12[^${e}\\\\]*?${e}\\\\" | grep --color=never -Eo "#[0-9A-Fa-f]{6}")"
-for term in /dev/pts/{0..9}*
-do
-echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null
-echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null
-echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null
-done
+ for term in /dev/pts/{0..9}*; do
+ echo -e "\e]4;256;${cursor_color}\a\c" > "${term}" 2>/dev/null
+ echo -e "\e]4;258;${background_color}\a\c" > "${term}" 2>/dev/null
+ echo -e "\e]4;259;${foreground_color}\a\c" > "${term}" 2>/dev/null
+ done
}
-fix_sequences <"${HOME}/.cache/wal/sequences"
+fix_sequences <"${XDG_CACHE_HOME:-$HOME/.cache}/wal/sequences"
-pkill dunst; dunst &
+pkill dunst; setsid -f dunst
diff --git a/.config/wal/templates/dunstrc b/.config/wal/templates/dunstrc
index 9a62500..5a2e020 100644
--- a/.config/wal/templates/dunstrc
+++ b/.config/wal/templates/dunstrc
@@ -1,152 +1,27 @@
[global]
monitor = 0
follow = keyboard
- geometry = "350x5-0+24"
- indicate_hidden = yes
- shrink = yes
- transparency = 20
- notification_height = 0
- separator_height = 2
- padding = 0
- horizontal_padding = 8
- frame_width = 3
- frame_color = "{color4}"
-
- # Define a color for the separator.
- # possible values are:
- # * auto: dunst tries to find a color fitting to the background;
- # * foreground: use the same color as the foreground;
- # * frame: use the same color as the frame;
- # * anything else will be interpreted as a X color.
- separator_color = frame
-
- # Sort messages by urgency.
- sort = yes
-
- idle_threshold = 120
- font = Monospace 14
- line_height = 0
- markup = full
-
- # The format of the message. Possible variables are:
- # %a appname
- # %s summary
- # %b body
- # %i iconname (including its path)
- # %I iconname (without its path)
- # %p progress value if set ([ 0%] to [100%]) or nothing
- # %n progress value if set without any extra characters
- # %% Literal %
- # Markup is allowed
+ width = 370
+ height = 350
+ offset = 0x19
+ padding = 2
+ horizontal_padding = 2
+ transparency = 25
+ font = Monospace 12
format = "<b>%s</b>\n%b"
- alignment = left
- show_age_threshold = 60
- word_wrap = yes
- ellipsize = middle
- ignore_newline = no
- stack_duplicates = true
- hide_duplicate_count = true
- show_indicators = yes
- icon_position = left
- max_icon_size = 40
- #icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/:/usr/share/icons/Adwaita/256x256/status/
- sticky_history = yes
- history_length = 20
- dmenu = /usr/bin/dmenu -p dunst:
- browser = /usr/bin/firefox -new-tab
-
- # Always run rule-defined scripts, even if the notification is suppressed
- always_run_script = true
-
- title = Dunst
- class = Dunst
- startup_notification = false
- force_xinerama = false
-[experimental]
- per_monitor_dpi = false
-
-[shortcuts]
- close = ctrl+space
- close_all = ctrl+shift+space
- history = ctrl+grave
- context = ctrl+shift+period
-
[urgency_low]
- # IMPORTANT: colors have to be defined in quotation marks.
- # Otherwise the "#" and following would be interpreted as a comment.
- background = "{background}"
- foreground = "{foreground}"
- timeout = 5
- # Icon for notifications with low urgency, uncomment to enable
- #icon = /path/to/icon
+ background = "{color0}" # color0
+ foreground = "{color8}" # color8
+ timeout = 3
[urgency_normal]
- background = "{background}"
- foreground = "{foreground}"
+ foreground = "{color15}" # color15
+ background = "{color4}" # color4
timeout = 5
[urgency_critical]
- background = "{background}"
- foreground = "{foreground}"
- frame_color = "#fabd2f"
- timeout = 0
-
-# Every section that isn't one of the above is interpreted as a rules to
-# override settings for certain messages.
-# Messages can be matched by "appname", "summary", "body", "icon", "category",
-# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
-# "background", "new_icon" and "format".
-# Shell-like globbing will get expanded.
-#
-# SCRIPTING
-# You can specify a script that gets run when the rule matches by
-# setting the "script" option.
-# The script will be called as follows:
-# script appname summary body icon urgency
-# where urgency can be "LOW", "NORMAL" or "CRITICAL".
-#
-# NOTE: if you don't want a notification to be displayed, set the format
-# to "".
-# NOTE: It might be helpful to run dunst -print in a terminal in order
-# to find fitting options for rules.
-
-#[espeak]
-# summary = "*"
-# script = dunst_espeak.sh
-
-#[script-test]
-# summary = "*script*"
-# script = dunst_test.sh
-
-#[ignore]
-# # This notification will not be displayed
-# summary = "foobar"
-# format = ""
-
-#[history-ignore]
-# # This notification will not be saved in history
-# summary = "foobar"
-# history_ignore = yes
-
-#[signed_on]
-# appname = Pidgin
-# summary = "*signed on*"
-# urgency = low
-#
-#[signed_off]
-# appname = Pidgin
-# summary = *signed off*
-# urgency = low
-#
-#[says]
-# appname = Pidgin
-# summary = *says*
-# urgency = critical
-#
-#[twitter]
-# appname = Pidgin
-# summary = *twitter.com*
-# urgency = normal
-#
-# vim: ft=cfg
+ background = "{color1}" # color1
+ foreground = "{color15}" # color15
+ frame_color = "{color11}" # color11
+ timeout = 10
diff --git a/.config/x11/xprofile b/.config/x11/xprofile
index f7182e1..0e22628 100755
--- a/.config/x11/xprofile
+++ b/.config/x11/xprofile
@@ -3,18 +3,16 @@
# This file runs when a DM logs you into a graphical session.
# If you use startx/xinit like a Chad, this file will also be sourced.
+xrandr --dpi 96 # Set DPI. User may want to use a larger number for larger screens.
setbg & # set the background with the `setbg` script
-#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & # Uncomment to use Xresources colors/settings on startup
-mpd & # music player daemon-you might prefer it as a service though
+#xrdb ${XDG_CONFIG_HOME:-$HOME/.config}/x11/xresources & xrdbpid=$! # Uncomment to use Xresources colors/settings on startup
remaps & # run the remaps script, switching caps/esc and more; check it for more info
-xcompmgr & # xcompmgr for transparency
-dunst & # dunst for notifications
-xset r rate 300 50 & # Speed xrate up
-unclutter & # Remove mouse when idle
-# This line autostarts an instance of Pulseaudio that does not exit on idle.
-# This is "necessary" on Artix due to a current bug between PA and
-# Chromium-based browsers where they fail to start PA and use dummy output.
-pidof -s runit &&
- ! pidof -s pulseaudio >/dev/null 2>&1 &&
- setsid -f pulseaudio --start --exit-idle-time=-1 >/dev/null 2>&1
+autostart="mpd xcompmgr dunst unclutter pipewire"
+
+for program in $autostart; do
+ pidof -s "$program" || "$program" &
+done >/dev/null 2>&1
+
+# Ensure that xrdb has finished running before moving on to start the WM/DE.
+[ -n "$xrdbpid" ] && wait "$xrdbpid"
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc
index 22a166e..7e96734 100644
--- a/.config/zsh/.zshrc
+++ b/.config/zsh/.zshrc
@@ -10,7 +10,7 @@ setopt interactive_comments
# History in cache directory:
HISTSIZE=10000000
SAVEHIST=10000000
-HISTFILE=~/.cache/zsh/history
+HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
# Load aliases and shortcuts if existent.
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
@@ -53,25 +53,28 @@ preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
# Use lf to switch directories and bind it to ctrl-o
lfcd () {
- tmp="$(mktemp)"
+ tmp="$(mktemp -uq)"
+ trap 'rm -f $tmp >/dev/null 2>&1' HUP INT QUIT TERM PWR EXIT
lf -last-dir-path="$tmp" "$@"
if [ -f "$tmp" ]; then
dir="$(cat "$tmp")"
- rm -f "$tmp" >/dev/null
[ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
fi
}
-bindkey -s '^o' 'lfcd\n'
+bindkey -s '^o' '^ulfcd\n'
-bindkey -s '^a' 'bc -lq\n'
+bindkey -s '^a' '^ubc -lq\n'
-bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'
+bindkey -s '^f' '^ucd "$(dirname "$(fzf)")"\n'
bindkey '^[[P' delete-char
# Edit line in vim with ctrl-e:
autoload edit-command-line; zle -N edit-command-line
bindkey '^e' edit-command-line
+bindkey -M vicmd '^[[P' vi-delete-char
+bindkey -M vicmd '^e' edit-command-line
+bindkey -M visual '^[[P' vi-delete
# Load syntax highlighting; should be last.
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null