From 7ec75c020aa46e2107c5c3bce96ce7ce83d56fc8 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Tue, 8 Jul 2025 21:27:56 -0400 Subject: Use C-; for tmux term --- tmux/.config/tmux/key-remappings.tmux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmux/.config/tmux/key-remappings.tmux b/tmux/.config/tmux/key-remappings.tmux index d7dfa8d..323c89f 100644 --- a/tmux/.config/tmux/key-remappings.tmux +++ b/tmux/.config/tmux/key-remappings.tmux @@ -18,6 +18,6 @@ bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "Config reloa bind-key x kill-pane # Add key bindings for toggling terminal windows -bind-key -n 'C-\\' run-shell -b "${HOME}/bin/tmux-toggle-term" +bind-key -n 'C-;' run-shell -b "${HOME}/bin/tmux-toggle-term" bind-key -n 'C-f' run-shell -b "${HOME}/bin/tmux-toggle-term float" -- cgit v1.2.3 From 6d02c6da38bdad037b931289f4af3f31bbfb1272 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 16 Jul 2025 19:45:24 -0400 Subject: Add migrate to sourcehut script --- executables/bin/migrate-to-sourcehut | 76 ++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100755 executables/bin/migrate-to-sourcehut diff --git a/executables/bin/migrate-to-sourcehut b/executables/bin/migrate-to-sourcehut new file mode 100755 index 0000000..d7e471a --- /dev/null +++ b/executables/bin/migrate-to-sourcehut @@ -0,0 +1,76 @@ +#!/bin/bash +set -euo pipefail +set -x + +REPOS_DIR="$HOME/src/" +SOURCEHUT_USER="eugenetriguba" + +main() { + parse_args "$@" + + cd "$REPOS_DIR" + for repo in */; do + if [ -d "$repo/.git" ]; then + echo "Processing $repo..." + cd "$repo" + + if ! git remote | grep -q "^origin$"; then + echo "No origin remote found for $repo, skipping..." + cd .. + continue + fi + + if ! git remote get-url origin | grep -q "git.sr.ht"; then + echo "Migrating $repo to SourceHut..." + + local repo_name + repo_name=$(git remote get-url origin | cut -d '/' -f 2 | cut -d '.' -f 1) + git remote remove origin + git remote add origin "git@git.sr.ht:~${SOURCEHUT_USER}/${repo_name}" + + local current_branch + current_branch=$(git branch --show-current) + if [ "$current_branch" = "master" ]; then + echo "Renaming master branch to main..." + git branch -m master main + fi + + git push --push-option visiblity="private" -u origin main + git push origin main --tags + fi + + cd .. + fi + done +} + +parse_args() { + while [[ $# -gt 0 ]]; do + case "$1" in + --repos-dir) + REPOS_DIR="$2" + shift 2 + ;; + --sourcehut-user) + SOURCEHUT_USER="$2" + shift 2 + ;; + *) + echo "Usage: $0 [--repos-dir ] [--sourcehut-user ]" + exit 1 + ;; + esac + + if [[ -z "$REPOS_DIR" || ! -d "$REPOS_DIR" ]]; then + echo "Invalid or empty REPOS_DIR: $REPOS_DIR" + exit 1 + fi + + if [[ -z "$SOURCEHUT_USER" ]]; then + echo "SOURCEHUT_USER must be specified." + exit 1 + fi + done +} + +main "$@" -- cgit v1.2.3 From 05c6f3d4bff107935e32bde1c08909e5a0fb46c5 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 16 Jul 2025 21:27:28 -0400 Subject: Use tc --- nvim/.config/nvim/lua/plugins/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua index 36ddc99..c6aff39 100644 --- a/nvim/.config/nvim/lua/plugins/copilot.lua +++ b/nvim/.config/nvim/lua/plugins/copilot.lua @@ -21,7 +21,7 @@ return { require('CopilotChat').setup { model = 'claude-3.5-sonnet', } - vim.keymap.set('n', 'cc', function() + vim.keymap.set('n', 'tc', function() vim.cmd 'CopilotChatToggle' end, { desc = '[Copilot] Toggle Copilot Chat' }) end, -- cgit v1.2.3 From 036f9f40684c54a92c73bdca740f5ff16a368d38 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 16 Jul 2025 21:28:03 -0400 Subject: Use clang-format for c and cpp --- nvim/.config/nvim/lua/plugins/conform.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua index 1d4be80..c83ea3b 100644 --- a/nvim/.config/nvim/lua/plugins/conform.lua +++ b/nvim/.config/nvim/lua/plugins/conform.lua @@ -55,7 +55,7 @@ return { end -- Disable "format_on_save lsp_fallback" for certain languages. - local disable_filetypes = { sql = true, c = true, cpp = true } + local disable_filetypes = {} if disable_filetypes[vim.bo[bufnr].filetype] then return nil end @@ -78,6 +78,8 @@ return { htmldjango = { 'prettierd', 'prettier', stop_after_first = true }, html = { 'prettierd', 'prettier', stop_after_first = true }, sh = { 'shfmt' }, + cpp = { 'clang-format' }, + c = { 'clang-format' }, }, formatters = { isort = { -- cgit v1.2.3 From d648fba27d8381aea373d80b805d011ccd5ee554 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Wed, 16 Jul 2025 21:58:20 -0400 Subject: ADd get password script --- executables/bin/get-password | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 executables/bin/get-password diff --git a/executables/bin/get-password b/executables/bin/get-password new file mode 100755 index 0000000..ca13d93 --- /dev/null +++ b/executables/bin/get-password @@ -0,0 +1,36 @@ +#!/bin/sh +set -e + +VAULT="Private" +CREDENTIAL="" + +main() { + parse_args "$@" + op read "op://$VAULT/$CREDENTIAL/password" +} + +parse_args() { + while [ $# -gt 0 ]; do + case "$1" in + --vault) + VAULT="$2" + shift 2 + ;; + --credential) + CREDENTIAL="$2" + shift 2 + ;; + *) + echo "Usage: $0 [--vault ] --credential " + exit 1 + ;; + esac + done + + if [ -z "$CREDENTIAL" ]; then + echo "Invalid or empty CREDENTIAL" >&2 + exit 1 + fi +} + +main "$@" -- cgit v1.2.3 From 14be96d44a9a510c638f68f949c0eff8ab7bde58 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 14:01:57 -0400 Subject: Add aerc --- aerc/.config/aerc/accounts.conf | 19 + aerc/.config/aerc/aerc.conf | 866 ++++++++++++++++++++++++++++++++++++++++ aerc/.config/aerc/binds.conf | 186 +++++++++ install.sh | 1 + zsh/.zsh/env.sh | 5 + 5 files changed, 1077 insertions(+) create mode 100644 aerc/.config/aerc/accounts.conf create mode 100644 aerc/.config/aerc/aerc.conf create mode 100644 aerc/.config/aerc/binds.conf diff --git a/aerc/.config/aerc/accounts.conf b/aerc/.config/aerc/accounts.conf new file mode 100644 index 0000000..eb8d118 --- /dev/null +++ b/aerc/.config/aerc/accounts.conf @@ -0,0 +1,19 @@ +[Personal Gmail] +source = imaps://eugenetriguba%40gmail.com@imap.gmail.com:993 +outgoing = smtps://eugenetriguba%40gmail.com@smtp.gmail.com:587 +default = INBOX +from = Eugene Triguba +copy-to = ~/Documents/Email/Gmail +cache-headers = true +source-cred-cmd = get-password --credential "Personal Gmail - Sourcehut" +outgoing-cred-cmd = get-password --credential "Personal Gmail - Sourcehut" + +[Personal iCloud] +source = imaps://eugenetriguba%40gmail.com@imap.mail.me.com:993 +outgoing = smtps://eugenetriguba%40gmail.com@smtp.mail.me.com:587 +default = INBOX +from = Eugene Triguba +copy-to = ~/Documents/Email/iCloud +cache-headers = true +source-cred-cmd = get-password --credential "Personal iCloud - Sourcehut" +outgoing-cred-cmd = get-password --credential "Personal iCloud - Sourcehut" diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf new file mode 100644 index 0000000..3d48ec3 --- /dev/null +++ b/aerc/.config/aerc/aerc.conf @@ -0,0 +1,866 @@ +# +# aerc main configuration + +[general] +# +# Used as a default path for save operations if no other path is specified. +# ~ is expanded to the current user home dir. +# +#default-save-path= + +# If set to "gpg", aerc will use system gpg binary and keystore for all crypto +# operations. If set to "internal", the internal openpgp keyring will be used. +# If set to "auto", the system gpg will be preferred unless the internal +# keyring already exists, in which case the latter will be used. +# +# Default: auto +#pgp-provider=auto + +# By default, the file permissions of accounts.conf must be restrictive and +# only allow reading by the file owner (0600). Set this option to true to +# ignore this permission check. Use this with care as it may expose your +# credentials. +# +# Default: false +#unsafe-accounts-conf=false + +# Output log messages to specified file. A path starting with ~/ is expanded to +# the user home dir. When redirecting aerc's output to a file using > shell +# redirection, this setting is ignored and log messages are printed to stdout. +# +#log-file= + +# Only log messages above the specified level to log-file. Supported levels +# are: trace, debug, info, warn and error. When redirecting aerc's output to +# a file using > shell redirection, this setting is ignored and the log level +# is forced to trace. +# +# Default: info +#log-level=info + +# Disable IPC entirely. Don't run commands (including mailto:... and mbox:...) +# in an existing aerc instance, and don't start an IPC server to allow +# subsequent aerc instances to run commands in the current one. +# +# Default: false +#disable-ipc=false + +# Don't run mailto:... commands over IPC; start a new aerc instance with the +# composer instead. +# +# Default: false +#disable-ipc-mailto=false +# +# Don't run mbox:... commands over IPC; start a new aerc instance with the mbox +# file instead. +# +# Default: false +#disable-ipc-mbox=false + +# Set the $TERM environment variable used for the embedded terminal. +# +# Default: xterm-256color +#term=xterm-256color + +# Display OSC8 strings in the embedded terminal +# +# Default: false +#enable-osc8=false + +# Default shell command to use for :menu. This will be executed with sh -c and +# will run in an popover dialog. +# +# Any occurrence of %f will be replaced by a temporary file path where the +# command is expected to write output lines to be consumed by :menu. Otherwise, +# the lines will be read from the command's standard output. +# +# Examples: +# default-menu-cmd=fzf +# default-menu-cmd=fzf --multi +# default-menu-cmd=dmenu -l 20 +# default-menu-cmd=ranger --choosefiles=%f +# +#default-menu-cmd= + +[ui] +# +# Describes the format for each row in a mailbox view. This is a comma +# separated list of column names with an optional align and width suffix. After +# the column name, one of the '<' (left), ':' (center) or '>' (right) alignment +# characters can be added (by default, left) followed by an optional width +# specifier. The width is either an integer representing a fixed number of +# characters, or a percentage between 1% and 99% representing a fraction of the +# terminal width. It can also be one of the '*' (auto) or '=' (fit) special +# width specifiers. Auto width columns will be equally attributed the remaining +# terminal width. Fit width columns take the width of their contents. If no +# width specifier is set, '*' is used by default. +# +# Default: flags:4,name<20%,subject,date>= +#index-columns=flags:4,name<20%,subject,date>= + +# +# Each name in index-columns must have a corresponding column-$name setting. +# All column-$name settings accept golang text/template syntax. See +# aerc-templates(7) for available template attributes and functions. +# +# Here are some examples to show the To field instead of the From field for +# an email (modifying column-name): +# +# 1. a generic one +# column-name={{ .Peer | names | join ", " }} +# 2. based upon the selected folder +# column-name={{if match .Folder "^(Gesendet|Sent)$"}}{{index (.To | names) 0}}{{else}}{{index (.From | names) 0}}{{end}} +# +# Default settings +#column-flags={{.Flags | join ""}} +#column-name={{index (.From | names) 0}} +#column-subject={{.ThreadPrefix}}{{.Subject}} +#column-date={{.DateAutoFormat .Date.Local}} + +# +# String separator inserted between columns. When the column width specifier is +# an exact number of characters, the separator is added to it (i.e. the exact +# width will be fully available for the column contents). +# +# Default: " " +#column-separator=" " + +# +# See time.Time#Format at https://godoc.org/time#Time.Format +# +# Default: 2006 Jan 02 +#timestamp-format=2006 Jan 02 + +# +# Index-only time format for messages that were received/sent today. +# If this is empty, timestamp-format is used instead. +# +# Default: 15:04 +#this-day-time-format=15:04 + +# +# Index-only time format for messages that were received/sent within the last +# 7 days. If this is empty, timestamp-format is used instead. +# +# Default: Jan 02 +#this-week-time-format=Jan 02 + +# +# Index-only time format for messages that were received/sent this year. +# If this is empty, timestamp-format is used instead. +# +#Default: Jan 02 +#this-year-time-format=Jan 02 + +# +# Overrides timestamp-format for the message view. +# +# Default: 2006 Jan 02, 15:04 GMT-0700 +#message-view-timestamp-format=2006 Jan 02, 15:04 GMT-0700 + +# +# If set, overrides timestamp-format in the message view for messages +# that were received/sent today. +# +#message-view-this-day-time-format= + +# If set, overrides timestamp-format in the message view for messages +# that were received/sent within the last 7 days. +# +#message-view-this-week-time-format= + +# +# If set, overrides *timestamp-format* in the message view for messages +# that were received/sent this year. +# +#message-view-this-year-time-format= + +# +# Width of the sidebar, including the border. +# +# Default: 22 +#sidebar-width=22 + +# +# Default split layout for message list tabs. The syntax is: +# +# [] +# +# is optional and defaults to horizontal. It can take one +# of the following values: h, horiz, horizontal, v, vert, vertical. +# +# is a positive integer representing the size (in terminal cells) +# of the message list window. +# +#message-list-split= + +# +# Message to display when viewing an empty folder. +# +# Default: (no messages) +#empty-message=(no messages) + +# Message to display when no folders exists or are all filtered +# +# Default: (no folders) +#empty-dirlist=(no folders) +# +# Value to set {{.Subject}} template to when subject is empty. +# +# Default: (no subject) +#empty-subject=(no subject) + +# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel +# +# Default: false +#mouse-enabled=false + +# +# Ring the bell when new messages are received +# +# Default: true +#new-message-bell=true + +# +# Template to use for Account tab titles +# +# Default: {{.Account}} +#tab-title-account={{.Account}} + +# +# Template to use for Composer tab titles +# +# Default: {{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}} +#tab-title-composer={{if .To}}to:{{index (.To | shortmboxes) 0}} {{end}}{{.SubjectBase}} + +# +# Template to use for Message Viewer tab titles +# +# Default: {{.Subject}} +#tab-title-viewer={{.Subject}} + + +# Marker to show before a pinned tab's name. +# +# Default: ` +#pinned-tab-marker='`' + +# Template for the left side of the directory list. +# See aerc-templates(7) for all available fields and functions. +# +# Default: {{.Folder}} +#dirlist-left={{.Folder}} + +# Template for the right side of the directory list. +# See aerc-templates(7) for all available fields and functions. +# +# Default: {{if .Unread}}{{humanReadable .Unread}}{{end}} +#dirlist-right={{if .Unread}}{{humanReadable .Unread}}{{end}} + +# Delay after which the messages are actually listed when entering a directory. +# This avoids loading messages when skipping over folders and makes the UI more +# responsive. If you do not want that, set it to 0s. +# +# Default: 200ms +#dirlist-delay=200ms + +# Display the directory list as a foldable tree that allows to collapse and +# expand the folders. +# +# Default: false +#dirlist-tree=false + +# If dirlist-tree is enabled, set level at which folders are collapsed by +# default. Set to 0 to disable. +# +# Default: 0 +#dirlist-collapse=0 + +# List of space-separated criteria to sort the messages by, see *sort* +# command in *aerc*(1) for reference. Prefixing a criterion with "-r " +# reverses that criterion. +# +# Example: "from -r date" +# +#sort= + +# Moves to next message when the current message is deleted +# +# Default: true +#next-message-on-delete=true + +# Automatically set the "seen" flag when a message is opened in the message +# viewer. +# +# Default: true +#auto-mark-read=true + +# The directories where the stylesets are stored. It takes a colon-separated +# list of directories. If this is unset or if a styleset cannot be found, the +# following paths will be used as a fallback in that order: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/stylesets +# ${XDG_DATA_HOME:-~/.local/share}/aerc/stylesets +# /usr/local/share/aerc/stylesets +# /usr/share/aerc/stylesets +# +#stylesets-dirs= + +# Uncomment to use box-drawing characters for vertical and horizontal borders. +# +# Default: "│" and "─" +#border-char-vertical="│" +#border-char-horizontal="─" + +# Sets the styleset to use for the aerc ui elements. +# +# Default: default +#styleset-name=default + +# Activates fuzzy search in commands and their arguments: the typed string is +# searched in the command or option in any position, and need not be +# consecutive characters in the command or option. +# +# Default: false +#fuzzy-complete=false + +# How long to wait after the last input before auto-completion is triggered. +# +# Default: 250ms +#completion-delay=250ms + +# The minimum required characters to allow auto-completion to be triggered after +# completion-delay. +# +# Setting this to "manual" disables automatic completion, leaving only the +# manually triggered completion with the $complete key (see aerc-binds(5) for +# more details). +# +# Default: 1 +#completion-min-chars=1 + +# +# Global switch for completion popovers +# +# Default: true +#completion-popovers=true + +# Uncomment to use UTF-8 symbols to indicate PGP status of messages +# +# Default: ASCII +#icon-unencrypted= +#icon-encrypted=✔ +#icon-signed=✔ +#icon-signed-encrypted=✔ +#icon-unknown=✘ +#icon-invalid=⚠ + +# Reverses the order of the message list. By default, the message list is +# ordered with the newest (highest UID) message on top. Reversing the order +# will put the oldest (lowest UID) message on top. This can be useful in cases +# where the backend does not support sorting. +# +# Default: false +#reverse-msglist-order = false + +# Reverse display of the message threads. Default order is the initial +# message is on the top with all the replies being displayed below. The +# reverse option will put the initial message at the bottom with the +# replies on top. +# +# Default: false +#reverse-thread-order=false + +# Positions the cursor on the last message in the message list (at the +# bottom of the view) when opening a new folder. +# +# Default: false +#select-last-message=false + +# Sort the thread siblings according to the sort criteria for the messages. If +# sort-thread-siblings is false, the thread siblings will be sorted based on +# the message UID in ascending order. This option is only applicable for +# client-side threading with a backend that enables sorting. Note that there's +# a performance impact when sorting is activated. +# +# Default: false +#sort-thread-siblings=false + +# Set the scroll offset in number of lines from the top and bottom of the +# message list. +# +# Default: 0 +#msglist-scroll-offset = 0 + +# +# Enable a threaded view of messages. If this is not supported by the backend +# (IMAP server or notmuch), threads will be built by the client. +# +# Default: false +#threading-enabled=false + +# Force client-side thread building +# +# Default: false +#force-client-threads=false + +# If no References nor In-Reply-To headers can be matched to build client side +# threads, fallback to similar subjects. +# +# Default: false +#threading-by-subject=false + +# Show thread context enables messages which do not match the current query (or +# belong to the current mailbox) to be shown for context. These messages can be +# styled separately using "msglist_thread_context" in a styleset. This feature +# is not supported by all backends +# +# Default: false +#show-thread-context=false + +# Debounce client-side thread building +# +# Default: 50ms +#client-threads-delay=50ms + +# +# Thread prefix customization: + +# +# Customize the thread prefix appearance by selecting the arrow head. +# +# Default: ">" +#thread-prefix-tip = ">" + +# +# Customize the thread prefix appearance by selecting the arrow indentation. +# +# Default: " " +#thread-prefix-indent = " " + +# +# Customize the thread prefix appearance by selecting the vertical extension of +# the arrow. +# +# Default: "│" +#thread-prefix-stem = "│" + +# +# Customize the thread prefix appearance by selecting the horizontal extension +# of the arrow. +# +# Default: "" +#thread-prefix-limb = "" + +# +# Customize the thread prefix appearance by selecting the folded thread +# indicator. +# +# Default: "+" +#thread-prefix-folded = "+" + +# +# Customize the thread prefix appearance by selecting the unfolded thread +# indicator. +# +# Default: "" +#thread-prefix-unfolded = "" + +# +# Customize the thread prefix appearance by selecting the first child connector. +# +# Default: "" +#thread-prefix-first-child = "" + +# +# Customize the thread prefix appearance by selecting the connector used if +# the message has siblings. +# +# Default: "├─" +#thread-prefix-has-siblings = "├─" + +# +# Customize the thread prefix appearance by selecting the connector used if the +# message has no parents and no children. +# +# Default: "" +#thread-prefix-lone = "" + +# +# Customize the thread prefix appearance by selecting the connector used if the +# message has no parents and has children. +# +# Default: "" +#thread-prefix-orphan = "" + +# +# Customize the thread prefix appearance by selecting the connector for the last +# sibling. +# +# Default: "└─" +#thread-prefix-last-sibling = "└─" + +# +# Customize the reversed thread prefix appearance by selecting the connector for +# the last sibling. +# +# Default: "┌─" +#thread-prefix-last-sibling-reverse = "┌─" + +# +# Customize the thread prefix appearance by selecting the connector for dummy +# thread. +# +# Default: "┬─" +#thread-prefix-dummy = "┬─" + +# +# Customize the reversed thread prefix appearance by selecting the connector for +# dummy thread. +# +# Default: "┴─" +#thread-prefix-dummy-reverse = "┴─" + +# +# Customize the reversed thread prefix appearance by selecting the first child +# connector. +# +# Default: "" +#thread-prefix-first-child-reverse = "" + +# +# Customize the reversed thread prefix appearance by selecting the connector +# used if the message has no parents and has children. +# +# Default: "" +#thread-prefix-orphan-reverse = "" + +[statusline] +# +# Describes the format for the status line. This is a comma separated list of +# column names with an optional align and width suffix. See [ui].index-columns +# for more details. To completely mute the status line except for push +# notifications, explicitly set status-columns to an empty string. +# +# Default: left<*,center:=,right>* +#status-columns=left<*,center:=,right>* + +# +# Each name in status-columns must have a corresponding column-$name setting. +# All column-$name settings accept golang text/template syntax. See +# aerc-templates(7) for available template attributes and functions. +# +# Default settings +#column-left=[{{.Account}}] {{.StatusInfo}} +#column-center={{.PendingKeys}} +#column-right={{.TrayInfo}} | {{cwd}} + +# +# String separator inserted between columns. +# See [ui].column-separator for more details. +# +#column-separator=" " + +# Specifies the separator between grouped statusline elements. +# +# Default: " | " +#separator=" | " + +# Defines the mode for displaying the status elements. +# Options: text, icon +# +# Default: text +#display-mode=text + +[viewer] +# +# Specifies the pager to use when displaying emails. Note that some filters +# may add ANSI codes to add color to rendered emails, so you may want to use a +# pager which supports ANSI codes. +# +# Default: less -Rc +#pager=less -Rc + +# +# If an email offers several versions (multipart), you can configure which +# mimetype to prefer. For example, this can be used to prefer plaintext over +# html emails. +# +# Default: text/plain,text/html +#alternatives=text/plain,text/html + +# +# Default setting to determine whether to show full headers or only parsed +# ones in message viewer. +# +# Default: false +#show-headers=false + +# +# Layout of headers when viewing a message. To display multiple headers in the +# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if +# none of their specified headers are present in the message. +# +# Default: From|To,Cc|Bcc,Date,Subject +#header-layout=From|To,Cc|Bcc,Date,Subject + +# Whether to always show the mimetype of an email, even when it is just a single part +# +# Default: false +#always-show-mime=false + +# Define the maximum height of the mimetype switcher before a scrollbar is used. +# The height of the mimetype switcher is restricted to half of the display +# height. If the provided value for the height is zero, the number of parts will +# be used as the height of the type switcher. +# +# Default: 0 +#max-mime-height = 0 + +# Parses and extracts http links when viewing a message. Links can then be +# accessed with the open-link command. +# +# Default: true +#parse-http-links=true + +[compose] +# +# Specifies the command to run the editor with. It will be shown in an embedded +# terminal, though it may also launch a graphical window if the environment +# supports it. Defaults to $EDITOR, or vi. +#editor= + +# +# When set, aerc will create and read .eml files for composing that have +# non-standard \n linebreaks. This is only relevant if the used editor does not +# support CRLF linebreaks. +# +#lf-editor=false + +# +# Default header fields to display when composing a message. To display +# multiple headers in the same row, separate them with a pipe, e.g. "To|From". +# +# Default: To|From,Subject +#header-layout=To|From,Subject + +# +# Edit headers into the text editor instead than separate fields. +# +# When this is true, address-book-cmd is not supported and address completion +# is left to the editor itself. Also, displaying multiple headers on the same +# line is not possible. +# +# Default: false +#edit-headers=false + +# +# Sets focus to the email body when the composer window opens. +# +# Default: false +#focus-body=false + +# +# Specifies the command to be used to tab-complete email addresses. Any +# occurrence of "%s" in the address-book-cmd will be replaced with what the +# user has typed so far. +# +# The command must output the completions to standard output, one completion +# per line. Each line must be tab-delimited, with an email address occurring as +# the first field. Only the email address field is required. The second field, +# if present, will be treated as the contact name. Additional fields are +# ignored. +# +# This parameter can also be set per account in accounts.conf. +#address-book-cmd= + +# Specifies the command to be used to select attachments. Any occurrence of +# '%s' in the file-picker-cmd will be replaced with the argument +# to :attach -m . Any occurrence of '%f' will be replaced by the +# location of a temporary file, from which aerc will read the selected files. +# +# If '%f' is not present, the command must output the selected files to +# standard output, one file per line. If it is present, then aerc does not +# capture the standard output and instead reads the files from the temporary +# file which should have the same format. +#file-picker-cmd= + +# +# Allow to address yourself when replying +# +# Default: true +#reply-to-self=true + +# Warn before sending an email with an empty subject. +# +# Default: false +#empty-subject-warning=false + +# +# Warn before sending an email that matches the specified regexp but does not +# have any attachments. Leave empty to disable this feature. +# +# Uses Go's regexp syntax, documented at https://golang.org/s/re2syntax. The +# "(?im)" flags are set by default (case-insensitive and multi-line). +# +# Example: +# no-attachment-warning=^[^>]*attach(ed|ment) +# +#no-attachment-warning= + +# +# When set, aerc will generate "format=flowed" bodies with a content type of +# "text/plain; format=flowed" as described in RFC3676. This format is easier to +# handle for some mailing software, and generally just looks like ordinary +# text. To actually make use of this format's features, you'll need support in +# your editor. +# +#format-flowed=false + +[multipart-converters] +# +# Converters allow to generate multipart/alternative messages by converting the +# main text/plain part into any other MIME type. Only exact MIME types are +# accepted. The commands are invoked with sh -c and are expected to output +# valid UTF-8 text. +# +# Example (obviously, this requires that you write your main text/plain body +# using the markdown syntax): +#text/html=pandoc -f markdown -t html --standalone + +[filters] +# +# Filters allow you to pipe an email body through a shell command to render +# certain emails differently, e.g. highlighting them with ANSI escape codes. +# +# The commands are invoked with sh -c. The following folders are prepended to +# the system $PATH to allow referencing filters from their name only: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/filters +# ~/.local/libexec/aerc/filters +# ${XDG_DATA_HOME:-~/.local/share}/aerc/filters +# $PREFIX/libexec/aerc/filters +# $PREFIX/share/aerc/filters +# /usr/libexec/aerc/filters +# /usr/share/aerc/filters +# +# If you want to run a program in your default $PATH which has the same name +# as a builtin filter (e.g. /usr/bin/colorize), use its absolute path. +# +# The following variables are defined in the filter command environment: +# +# AERC_MIME_TYPE the part MIME type/subtype +# AERC_FORMAT the part content type format= parameter +# AERC_FILENAME the attachment filename (if any) +# AERC_SUBJECT the message Subject header value +# AERC_FROM the message From header value +# +# The first filter which matches the email's mimetype will be used, so order +# them from most to least specific. +# +# You can also match on non-mimetypes, by prefixing with the header to match +# against (non-case-sensitive) and a comma, e.g. subject,text will match a +# subject which contains "text". Use header,~regex to match against a regex. +# +text/plain=colorize +text/calendar=calendar +message/delivery-status=colorize +message/rfc822=colorize +#text/html=pandoc -f html -t plain | colorize +#text/html=! html +text/html=! w3m -T text/html -I UTF-8 +#text/*=bat -fP --file-name="$AERC_FILENAME" +#application/x-sh=bat -fP -l sh +#image/*=catimg -w $(tput cols) - +#subject,~Git(hub|lab)=lolcat -f +#from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize + +# This special filter is only used to post-process email headers when +# [viewer].show-headers=true +# By default, headers are piped directly into the pager. +# +.headers=colorize + +[openers] +# +# Openers allow you to specify the command to use for the :open and :open-link +# actions on a per-MIME-type basis. The :open-link URL scheme is used to +# determine the MIME type as follows: x-scheme-handler/. +# +# {} is expanded as the temporary filename or URL to be opened with proper +# shell quoting. If it is not encountered in the command, the filename/URL will +# be appended to the end of the command. The command will then be executed with +# `sh -c`. +# +# Like [filters], openers support basic shell globbing. The first opener which +# matches the part's MIME type (or URL scheme handler MIME type) will be used, +# so order them from most to least specific. +# +# Examples: +# x-scheme-handler/irc=hexchat +# x-scheme-handler/http*=printf '%s' {} | wl-copy +# text/html=surf -dfgms +# text/plain=gvim {} +125 +# message/rfc822=thunderbird + +[hooks] +# +# Hooks are triggered whenever the associated event occurs. + +# +# Executed when a new email arrives in the selected folder +#mail-received=notify-send "[$AERC_ACCOUNT/$AERC_FOLDER] New mail from $AERC_FROM_NAME" "$AERC_SUBJECT" + +# +# Executed when mail is deleted from a folder +#mail-deleted=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +# +# Executed when aerc adds mail to a folder +#mail-added=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +# +# Executed when aerc starts +#aerc-startup=aerc :terminal calcurse && aerc :next-tab + +# +# Executed when aerc shuts down. +#aerc-shutdown= + +# +# Executed when notmuch tags are modified. +#tag-modified= + +# +# Executed when flags are changed on a message. +#flag-changed=mbsync "$AERC_ACCOUNT:$AERC_FOLDER" & + +[templates] +# Templates are used to populate email bodies automatically. +# + +# The directories where the templates are stored. It takes a colon-separated +# list of directories. If this is unset or if a template cannot be found, the +# following paths will be used as a fallback in that order: +# +# ${XDG_CONFIG_HOME:-~/.config}/aerc/templates +# ${XDG_DATA_HOME:-~/.local/share}/aerc/templates +# /usr/local/share/aerc/templates +# /usr/share/aerc/templates +# +#template-dirs= + +# The default template to be used for new messages. +# +# default: new_message +#new-message=new_message + +# The default template to be used for quoted replies. +# +# default: quoted_reply +#quoted-reply=quoted_reply + +# The default template to be used for forward as body. +# +# default: forward_as_body +#forwards=forward_as_body diff --git a/aerc/.config/aerc/binds.conf b/aerc/.config/aerc/binds.conf new file mode 100644 index 0000000..bcfe3f8 --- /dev/null +++ b/aerc/.config/aerc/binds.conf @@ -0,0 +1,186 @@ +# Binds are of the form = +# To use '=' in a key sequence, substitute it with "Eq": "" +# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab +\[t = :prev-tab +\]t = :next-tab + = :term +? = :help keys + = :prompt 'Quit?' quit + = :prompt 'Quit?' quit + = :suspend + +[messages] +q = :prompt 'Quit?' quit + +j = :next + = :next + = :next 50% + = :next 100% + = :next 100% + +k = :prev + = :prev + = :prev 50% + = :prev 100% + = :prev 100% +g = :select 0 +G = :select -1 + +J = :next-folder + = :next-folder +K = :prev-folder + = :prev-folder +H = :collapse-folder + = :collapse-folder +L = :expand-folder + = :expand-folder + +v = :mark -t + = :mark -t:next +V = :mark -v + +T = :toggle-threads +zc = :fold +zo = :unfold +za = :fold -t +zM = :fold -a +zR = :unfold -a + = :fold -t + +zz = :align center +zt = :align top +zb = :align bottom + + = :view +d = :choose -o y 'Really delete this message' delete-message +D = :delete +a = :archive flat +A = :unmark -a:mark -T:archive flat + +C = :compose +m = :compose + +b = :bounce + +rr = :reply -a +rq = :reply -aq +Rr = :reply +Rq = :reply -q + +c = :cf +$ = :term +! = :term +| = :pipe + +/ = :search +\ = :filter +n = :next-result +N = :prev-result + = :clear + +s = :split +S = :vsplit + +pl = :patch list +pa = :patch apply +pd = :patch drop +pb = :patch rebase +pt = :patch term +ps = :patch switch + +[messages:folder=Drafts] + = :recall + +[view] +/ = :toggle-key-passthrough/ +q = :close +O = :open +o = :open +S = :save +| = :pipe +D = :delete +A = :archive flat + + = :open-link + +f = :forward +rr = :reply -a +rq = :reply -aq +Rr = :reply +Rq = :reply -q + +H = :toggle-headers + = :prev-part + = :prev-part + = :next-part + = :next-part +J = :next + = :next +K = :prev + = :prev + +[view::passthrough] +$noinherit = true +$ex = + = :toggle-key-passthrough + +[compose] +# Keybindings used when the embedded terminal is not selected in the compose +# view +$noinherit = true +$ex = +$complete = + = :prev-field + = :prev-field + = :next-field + = :next-field + = :switch-account -p + = :switch-account -p + = :switch-account -n + = :switch-account -n + = :next-field + = :prev-field + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab + +[compose::editor] +# Keybindings used when the embedded terminal is selected in the compose view +$noinherit = true +$ex = + = :prev-field + = :prev-field + = :next-field + = :next-field + = :prev-tab + = :prev-tab + = :next-tab + = :next-tab + +[compose::review] +# Keybindings used when reviewing a message to be sent +# Inline comments are used as descriptions on the review screen +y = :send # Send +n = :abort # Abort (discard message, no confirmation) +s = :sign # Toggle signing +x = :encrypt # Toggle encryption to all recipients +v = :preview # Preview message +p = :postpone # Postpone +q = :choose -o d discard abort -o p postpone postpone # Abort or postpone +e = :edit # Edit (body and headers) +a = :attach # Add attachment +d = :detach # Remove attachment + +[terminal] +$noinherit = true +$ex = + + = :prev-tab + = :next-tab + = :prev-tab + = :next-tab diff --git a/install.sh b/install.sh index 8a08e51..e0ef219 100755 --- a/install.sh +++ b/install.sh @@ -25,6 +25,7 @@ main() { stow gpg stow tmux stow ghostty + stow aerc echo "Successfully linked all dotfiles." echo "Initializing TPM (Tmux Plugin Manager)..." diff --git a/zsh/.zsh/env.sh b/zsh/.zsh/env.sh index 74b9067..df3deee 100644 --- a/zsh/.zsh/env.sh +++ b/zsh/.zsh/env.sh @@ -8,3 +8,8 @@ export MANPAGER="less" export BAT_THEME="tokyonight_night" export SRC_DIR="$HOME/src" export BIN_DIR="$HOME/bin" + +export XDG_CONFIG_HOME="$HOME/.config" +export XDG_DATA_HOME="$HOME/.local/share" +export XDG_CACHE_HOME="$HOME/.cache" +export XDG_STATE_HOME="$HOME/.local/state" -- cgit v1.2.3 From 0359e63ef0d75baf4c7832f8b28c0a7d077e6142 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 14:02:40 -0400 Subject: Use direct for goproxy --- zsh/.zsh/languages.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/zsh/.zsh/languages.sh b/zsh/.zsh/languages.sh index 36ade67..afaf272 100644 --- a/zsh/.zsh/languages.sh +++ b/zsh/.zsh/languages.sh @@ -6,6 +6,7 @@ export GOBIN="$SRC_DIR/go/bin" export PATH="$GOPATH/bin:$PATH" export PATH="$GOROOT/bin:$PATH" export PATH="$GOBIN:$PATH" +export GOPROXY="direct" # Python export PYENV_ROOT="$HOME/.pyenv" -- cgit v1.2.3 From 4d88411c9e1a3e509463c9e925d912d75ef1adc3 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 14:09:50 -0400 Subject: Replace barbar with harpoon / adjust config --- nvim/.config/nvim/lazy-lock.json | 32 +++++------ nvim/.config/nvim/lua/plugins/autopairs.lua | 8 ++- nvim/.config/nvim/lua/plugins/barbar.lua | 74 ------------------------- nvim/.config/nvim/lua/plugins/colorschemes.lua | 20 +++++++ nvim/.config/nvim/lua/plugins/copilot.lua | 9 +-- nvim/.config/nvim/lua/plugins/harpoon.lua | 36 ++++++++++++ nvim/.config/nvim/lua/plugins/todo-comments.lua | 33 ++++++++++- nvim/.config/nvim/lua/plugins/tokyonight.lua | 20 ------- nvim/.config/nvim/lua/plugins/vim-sleuth.lua | 4 -- 9 files changed, 113 insertions(+), 123 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/barbar.lua create mode 100644 nvim/.config/nvim/lua/plugins/colorschemes.lua create mode 100644 nvim/.config/nvim/lua/plugins/harpoon.lua delete mode 100644 nvim/.config/nvim/lua/plugins/tokyonight.lua delete mode 100644 nvim/.config/nvim/lua/plugins/vim-sleuth.lua diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 357ce1c..3e7b5c1 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,34 +1,35 @@ { - "CopilotChat.nvim": { "branch": "main", "commit": "55f2162c36901224e22ff8424fd60ecef670b8fc" }, + "CopilotChat.nvim": { "branch": "main", "commit": "f7eb423baccbb27f5b5608fb91acee2d6bc769c7" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "barbar.nvim": { "branch": "master", "commit": "53b5a2f34b68875898f0531032fbf090e3952ad7" }, "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, - "blink.cmp": { "branch": "main", "commit": "9bcb14b43852a6f2bfd5ac9ef29cb5cf09b1b39b" }, + "blink.cmp": { "branch": "main", "commit": "586ee87534f5bf65f1c8dea2d1da2a57e8cddd36" }, "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, - "copilot.lua": { "branch": "master", "commit": "46f4b7d026cba9497159dcd3e6aa61a185cb1c48" }, + "copilot.lua": { "branch": "master", "commit": "14bf786180b2ca4578915c56989b6d676dddc6f3" }, + "everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "gitsigns.nvim": { "branch": "main", "commit": "362fe61f9f19e9bceff178792780df5cce118a7d" }, + "gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" }, + "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c2465eb07db648026eee81005a659abe26e6d077" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "5fcd0dfdcf55d8a1c1a02cccc14ee5d79728a496" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" }, "mini.icons": { "branch": "main", "commit": "94848dad1589a199f876539bd79befb0c5e3abf0" }, - "mini.nvim": { "branch": "main", "commit": "48f48e4b3f317e9da34ee7a01958b4c5018e2d34" }, + "mini.nvim": { "branch": "main", "commit": "77e20cd6ed80fdf1738c116c35da81e7d9ad997e" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "1c75a797b4017fec6491f509cf196c8c8833f26f" }, - "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, + "nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" }, + "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, - "nvim-dap-ui": { "branch": "master", "commit": "73a26abf4941aa27da59820fd6b028ebcdbcf932" }, - "nvim-lint": { "branch": "master", "commit": "3c5e34c24834a67b1cb37600ab7663eefd2b0390" }, - "nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" }, + "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, + "nvim-lint": { "branch": "master", "commit": "52e603c4b66f2fb4f268916725076e6c3ae412fd" }, + "nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "19d6211c78169e78bab372b585b6fb17ad974e82" }, + "nvim-web-devicons": { "branch": "master", "commit": "0422a19d9aa3aad2c7e5cca167e5407b13407a9d" }, "obsidian.nvim": { "branch": "main", "commit": "ae1f76a75c7ce36866e1d9342a8f6f5b9c2caf9b" }, "oil.nvim": { "branch": "master", "commit": "bbad9a76b2617ce1221d49619e4e4b659b3c61fc" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, @@ -37,7 +38,6 @@ "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, - "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "vim-tmux-navigator": { "branch": "master", "commit": "412c474e97468e7934b9c217064025ea7a69e05e" }, + "vim-tmux-navigator": { "branch": "master", "commit": "c45243dc1f32ac6bcf6068e5300f3b2b237e576a" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/nvim/.config/nvim/lua/plugins/autopairs.lua b/nvim/.config/nvim/lua/plugins/autopairs.lua index 386d392..8171237 100644 --- a/nvim/.config/nvim/lua/plugins/autopairs.lua +++ b/nvim/.config/nvim/lua/plugins/autopairs.lua @@ -4,5 +4,11 @@ return { 'windwp/nvim-autopairs', event = 'InsertEnter', - opts = {}, + config = function() + local autopairs = require 'nvim-autopairs' + autopairs.setup { + check_ts = true, -- Use treesitter for smarter pairing + disable_filetype = { 'TelescopePrompt' }, + } + end, } diff --git a/nvim/.config/nvim/lua/plugins/barbar.lua b/nvim/.config/nvim/lua/plugins/barbar.lua deleted file mode 100644 index 9787b05..0000000 --- a/nvim/.config/nvim/lua/plugins/barbar.lua +++ /dev/null @@ -1,74 +0,0 @@ -return { - { - 'romgrk/barbar.nvim', - dependencies = { - 'lewis6991/gitsigns.nvim', - 'nvim-tree/nvim-web-devicons', - }, - init = function() - vim.g.barbar_auto_setup = false - end, - version = '^1.0.0', - config = function() - require('barbar').setup {} - - local map = vim.api.nvim_set_keymap - local opts = { noremap = true, silent = true } - - -- Move to previous/next - map('n', '', 'BufferPrevious', opts) - map('n', '', 'BufferNext', opts) - - -- Re-order to previous/next - map('n', '', 'BufferMovePrevious', opts) - map('n', '>', 'BufferMoveNext', opts) - - -- Goto buffer in position... - map('n', '', 'BufferGoto 1', opts) - map('n', '', 'BufferGoto 2', opts) - map('n', '', 'BufferGoto 3', opts) - map('n', '', 'BufferGoto 4', opts) - map('n', '', 'BufferGoto 5', opts) - map('n', '', 'BufferGoto 6', opts) - map('n', '', 'BufferGoto 7', opts) - map('n', '', 'BufferGoto 8', opts) - map('n', '', 'BufferGoto 9', opts) - map('n', '', 'BufferLast', opts) - - -- Pin/unpin buffer - map('n', '', 'BufferPin', opts) - - -- Goto pinned/unpinned buffer - -- :BufferGotoPinned - -- :BufferGotoUnpinned - - -- Close buffer - map('n', '', 'BufferClose', opts) - - -- Wipeout buffer - -- :BufferWipeout - - -- Close commands - -- :BufferCloseAllButCurrent - -- :BufferCloseAllButPinned - -- :BufferCloseAllButCurrentOrPinned - -- :BufferCloseBuffersLeft - -- :BufferCloseBuffersRight - - -- Magic buffer-picking mode - map('n', '', 'BufferPick', opts) - map('n', '', 'BufferPickDelete', opts) - - -- Sort automatically by... - map('n', 'bb', 'BufferOrderByBufferNumber', opts) - map('n', 'bn', 'BufferOrderByName', opts) - map('n', 'bd', 'BufferOrderByDirectory', opts) - map('n', 'bl', 'BufferOrderByLanguage', opts) - map('n', 'bw', 'BufferOrderByWindowNumber', opts) - - -- Other: - -- :BarbarEnable - enables barbar (enabled by default) - -- :BarbarDisable - very bad command, should never be used - end, - }, -} diff --git a/nvim/.config/nvim/lua/plugins/colorschemes.lua b/nvim/.config/nvim/lua/plugins/colorschemes.lua new file mode 100644 index 0000000..aae2d30 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/colorschemes.lua @@ -0,0 +1,20 @@ +-- Setup the tokyonight color scheme. +-- +-- To see what colorschemes are already installed: `:Telescope colorscheme`. + +return { + { + 'folke/tokyonight.nvim', + priority = 1000, + config = function() + require('tokyonight').setup { + styles = { + comments = { italic = false }, -- Disable italics in comments + }, + } + + -- Other styles: 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. + vim.cmd.colorscheme 'tokyonight' + end, + }, +} diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua index c6aff39..8f78f47 100644 --- a/nvim/.config/nvim/lua/plugins/copilot.lua +++ b/nvim/.config/nvim/lua/plugins/copilot.lua @@ -3,12 +3,7 @@ return { 'zbirenbaum/copilot.lua', cmd = 'Copilot', event = 'InsertEnter', - config = function() - require('copilot').setup { - suggestion = { enabled = false }, - panel = { enabled = false }, - } - end, + opts = {}, }, { 'CopilotC-Nvim/CopilotChat.nvim', @@ -19,7 +14,7 @@ return { build = 'make tiktoken', -- Only on MacOS or Linux config = function() require('CopilotChat').setup { - model = 'claude-3.5-sonnet', + model = 'claude-sonnet-4', } vim.keymap.set('n', 'tc', function() vim.cmd 'CopilotChatToggle' diff --git a/nvim/.config/nvim/lua/plugins/harpoon.lua b/nvim/.config/nvim/lua/plugins/harpoon.lua new file mode 100644 index 0000000..bf43c5d --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/harpoon.lua @@ -0,0 +1,36 @@ +return { + 'ThePrimeagen/harpoon', + branch = 'harpoon2', + dependencies = { 'nvim-lua/plenary.nvim' }, + config = function() + local harpoon = require 'harpoon' + harpoon:setup() + + vim.keymap.set('n', 'a', function() + harpoon:list():add() + end) + vim.keymap.set('n', '', function() + harpoon.ui:toggle_quick_menu(harpoon:list()) + end) + + vim.keymap.set('n', '1', function() + harpoon:list():select(1) + end) + vim.keymap.set('n', '2', function() + harpoon:list():select(2) + end) + vim.keymap.set('n', '3', function() + harpoon:list():select(3) + end) + vim.keymap.set('n', '4', function() + harpoon:list():select(4) + end) + + vim.keymap.set('n', 'hp', function() + harpoon:list():prev() + end) + vim.keymap.set('n', 'hn', function() + harpoon:list():next() + end) + end, +} diff --git a/nvim/.config/nvim/lua/plugins/todo-comments.lua b/nvim/.config/nvim/lua/plugins/todo-comments.lua index 70f72d0..3b3bd96 100644 --- a/nvim/.config/nvim/lua/plugins/todo-comments.lua +++ b/nvim/.config/nvim/lua/plugins/todo-comments.lua @@ -5,6 +5,37 @@ return { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, - opts = { signs = false }, + opts = { + signs = false, + keywords = { + NOTE = { + color = 'hint', + alt = { 'INFO', 'Note' }, + }, + }, + }, + keys = { + { + ']t', + function() + require('todo-comments').jump_next() + end, + desc = 'Next todo comment', + }, + { + '[t', + function() + require('todo-comments').jump_prev() + end, + desc = 'Previous todo comment', + }, + { + 'st', + function() + vim.cmd 'TodoTelescope' + end, + desc = 'Search todo comments', + }, + }, }, } diff --git a/nvim/.config/nvim/lua/plugins/tokyonight.lua b/nvim/.config/nvim/lua/plugins/tokyonight.lua deleted file mode 100644 index aae2d30..0000000 --- a/nvim/.config/nvim/lua/plugins/tokyonight.lua +++ /dev/null @@ -1,20 +0,0 @@ --- Setup the tokyonight color scheme. --- --- To see what colorschemes are already installed: `:Telescope colorscheme`. - -return { - { - 'folke/tokyonight.nvim', - priority = 1000, - config = function() - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- Other styles: 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight' - end, - }, -} diff --git a/nvim/.config/nvim/lua/plugins/vim-sleuth.lua b/nvim/.config/nvim/lua/plugins/vim-sleuth.lua deleted file mode 100644 index d9a0887..0000000 --- a/nvim/.config/nvim/lua/plugins/vim-sleuth.lua +++ /dev/null @@ -1,4 +0,0 @@ --- Detect tabstop and shiftwidth automatically -return { - 'tpope/vim-sleuth', -} -- cgit v1.2.3 From 004db1b9fe33c501907764fe6ecf718afe1bcd92 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 18:50:30 -0400 Subject: Add msmtp/isync setup for local email processing via aerc --- .gitignore | 2 + aerc/.config/aerc/accounts.conf | 30 ++-- executables/bin/get-password | 44 +++--- executables/bin/msmtp-queue | 294 ++++++++++++++++++++++++++++++++++++++++ executables/bin/msmtp-send | 147 ++++++++++++++++++++ homebrew/Brewfile | 15 ++ install.sh | 8 ++ isync/.config/isync/mbsync.conf | 56 ++++++++ msmtp/.config/msmtp/config | 23 ++++ 9 files changed, 581 insertions(+), 38 deletions(-) create mode 100755 executables/bin/msmtp-queue create mode 100755 executables/bin/msmtp-send create mode 100644 isync/.config/isync/mbsync.conf create mode 100644 msmtp/.config/msmtp/config diff --git a/.gitignore b/.gitignore index 235823d..f44725e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ .DS_Store /tags /tmux/.config/tmux/plugins +/msmtp/.config/msmtp/*.log + diff --git a/aerc/.config/aerc/accounts.conf b/aerc/.config/aerc/accounts.conf index eb8d118..2b9c0ed 100644 --- a/aerc/.config/aerc/accounts.conf +++ b/aerc/.config/aerc/accounts.conf @@ -1,19 +1,17 @@ [Personal Gmail] -source = imaps://eugenetriguba%40gmail.com@imap.gmail.com:993 -outgoing = smtps://eugenetriguba%40gmail.com@smtp.gmail.com:587 -default = INBOX -from = Eugene Triguba -copy-to = ~/Documents/Email/Gmail -cache-headers = true -source-cred-cmd = get-password --credential "Personal Gmail - Sourcehut" -outgoing-cred-cmd = get-password --credential "Personal Gmail - Sourcehut" +source = maildir://~/Mail/Gmail +outgoing = /usr/local/bin/msmtp-send --account gmail +default = INBOX +from = Eugene Triguba +copy-to = Sent +check-mail-cmd = 'mbsync -c ~/.config/isync/mbsync.conf gmail-inbox' +check-mail = 1m [Personal iCloud] -source = imaps://eugenetriguba%40gmail.com@imap.mail.me.com:993 -outgoing = smtps://eugenetriguba%40gmail.com@smtp.mail.me.com:587 -default = INBOX -from = Eugene Triguba -copy-to = ~/Documents/Email/iCloud -cache-headers = true -source-cred-cmd = get-password --credential "Personal iCloud - Sourcehut" -outgoing-cred-cmd = get-password --credential "Personal iCloud - Sourcehut" +source = maildir://~/Mail/iCloud +outgoing = /usr/local/bin/msmtp-send --account icloud +default = INBOX +from = Eugene Triguba +copy-to = Sent +check-mail-cmd = 'mbsync -c ~/.config/isync/mbsync.conf icloud-inbox' +check-mail = 1m diff --git a/executables/bin/get-password b/executables/bin/get-password index ca13d93..3b83bb7 100755 --- a/executables/bin/get-password +++ b/executables/bin/get-password @@ -5,32 +5,32 @@ VAULT="Private" CREDENTIAL="" main() { - parse_args "$@" - op read "op://$VAULT/$CREDENTIAL/password" + parse_args "$@" + op read "op://$VAULT/$CREDENTIAL/password" } parse_args() { - while [ $# -gt 0 ]; do - case "$1" in - --vault) - VAULT="$2" - shift 2 - ;; - --credential) - CREDENTIAL="$2" - shift 2 - ;; - *) - echo "Usage: $0 [--vault ] --credential " - exit 1 - ;; - esac - done + while [ $# -gt 0 ]; do + case "$1" in + --vault) + VAULT="$2" + shift 2 + ;; + --credential) + CREDENTIAL="$2" + shift 2 + ;; + *) + echo "Usage: $0 [--vault ] --credential " + exit 1 + ;; + esac + done - if [ -z "$CREDENTIAL" ]; then - echo "Invalid or empty CREDENTIAL" >&2 - exit 1 - fi + if [ -z "$CREDENTIAL" ]; then + echo "Invalid or empty CREDENTIAL" >&2 + exit 1 + fi } main "$@" diff --git a/executables/bin/msmtp-queue b/executables/bin/msmtp-queue new file mode 100755 index 0000000..fb1e487 --- /dev/null +++ b/executables/bin/msmtp-queue @@ -0,0 +1,294 @@ +#!/usr/bin/env bash +# msmtp queue management utility +# +# Provides commands to process, check status, and clear the +# msmtp email queue that is populated by msmtp-send. +set -euo pipefail + +DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}" +QUEUE_DIR="${DATA_DIR}/msmtp-queue" +LOG_FILE="${DATA_DIR}/msmtp-queue-processor.log" +MSMTP_PATH="$(command -v msmtp)" + +main() { + if [[ $# -eq 0 ]]; then + print_usage + exit 1 + fi + + local subcommand="$1" + shift + + case "$subcommand" in + process) + process_queue "$@" + ;; + status) + show_status "$@" + ;; + clear) + clear_queue "$@" + ;; + -h | --help) + print_usage + exit 0 + ;; + *) + log_message "ERROR" "Unknown subcommand: $subcommand" + print_usage + exit 1 + ;; + esac +} + +print_usage() { + cat < [OPTIONS] + +A utility to manage the msmtp email queue. + +SUBCOMMANDS: + process Process all queued emails (attempt to send) + status Show queue status and recent activity + clear [ACCOUNT] Clear queued emails (all accounts or specific account) + +OPTIONS: + -h, --help Show this help message + +EXAMPLES: + $(basename "$0") process + $(basename "$0") status + $(basename "$0") clear + $(basename "$0") clear gmail + +NOTES: + - Queue directory: $QUEUE_DIR + - Log file: $LOG_FILE + - Queued files are named: timestamp-pid-random-ACCOUNT +USAGE +} + +log_message() { + local level="$1" + shift + local message + message="$(date '+%Y-%m-%d %H:%M:%S') [$level] $*" + + if [[ -d "$QUEUE_DIR" ]]; then + echo "$message" >>"$LOG_FILE" + fi + echo "$message" >&2 +} + +process_queue() { + if [[ $# -gt 0 ]]; then + log_message "ERROR" "process subcommand takes no arguments" + print_usage + exit 1 + fi + + if ! command -v "$MSMTP_PATH" >/dev/null 2>&1; then + log_message "ERROR" "msmtp not found at $MSMTP_PATH" + exit 1 + fi + + setup_queue_directory + + local total_count + total_count="$(count_queued_files)" + if [[ "$total_count" -eq 0 ]]; then + log_message "INFO" "No emails in queue" + return 0 + fi + + log_message "DEBUG" "Files from get_queued_files:" + get_queued_files | while IFS= read -r debug_file; do + log_message "DEBUG" " - $debug_file" + done + + log_message "INFO" "Processing $total_count queued emails" + local sent_count=0 + local failed_count=0 + # NOTE: Temporarily disable exit on error for msmtp call + # so that it can continue processing other files even if + # one fails. + set +e + while IFS= read -r file; do + if [[ -n "$file" ]]; then + local account + account="$(extract_account_from_filename "$file")" + + log_message "INFO" "Attempting to send $(basename "$file") via $account" + + local msmtp_output + if msmtp_output=$("$MSMTP_PATH" --account="$account" -t <"$file" 2>&1); then + rm "$file" + log_message "INFO" "SUCCESS: Sent $(basename "$file") via $account" + ((sent_count++)) + else + log_message "ERROR" "FAILED: Could not send $(basename "$file") via $account - $msmtp_output" + ((failed_count++)) + fi + fi + done < <(get_queued_files) + set -e + + log_message "INFO" "Processing complete: $sent_count sent, $failed_count failed" +} + +setup_queue_directory() { + if ! mkdir -p "$QUEUE_DIR"; then + log_message "ERROR" "Failed to create queue directory: $QUEUE_DIR" + exit 1 + fi +} + +extract_account_from_filename() { + local filename="$1" + local basename_file + basename_file="$(basename "$filename")" + + # NOTE: Expected format of timestamp-pid-random-ACCOUNT + if [[ "$basename_file" =~ ^[0-9]+-[0-9]+-[a-fA-F0-9]+-(.+)$ ]]; then + echo "${BASH_REMATCH[1]}" + else + log_message "WARN" "Could not extract account from filename: $basename_file" + echo "unknown" + fi +} + +get_queued_files() { + local account_filter="${1:-}" + + if [[ ! -d "$QUEUE_DIR" ]]; then + return 0 + fi + + for file in "$QUEUE_DIR"/*; do + if [[ -f "$file" ]]; then + if [[ -z "$account_filter" ]]; then + echo "$file" + else + local file_account + file_account="$(extract_account_from_filename "$file")" + if [[ "$file_account" == "$account_filter" ]]; then + echo "$file" + fi + fi + fi + done +} + +count_queued_files() { + local account_filter="${1:-}" + local count=0 + + while IFS= read -r -d '' file; do + ((count++)) + done < <(get_queued_files "$account_filter" | tr '\n' '\0') + + echo "$count" +} + +show_status() { + if [[ $# -gt 0 ]]; then + log_message "ERROR" "status subcommand takes no arguments" + print_usage + exit 1 + fi + + setup_queue_directory + + echo "=== Queue Status ===" + + local total_count + total_count="$(count_queued_files)" + echo "Total queued: $total_count" + + if [[ "$total_count" -gt 0 ]]; then + echo "" + echo "By account:" + while IFS= read -r account; do + if [[ -n "$account" ]]; then + local account_count + account_count="$(count_queued_files "$account")" + echo " $account: $account_count" + fi + done < <(get_all_accounts) + fi + + if [[ -f "$LOG_FILE" ]]; then + echo "" + echo "=== Recent Activity (last 10 lines) ===" + tail -10 "$LOG_FILE" 2>/dev/null || echo "No log entries yet" + fi +} + +get_all_accounts() { + local accounts=() + + while IFS= read -r file; do + if [[ -n "$file" ]]; then + local account + account="$(extract_account_from_filename "$file")" + if [[ "$account" != "unknown" ]]; then + accounts+=("$account") + fi + fi + done < <(get_queued_files) + + # Remove duplicates and sort + printf '%s\n' "${accounts[@]}" | sort -u +} + +clear_queue() { + local account_filter="${1:-}" + + if [[ $# -gt 1 ]]; then + log_message "ERROR" "clear subcommand takes at most one argument (account name)" + print_usage + exit 1 + fi + + setup_queue_directory + + if [[ -n "$account_filter" ]]; then + local account_count + account_count="$(count_queued_files "$account_filter")" + + if [[ "$account_count" -eq 0 ]]; then + echo "No queued emails for account: $account_filter" + return 0 + fi + + while IFS= read -r file; do + if [[ -n "$file" ]]; then + rm "$file" + fi + done < <(get_queued_files "$account_filter") + + log_message "INFO" "Cleared $account_count queued emails for account: $account_filter" + echo "Cleared $account_count queued emails for account: $account_filter" + else + local total_count + total_count="$(count_queued_files)" + + if [[ "$total_count" -eq 0 ]]; then + echo "No queued emails to clear" + return 0 + fi + + while IFS= read -r file; do + if [[ -n "$file" ]]; then + rm "$file" + fi + done < <(get_queued_files) + + log_message "INFO" "Cleared $total_count queued emails (all accounts)" + echo "Cleared $total_count queued emails (all accounts)" + fi +} + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + main "$@" +fi diff --git a/executables/bin/msmtp-send b/executables/bin/msmtp-send new file mode 100755 index 0000000..fad2f9e --- /dev/null +++ b/executables/bin/msmtp-send @@ -0,0 +1,147 @@ +#!/bin/bash +# Smart sendmail replacement with account selection and offline queuing +# +# When the mail server is offline, emails are queued in a local directory. +# When the server is back online, queued emails are sent automatically. +set -euo pipefail + +MSMTP_ACCOUNT="" +DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}" +QUEUE_DIR="${DATA_DIR}/msmtp-queue" +TEMP_DIR="${DATA_DIR}/msmtp-temp" +MSMTP_PATH="$(command -v msmtp)" + +main() { + parse_args "$@" + + if ! command -v "$MSMTP_PATH" >/dev/null 2>&1; then + log_message "ERROR" "msmtp not found at $MSMTP_PATH" + exit 1 + fi + + setup_directories + + local temp_file + temp_file=$(create_temp_file) + if ! cat >"$temp_file"; then + log_message "ERROR" "Failed to read email content" + cleanup_temp_file "$temp_file" + exit 1 + fi + + send_email "$temp_file" "$MSMTP_ACCOUNT" +} + +parse_args() { + while [[ $# -gt 0 ]]; do + case $1 in + --account) + if [[ -z "${2:-}" ]]; then + log_message "ERROR" "--account requires an argument" + print_usage + exit 1 + fi + MSMTP_ACCOUNT="$2" + shift 2 + ;; + -h | --help) + print_usage + exit 0 + ;; + esac + done + + if [[ -z "$MSMTP_ACCOUNT" ]]; then + log_message "ERROR" "No account specified. Use --account to specify an account." + print_usage + exit 1 + fi +} + +log_message() { + local level="$1" + shift + echo "$(date '+%Y-%m-%d %H:%M:%S') [$level] $*" >&2 +} + +print_usage() { + cat < [OPTIONS] [RECIPIENT...] + +A sendmail replacement that routes emails through msmtp with offline queuing. + +ARGUMENTS: + --account Specify the account to use. It should match the name in your + msmtp configuration. + RECIPIENT... Email recipients (optional, can be specified in email body) + +OPTIONS: + -h, --help Show this help message + +EXAMPLES: + echo "test email" | $(basename "$0") --account gmail user@example.com + +NOTES: + - Emails are queued offline and sent when connection is available + - Queue directory: $QUEUE_DIR +USAGE +} + +create_temp_file() { + local timestamp + timestamp="$(date +%s)" + local pid="$$" + local random + random="$(od -An -N4 -tx4 /dev/null; then + log_message "INFO" "Email sent successfully via $account" + cleanup_temp_file "$temp_file" + return 0 + else + log_message "INFO" "Failed to send email, queuing for later" + queue_email "$temp_file" "$account" + return 1 + fi +} + +queue_email() { + local temp_file="$1" + local account="$2" + local timestamp + timestamp="$(date +%s)" + local pid="$$" + local random + random="$(od -An -N4 -tx4 Date: Sun, 20 Jul 2025 18:55:33 -0400 Subject: Update email for git --- git/.gitconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/.gitconfig b/git/.gitconfig index 11cc75f..50db8bd 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,6 +1,6 @@ [user] name = Eugene Triguba - email = eugenetriguba@gmail.com + email = hello@eugenetriguba.com signingkey = E2C90ACA3CC16B98 [core] editor = nvim -- cgit v1.2.3 From cd5531dd2df9074116090770c7144faa9a4ba968 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 19:05:20 -0400 Subject: Use atuin for shell history --- atuin/.config/atuin/config.toml | 272 ++++++++++++++++++++++++++++++++++++++++ install.sh | 1 + zsh/.zsh/history.sh | 9 +- 3 files changed, 279 insertions(+), 3 deletions(-) create mode 100644 atuin/.config/atuin/config.toml diff --git a/atuin/.config/atuin/config.toml b/atuin/.config/atuin/config.toml new file mode 100644 index 0000000..ac9f8a1 --- /dev/null +++ b/atuin/.config/atuin/config.toml @@ -0,0 +1,272 @@ +## where to store your database, default is your system data directory +## linux/mac: ~/.local/share/atuin/history.db +## windows: %USERPROFILE%/.local/share/atuin/history.db +# db_path = "~/.history.db" + +## where to store your encryption key, default is your system data directory +## linux/mac: ~/.local/share/atuin/key +## windows: %USERPROFILE%/.local/share/atuin/key +# key_path = "~/.key" + +## where to store your auth session token, default is your system data directory +## linux/mac: ~/.local/share/atuin/session +## windows: %USERPROFILE%/.local/share/atuin/session +# session_path = "~/.session" + +## date format used, either "us" or "uk" +# dialect = "us" + +## default timezone to use when displaying time +## either "l", "local" to use the system's current local timezone, or an offset +## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]" +## for example: "+9", "-05", "+03:30", "-01:23:45", etc. +# timezone = "local" + +## enable or disable automatic sync +# auto_sync = true + +## enable or disable automatic update checks +# update_check = true + +## address of the sync server +# sync_address = "https://api.atuin.sh" + +## how often to sync history. note that this is only triggered when a command +## is ran, so sync intervals may well be longer +## set it to 0 to sync after every command +# sync_frequency = "10m" + +## which search mode to use +## possible values: prefix, fulltext, fuzzy, skim +# search_mode = "fuzzy" + +## which filter mode to use by default +## possible values: "global", "host", "session", "directory", "workspace" +## consider using search.filters to customize the enablement and order of filter modes +# filter_mode = "global" + +## With workspace filtering enabled, Atuin will filter for commands executed +## in any directory within a git repository tree (default: false). +## +## To use workspace mode by default when available, set this to true and +## set filter_mode to "workspace" or leave it unspecified and +## set search.filters to include "workspace" before other filter modes. +# workspaces = false + +## which filter mode to use when atuin is invoked from a shell up-key binding +## the accepted values are identical to those of "filter_mode" +## leave unspecified to use same mode set in "filter_mode" +# filter_mode_shell_up_key_binding = "global" + +## which search mode to use when atuin is invoked from a shell up-key binding +## the accepted values are identical to those of "search_mode" +## leave unspecified to use same mode set in "search_mode" +# search_mode_shell_up_key_binding = "fuzzy" + +## which style to use +## possible values: auto, full, compact +# style = "auto" + +## the maximum number of lines the interface should take up +## set it to 0 to always go full screen +# inline_height = 0 + +## Invert the UI - put the search bar at the top , Default to `false` +# invert = false + +## enable or disable showing a preview of the selected command +## useful when the command is longer than the terminal width and is cut off +# show_preview = true + +## what to do when the escape key is pressed when searching +## possible values: return-original, return-query +# exit_mode = "return-original" + +## possible values: emacs, subl +# word_jump_mode = "emacs" + +## characters that count as a part of a word +# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +## number of context lines to show when scrolling by pages +# scroll_context_lines = 1 + +## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts +## alt-0 .. alt-9 +# ctrl_n_shortcuts = false + +## default history list format - can also be specified with the --format arg +# history_format = "{time}\t{command}\t{duration}" + +## prevent commands matching any of these regexes from being written to history. +## Note that these regular expressions are unanchored, i.e. if they don't start +## with ^ or end with $, they'll match anywhere in the command. +## For details on the supported regular expression syntax, see +## https://docs.rs/regex/latest/regex/#syntax +# history_filter = [ +# "^secret-cmd", +# "^innocuous-cmd .*--secret=.+", +# ] + +## prevent commands run with cwd matching any of these regexes from being written +## to history. Note that these regular expressions are unanchored, i.e. if they don't +## start with ^ or end with $, they'll match anywhere in CWD. +## For details on the supported regular expression syntax, see +## https://docs.rs/regex/latest/regex/#syntax +# cwd_filter = [ +# "^/very/secret/area", +# ] + +## Configure the maximum height of the preview to show. +## Useful when you have long scripts in your history that you want to distinguish +## by more than the first few lines. +# max_preview_height = 4 + +## Configure whether or not to show the help row, which includes the current Atuin +## version (and whether an update is available), a keymap hint, and the total +## amount of commands in your history. +# show_help = true + +## Configure whether or not to show tabs for search and inspect +# show_tabs = true + +## Configure whether or not the tabs row may be auto-hidden, which includes the current Atuin +## tab, such as Search or Inspector, and other tabs you may wish to see. This will +## only be hidden if there are fewer than this count of lines available, and does not affect the use +## of keyboard shortcuts to switch tab. 0 to never auto-hide, default is 8 (lines). +## This is ignored except in `compact` mode. +# auto_hide_height = 8 + +## Defaults to true. This matches history against a set of default regex, and will not save it if we get a match. Defaults include +## 1. AWS key id +## 2. Github pat (old and new) +## 3. Slack oauth tokens (bot, user) +## 4. Slack webhooks +## 5. Stripe live/test keys +# secrets_filter = true + +## Defaults to true. If enabled, upon hitting enter Atuin will immediately execute the command. Press tab to return to the shell and edit. +# This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. +enter_accept = true + +## Defaults to "emacs". This specifies the keymap on the startup of `atuin +## search`. If this is set to "auto", the startup keymap mode in the Atuin +## search is automatically selected based on the shell's keymap where the +## keybinding is defined. If this is set to "emacs", "vim-insert", or +## "vim-normal", the startup keymap mode in the Atuin search is forced to be +## the specified one. +# keymap_mode = "auto" + +## Cursor style in each keymap mode. If specified, the cursor style is changed +## in entering the cursor shape. Available values are "default" and +## "{blink,steady}-{block,underline,bar}". +# keymap_cursor = { emacs = "blink-block", vim_insert = "blink-block", vim_normal = "steady-block" } + +# network_connect_timeout = 5 +# network_timeout = 5 + +## Timeout (in seconds) for acquiring a local database connection (sqlite) +# local_timeout = 5 + +## Set this to true and Atuin will minimize motion in the UI - timers will not update live, etc. +## Alternatively, set env NO_MOTION=true +# prefers_reduced_motion = false + +[stats] +## Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl +# common_subcommands = [ +# "apt", +# "cargo", +# "composer", +# "dnf", +# "docker", +# "git", +# "go", +# "ip", +# "jj", +# "kubectl", +# "nix", +# "nmcli", +# "npm", +# "pecl", +# "pnpm", +# "podman", +# "port", +# "systemctl", +# "tmux", +# "yarn", +# ] + +## Set commands that should be totally stripped and ignored from stats +# common_prefix = ["sudo"] + +## Set commands that will be completely ignored from stats +# ignored_commands = [ +# "cd", +# "ls", +# "vi" +# ] + +[keys] +# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry. +# scroll_exits = true +# Defaults to true. The left arrow key will exit the TUI when scrolling before the first character +# exit_past_line_start = true +# Defaults to true. The right arrow key performs the same functionality as Tab and copies the selected line to the command line to be modified. +# accept_past_line_end = true + +[sync] +# Enable sync v2 by default +# This ensures that sync v2 is enabled for new installs only +# In a later release it will become the default across the board +records = true + +[preview] +## which preview strategy to use to calculate the preview height (respects max_preview_height). +## possible values: auto, static +## auto: length of the selected command. +## static: length of the longest command stored in the history. +## fixed: use max_preview_height as fixed height. +# strategy = "auto" + +[daemon] +## Enables using the daemon to sync. Requires the daemon to be running in the background. Start it with `atuin daemon` +# enabled = false + +## How often the daemon should sync in seconds +# sync_frequency = 300 + +## The path to the unix socket used by the daemon (on unix systems) +## linux/mac: ~/.local/share/atuin/atuin.sock +## windows: Not Supported +# socket_path = "~/.local/share/atuin/atuin.sock" + +## Use systemd socket activation rather than opening the given path (the path must still be correct for the client) +## linux: false +## mac/windows: Not Supported +# systemd_socket = false + +## The port that should be used for TCP on non unix systems +# tcp_port = 8889 + +# [theme] +## Color theme to use for rendering in the terminal. +## There are some built-in themes, including the base theme ("default"), +## "autumn" and "marine". You can add your own themes to the "./themes" subdirectory of your +## Atuin config (or ATUIN_THEME_DIR, if provided) as TOML files whose keys should be one or +## more of AlertInfo, AlertWarn, AlertError, Annotation, Base, Guidance, Important, and +## the string values as lowercase entries from this list: +## https://ogeon.github.io/docs/palette/master/palette/named/index.html +## If you provide a custom theme file, it should be called "NAME.toml" and the theme below +## should be the stem, i.e. `theme = "NAME"` for your chosen NAME. +# name = "autumn" + +## Whether the theme manager should output normal or extra information to help fix themes. +## Boolean, true or false. If unset, left up to the theme manager. +# debug = true + +[search] +## The list of enabled filter modes, in order of priority. +## The "workspace" mode is skipped when not in a workspace or workspaces = false. +## Default filter mode can be overridden with the filter_mode setting. +# filters = [ "global", "host", "session", "workspace", "directory" ] diff --git a/install.sh b/install.sh index b2ec3c9..d22368f 100755 --- a/install.sh +++ b/install.sh @@ -28,6 +28,7 @@ main() { stow aerc stow isync stow msmtp + stow atuin echo "Successfully linked all dotfiles." mkdir -p ~/Mail/Gmail/INBOX ~/Mail/iCloud/INBOX ~/bin/ ~/src/ diff --git a/zsh/.zsh/history.sh b/zsh/.zsh/history.sh index e834b85..05d5cd3 100644 --- a/zsh/.zsh/history.sh +++ b/zsh/.zsh/history.sh @@ -1,5 +1,8 @@ #!/usr/bin/env zsh -export HISTFILE=~/.zhistory -export HISTSIZE=100000 -export SAVEHIST=100000 +eval "$(atuin init zsh)" + +# Disable zsh default history +unset HISTFILE +HISTSIZE=0 +SAVEHIST=0 -- cgit v1.2.3 From d35e5c37e4a6391fd1b3fca074976c6d4b83dffd Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 19:08:46 -0400 Subject: Remove unused brew packages --- homebrew/Brewfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index fde03fc..5a6fb93 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -84,7 +84,6 @@ brew "python@3.12" brew "python@3.13" brew "qemu" brew "r" -brew "readline" brew "reattach-to-user-namespace" brew "ripgrep" brew "rsync" @@ -128,9 +127,6 @@ cask "ghostty" cask "google-chrome" cask "hashicorp-vagrant" cask "iterm2" -cask "logi-options-plus" -cask "logi-options+" -cask "mullvad-vpn" cask "mullvadvpn" cask "neovide-app" cask "neovide" -- cgit v1.2.3 From 24829aa6a20a05890fedd31bc9c2fd11b7b42215 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 20:55:50 -0400 Subject: adjust aerc and isync config --- aerc/.config/aerc/accounts.conf | 10 ++- aerc/.config/aerc/aerc.conf | 10 ++- isync/.config/isync/mbsync.conf | 56 -------------- isync/.config/isyncrc | 161 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 173 insertions(+), 64 deletions(-) delete mode 100644 isync/.config/isync/mbsync.conf create mode 100644 isync/.config/isyncrc diff --git a/aerc/.config/aerc/accounts.conf b/aerc/.config/aerc/accounts.conf index 2b9c0ed..4f48be4 100644 --- a/aerc/.config/aerc/accounts.conf +++ b/aerc/.config/aerc/accounts.conf @@ -1,17 +1,19 @@ [Personal Gmail] source = maildir://~/Mail/Gmail -outgoing = /usr/local/bin/msmtp-send --account gmail +outgoing = /usr/local/bin/msmtp-send-simple --account gmail default = INBOX from = Eugene Triguba copy-to = Sent -check-mail-cmd = 'mbsync -c ~/.config/isync/mbsync.conf gmail-inbox' +check-mail-cmd = 'mbsync gmail-all' check-mail = 1m +check-mail-timeout = 30s [Personal iCloud] source = maildir://~/Mail/iCloud -outgoing = /usr/local/bin/msmtp-send --account icloud +outgoing = /usr/local/bin/msmtp-send-simple --account icloud default = INBOX from = Eugene Triguba copy-to = Sent -check-mail-cmd = 'mbsync -c ~/.config/isync/mbsync.conf icloud-inbox' +check-mail-cmd = 'mbsync icloud-all' check-mail = 1m +check-mail-timeout = 30s diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf index 3d48ec3..f60d54e 100644 --- a/aerc/.config/aerc/aerc.conf +++ b/aerc/.config/aerc/aerc.conf @@ -29,6 +29,7 @@ # redirection, this setting is ignored and log messages are printed to stdout. # #log-file= +log-file = ~/.local/share/aerc/aerc.log # Only log messages above the specified level to log-file. Supported levels # are: trace, debug, info, warn and error. When redirecting aerc's output to @@ -37,6 +38,7 @@ # # Default: info #log-level=info +log-level = debug # Disable IPC entirely. Don't run commands (including mailto:... and mbox:...) # in an existing aerc instance, and don't start an IPC server to allow @@ -587,7 +589,7 @@ # html emails. # # Default: text/plain,text/html -#alternatives=text/plain,text/html +alternatives=text/html,text/plain # # Default setting to determine whether to show full headers or only parsed @@ -762,16 +764,16 @@ # against (non-case-sensitive) and a comma, e.g. subject,text will match a # subject which contains "text". Use header,~regex to match against a regex. # -text/plain=colorize +text/plain=colorize | less text/calendar=calendar message/delivery-status=colorize message/rfc822=colorize #text/html=pandoc -f html -t plain | colorize #text/html=! html -text/html=! w3m -T text/html -I UTF-8 +text/html=! w3m -T text/html -I UTF-8 | less #text/*=bat -fP --file-name="$AERC_FILENAME" #application/x-sh=bat -fP -l sh -#image/*=catimg -w $(tput cols) - +image/*=catimg -w $(tput cols) - #subject,~Git(hub|lab)=lolcat -f #from,thatguywhodoesnothardwraphismessages=wrap -w 100 | colorize diff --git a/isync/.config/isync/mbsync.conf b/isync/.config/isync/mbsync.conf deleted file mode 100644 index b562318..0000000 --- a/isync/.config/isync/mbsync.conf +++ /dev/null @@ -1,56 +0,0 @@ -CopyArrivalDate yes -Create Near -Expunge Both - -################## -# Gmail -################## - -IMAPAccount gmail -Host imap.gmail.com -User eugenetriguba@gmail.com -PassCmd "get-password --credential 'Personal Gmail Password'" -TLSType IMAPS -AuthMechs PLAIN - -MaildirStore gmail-local -Path ~/Mail/Gmail/ -Inbox ~/Mail/Gmail/INBOX -SubFolders Verbatim - -IMAPStore gmail-remote -Account gmail - -Channel gmail-inbox -Far :gmail-remote: -Near :gmail-local: -Patterns * - -################## -# iCloud -################## - -IMAPAccount icloud -Host imap.mail.me.com -User eugenetriguba@gmail.com -PassCmd "get-password --credential 'Personal iCloud Password'" -TLSType IMAPS -AuthMechs PLAIN - -MaildirStore icloud-local -Path ~/Mail/iCloud/ -Inbox ~/Mail/iCloud/INBOX -SubFolders Verbatim - -IMAPStore icloud-remote -Account icloud - -Channel icloud-inbox -Far :icloud-remote: -Near :icloud-local: -Patterns * - -# Group for syncing both accounts -Group primary -Channel gmail-inbox -Channel icloud-inbox diff --git a/isync/.config/isyncrc b/isync/.config/isyncrc new file mode 100644 index 0000000..a68cd1a --- /dev/null +++ b/isync/.config/isyncrc @@ -0,0 +1,161 @@ +CopyArrivalDate yes +Create Near +Expunge Both + +################## +# Gmail +################## + +IMAPAccount gmail +Host imap.gmail.com +User eugenetriguba@gmail.com +PassCmd "get-password --credential 'Personal Gmail Password'" +TLSType IMAPS +AuthMechs PLAIN + +MaildirStore gmail-local +Path ~/Mail/Gmail/ +Inbox ~/Mail/Gmail/INBOX +SubFolders Verbatim + +IMAPStore gmail-remote +Account gmail + +Channel gmail-main +Far :gmail-remote: +Near :gmail-local: +Patterns INBOX + +Channel gmail-sent +Far :gmail-remote:"[Gmail]/Sent Mail" +Near :gmail-local:Sent +Create Both +SyncState * + +Channel gmail-drafts +Far :gmail-remote:"[Gmail]/Drafts" +Near :gmail-local:Drafts +Create Both +SyncState * + +Channel gmail-starred +Far :gmail-remote:"[Gmail]/Starred" +Near :gmail-local:Starred +Create Both +SyncState * + +Channel gmail-spam +Far :gmail-remote:"[Gmail]/Spam" +Near :gmail-local:Spam +Create Both +SyncState * + +Channel gmail-trash +Far :gmail-remote:"[Gmail]/Trash" +Near :gmail-local:Trash +Create Both +SyncState * + +Channel gmail-all +Far :gmail-remote:"[Gmail]/All Mail" +Near :gmail-local:"All Mail" +Create Both +SyncState * + +Channel gmail-important +Far :gmail-remote:"[Gmail]/Important" +Near :gmail-local:Important +Create Both +SyncState * + +Channel gmail-labels +Far :gmail-remote: +Near :gmail-local: +Patterns "http-wg" +Create Both +SyncState * + +# Group all Gmail channels +Group gmail-all +Channel gmail-main +Channel gmail-sent +Channel gmail-drafts +Channel gmail-starred +Channel gmail-spam +Channel gmail-trash +Channel gmail-all +Channel gmail-important +Channel gmail-labels + +################## +# iCloud +################## + +IMAPAccount icloud +Host imap.mail.me.com +User eugenetriguba@gmail.com +PassCmd "get-password --credential 'Personal iCloud Password'" +TLSType IMAPS +AuthMechs PLAIN + +MaildirStore icloud-local +Path ~/Mail/iCloud/ +Inbox ~/Mail/iCloud/INBOX +SubFolders Verbatim + +IMAPStore icloud-remote +Account icloud + +Channel icloud-main +Far :icloud-remote: +Near :icloud-local: +Patterns INBOX + +Channel icloud-sent +Far :icloud-remote:"Sent Messages" +Near :icloud-local:Sent +Create Both +SyncState * + +Channel icloud-drafts +Far :icloud-remote:Drafts +Near :icloud-local:Drafts +Create Both +SyncState * + +Channel icloud-trash +Far :icloud-remote:"Deleted Messages" +Near :icloud-local:Trash +Create Both +SyncState * + +Channel icloud-junk +Far :icloud-remote:Junk +Near :icloud-local:Spam +Create Both +SyncState * + +Channel icloud-archive +Far :icloud-remote:Archive +Near :icloud-local:Archive +Create Both +SyncState * + +Channel icloud-snoozed +Far :icloud-remote:Snoozed +Near :icloud-local:Snoozed +Create Both +SyncState * + +Group icloud-all +Channel icloud-main +Channel icloud-sent +Channel icloud-drafts +Channel icloud-trash +Channel icloud-junk +Channel icloud-archive +Channel icloud-snoozed + +Group primary +Channel gmail-all +Channel icloud-all -- cgit v1.2.3 From a61df34af9182b4668dbbc52212b841fe5818190 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 20:56:05 -0400 Subject: fix symlinks in install script --- homebrew/Brewfile | 2 -- install.sh | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/homebrew/Brewfile b/homebrew/Brewfile index 5a6fb93..8365dc0 100644 --- a/homebrew/Brewfile +++ b/homebrew/Brewfile @@ -116,7 +116,6 @@ cask "anki" cask "calibre" cask "discord" cask "docker-desktop" -cask "docker" cask "elgato-control-center" cask "font-hack-nerd-font" cask "font-inter" @@ -127,7 +126,6 @@ cask "ghostty" cask "google-chrome" cask "hashicorp-vagrant" cask "iterm2" -cask "mullvadvpn" cask "neovide-app" cask "neovide" cask "obsidian" diff --git a/install.sh b/install.sh index d22368f..64e0845 100755 --- a/install.sh +++ b/install.sh @@ -32,10 +32,10 @@ main() { echo "Successfully linked all dotfiles." mkdir -p ~/Mail/Gmail/INBOX ~/Mail/iCloud/INBOX ~/bin/ ~/src/ - sudo ln -s "$HOME/bin/get-password" /usr/local/bin/get-password - sudo ln -s "$(which op)" /usr/local/bin/op - sudo ln -s "$HOME/bin/msmtp-send" /usr/local/bin/msmtp-send - sudo ln -s "$HOME/bin/msmtp-queue" /usr/local/bin/msmtp-queue + sudo ln -sf "$HOME/bin/get-password" /usr/local/bin/get-password + sudo ln -sf "$(which op)" /usr/local/bin/op + sudo ln -sf "$HOME/bin/msmtp-send" /usr/local/bin/msmtp-send + sudo ln -sf "$HOME/bin/msmtp-queue" /usr/local/bin/msmtp-queue echo "Initializing TPM (Tmux Plugin Manager)..." setup_tpm -- cgit v1.2.3 From 47270beb6c57cb04808d7c1e844e896b5bfabc65 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 20:56:15 -0400 Subject: default atuin to session history --- atuin/.config/atuin/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atuin/.config/atuin/config.toml b/atuin/.config/atuin/config.toml index ac9f8a1..11fb888 100644 --- a/atuin/.config/atuin/config.toml +++ b/atuin/.config/atuin/config.toml @@ -43,7 +43,7 @@ ## which filter mode to use by default ## possible values: "global", "host", "session", "directory", "workspace" ## consider using search.filters to customize the enablement and order of filter modes -# filter_mode = "global" +filter_mode = "session" ## With workspace filtering enabled, Atuin will filter for commands executed ## in any directory within a git repository tree (default: false). -- cgit v1.2.3 From fb3e5cf37e9daabd95122a03d27ffba222fa9807 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 21:08:16 -0400 Subject: adjust aerc config --- aerc/.config/aerc/aerc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aerc/.config/aerc/aerc.conf b/aerc/.config/aerc/aerc.conf index f60d54e..a8afb05 100644 --- a/aerc/.config/aerc/aerc.conf +++ b/aerc/.config/aerc/aerc.conf @@ -589,7 +589,7 @@ log-level = debug # html emails. # # Default: text/plain,text/html -alternatives=text/html,text/plain +# alternatives=text/html,text/plain # # Default setting to determine whether to show full headers or only parsed -- cgit v1.2.3 From fa669fb4f8a1cc6c251c149b9e402568eb2773bd Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 21:30:43 -0400 Subject: tweak zsh --- zsh/.zsh/history.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/zsh/.zsh/history.sh b/zsh/.zsh/history.sh index 05d5cd3..4f83e1c 100644 --- a/zsh/.zsh/history.sh +++ b/zsh/.zsh/history.sh @@ -1,8 +1,7 @@ #!/usr/bin/env zsh -eval "$(atuin init zsh)" +eval "$(atuin init zsh --disable-up-arrow)" -# Disable zsh default history -unset HISTFILE -HISTSIZE=0 -SAVEHIST=0 +export HISTFILE=~/.zhistory +export HISTSIZE=100000 +export SAVEHIST=100000 -- cgit v1.2.3 From 15bb73ca2413dcce2484218d34a7ed1672151d52 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 21:30:57 -0400 Subject: adjust atuin --- atuin/.config/atuin/config.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atuin/.config/atuin/config.toml b/atuin/.config/atuin/config.toml index 11fb888..39c5f7a 100644 --- a/atuin/.config/atuin/config.toml +++ b/atuin/.config/atuin/config.toml @@ -43,7 +43,7 @@ ## which filter mode to use by default ## possible values: "global", "host", "session", "directory", "workspace" ## consider using search.filters to customize the enablement and order of filter modes -filter_mode = "session" +filter_mode = "global" ## With workspace filtering enabled, Atuin will filter for commands executed ## in any directory within a git repository tree (default: false). @@ -56,16 +56,16 @@ filter_mode = "session" ## which filter mode to use when atuin is invoked from a shell up-key binding ## the accepted values are identical to those of "filter_mode" ## leave unspecified to use same mode set in "filter_mode" -# filter_mode_shell_up_key_binding = "global" +# filter_mode_shell_up_key_binding = "session" ## which search mode to use when atuin is invoked from a shell up-key binding ## the accepted values are identical to those of "search_mode" ## leave unspecified to use same mode set in "search_mode" -# search_mode_shell_up_key_binding = "fuzzy" +# search_mode_shell_up_key_binding = "prefix" ## which style to use ## possible values: auto, full, compact -# style = "auto" +style = "compact" ## the maximum number of lines the interface should take up ## set it to 0 to always go full screen -- cgit v1.2.3 From 66ad77b8b1ec3ddf472acd705cb2060fc1a8971b Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 20 Jul 2025 21:47:48 -0400 Subject: Simplify aerc config --- aerc/.config/aerc/accounts.conf | 4 +- executables/bin/msmtp-queue | 294 ---------------------------------------- executables/bin/msmtp-send | 147 -------------------- 3 files changed, 2 insertions(+), 443 deletions(-) delete mode 100755 executables/bin/msmtp-queue delete mode 100755 executables/bin/msmtp-send diff --git a/aerc/.config/aerc/accounts.conf b/aerc/.config/aerc/accounts.conf index 4f48be4..8b58835 100644 --- a/aerc/.config/aerc/accounts.conf +++ b/aerc/.config/aerc/accounts.conf @@ -1,6 +1,6 @@ [Personal Gmail] source = maildir://~/Mail/Gmail -outgoing = /usr/local/bin/msmtp-send-simple --account gmail +outgoing = msmtp -t --account gmail default = INBOX from = Eugene Triguba copy-to = Sent @@ -10,7 +10,7 @@ check-mail-timeout = 30s [Personal iCloud] source = maildir://~/Mail/iCloud -outgoing = /usr/local/bin/msmtp-send-simple --account icloud +outgoing = msmtp -t --account icloud default = INBOX from = Eugene Triguba copy-to = Sent diff --git a/executables/bin/msmtp-queue b/executables/bin/msmtp-queue deleted file mode 100755 index fb1e487..0000000 --- a/executables/bin/msmtp-queue +++ /dev/null @@ -1,294 +0,0 @@ -#!/usr/bin/env bash -# msmtp queue management utility -# -# Provides commands to process, check status, and clear the -# msmtp email queue that is populated by msmtp-send. -set -euo pipefail - -DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}" -QUEUE_DIR="${DATA_DIR}/msmtp-queue" -LOG_FILE="${DATA_DIR}/msmtp-queue-processor.log" -MSMTP_PATH="$(command -v msmtp)" - -main() { - if [[ $# -eq 0 ]]; then - print_usage - exit 1 - fi - - local subcommand="$1" - shift - - case "$subcommand" in - process) - process_queue "$@" - ;; - status) - show_status "$@" - ;; - clear) - clear_queue "$@" - ;; - -h | --help) - print_usage - exit 0 - ;; - *) - log_message "ERROR" "Unknown subcommand: $subcommand" - print_usage - exit 1 - ;; - esac -} - -print_usage() { - cat < [OPTIONS] - -A utility to manage the msmtp email queue. - -SUBCOMMANDS: - process Process all queued emails (attempt to send) - status Show queue status and recent activity - clear [ACCOUNT] Clear queued emails (all accounts or specific account) - -OPTIONS: - -h, --help Show this help message - -EXAMPLES: - $(basename "$0") process - $(basename "$0") status - $(basename "$0") clear - $(basename "$0") clear gmail - -NOTES: - - Queue directory: $QUEUE_DIR - - Log file: $LOG_FILE - - Queued files are named: timestamp-pid-random-ACCOUNT -USAGE -} - -log_message() { - local level="$1" - shift - local message - message="$(date '+%Y-%m-%d %H:%M:%S') [$level] $*" - - if [[ -d "$QUEUE_DIR" ]]; then - echo "$message" >>"$LOG_FILE" - fi - echo "$message" >&2 -} - -process_queue() { - if [[ $# -gt 0 ]]; then - log_message "ERROR" "process subcommand takes no arguments" - print_usage - exit 1 - fi - - if ! command -v "$MSMTP_PATH" >/dev/null 2>&1; then - log_message "ERROR" "msmtp not found at $MSMTP_PATH" - exit 1 - fi - - setup_queue_directory - - local total_count - total_count="$(count_queued_files)" - if [[ "$total_count" -eq 0 ]]; then - log_message "INFO" "No emails in queue" - return 0 - fi - - log_message "DEBUG" "Files from get_queued_files:" - get_queued_files | while IFS= read -r debug_file; do - log_message "DEBUG" " - $debug_file" - done - - log_message "INFO" "Processing $total_count queued emails" - local sent_count=0 - local failed_count=0 - # NOTE: Temporarily disable exit on error for msmtp call - # so that it can continue processing other files even if - # one fails. - set +e - while IFS= read -r file; do - if [[ -n "$file" ]]; then - local account - account="$(extract_account_from_filename "$file")" - - log_message "INFO" "Attempting to send $(basename "$file") via $account" - - local msmtp_output - if msmtp_output=$("$MSMTP_PATH" --account="$account" -t <"$file" 2>&1); then - rm "$file" - log_message "INFO" "SUCCESS: Sent $(basename "$file") via $account" - ((sent_count++)) - else - log_message "ERROR" "FAILED: Could not send $(basename "$file") via $account - $msmtp_output" - ((failed_count++)) - fi - fi - done < <(get_queued_files) - set -e - - log_message "INFO" "Processing complete: $sent_count sent, $failed_count failed" -} - -setup_queue_directory() { - if ! mkdir -p "$QUEUE_DIR"; then - log_message "ERROR" "Failed to create queue directory: $QUEUE_DIR" - exit 1 - fi -} - -extract_account_from_filename() { - local filename="$1" - local basename_file - basename_file="$(basename "$filename")" - - # NOTE: Expected format of timestamp-pid-random-ACCOUNT - if [[ "$basename_file" =~ ^[0-9]+-[0-9]+-[a-fA-F0-9]+-(.+)$ ]]; then - echo "${BASH_REMATCH[1]}" - else - log_message "WARN" "Could not extract account from filename: $basename_file" - echo "unknown" - fi -} - -get_queued_files() { - local account_filter="${1:-}" - - if [[ ! -d "$QUEUE_DIR" ]]; then - return 0 - fi - - for file in "$QUEUE_DIR"/*; do - if [[ -f "$file" ]]; then - if [[ -z "$account_filter" ]]; then - echo "$file" - else - local file_account - file_account="$(extract_account_from_filename "$file")" - if [[ "$file_account" == "$account_filter" ]]; then - echo "$file" - fi - fi - fi - done -} - -count_queued_files() { - local account_filter="${1:-}" - local count=0 - - while IFS= read -r -d '' file; do - ((count++)) - done < <(get_queued_files "$account_filter" | tr '\n' '\0') - - echo "$count" -} - -show_status() { - if [[ $# -gt 0 ]]; then - log_message "ERROR" "status subcommand takes no arguments" - print_usage - exit 1 - fi - - setup_queue_directory - - echo "=== Queue Status ===" - - local total_count - total_count="$(count_queued_files)" - echo "Total queued: $total_count" - - if [[ "$total_count" -gt 0 ]]; then - echo "" - echo "By account:" - while IFS= read -r account; do - if [[ -n "$account" ]]; then - local account_count - account_count="$(count_queued_files "$account")" - echo " $account: $account_count" - fi - done < <(get_all_accounts) - fi - - if [[ -f "$LOG_FILE" ]]; then - echo "" - echo "=== Recent Activity (last 10 lines) ===" - tail -10 "$LOG_FILE" 2>/dev/null || echo "No log entries yet" - fi -} - -get_all_accounts() { - local accounts=() - - while IFS= read -r file; do - if [[ -n "$file" ]]; then - local account - account="$(extract_account_from_filename "$file")" - if [[ "$account" != "unknown" ]]; then - accounts+=("$account") - fi - fi - done < <(get_queued_files) - - # Remove duplicates and sort - printf '%s\n' "${accounts[@]}" | sort -u -} - -clear_queue() { - local account_filter="${1:-}" - - if [[ $# -gt 1 ]]; then - log_message "ERROR" "clear subcommand takes at most one argument (account name)" - print_usage - exit 1 - fi - - setup_queue_directory - - if [[ -n "$account_filter" ]]; then - local account_count - account_count="$(count_queued_files "$account_filter")" - - if [[ "$account_count" -eq 0 ]]; then - echo "No queued emails for account: $account_filter" - return 0 - fi - - while IFS= read -r file; do - if [[ -n "$file" ]]; then - rm "$file" - fi - done < <(get_queued_files "$account_filter") - - log_message "INFO" "Cleared $account_count queued emails for account: $account_filter" - echo "Cleared $account_count queued emails for account: $account_filter" - else - local total_count - total_count="$(count_queued_files)" - - if [[ "$total_count" -eq 0 ]]; then - echo "No queued emails to clear" - return 0 - fi - - while IFS= read -r file; do - if [[ -n "$file" ]]; then - rm "$file" - fi - done < <(get_queued_files) - - log_message "INFO" "Cleared $total_count queued emails (all accounts)" - echo "Cleared $total_count queued emails (all accounts)" - fi -} - -if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then - main "$@" -fi diff --git a/executables/bin/msmtp-send b/executables/bin/msmtp-send deleted file mode 100755 index fad2f9e..0000000 --- a/executables/bin/msmtp-send +++ /dev/null @@ -1,147 +0,0 @@ -#!/bin/bash -# Smart sendmail replacement with account selection and offline queuing -# -# When the mail server is offline, emails are queued in a local directory. -# When the server is back online, queued emails are sent automatically. -set -euo pipefail - -MSMTP_ACCOUNT="" -DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}" -QUEUE_DIR="${DATA_DIR}/msmtp-queue" -TEMP_DIR="${DATA_DIR}/msmtp-temp" -MSMTP_PATH="$(command -v msmtp)" - -main() { - parse_args "$@" - - if ! command -v "$MSMTP_PATH" >/dev/null 2>&1; then - log_message "ERROR" "msmtp not found at $MSMTP_PATH" - exit 1 - fi - - setup_directories - - local temp_file - temp_file=$(create_temp_file) - if ! cat >"$temp_file"; then - log_message "ERROR" "Failed to read email content" - cleanup_temp_file "$temp_file" - exit 1 - fi - - send_email "$temp_file" "$MSMTP_ACCOUNT" -} - -parse_args() { - while [[ $# -gt 0 ]]; do - case $1 in - --account) - if [[ -z "${2:-}" ]]; then - log_message "ERROR" "--account requires an argument" - print_usage - exit 1 - fi - MSMTP_ACCOUNT="$2" - shift 2 - ;; - -h | --help) - print_usage - exit 0 - ;; - esac - done - - if [[ -z "$MSMTP_ACCOUNT" ]]; then - log_message "ERROR" "No account specified. Use --account to specify an account." - print_usage - exit 1 - fi -} - -log_message() { - local level="$1" - shift - echo "$(date '+%Y-%m-%d %H:%M:%S') [$level] $*" >&2 -} - -print_usage() { - cat < [OPTIONS] [RECIPIENT...] - -A sendmail replacement that routes emails through msmtp with offline queuing. - -ARGUMENTS: - --account Specify the account to use. It should match the name in your - msmtp configuration. - RECIPIENT... Email recipients (optional, can be specified in email body) - -OPTIONS: - -h, --help Show this help message - -EXAMPLES: - echo "test email" | $(basename "$0") --account gmail user@example.com - -NOTES: - - Emails are queued offline and sent when connection is available - - Queue directory: $QUEUE_DIR -USAGE -} - -create_temp_file() { - local timestamp - timestamp="$(date +%s)" - local pid="$$" - local random - random="$(od -An -N4 -tx4 /dev/null; then - log_message "INFO" "Email sent successfully via $account" - cleanup_temp_file "$temp_file" - return 0 - else - log_message "INFO" "Failed to send email, queuing for later" - queue_email "$temp_file" "$account" - return 1 - fi -} - -queue_email() { - local temp_file="$1" - local account="$2" - local timestamp - timestamp="$(date +%s)" - local pid="$$" - local random - random="$(od -An -N4 -tx4 Date: Sun, 20 Jul 2025 21:51:50 -0400 Subject: fix install script --- install.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install.sh b/install.sh index 64e0845..5e4013a 100755 --- a/install.sh +++ b/install.sh @@ -34,8 +34,6 @@ main() { mkdir -p ~/Mail/Gmail/INBOX ~/Mail/iCloud/INBOX ~/bin/ ~/src/ sudo ln -sf "$HOME/bin/get-password" /usr/local/bin/get-password sudo ln -sf "$(which op)" /usr/local/bin/op - sudo ln -sf "$HOME/bin/msmtp-send" /usr/local/bin/msmtp-send - sudo ln -sf "$HOME/bin/msmtp-queue" /usr/local/bin/msmtp-queue echo "Initializing TPM (Tmux Plugin Manager)..." setup_tpm -- cgit v1.2.3 From 4a68831504c1683ec5bdc76c1d7ae017461ae45a Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 21 Jul 2025 06:47:48 -0400 Subject: remove copilot plugin --- nvim/.config/nvim/lazy-lock.json | 5 +---- nvim/.config/nvim/lua/plugins/blink.lua | 14 ++++++-------- nvim/.config/nvim/lua/plugins/copilot.lua | 24 ------------------------ 3 files changed, 7 insertions(+), 36 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plugins/copilot.lua diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 3e7b5c1..f8142c7 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,11 +1,8 @@ { - "CopilotChat.nvim": { "branch": "main", "commit": "f7eb423baccbb27f5b5608fb91acee2d6bc769c7" }, "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, "blink.cmp": { "branch": "main", "commit": "586ee87534f5bf65f1c8dea2d1da2a57e8cddd36" }, "conform.nvim": { "branch": "master", "commit": "973f3cb73887d510321653044791d7937c7ec0fa" }, - "copilot.lua": { "branch": "master", "commit": "14bf786180b2ca4578915c56989b6d676dddc6f3" }, - "everforest-nvim": { "branch": "main", "commit": "2eb7c348f880ba93de4d98cae049c9441f5d4d49" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "gitsigns.nvim": { "branch": "main", "commit": "0cb5a7753d3c4b8e9cfdc9d88d9110cb8d4b1544" }, "harpoon": { "branch": "harpoon2", "commit": "ed1f853847ffd04b2b61c314865665e1dadf22c7" }, @@ -25,7 +22,7 @@ "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" }, "nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" }, - "nvim-lint": { "branch": "master", "commit": "52e603c4b66f2fb4f268916725076e6c3ae412fd" }, + "nvim-lint": { "branch": "master", "commit": "9c6207559297b24f0b7c32829f8e45f7d65b991f" }, "nvim-lspconfig": { "branch": "master", "commit": "f47cd681d7cb6048876a2e908b6d8ba1e530d152" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, diff --git a/nvim/.config/nvim/lua/plugins/blink.lua b/nvim/.config/nvim/lua/plugins/blink.lua index e035292..3fd95e3 100644 --- a/nvim/.config/nvim/lua/plugins/blink.lua +++ b/nvim/.config/nvim/lua/plugins/blink.lua @@ -32,7 +32,6 @@ return { opts = {}, }, 'folke/lazydev.nvim', - 'giuxtaposition/blink-cmp-copilot', }, --- @module 'blink.cmp' --- @type blink.cmp.Config @@ -78,15 +77,14 @@ return { }, sources = { - default = { 'lsp', 'path', 'snippets', 'lazydev', 'copilot' }, + default = { + 'lsp', + 'path', + 'snippets', + 'lazydev', + }, providers = { lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, - copilot = { - name = 'copilot', - module = 'blink-cmp-copilot', - score_offset = 100, - async = true, - }, }, }, diff --git a/nvim/.config/nvim/lua/plugins/copilot.lua b/nvim/.config/nvim/lua/plugins/copilot.lua deleted file mode 100644 index 8f78f47..0000000 --- a/nvim/.config/nvim/lua/plugins/copilot.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - { - 'zbirenbaum/copilot.lua', - cmd = 'Copilot', - event = 'InsertEnter', - opts = {}, - }, - { - 'CopilotC-Nvim/CopilotChat.nvim', - dependencies = { - { 'zbirenbaum/copilot.lua' }, - { 'nvim-lua/plenary.nvim', branch = 'master' }, -- for curl, log and async functions - }, - build = 'make tiktoken', -- Only on MacOS or Linux - config = function() - require('CopilotChat').setup { - model = 'claude-sonnet-4', - } - vim.keymap.set('n', 'tc', function() - vim.cmd 'CopilotChatToggle' - end, { desc = '[Copilot] Toggle Copilot Chat' }) - end, - }, -} -- cgit v1.2.3 From cea1ade624a5ba3ab49066f88295b0a7b03b5a3c Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 21 Jul 2025 06:56:51 -0400 Subject: turn off show git in tmux config --- tmux/.config/tmux/plugins.tmux | 1 + 1 file changed, 1 insertion(+) diff --git a/tmux/.config/tmux/plugins.tmux b/tmux/.config/tmux/plugins.tmux index e5750e3..004b1bb 100644 --- a/tmux/.config/tmux/plugins.tmux +++ b/tmux/.config/tmux/plugins.tmux @@ -41,5 +41,6 @@ set -g @tokyo-night-tmux_window_tidy_icons 1 set -g @tokyo-night-tmux_show_datetime 1 set -g @tokyo-night-tmux_date_format YMD set -g @tokyo-night-tmux_time_format 24H +set -g @tokyo-night-tmux_show_git 0 run '$HOME/.config/tmux/plugins/tpm/tpm' -- cgit v1.2.3