Skip to content

Commit

Permalink
neomutt: new wrapper for urlscan
Browse files Browse the repository at this point in the history
  • Loading branch information
rbmarliere committed Jun 6, 2024
1 parent 32aee2d commit b80b260
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .config/neomutt/macros
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ macro index <esc>s ":set confirmappend=no delete=yes auto_tag=yes\n<clear-flag>N
macro index \Ca ":set confirmappend=no delete=yes auto_tag=yes\n<clear-flag>Nk<save-message>${my_archive}\n<sync-mailbox>:set confirmappend=yes delete=ask-yes\n"
macro index \Cb ":set delete=yes\nD~=\n$" "delete duplicate messages"
macro index,pager L '| git am -s'\n
macro pager \Co "<pipe-message> urlscan --run-safe 'wl-copy {}' --single<Enter>" "call urlscan to extract URLs out of a message"
macro pager \Co "<pipe-message> urlscan --run '~/.local/bin/neomutt.urlwrapper {}' --single<Enter>" "call urlscan to extract URLs out of a message"
2 changes: 1 addition & 1 deletion .config/tmux/tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ bind-key f run "tmux neww ~/.local/bin/tmux_loader"
bind-key S run "tmux send 'stty cols #{pane_width} rows #{pane_height}' Enter"
bind-key N run "~/.local/bin/tmux_popup '~/.local/bin/vi ~/notes/imm'"

set-option -g set-clipboard off
set-option -g set-clipboard on
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi V send-keys -X rectangle-toggle
Expand Down
7 changes: 7 additions & 0 deletions .local/bin/neomutt.urlwrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [ -z "$1" ]; then
exit 1
fi

echo $1 | sh -c 'printf "\033]52;c;%s\a" "$(base64)"'

0 comments on commit b80b260

Please sign in to comment.