commit 89e94639c2e8d6a9b1689a4a9cb78d6ae79e0c82 parent 0a02b130965e18c23eed5740a001905271c540fa Author: Yohanes Bandung <hi@ybbond.dev> Date: Sat, 30 May 2020 21:24:14 +0700 new: mailmate settings, updated kitty, nvim and vim Diffstat:
| M | .config/kitty/kitty.conf | | | 2 | +- |
| M | .config/nvim/init.vim | | | 1 | + |
| M | .zshrc | | | 40 | ++++++++++++++++++++-------------------- |
| A | Library/Application Support/MailMate/Resources/KeyBindings/gmail-extended.plist | | | 114 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| A | Library/Application Support/MailMate/Resources/Layouts/Mailboxes/correspondence-arcs-widescreen.plist | | | 198 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
5 files changed, 334 insertions(+), 21 deletions(-)
diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf @@ -588,7 +588,7 @@ close_on_child_death no #: to yes means that any background processes still using the terminal #: can fail silently because their stdout/stderr/stdin no longer work. -allow_remote_control no +allow_remote_control yes #: Allow other programs to control kitty. If you turn this on other #: programs can control all aspects of kitty, including sending text diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim @@ -441,3 +441,4 @@ hi htmlStrike gui=strikethrough cterm=strikethrough guibg=Black ctermbg=Black hi Todo guibg=White ctermbg=White guifg=Black ctermfg=Black gui=bold,italic cterm=bold,italic hi NonText guifg=#4a4a59 ctermfg=Gray hi SpecialKey guifg=#4a4a59 ctermfg=Gray +hi SignColumn ctermbg=NONE cterm=NONE guibg=NONE gui=NONE diff --git a/.zshrc b/.zshrc @@ -2,8 +2,8 @@ # EXPORTS ######################################################################## -export EDITOR='nvim' -export SHELL='zsh' +export EDITOR=nvim +export SHELL=zsh export LANG=en_US.UTF-8 export TERM=xterm-256color @@ -90,7 +90,7 @@ n () # stty lwrap undef # stty lnext undef - nnn -e "$@" + nnn -deo "$@" if [ -f "$NNN_TMPFILE" ]; then . "$NNN_TMPFILE" @@ -263,22 +263,22 @@ precmd () { echo -n -e "\a" } -# Change cursor shape for different vi modes. -function zle-keymap-select { - if [[ ${KEYMAP} == vicmd ]] || - [[ $1 = 'block' ]]; then - echo -ne '\e[1 q' - - elif [[ ${KEYMAP} == main ]] || - [[ ${KEYMAP} == viins ]] || - [[ ${KEYMAP} = '' ]] || - [[ $1 = 'beam' ]]; then - echo -ne '\e[5 q' - fi -} +# # Change cursor shape for different vi modes. +# function zle-keymap-select { +# if [[ ${KEYMAP} == vicmd ]] || +# [[ $1 = 'block' ]]; then +# echo -ne '\e[1 q' + +# elif [[ ${KEYMAP} == main ]] || +# [[ ${KEYMAP} == viins ]] || +# [[ ${KEYMAP} = '' ]] || +# [[ $1 = 'beam' ]]; then +# echo -ne '\e[5 q' +# fi +# } zle -N zle-keymap-select -_fix_cursor() { - echo -ne '\e[5 q' -} -precmd_functions+=(_fix_cursor) +# _fix_cursor() { +# echo -ne '\e[5 q' +# } +# precmd_functions+=(_fix_cursor) alias config=$CONFTREE diff --git a/Library/Application Support/MailMate/Resources/KeyBindings/gmail-extended.plist b/Library/Application Support/MailMate/Resources/KeyBindings/gmail-extended.plist @@ -0,0 +1,114 @@ +{ + + /* + * Gmail (extended) defaults for MailMate + * Extended key bindings down below + * + * Based on: http://mail.google.com/support/bin/answer.py?answer=6594 + */ + + /* + * | Keybindings | + * | Shortcut | Code | Description | + * | -------- | ---- | ----------- | + * | a | a | - | + * | ⌃ a | ^a | Control-a | + * | ⌥ a | ~a | Option-a | + * | ⇧ a | A | Shift-a | + * | ⌘ a | @a | Command-a | + */ + + "@\U000A" = "send:"; // ⌘+return + "@\U000D" = "send:"; // ⌘+enter + + "c" = "newMessage:"; + "/" = "searchAllMessages:"; + // "n" = "nextMessage:"; + // "p" = "previousMessage:"; + "j" = "nextThread:"; + "k" = "previousThread:"; + "o" = "openMessages:"; // Gmail: Also expands or collapses a message if you are in 'Conversation View.' + "e" = "archive:"; + "^m" = ( "toggleMuteState:", "archive:" ); // FIXME: Should be 'markAsMuted:' + "s" = "toggleFlag:"; + "!" = "moveToJunk:"; + "r" = "reply:"; + "a" = "replyAll:"; + "f" = "forwardMessage:"; + "^s" = "saveDocument:"; + // l Label + "v" = "moveToMailbox:"; + "#" = "deleteMessage:"; + + // "I" = ( "setTag:", "\\Seen", "nextMessage:"); + "U" = ( "removeTag:", "\\Seen"); + + /* Only in MailMate */ + + // "N" = "moveDownAndModifySelection:"; + // "P" = "moveUpAndModifySelection:"; + "J" = "moveDownAndModifySelection:"; + "K" = "moveUpAndModifySelection:"; + "Z" = "redo:"; + + /* Combo-Keys */ + + "g" = { + "a" = ( "goToMailbox:", "ALL_MESSAGES" ); + "s" = ( "goToMailbox:", "FLAGGED" ); + // g then c Go to 'Contacts' Takes you to your Contacts list. + "d" = ( "goToMailbox:", "DRAFTS" ); + "l" = "goToMailbox:"; + "i" = ( "goToMailbox:", "INBOX" ); + "t" = ( "goToMailbox:", "SENT" ); + "g" = "selectFirstMessageRow:"; /* gg, like in Vim */ + }; + "G" = "selectLastMessageRow:"; /* G, like in Vim */ + + "*" = { + "a" = "selectAll:"; + "n" = "deselectAll:"; + "r" = ( "selectWithFilter:", "#flags.flag = '\\Seen'"); // Selects all mail you've read. + "u" = ( "selectWithFilter:", "#flags.flag !=[x] '\\Seen'"); // Selects all unread mail. + "s" = ( "selectWithFilter:", "#flags.flag = '\\Flagged'"); // Selects all starred mail. + "t" = ( "selectWithFilter:", "#flags.flag !=[x] '\\Flagged'"); // Selects all unstarred mail. + }; + + /* Added-Keys */ + + "p" = "selectPreviousMailboxRow:"; + "n" = "selectNextMailboxRow:"; + "P" = "selectPreviousMailbox:"; + "N" = "selectNextMailbox:"; + "^l" = "loadImagesOnce:"; + "^j" = "nextMessage:"; + "^k" = "previousMessage:"; + "^J" = "moveDownAndModifySelection:"; + "^K" = "moveUpAndModifySelection:"; + "I" = ( "setTag:", "\\Seen"); + +} + + /* + * + * Not included above: + * + * u Return to conversation list Refreshes your page and returns you to the inbox, or list of conversations. + * x Select conversation Automatically checks and selects a conversation so that you can archive, apply a label, or choose an action from the drop-down menu to apply to that conversation. + * + Mark as important Helps Gmail learn what's important to you by marking misclassified messages. (Specific to Priority Inbox) + * - Mark as unimportant Helps Gmail learn what's not important to you by marking misclassified messages. (Specific to Priority Inbox) + * + * [ Archive and previous Removes the current view's label from your conversation and moves to the previous one. + * ] Archive and next Removes the current view's label from your conversation and moves to the next one. + * y Remove from Current View* Automatically removes the message or conversation from your current view. + * From 'Inbox,' 'y' means Archive + * From 'Starred,' 'y' means Unstar + * From 'Trash,' 'y' means Move to inbox + * From any label, 'y' means Remove the label + * * 'y' has no effect if you're in 'Spam,' 'Sent,' or 'All Mail.' + * . Show more actions Displays the 'More Actions' drop-down menu. + * + * y then o Archive and next Archives your conversation and moves to the next one. + * + * + */ diff --git a/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/correspondence-arcs-widescreen.plist b/Library/Application Support/MailMate/Resources/Layouts/Mailboxes/correspondence-arcs-widescreen.plist @@ -0,0 +1,198 @@ +{ + name = "Correspondence Arcs (Widescreen)"; + rootViewer = + { + viewerType = "MmSplitView"; + orientation = "horizontal"; + children = + ( + { + // Mailboxes sidebar + viewerType = "MmBoxView"; + orientation = "vertical"; + defaultSize = 200; + minWidth = 100; + autoresize = 0; + toggleMenuTitle = "Mailboxes"; + toggleKeyEquivalent = "^~@d"; + + dragRect = { width = 16.0; height = 16.0; location = "bottomRight"; }; + + children = + ( + { + identifier = "mailboxesOutline"; + viewerType = "MmMailboxesOutlineView"; + stickyMessages = 1; + }, + { + viewerType = "MmMailboxesStatusBar"; + }, + ); + }, + { + // Main window view + // Split the entire window vertically to separate sidebar from mailbox view + viewerType = "MmSplitView"; + orientation = "horizontal"; + // collapsibleSubview = 2; // Incomplete support -- no way to get it back (1 = first, 2 = last) + children = + ( + { + // Top of main view + identifier = "pathOutlineBox"; + viewerType = "MmBoxView"; + orientation = "vertical"; + defaultSize = 1000; + autoresize = 0; + children = + ( + { + identifier = "pathControl"; + viewerType = "MmPathControlView"; + sources = ( { sourceIdentifier = "mailboxesOutline"; } ); + }, + { + viewerType = "MmSeparatorView"; showWithViews = ( "pathControl" ); + }, + { + viewerType = "MmSplitView"; + minHeight = 50; + orientation = "vertical"; + children = + ( + { + // Message list + viewerType = "MmBoxView"; + orientation = "vertical"; + defaultSize = 800; + minWidth = 500; + autoresize = 0; + children = + ( + { + viewerType = "MmLabelView"; + // TODO: Make label state current mailbox + label = "Messages"; + }, + { viewerType = "MmSeparatorView"; }, + { + identifier = "mainOutline"; + viewerType = "MmMessagesOutlineView"; + /* columnSettings = "outlineColumns"; */ + sources = ( { sourceIdentifier = "pathControl"; } ); + }, + ); + }, + { + // Correspondence view + viewerType = "MmBoxView"; + orientation = "vertical"; + defaultSize = 300; + minWidth = 300; + autoresize = 0; + children = + ( + { + viewerType = "MmLabelView"; + label = "Correspondence"; + }, + { viewerType = "MmSeparatorView"; }, + { + identifier = "correspondenceOutline"; + viewerType = "MmMessagesOutlineView"; + minWidth = 100; + sources = ( { sourceIdentifier = "mainOutline"; } ); + selectionSources = ( { sourceIdentifier = "mainOutline"; } ); + // FIXME: The transformation does not work 'per' message, i.e., it tries to combine any 'from' with any 'to' in $mainOutline. + transformation = "$ALL_MESSAGES.filter((from.address = $mainOutline.from.address and #recipient.address = $mainOutline.#recipient.address) or (from.address = $mainOutline.#recipient.address and #recipient.address = $mainOutline.from.address))"; + defaultColumns = ( "subject", "relativeDate" ); + outlineColumn = "subject"; + }, + ); + toggleMenuTitle = "Correspondence View"; + toggleKeyEquivalent = "^~@c"; + }, + ); + }, + ); + }, + { + viewerType = "MmSplitView"; + minHeight = 50; + orientation = "horizontal"; + children = + ( + { + // Thread arcs view + viewerType = "MmThreadArcsView"; + sources = ( { sourceIdentifier = "mainOutline"; } ); + selectionSources = ( { sourceIdentifier = "mainOutline"; } ); + transformation = "$ALL_MESSAGES.filter(#thread-id =[c] $mainOutline.#thread-id)"; + minWidth = 10; + defaultSize = 10; + orientation = "vertical"; + toggleMenuTitle = "Thread Arc View"; + toggleKeyEquivalent = ""; + }, + ); + }, + { + // Bottom of main view + // Split the main window horizontally to separate messages from message list + viewerType = "MmSplitView"; + orientation = "vertical"; + children = + ( + { + // Email view + viewerType = "MmBoxView"; + orientation = "vertical"; + children = + ( + { + identifier = "headersView"; + viewerType = "MmHeadersView"; + sources = ( { sourceIdentifier = "correspondenceOutline"; } ); + inject = ( "headersFormatting.plist" ); + }, + { viewerType = "MmSeparatorView"; showWithViews = ( "headersView" ); }, + { + identifier = "tagsEditor"; + viewerType = "MmTagsEditor"; + sources = ( { sourceIdentifier = "correspondenceOutline"; } ); + }, + { viewerType = "MmSeparatorView"; showWithViews = ( "tagsEditor" ); }, + { + identifier = "blockingView"; + viewerType = "MmImageBlockingView"; + sources = ( { sourceIdentifier = "correspondenceOutline"; } ); + transformation = "$correspondenceOutline.filter(##blocked-count exists)"; + }, + { viewerType = "MmSeparatorView"; showWithViews = ( "blockingView" ); }, + { + identifier = "securityView"; + viewerType = "MmSecurityView"; + sources = ( { sourceIdentifier = "correspondenceOutline"; } ); + transformation = "$correspondenceOutline.filter(##security-problem exists)"; + }, + { viewerType = "MmSeparatorView"; showWithViews = ( "securityView" ); }, + { + identifier = "messageView"; + viewerType = "MmWebView"; + sources = ( { sourceIdentifier = "correspondenceOutline"; } ); + minWidth = 175; + minHeight = 50; + }, + ); + } + ); + + toggleMenuTitle = "Message View"; + toggleKeyEquivalent = "^~@h"; + }, + ); + }, + ); + }; +}