aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterminaldweller <thabogre@gmail.com>2022-02-14 19:23:05 +0000
committerterminaldweller <thabogre@gmail.com>2022-02-14 19:23:05 +0000
commit8a4d8d3e1155a66c1bdf5f794eebc1261656ffe8 (patch)
tree438694e932edd0ad4aaa322ca67e30125d302cf4
parentupdates (diff)
downloadscripts-8a4d8d3e1155a66c1bdf5f794eebc1261656ffe8.tar.gz
scripts-8a4d8d3e1155a66c1bdf5f794eebc1261656ffe8.zip
fix for gmail inboxes
-rw-r--r--.mutt/.muttrc16
-rw-r--r--.mutt/account.gmail4
-rw-r--r--.mutt/account.self3
-rw-r--r--.zshrc2
-rw-r--r--qtbrowser/config.py200
5 files changed, 120 insertions, 105 deletions
diff --git a/.mutt/.muttrc b/.mutt/.muttrc
index 9b229c6..1575761 100644
--- a/.mutt/.muttrc
+++ b/.mutt/.muttrc
@@ -1,4 +1,7 @@
# vim: filetype=neomuttrc
+set mailcap_path= $HOME/.mutt/mailcap
+set allow_ansi
+set smart_wrap
set imap_keepalive = 900
set timeout=60
set move = no
@@ -7,13 +10,15 @@ set ssl_force_tls=yes
folder-hook 'account.gmail' 'source ~/.mutt/account.gmail'
folder-hook 'account.self' 'source ~/.mutt/account.self'
+folder-hook 'account.zharf' 'source ~/.mutt/account.zharf'
# default account
source ~/.mutt/account.self
# source ~/.mutt/account.gmail
-macro index <f2> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.self<enter><change-folder>!<enter>'
-macro index <f3> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.gmail<enter><change-folder>!<enter>'
+macro index,pager <f2> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.self<enter><change-folder>!<enter>'
+macro index,pager <f3> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.gmail<enter><change-folder>!<enter>'
+macro index,pager <f4> '<sync-mailbox><refresh><enter-command>source ~/.mutt/account.zharf<enter><change-folder>!<enter>'
# macros
macro index A "T~N<enter>;WNT~O<enter>;WO\CT~T<enter>” “mark all messages read"
@@ -170,6 +175,8 @@ color body brightcolor39 default "([a-z][a-z0-9+-]*://(((([a-z
# and a heavy handed email regex
color body brightcolor39 default "((@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]),)*@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\.[0-9]?[0-9]?[0-9]\\]):)?[0-9a-z_.+%$-]+@(([0-9a-z-]+\\.)*[0-9a-z-]+\\.?|#[0-9]+|\\[[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\.[0-2]?[0-9]?[0-9]\\])"
+set display_filter="perl -0777pe 's/___{10,}[^_]*microsoft teams meeting.*to join the meeting<([^>]*).*(___{10,})/\\n────────────────────────────────────────────────────────────────────────\\n\\nTeams Meeting ~~\\n\\nMeeting URL:\\n$1\\n\\n────────────────────────────────────────────────────────────────────────/is'| sed 's/^\\(To\\|CC\\): \\([^<]*[^>]\\)$/\\1\:<\\2>/g' | perl -0777pe 's/(((?!.*CC:)To:|CC:).+?(?=>\\n)>)/$1!REMOVE_ME!\\n!END!/gs' | sed '/^To:/{;:l N;/!END!/b; s/\\(\\n\\| *\\|\\t\\t*\\)/ /g; bl}' | sed '/^To:/,/>$/ s/\\([^>]*>,\\?\\)/\\1\\n/g' | sed -e 's/^ \\(CC:\\)\\(.*$\\)/\\1\\n\\2/' -e 's/^\\(To:\\)\\(.*$\\)/\\1 --------------------------------------------------------------------\\n\\2/' -e 's/^!END!$/------------------------------------------------------------------------/' -e '/!REMOVE_ME!/d' -e '/\\[-- Type: text.* --\\]/d' -e '/\\[-- Autoview.* --\\]/d' -e '/\\[-- Type.* --\\]/d' -e '/\\[-- .*unsupported.* --\\]/d' -e '/\\[-- Attachment #[0-9] --\\]/d' -e 's/Attachment #[0-9]: //g' -e '/./,/^$/!d' -e 's/\\([A-Z]*\\), *\\([A-Za-z]*\\)\\(\"\\)\\?/\\2 \\L\\u\\1\\E\\3/g'"
+
# simplified regex for URL & email
#color body magenta default "(ftp|https?|gopher|news|telnet|finger)://[^ \"\t\r\n]+"
#color body magenta default "[-a-z_0-9.]+@[-a-z_0-9.]+"
@@ -243,7 +250,6 @@ color status default default '\(threads/last-date-received\)'
color status red default '\[([^]]+)\]' 1
color status brightwhite default 'NeoMutt: ([^ ]+)' 1
-set mailcap_path = ~/.mutt/mailcap
auto_view text/html
#set pager_index_lines=10
@@ -303,7 +309,3 @@ color body brightmagenta default "-- Patch Links --"
color body green default "^Merged #.*"
color body red default "^Closed #.*"
color body brightblue default "^Reply to this email.*"
-
-# set pager_format=" %n %zc  %T %s%*  %{!%d %b · %H:%M} %?X?  %X ? %P  "
-# set vfolder_format = " %N %?n?%3n& ? %8m  · %f"
-# set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M"
diff --git a/.mutt/account.gmail b/.mutt/account.gmail
index f3fc94f..3f0ebf0 100644
--- a/.mutt/account.gmail
+++ b/.mutt/account.gmail
@@ -10,8 +10,8 @@ set folder = 'imaps://imap.gmail.com:993'
set spoolfile = '+Inbox'
set postponed = '+Drafts'
set record = '+Sent'
-set trash = '+Trash'
+set trash = ''
set header_cache = ~/.mutt/gmail/cache/headers
set message_cachedir = ~/.mutt/gmail/cache/bodies
set certificate_file = ~/.mutt/gmail/certificates
-mailboxes "+Inbox" "+Drafts" "+Sent" "+Trash"
+mailboxes "Inbox"
diff --git a/.mutt/account.self b/.mutt/account.self
index a1ff604..0b33c94 100644
--- a/.mutt/account.self
+++ b/.mutt/account.self
@@ -14,4 +14,5 @@ set trash = '+Trash'
set header_cache = ~/.mutt/self/cache/headers
set message_cachedir = ~/.mutt/self/cache/bodies
set certificate_file = ~/.mutt/self/certificates
-mailboxes "+INBOX" "+Drafts" "+Sent" "+Trash"
+# mailboxes "+INBOX" "+Drafts" "+Sent" "+Trash"
+mailboxes "+INBOX"
diff --git a/.zshrc b/.zshrc
index 12eaf4a..6d64e2d 100644
--- a/.zshrc
+++ b/.zshrc
@@ -192,6 +192,8 @@ alias screenrc="vim ~/scripts/.screenrc"
alias fixscreenrc="cp ~/scripts/.screenrc ~/"
alias xresources="vim ~/scripts/.Xresources"
alias fixxresources="cp ~/scripts/.Xresources ~/.Xresources && xrdb -merge ~/.Xresources"
+alias qutebrowserrc="vim ~/scripts/qtbrowser/config.py"
+alias fixqutebrowserrc="cp ~/scripts/qtbrowser/config.py ~/.config/qutebrowser/config.py"
#autosuggest
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#5f5fff,bg=#000000,bold"
diff --git a/qtbrowser/config.py b/qtbrowser/config.py
index e82b0a5..15ed60e 100644
--- a/qtbrowser/config.py
+++ b/qtbrowser/config.py
@@ -1,100 +1,110 @@
-import os
+from qutebrowser.config.configfiles import ConfigAPI
+from qutebrowser.config.config import ConfigContainer
+
+config: ConfigAPI = config
+c: ConfigContainer = c
+
+config.load_autoconfig()
+
solarized = {
- 'base03': '#002b36',
- 'base02': '#073642',
- 'base01': '#586e75',
- 'base00': '#657b83',
- 'base0': '#839496',
- 'base1': '#93a1a1',
- 'base2': '#eee8d5',
- 'base3': '#fdf6e3',
- 'yellow': '#b58900',
- 'orange': '#cb4b16',
- 'red': '#dc322f',
- 'magenta': '#d33682',
- 'violet': '#6c71c4',
- 'blue': '#268bd2',
- 'cyan': '#2aa198',
- 'green': '#859900'
+ "base03": "#002b36",
+ "base02": "#073642",
+ "base01": "#586e75",
+ "base00": "#657b83",
+ "base0": "#839496",
+ "base1": "#93a1a1",
+ "base2": "#eee8d5",
+ "base3": "#fdf6e3",
+ "yellow": "#b58900",
+ "orange": "#cb4b16",
+ "red": "#dc322f",
+ "magenta": "#d33682",
+ "violet": "#6c71c4",
+ "blue": "#268bd2",
+ "cyan": "#2aa198",
+ "green": "#005f00",
}
-c.colors.completion.category.bg = solarized['base03']
-c.colors.completion.category.border.bottom = solarized['base03']
-c.colors.completion.category.border.top = solarized['base03']
-c.colors.completion.category.fg = solarized['base3']
-c.colors.completion.even.bg = solarized['base02']
-c.colors.completion.fg = solarized['base3']
-c.colors.completion.item.selected.bg = solarized['violet']
-c.colors.completion.item.selected.border.bottom = solarized['violet']
-c.colors.completion.item.selected.border.top = solarized['violet']
-c.colors.completion.item.selected.fg = solarized['base3']
-c.colors.completion.match.fg = solarized['base2']
-c.colors.completion.odd.bg = solarized['base02']
-c.colors.completion.scrollbar.bg = solarized['base0']
-c.colors.completion.scrollbar.fg = solarized['base2']
-c.colors.downloads.bar.bg = solarized['base03']
-c.colors.downloads.error.bg = solarized['red']
-c.colors.downloads.error.fg = solarized['base3']
-c.colors.downloads.start.bg = '#0000aa'
-c.colors.downloads.start.fg = solarized['base3']
-c.colors.downloads.stop.bg = '#00aa00'
-c.colors.downloads.stop.fg = solarized['base3']
-c.colors.downloads.system.bg = 'rgb'
-c.colors.downloads.system.fg = 'rgb'
-c.colors.hints.bg = solarized['violet']
-c.colors.hints.fg = solarized['base3']
-c.colors.hints.match.fg = solarized['base2']
-c.colors.keyhint.bg = 'rgba(0, 0, 0, 80%)'
-c.colors.keyhint.fg = solarized['base3']
-c.colors.keyhint.suffix.fg = solarized['yellow']
-c.colors.messages.error.bg = solarized['red']
-c.colors.messages.error.border = solarized['red']
-c.colors.messages.error.fg = solarized['base3']
-c.colors.messages.info.bg = solarized['base03']
-c.colors.messages.info.border = solarized['base03']
-c.colors.messages.info.fg = solarized['base3']
-c.colors.messages.warning.bg = solarized['orange']
-c.colors.messages.warning.border = solarized['orange']
-c.colors.messages.warning.fg = solarized['base3']
-c.colors.prompts.bg = solarized['base02']
-c.colors.prompts.border = '1px solid ' + solarized['base3']
-c.colors.prompts.fg = solarized['base3']
-c.colors.prompts.selected.bg = solarized['base01']
-c.colors.statusbar.caret.bg = solarized['blue']
-c.colors.statusbar.caret.fg = solarized['base3']
-c.colors.statusbar.caret.selection.bg = solarized['violet']
-c.colors.statusbar.caret.selection.fg = solarized['base3']
-c.colors.statusbar.command.bg = solarized['base03']
-c.colors.statusbar.command.fg = solarized['base3']
-c.colors.statusbar.command.private.bg = solarized['base01']
-c.colors.statusbar.command.private.fg = solarized['base3']
-c.colors.statusbar.insert.bg = solarized['green']
-c.colors.statusbar.insert.fg = solarized['base3']
-c.colors.statusbar.normal.bg = solarized['base03']
-c.colors.statusbar.normal.fg = solarized['base3']
-c.colors.statusbar.passthrough.bg = solarized['magenta']
-c.colors.statusbar.passthrough.fg = solarized['base3']
-c.colors.statusbar.private.bg = solarized['base01']
-c.colors.statusbar.private.fg = solarized['base3']
-c.colors.statusbar.progress.bg = solarized['base3']
-c.colors.statusbar.url.error.fg = solarized['red']
-c.colors.statusbar.url.fg = solarized['base3']
-c.colors.statusbar.url.hover.fg = solarized['base2']
-c.colors.statusbar.url.success.http.fg = solarized['base3']
-c.colors.statusbar.url.success.https.fg = solarized['base3']
-c.colors.statusbar.url.warn.fg = solarized['yellow']
-c.colors.tabs.bar.bg = '#555555'
-c.colors.tabs.even.bg = solarized['base01']
-c.colors.tabs.even.fg = solarized['base2']
-c.colors.tabs.indicator.error = solarized['red']
-c.colors.tabs.indicator.start = solarized['violet']
-c.colors.tabs.indicator.stop = solarized['orange']
-c.colors.tabs.odd.bg = solarized['base01']
-c.colors.tabs.odd.fg = solarized['base2']
-c.colors.tabs.selected.even.bg = solarized['base03']
-c.colors.tabs.selected.even.fg = solarized['base3']
-c.colors.tabs.selected.odd.bg = solarized['base03']
-c.colors.tabs.selected.odd.fg = solarized['base3']
+c.colors.completion.category.bg = solarized["base03"]
+c.colors.completion.category.border.bottom = solarized["base03"]
+c.colors.completion.category.border.top = solarized["base03"]
+c.colors.completion.category.fg = solarized["base3"]
+c.colors.completion.even.bg = solarized["base02"]
+c.colors.completion.fg = solarized["base3"]
+c.colors.completion.item.selected.bg = solarized["violet"]
+c.colors.completion.item.selected.border.bottom = solarized["violet"]
+c.colors.completion.item.selected.border.top = solarized["violet"]
+c.colors.completion.item.selected.fg = solarized["base3"]
+c.colors.completion.match.fg = solarized["base2"]
+c.colors.completion.odd.bg = solarized["base02"]
+c.colors.completion.scrollbar.bg = solarized["base0"]
+c.colors.completion.scrollbar.fg = solarized["base2"]
+c.colors.downloads.bar.bg = solarized["base03"]
+c.colors.downloads.error.bg = solarized["red"]
+c.colors.downloads.error.fg = solarized["base3"]
+c.colors.downloads.start.bg = "#0000aa"
+c.colors.downloads.start.fg = solarized["base3"]
+c.colors.downloads.stop.bg = "#00aa00"
+c.colors.downloads.stop.fg = solarized["base3"]
+c.colors.downloads.system.bg = "rgb"
+c.colors.downloads.system.fg = "rgb"
+c.colors.hints.bg = solarized["violet"]
+c.colors.hints.fg = solarized["base3"]
+c.colors.hints.match.fg = solarized["base2"]
+c.colors.keyhint.bg = "rgba(0, 0, 0, 80%)"
+c.colors.keyhint.fg = solarized["base3"]
+c.colors.keyhint.suffix.fg = solarized["yellow"]
+c.colors.messages.error.bg = solarized["red"]
+c.colors.messages.error.border = solarized["red"]
+c.colors.messages.error.fg = solarized["base3"]
+c.colors.messages.info.bg = solarized["base03"]
+c.colors.messages.info.border = solarized["base03"]
+c.colors.messages.info.fg = solarized["base3"]
+c.colors.messages.warning.bg = solarized["orange"]
+c.colors.messages.warning.border = solarized["orange"]
+c.colors.messages.warning.fg = solarized["base3"]
+c.colors.prompts.bg = solarized["base02"]
+c.colors.prompts.border = "1px solid " + solarized["base3"]
+c.colors.prompts.fg = solarized["base3"]
+c.colors.prompts.selected.bg = solarized["base01"]
+c.colors.statusbar.caret.bg = solarized["blue"]
+c.colors.statusbar.caret.fg = solarized["base3"]
+c.colors.statusbar.caret.selection.bg = solarized["violet"]
+c.colors.statusbar.caret.selection.fg = solarized["base3"]
+c.colors.statusbar.command.bg = solarized["base03"]
+c.colors.statusbar.command.fg = solarized["base3"]
+c.colors.statusbar.command.private.bg = solarized["base01"]
+c.colors.statusbar.command.private.fg = solarized["base3"]
+c.colors.statusbar.insert.bg = solarized["green"]
+c.colors.statusbar.insert.fg = solarized["base3"]
+c.colors.statusbar.normal.bg = solarized["base03"]
+c.colors.statusbar.normal.fg = solarized["base3"]
+c.colors.statusbar.passthrough.bg = solarized["magenta"]
+c.colors.statusbar.passthrough.fg = solarized["base3"]
+c.colors.statusbar.private.bg = solarized["base01"]
+c.colors.statusbar.private.fg = solarized["base3"]
+c.colors.statusbar.progress.bg = solarized["base3"]
+c.colors.statusbar.url.error.fg = solarized["red"]
+c.colors.statusbar.url.fg = solarized["base3"]
+c.colors.statusbar.url.hover.fg = solarized["base2"]
+c.colors.statusbar.url.success.http.fg = solarized["base3"]
+c.colors.statusbar.url.success.https.fg = solarized["base3"]
+c.colors.statusbar.url.warn.fg = solarized["yellow"]
+c.colors.tabs.bar.bg = "#000000"
+c.colors.tabs.even.bg = solarized["base01"]
+c.colors.tabs.even.fg = solarized["base2"]
+c.colors.tabs.indicator.error = solarized["red"]
+c.colors.tabs.indicator.start = solarized["violet"]
+c.colors.tabs.indicator.stop = solarized["orange"]
+c.colors.tabs.odd.bg = solarized["base01"]
+c.colors.tabs.odd.fg = solarized["base2"]
+c.colors.tabs.selected.even.bg = solarized["base03"]
+c.colors.tabs.selected.even.fg = solarized["base3"]
+c.colors.tabs.selected.odd.bg = solarized["base03"]
+c.colors.tabs.selected.odd.fg = solarized["base3"]
c.auto_save.session = True
-c.content.user_stylesheets = "/home/bloodstalker/solarized-everything-css/css/solarized-all-sites-dark.css"
+c.content.user_stylesheets = (
+ "/home/devi/.config/qutebrowser/"
+ "qutebrowser_dark_solarized/solarized-dark.css"
+)