From bd71cfc168235b3d12d1b0616127244547eefb6f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 19 Mar 2022 11:34:29 +0100 Subject: [PATCH 01/13] mail: Use new neomutt styling, extend html view --- bootstrap/packages.tsv | 13 +- mail/.config/glow/email.json | 204 +++++++++++++++++++++++++++ mail/.config/isync/mbsyncrc | 4 +- mail/.config/msmtp/config | 2 +- mail/.config/neomutt/colors | 226 ++++++++++++++++++++++++++---- mail/.config/neomutt/mailcap | 30 +++- mail/.config/neomutt/maps | 2 + mail/.config/neomutt/settings | 89 ++++++++---- mail/.local/bin/render-prettyhtml | 6 + 9 files changed, 501 insertions(+), 75 deletions(-) create mode 100644 mail/.config/glow/email.json create mode 100755 mail/.local/bin/render-prettyhtml diff --git a/bootstrap/packages.tsv b/bootstrap/packages.tsv index dfae361..743f256 100644 --- a/bootstrap/packages.tsv +++ b/bootstrap/packages.tsv @@ -33,6 +33,7 @@ bind A complete, highly portable implementation of the DNS protocol R bluez Daemons for the bluetooth protocol stack R bluez-utils Development and debugging utilities for the bluetooth protocol stack R brightnessctl Lightweight brightness control tool R +btop A monitor of system resources, bpytop ported to C++ R busted Elegant Lua unit testing (CLI) R caddy Fast web server with automatic HTTPS R calcurse A text-based personal organizer. R @@ -120,6 +121,7 @@ linux-firmware Firmware files for Linux R linux-headers Headers and scripts for building modules for the Linux kernel R littler a hash-bang and simple command line pipe front end for GNU R A logrotate Rotates system logs automatically R +lsof Lists open files for running Unix processes R lswt List Wayland toplevels A lua-format LuaFormatter - Code formatter for Lua A lua-language-server Lua Language Server coded by Lua R @@ -142,7 +144,7 @@ mopidy-scrobbler Mopidy extension for scrobbling played tracks to Last.fm A mopidy-spotify Mopidy extension for playing music from Spotify A moreutils A growing collection of the unix tools that nobody thought to write thirty years ago R mosh Mobile shell, surviving disconnects with local echo and line editing R -mpv-mpris MPRIS (Media Player Remote Interface Spec) plugin for mpv A +mpv-mpris MPRIS plugin for mpv R msmtp A mini smtp client R nano Pico editor clone with enhancements R ncmpcpp Almost exact clone of ncmpc with some new features R @@ -172,7 +174,7 @@ os-prober Utility to detect other OSes on a set of drives R p7zip Command-line file archiver with high compression ratio R parallel A shell tool for executing jobs in parallel R paru-bin Feature packed AUR helper A -pass-coffin A password store extension that hides data inside a GPG coffin A +pass-coffin A password store extension that hides data inside a signed and encrypted coffin A pass-ssh A pass extension that creates ssh keys with an automatically generated passphrases stored in pass and outputs the public key using fzf or rofi A pavucontrol PulseAudio Volume Control R pdfjs PDF reader in javascript R @@ -194,6 +196,7 @@ pyright Type checker for the Python language R python-adblock Brave's adblock library in Python R python-black Uncompromising Python code formatter R python-dictcc commandline tool for dict.cc A +python-html2text A HTML to markdown-structured text converter R python-openpyxl A Python library to read/write Excel 2007 xlsx/xlsm files R python-pagelabels Python library to manipulate PDF page numbers and labels. A python-pdfminer.six Community maintained fork of pdfminer A @@ -221,13 +224,12 @@ rtv Browse Reddit from your terminal A sc-im A spreadsheet program based on SC A screen Full-screen window manager that multiplexes a physical terminal R sfz A simple static file server A -shellcheck-bin Shell script analysis tool (binary release) A +shellcheck-bin Shell script analysis tool (binary release, static) A shfmt Format shell programs R siggo A terminal gui for signal-cli, written in Go. A slurp Select a region in a Wayland compositor R speedtest-cli Command line interface for testing internet bandwidth using speedtest.net R sshfs FUSE client based on the SSH File Transfer Protocol R -steam Valve's digital software delivery system R stow Manage installation of multiple softwares in the same directory tree R surfraw Shell Users' Revolutionary Front Rage Against the Web R swaybg Wallpaper tool for Wayland compositors R @@ -237,6 +239,7 @@ taskopen Script for taking notes and open urls with taskwarrior A tasksh A shell command that wraps Taskwarrior commands A tex-gyre-fonts Substitute PostScript fonts in OpenType format R texlab A cross-platform implementation of the Language Server Protocol for LaTeX. R +thermald The Linux Thermal Daemon program from 01.org R tigervnc Suite of VNC servers and clients. Based on the VNC 4 branch of TightVNC. R timew Timewarrior, A command line time tracking application R tllocalmgr-git A shell and command-line utility to manage TeXLive on Arch Linux A @@ -258,7 +261,6 @@ ufw Uncomplicated and easy to use CLI tool for managing a netfilter firewall R unclutter A small program for hiding the mouse cursor R unrar The RAR uncompression program R unrtf Command-line program which converts RTF documents to other formats R -upower Abstraction for enumerating power devices, listening to device events and querying history and statistics R urlview-xdg-git A curses URL parser for text files. Git version, adds support for QUITONLAUNCH option and XDG Base Directory specification compliance. A usql-bin Universal command-line interface for SQL databases A v4l2loopback-dkms v4l2-loopback device – module sources R @@ -282,6 +284,7 @@ wireless_tools Tools allowing to manipulate the Wireless Extensions R wpa_actiond Daemon that connects to wpa_supplicant and handles connect and disconnect events A wtype xdotool type for wayland R xdg-user-dirs Manage user directories like ~/Desktop and ~/Music R +xorg-xrandr Primitive command line interface to RandR extension R xsv A fast CSV toolkit written in Rust A yaml-language-server-bin Language server implementation for YAML files and optional schema support A youtube-dl A command-line program to download videos from YouTube.com and a few more sites R diff --git a/mail/.config/glow/email.json b/mail/.config/glow/email.json new file mode 100644 index 0000000..adb0482 --- /dev/null +++ b/mail/.config/glow/email.json @@ -0,0 +1,204 @@ +{ + "document": { + "block_prefix": "\n", + "block_suffix": "\n", + "color": "7", + "margin": 2 + }, + "block_quote": { + "indent": 0, + "color": "3", + "indent_token": "│ ", + "italic": true, + "margin": 1 + }, + "paragraph": {}, + "list": { + "level_indent": 2, + "color": "7" + }, + "heading": { + "block_suffix": "\n", + "color": "4", + "bold": true + }, + "h1": { + "prefix": " ", + "suffix": " ", + "color": "7", + "background_color": "4", + "bold": true + }, + "h2": { + "prefix": "## " + }, + "h3": { + "prefix": "### " + }, + "h4": { + "prefix": "#### " + }, + "h5": { + "prefix": "##### " + }, + "h6": { + "prefix": "###### ", + "color": "5", + "bold": false + }, + "text": {}, + "strikethrough": { + "crossed_out": true + }, + "emph": { + "italic": true, + "color": "3" + }, + "strong": { + "bold": true, + "color": "3" + }, + "hr": { + "color": "0", + "format": "\n―――――――――――――――――――\n" + }, + "item": { + "block_prefix": "• " + }, + "enumeration": { + "block_prefix": ". ", + "color": "6" + }, + "task": { + "ticked": "[✓] ", + "unticked": "[ ] " + }, + "link": { + "color": "6", + "underline": true + }, + "link_text": { + "color": "5", + "bold": true + }, + "image": { + "color": "6", + "underline": true + }, + "image_text": { + "color": "5", + "format": "Image: {{.text}} →" + }, + "code": { + "color": "7", + "prefix": " ", + "suffix": " ", + "background_color": "#44475a" + }, + "code_block": { + "color": "3", + "margin": 2, + "chroma": { + "text": { + "color": "#ansilightgray" + }, + "error": { + "color": "#ansilightgray", + "background_color": "#ansidarkred" + }, + "comment": { + "color": "#ansidarkgray" + }, + "comment_preproc": { + "color": "#ansipurple" + }, + "keyword": { + "color": "#ansipurple" + }, + "keyword_reserved": { + "color": "#ansipurple" + }, + "keyword_namespace": { + "color": "#ansipurple" + }, + "keyword_type": { + "color": "#ansiteal" + }, + "operator": { + "color": "#ansipurple" + }, + "punctuation": { + "color": "#ansilightgray" + }, + "name": { + "color": "#ansiteal" + }, + "name_builtin": { + "color": "#ansiteal" + }, + "name_tag": { + "color": "#ansipurple" + }, + "name_attribute": { + "color": "#ansidarkgreen" + }, + "name_class": { + "color": "#ansiteal" + }, + "name_constant": { + "color": "#ansidarkblue" + }, + "name_decorator": { + "color": "#ansidarkgreen" + }, + "name_exception": {}, + "name_function": { + "color": "#ansidarkgreen" + }, + "name_other": {}, + "literal": {}, + "literal_number": { + "color": "#ansiturquoise" + }, + "literal_date": {}, + "literal_string": { + "color": "#ansibrown" + }, + "literal_string_escape": { + "color": "#ansipurple" + }, + "generic_deleted": { + "color": "#ansidarkred" + }, + "generic_emph": { + "color": "#ansibrown", + "italic": true + }, + "generic_inserted": { + "color": "#ansidarkgreen" + }, + "generic_strong": { + "color": "#ansiyellow", + "bold": true + }, + "generic_subheading": { + "color": "#ansidarkblue" + }, + "background": { + "background_color": "#44475" + } + } + }, + "table": { + "center_separator": "┼", + "column_separator": "│", + "row_separator": "─" + }, + "definition_list": {}, + "definition_term": {}, + "definition_description": { + "block_prefix": "\n🠶 " + }, + "html_block": {}, + "html_span": {} +} diff --git a/mail/.config/isync/mbsyncrc b/mail/.config/isync/mbsyncrc index cba9b9a..815c415 100644 --- a/mail/.config/isync/mbsyncrc +++ b/mail/.config/isync/mbsyncrc @@ -3,8 +3,8 @@ IMAPAccount gmail # Address to connect to Host imap.gmail.com -UserCmd "pass show misc/aerc-gmail-app-password | grep username | cut -d: -f2" -PassCmd "pass show misc/aerc-gmail-app-password | head -n1" +UserCmd "pass show misc/gmail-app-password | grep username | cut -d: -f2" +PassCmd "pass show misc/gmail-app-password | head -n1" # To store the password in an encrypted file use PassCmd instead of Pass # PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg" # diff --git a/mail/.config/msmtp/config b/mail/.config/msmtp/config index 840a0b2..fd173cb 100644 --- a/mail/.config/msmtp/config +++ b/mail/.config/msmtp/config @@ -12,7 +12,7 @@ port 587 from marty.oehme@gmail.com user marty.oehme@gmail.com # password plain-text-password-goes-here -passwordeval "gpg --quiet --for-your-eyes-only --no-tty --decrypt $XDG_DATA_HOME/pass/misc/aerc-gmail-app-password.gpg" +passwordeval "pass show misc/gmail-app-password | head -n1" # Set a default account account default : personal-gmail diff --git a/mail/.config/neomutt/colors b/mail/.config/neomutt/colors index 7b7d1b3..faae263 100644 --- a/mail/.config/neomutt/colors +++ b/mail/.config/neomutt/colors @@ -1,39 +1,39 @@ -# taken from https://gideonwolfe.com/posts/workflow/neomutt/intro/ -# Header colors: +# # taken from https://gideonwolfe.com/posts/workflow/neomutt/intro/ +# # Header colors: color header blue default ".*" color header brightmagenta default "^(From)" color header brightcyan default "^(Subject)" color header brightwhite default "^(CC|BCC)" -mono bold bold -mono underline underline -mono indicator reverse -mono error bold -color normal default default -color indicator brightyellow default # currently selected message. default makes bar clear, disabled arrow to save space. -color sidebar_highlight red default -color sidebar_divider brightblack black -color sidebar_flagged red black -color sidebar_new green black -color normal brightyellow default -color error red default -color tilde black default -color message cyan default -color markers red white -color attachment white default -color search brightmagenta default -color status brightyellow black -color hdrdefault brightgreen default -color quoted green default -color quoted1 blue default -color quoted2 cyan default -color quoted3 yellow default -color quoted4 red default -color quoted5 brightred default -color signature brightgreen default -color bold black default -color underline black default -color normal default default +# mono bold bold +# mono underline underline +# mono indicator reverse +# mono error bold +# color normal default default +# color indicator brightyellow default # currently selected message. default makes bar clear, disabled arrow to save space. +# color sidebar_highlight red default +# color sidebar_divider brightblack black +# color sidebar_flagged red black +# color sidebar_new green black +# color normal brightyellow default +# color error red default +# color tilde black default +# color message cyan default +# color markers red white +# color attachment white default +# color search brightmagenta default +# color status brightyellow black +# color hdrdefault brightgreen default +# color quoted green default +# color quoted1 blue default +# color quoted2 cyan default +# color quoted3 yellow default +# color quoted4 red default +# color quoted5 brightred default +# color signature brightgreen default +# color bold black default +# color underline black default +# color normal default default color body brightred default "[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+" # Email addresses color body brightblue default "(https?|ftp)://[\-\.,/%~_:?&=\#a-zA-Z0-9]+" # URL @@ -67,3 +67,167 @@ color index_author brightred black "~N" color index_subject brightcyan black "~N" color progress black cyan +# Nerd icons idea based on https://github.com/sheoak/neomutt-powerline-nerdfonts/ +# Dracula colors based on Dracula Theme by Paul Townsend + + +# Formatting ---------------------------------------------------------------------- +set date_format = "%a %d %h %H:%M" +set index_format=" %zc %zs %zt | %-35.35L %@attachment_info@ %?M10?~(%1M) ?%-30.100s %> %?Y?%Y ? %(!%a %d %h %H:%M) " +set pager_format="%n %T %s%*  %{!%d %b · %H:%M} %?X? %X?%P" +set status_format = " %D %?u? %u ?%?R? %R ?%?d? %d ?%?t? %t ?%?F? %F ?%?p? %p? \n \n" +set compose_format="-- NeoMutt: Compose [Approx. msg size: %l Atts: %a]%>-" +# set vfolder_format = "%N %?n?%3n& ? %8m  · %f" +set attach_format = "%u%D  %T%-75.75d %?T?%& ? %5s · %m/%M" +set sidebar_format = '%D%?Z? [%Z]?%* %?S?%S?' +index-format-hook attachment_info '=B text/calendar ~X 1' ' ' +index-format-hook attachment_info '=B text/calendar' " " +index-format-hook attachment_info '~X 1' " " +index-format-hook attachment_info '~A' " " + + +# General Colors ------------------------------------------------------------------ +color normal default default # general text +color error color231 color212 # error messages +color message default default # messages at the bottom +color prompt default default # prompt text +color search black color10 # search highlight + + +# Statusbar Colors ---------------------------------------------------------------- +color status color141 default +color status color7 color8 '([a-zA-Z0-9\.,]|\[|\])(\s)' # bubble content 1 +color status color7 color8 '(\s)([a-zA-Z0-9\.,]|\[|\])' # bubble content 2 +color status color7 color8 '(\% )' # % symbol +color status color7 color8 '(\S)' # empty spaces +color status color8 default '(|)' # statusline "bubbles" +color status color69 black '(\` )' # bubble account variation +color status white color69 '([a-zA-Z0-9\.]+)( )' # account text +color status green color8 '' # Unread messages count +color status blue color8 '' # Read messages count icon +color status yellow color8 '' # Flagged icon +color status red color8 '' # Pending delete icon + + +# Index Colors -------------------------------------------------------------------- +color index color15 default '~N' # new messages +color index color8 default '~R' # read messages +color index color8 default '~Q' # messages which have been replied to +color index_collapsed color4 default # collapsed thread (message count text) +color index color5 default '!~Q^~p' # sent only to me and haven't been replied to +color index color22 default '~h X-Label..' # messages with a complete label +color index color6 default '~F' # flagged messages +color index color6 default '~F~N' # flagged messages (new) +color index color14 default '~F~R' # flagged messages (read) +color index color1 default '~D' # deleted messages +color index color1 default '~D~N' # deleted messages (new) +color index color9 default '~D~R' # deleted messages (read) +color index color3 default '~T' # tagged messages +color index color3 default '~T~N' # tagged messages (new) +color index color11 default '~T~R' # tagged messages (read) +color tree color8 color8 # thread tree lines/arrow +color indicator default color8 # selection indicator +color index_date color8 default # date is always the same colour +color index_label color6 default # label is always the same colour + + +# Sidebar Colors ------------------------------------------------------------------ +color sidebar_indicator color14 black # currently selected mailbox +color sidebar_highlight white color8 # highlighted, but not open, mailbox. +color sidebar_ordinary color8 default # Color to give mailboxes by default +color sidebar_divider color8 black # divider between sidebar & content +color sidebar_flagged red black # mailboxes containing flagged mail +color sidebar_new green black # mailboxes containing new mail +color sidebar_unread color7 default # mailboxes containing unread mail +color sidebar_unread color7 default # mailboxes containing unread mail + + +# Message Headers ----------------------------------------------------------------- +color hdrdefault color8 default + + +# Message Body -------------------------------------------------------------------- + +# Attachments +color attachment color8 default + +# Signature +color signature color8 default + +# emails +# color body color14 default '[\-\.+_a-zA-Z0-9]+@[\-\.a-zA-Z0-9]+' + +# hide "mailto" +color body color0 color0 '' + +# URLs +color body color3 default '(https?|ftp)://[-\.,/%~_:?&=\#a-zA-Z0-9\+]+' + +# Dividers +color body color8 default '(^[-_]*$)' + +# Important info in calendar invites +color body color6 default '^(Date\/Time|Location|Organiser|Invitees|Teams Meeting)(:| \~\~)' + +# Quotes +color quoted color61 default +color quoted1 color117 default +color quoted2 color84 default +color quoted3 color215 default +color quoted4 color212 default + +# Forward/reply headers +color body color8 default '(^(To|From|Sent|Subject):.*)' + +# Patch syntax highlighting +# color body brightwhite default '^[[:space:]].*' +# color body yellow default ^(diff).* +# color body white default ^[\-\-\-].* +# color body white default ^[\+\+\+].* +# color body green default ^[\+].* +# color body red default ^[\-].* +# color body brightblue default [@@].* +# color body cyan default ^(Signed-off-by).* +# color body brightwhite default ^(Cc) +# color body yellow default "^diff \-.*" +# color body brightwhite default "^index [a-f0-9].*" +# color body brightblue default "^---$" +# color body white default "^\-\-\- .*" +# color body white default "^[\+]{3} .*" +# color body green default "^[\+][^\+]+.*" +# color body red default "^\-[^\-]+.*" +# color body brightblue default "^@@ .*" +# color body green default "LGTM" +# color body brightmagenta default "-- Commit Summary --" +# color body brightmagenta default "-- File Changes --" +# color body brightmagenta default "-- Patch Links --" +# color body green default "^Merged #.*" +# color body red default "^Closed #.*" +# color body brightblue default "^Reply to this email.*" + + +# Misc ----------------------------------------------------------------------------- + +# no addressed to me, to me, group, cc, sent by me, mailing list +set to_chars=" " + +# unchanged mailbox, changed, read only, attach mode +set status_chars = " " +ifdef crypt_chars set crypt_chars = " " +set flag_chars = " " + +# hide some tags +set hidden_tags = "unread,draft,flagged,passed,replied,attachment,signed,encrypted" +tag-transforms "replied" "↻ " \ + "encrytpted" "" \ + "signed" "" \ + "attachment" "" \ + +# The formats must start with 'G' and the entire sequence is case sensitive. +tag-formats "replied" "GR" \ + "encrypted" "GE" \ + "signed" "GS" \ + "attachment" "GA" \ + + # don't put '+' at the beginning of wrapped lines +set markers=no diff --git a/mail/.config/neomutt/mailcap b/mail/.config/neomutt/mailcap index 0c8fb9a..acbeddc 100644 --- a/mail/.config/neomutt/mailcap +++ b/mail/.config/neomutt/mailcap @@ -1,8 +1,28 @@ -text/html; $BROWSER %s -text/html; w3m -I %{charset} -T text/html -dump; copiousoutput; -video/*; setsid umpv --quiet %s &; copiousoutput -audio/*; mpv %s ; -application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; xdg-open /tmp/mutt/$(basename %s) & +# open html emails in browser (or whatever GUI program is used to render HTML) +text/html; xdg-open %s ; nametemplate=%s.html +# render html emails inline using magic (uncomment the line below to use lynx instead) +# text/html; lynx -assume_charset=%{charset} -display_charset=utf-8 -collapse_br_tags -dump %s; nametemplate=%s.html; copiousoutput +text/html; render-prettyhtml %s; nametemplate=%s.html; copiousoutput; text/plain; $EDITOR %s ; + +# show calendar invites +text/calendar; render-calendar-attachment.py %s; copiousoutput; +application/ics; mutt-viewical; copiousoutput; + +# open images externally +image/*; nsxiv %s ; + +# open videos in mpv +video/*; mpv --autofit-larger=90\%x90\% %s; needsterminal; +video/*; setsid mpv --quiet %s &; copiousoutput + +# open spreadsheets in sc-im +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; sc-im %s; needsterminal + +# open anything else externally +application/pdf; xdg-open %s; + +application/*; mkdir -p /tmp/mutt \; cp %s /tmp/mutt \; xdg-open /tmp/mutt/$(basename %s) & application/pgp-encrypted; gpg -d '%s'; copiousoutput; application/pgp-keys; gpg --import '%s'; copiousoutput; + diff --git a/mail/.config/neomutt/maps b/mail/.config/neomutt/maps index a57a8f9..fee8617 100644 --- a/mail/.config/neomutt/maps +++ b/mail/.config/neomutt/maps @@ -44,6 +44,8 @@ bind pager gg top bind pager G bottom # compose postpone bind compose p postpone-message +# markdown to html for composition +macro compose M "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=UTF-8\n" "Convert from MD to HTML" # since we unbound the original g bind index,pager R group-reply diff --git a/mail/.config/neomutt/settings b/mail/.config/neomutt/settings index 450a765..735c43a 100644 --- a/mail/.config/neomutt/settings +++ b/mail/.config/neomutt/settings @@ -11,63 +11,90 @@ set from = "marty.oehme@gmail.com" set mail_check = 60 set mail_check_stats -# Basic settings -set quit # at least for rapid prototyping -unset mark_old # things should only be new/unread or I actually looked at them -set pipe_decode # get rid of headers when passing messages along -set wait_key = no # don't wait for user input after shell cmds, auto-view, piping, etc -# Pager settings -# filetypes and mailcap +set quit # at least for rapid prototyping +set sleep_time = 0 # no pause for info messages +set mark_old = no # things should only be new/unread or I actually looked at them +set pager_read_delay = 3 # mark read after 3 sec +set pipe_decode # get rid of headers when passing messages along +set auto_tag # apply commands to all tagged messages automatically +set wait_key = no # don't wait for user input after shell cmds, auto-view, piping, etc +set thorough_search = no # don't pre-process mail for ~b/~B searches +set flag_safe # make it impossible to delete flagged mails + # Pager settings + # filetypes and mailcap set mailcap_path = "~/.config/neomutt/mailcap:~/.mailcap:/usr/share/neomutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap" -# Consult mime.types for determining types of these attachments + # Consult mime.types for determining types of these attachments mime_lookup application/octet-stream -alternative_order multipart/mixed multipart/related text/plain -alternative_order text/html text/plain text/enriched text/* -# This requires a ~/.mailcap entry with the copiousoutput flag, such as: -# text/html; lynx -dump -width ${COLUMNS:-80} %s; nametemplate=%s.html; copiousoutput -# Prefer plain text to html but multipart to plain for those only sending that + # This requires a ~/.mailcap entry with the copiousoutput flag, such as: + # text/html; lynx -dump -width ${COLUMNS:-80} %s; nametemplate=%s.html; copiousoutput + # Prefer plain text to html but multipart to plain for those only sending that +auto_view application/ics +auto_view text/calendar +auto_view text/plain auto_view text/html -# Remember to `mkdir -p ~/.neomutt/hcache` first: +alternative_order text/calendar application/ics text/plain text/enriched text/html text/* multipart/mixed multipart/related text/plain +set count_alternatives = yes # look for attachments also in multipart/alternatives + # Remember to `mkdir -p ~/.neomutt/hcache` first: set header_cache= "~/.neomutt/hcache" -# Compose settings -set edit_headers # allow editing headers while writing mail -set sig_dashes # separate signature from mail -set fast_reply # automatically fill in from and subject for replies + # Compose settings +set edit_headers # allow editing headers while writing mail +set sig_dashes # separate signature from mail +set fast_reply # automatically fill in from and subject for replies set forward_format = "Fwd: %s" -set reply_to # default send back to reply-to: header instead of from: header -set reverse_name # default to reply as person e-mail was originally sent to -set include # include original msg in reply -set forward_quote # include original msg as quote in fwd -# set editor = "emacsclient -a emacs -t" -# set editor = "vim" +set reply_to # default send back to reply-to: header instead of from: header +set reverse_name # default to reply as person e-mail was originally sent to +set include # include original msg in reply +set forward_quote # include original msg as quote in fwd +set forward_format = "FW: %s" # subject for forwarding +set mime_forward = no # forward attachments with mail +set fcc_attach # attachments saved with body + # set editor = "emacsclient -a emacs -t" + # set editor = "vim" set mime_type_query_command = "xdg-mime query filetype" -# send settings + # send settings set sendmail = "/usr/bin/msmtp -a personal-gmail" set sendmail_wait = 0 # Display Settings +set allow_ansi # allow escape codes for color etc set sort = threads set sort_re # thread based on regex below set reply_regex = "^(([Rr][Ee]?(\[[0-9]+\])?: *)?(\[[^]]+\] *)?)*" +set quote_regex = "^( {0,4}[>|:#%]| {0,4}[A-Za-z0-9]+[>|]+)+" set sort_aux = reverse-last-date-received -set date_format = "%z/%m/%d %I:%M%p" +# set date_format = "%z/%m/%d %I:%M%p" # set date_format = "%m/%d" -set index_format = "%4C [%Z] %{%y/%b %d} %-20.20F %s" +# set index_format = "%4C [%Z] %{%y/%b %d} %-20.20F %s" # sidebar view options set sidebar_visible = yes -set sidebar_width = 18 -set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_width = 24 +# set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S" +set sidebar_divider_char = ' ░' +set sidebar_folder_indent = yes +set sidebar_indent_string = ' - ' +set sidebar_visible = no +set sidebar_next_new_wrap = yes +set sidebar_short_path = yes +set sidebar_component_depth = 0 color sidebar_new color221 color233 # statusbar view options set status_chars = " *%A" -set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" +# set status_format = "───[ Folder: %f ]───[%r%m messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]───%>─%?p?( %p postponed )?───" # pager view options -set pager_index_lines = 5 +set pager_index_lines = 10 set pager_context = 3 set pager_stop # do not go to next msg if at bottom of pager set menu_scroll = yes set tilde # show tildes for blank lines unset markers # no + markers for wrapped stuff +set wrap = 90 +#### Thread ordering +set use_threads=reverse +set sort='last-date' +set collapse_all = yes +set uncollapse_new = no +set thread_received = yes +set narrow_tree=no # hide headers except for those explicitly unignored ignore * unignore From To Cc Bcc Date Subject Message-ID diff --git a/mail/.local/bin/render-prettyhtml b/mail/.local/bin/render-prettyhtml new file mode 100755 index 0000000..26fd0aa --- /dev/null +++ b/mail/.local/bin/render-prettyhtml @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +# render html as markdown and display in glow, supports syntax highlighting +# requires: html2text, glow +# author: CEUK +perl -0777pe 's/()(.*?)(<\/code>)/\1\2\3\n```\2\n\4\n```\n\5/gs' "$1" | html2text | sed -re 's/^\s+(```(\w+)?)/\1/gm' >/tmp/mutt.md +glow -s ~/.config/glow/email.json /tmp/mutt.md | sed 's/\x1b\[[6-9;]*m//g' From 2c7430121e68f3ec9e8bc394d88db8c0fd3a5c86 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 7 Apr 2022 17:13:13 +0200 Subject: [PATCH 02/13] nvim: Fix dial plugin binds --- nvim/.config/nvim/lua/maps.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/maps.lua b/nvim/.config/nvim/lua/maps.lua index a1be15f..8234d08 100644 --- a/nvim/.config/nvim/lua/maps.lua +++ b/nvim/.config/nvim/lua/maps.lua @@ -238,8 +238,8 @@ map.n[''] = '(dial-increment)' map.n[''] = '(dial-decrement)' map.v[''] = '(dial-increment)' map.v[''] = '(dial-decrement)' -map.v['g'] = '(dial-increment-additional)' -map.v['g'] = '(dial-decrement-additional)' +map.v['g'] = 'g(dial-increment)' +map.v['g'] = 'g(dial-decrement)' -- PLUGIN: zettelkasten.nvim map.n.nore[''] = [[:silent lua require 'zettelkasten'.link_follow()]] From 50a5b23aabed143c5b6b98b7d5cf462a5da84308 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Apr 2022 12:48:21 +0200 Subject: [PATCH 03/13] scripts: Add queue to vidl Added queuing to vidl downloader - will collect newly added files to download to a queue. (by default in ($XDG_DATA_HOME/ or ~/.local/share)/vidl/vidl_queue) The queue of links can be interacted with like any other file. When vidl is already running it keeps a lock-file active in .cache directory so only one instance of vidl can ever be running simultaneously. --- scripts/.local/bin/vidl | 38 +++++++++++++++++++++++--------- wayland/.config/waybar/config | 19 ++++++++++++---- wayland/.config/waybar/style.css | 1 + 3 files changed, 43 insertions(+), 15 deletions(-) diff --git a/scripts/.local/bin/vidl b/scripts/.local/bin/vidl index 67d047b..bc1272d 100755 --- a/scripts/.local/bin/vidl +++ b/scripts/.local/bin/vidl @@ -4,7 +4,6 @@ show_help() { printf """ -archive.sh: Hard linking your stuff. vidl: Video downloader Simple wrapper for youtube-dl (or yt-dlp or similar). @@ -24,6 +23,8 @@ Options: -c Clear existing download queue. + -p Print out number of remaining items in queue. + -t Point to youtube-dl command to use. Can be command or absolute link. By default will use \`yt-dlp\` which is a more up to date fork of the youtube-dl program. @@ -32,7 +33,7 @@ Options: urls=("$@") -while getopts "t:f:d:hc" opt; do +while getopts "t:f:d:hcp" opt; do case "$opt" in # v) verbose=1 # ;; @@ -48,6 +49,9 @@ while getopts "t:f:d:hc" opt; do c) ONLY_DO=clear ;; + p) + ONLY_DO=remaining + ;; h | \? | *) show_help exit 0 @@ -122,12 +126,13 @@ setup() { declare -a YT_DL_OPTS=${YT_DL_OPTS:-( "${yt_default_opts[@]}" )} YT_DL_TITLE="${YT_DL_TITLE:-%(channel)s_%(title)s_%(id)s}" # this title needs to be without extension - queue_file="${XDG_CACHE_HOME:-$HOME/.cache}/vidl_queue" - if [ ! -f "$queue_file" ]; then - mkdir -p $(dirname "$queue_file") - touch "$queue_file" - fi - lock_dir="${XDG_CACHE_HOME:-$HOME/.cache}/vidl_lock" + data_dir="${XDG_DATA_HOME:-$HOME/.local/share}/vidl" + cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/vidl" + [ ! -d "$data_dir" ] && mkdir -p "$data_dir" + [ ! -d "$cache_dir" ] && mkdir -p "$cache_dir" + + queue_file="${data_dir}/vidl_queue" + lock_file="${cache_dir}/vidl_lock" } is_in_queue() { # 1=url @@ -150,14 +155,14 @@ clear_queue() { } remove_lock() { - if ! rmdir $lock_dir; then - echo "Failed to remove lock '$lock_dir'. Please remove manually before next run." + if ! rmdir "$lock_file"; then + echo "Failed to remove lock '$lock_file'. Please remove manually before next run." exit 1 fi } is_only_instance() { - if mkdir $lock_dir 2>/dev/null; then + if mkdir "$lock_file" 2>/dev/null; then trap "remove_lock" EXIT return 0 else @@ -165,11 +170,22 @@ is_only_instance() { fi } +print_queue_remaining() { + if [ ! -f "$queue_file" ]; then + echo 0 + return + fi + wc -l "$queue_file" | cut -f1 -d' ' +} + main() { setup if [ "$ONLY_DO" = "clear" ]; then clear_queue exit + elif [ "$ONLY_DO" = "remaining" ]; then + print_queue_remaining + exit fi for url in $*; do diff --git a/wayland/.config/waybar/config b/wayland/.config/waybar/config index 413ddae..4bd87ed 100644 --- a/wayland/.config/waybar/config +++ b/wayland/.config/waybar/config @@ -1,8 +1,8 @@ { "layer": "top", - "modules-left": ["river/tags"], - "modules-center": ["clock", ], - "modules-right": ["custom/events", "custom/media", "custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "battery", "tray"], + "modules-left": ["river/tags", "custom/events", "custom/vidl"], + "modules-center": ["clock", "custom/media"], + "modules-right": ["custom/wireguard", "custom/archupdates", "pulseaudio", "backlight", "network", "cpu", "memory", "temperature", "battery", "tray"], "custom/archupdates": { "format": "{} {icon}", "format-alt-click": "right", @@ -166,5 +166,16 @@ "return-type": "json", "signal": 6, "interval": 60, - } + }, + "custom/vidl": { + "format": "{} {icon}", + "format-alt-click": "right", + "format-icons": { + "default": "" + }, + "exec": "wc -l ~/.local/share/vidl/vidl_queue | cut -d' ' -f1", + "exec-if": "[ -f ~/.local/share/vidl/vidl_queue ]", + "interval": 5, + "on-click": "kitty --class float nvim ~/.local/share/vidl/vidl_queue" + }, } diff --git a/wayland/.config/waybar/style.css b/wayland/.config/waybar/style.css index f9bb2f5..5a25682 100644 --- a/wayland/.config/waybar/style.css +++ b/wayland/.config/waybar/style.css @@ -60,6 +60,7 @@ window#waybar.hidden { #custom-archupdates, #custom-wireguard, #custom-events, +#custom-vidl, #custom-media { padding: 0 10px; margin: 0 5px; From 72c0a5d5f2cdf4ba15310f70d3df797abae0d6d6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Apr 2022 12:52:19 +0200 Subject: [PATCH 04/13] sh: Add short py alias for repl Added `py` alias for any of `ptipython`, `ipython`, `python` found in that order. If python is not installed, will not create the alias. --- sh/.config/sh/alias | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sh/.config/sh/alias b/sh/.config/sh/alias index 9b1c9a8..2a28d55 100644 --- a/sh/.config/sh/alias +++ b/sh/.config/sh/alias @@ -92,3 +92,12 @@ if exist vifm; then alias vm=vifm alias vmm='vifm ${PWD}' fi + +# python +if exist ptipython; then + alias py=ptipython +elif exist ipython; then + alias py=ipython +elif exist python; then + alias py=python +fi From 8aa02654ebe7c67fb62f3b7dc99b1d9c2091849e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Apr 2022 13:00:55 +0200 Subject: [PATCH 05/13] nvim: Add Mini for indentblankline and commentary Replaced indentblankline and vim-commentary both with mini.nvim, which has both as submodules. Commentary is replaced exactly and without any end-user changes, simply transferred to be included in the lua plugin instead. Indent blankline is a bit simpler but brings with it a new text object which can be interacted with through `ai` and `ii`, e.g. `vii` select in current indentation or `dai` delete around current indentation - very useful. Also added fuzzy matching algorithm from mini.nvim to telescope as default sorter. --- .../nvim/lua/plug/_indent-blankline.lua | 18 ------------------ nvim/.config/nvim/lua/plug/_mini.lua | 2 ++ nvim/.config/nvim/lua/plug/_telescope.lua | 3 ++- nvim/.config/nvim/lua/plugins.lua | 10 +++++----- 4 files changed, 9 insertions(+), 24 deletions(-) delete mode 100644 nvim/.config/nvim/lua/plug/_indent-blankline.lua create mode 100644 nvim/.config/nvim/lua/plug/_mini.lua diff --git a/nvim/.config/nvim/lua/plug/_indent-blankline.lua b/nvim/.config/nvim/lua/plug/_indent-blankline.lua deleted file mode 100644 index 5927df3..0000000 --- a/nvim/.config/nvim/lua/plug/_indent-blankline.lua +++ /dev/null @@ -1,18 +0,0 @@ --- Settings for indentBlankline --- turn off for diff views since we want to compare directly -if vim.wo.diff then vim.g["indent_blankline_enabled"] = false end - -vim.g.indent_blankline_char = "▏" - -vim.g.indent_blankline_filetype_exclude = { - "help", "undotree", "markdown", "text", "pandoc", "rst", "asciidoc", - "vim-plug" -} -vim.g.indent_blankline_buftype_exclude = {"terminal"} - -vim.g.indent_blankline_use_treesitter = true -vim.g.indent_blankline_show_first_indent_level = false - -vim.g.indent_blankline_show_current_context = true -vim.g.indent_blankline_context_highlight = "Function" -vim.g.indent_blankline_context_patterns = {"function", "class", "method"} diff --git a/nvim/.config/nvim/lua/plug/_mini.lua b/nvim/.config/nvim/lua/plug/_mini.lua new file mode 100644 index 0000000..15a498c --- /dev/null +++ b/nvim/.config/nvim/lua/plug/_mini.lua @@ -0,0 +1,2 @@ +require('mini.comment').setup() +require('mini.indentscope').setup({symbol = "│"}) diff --git a/nvim/.config/nvim/lua/plug/_telescope.lua b/nvim/.config/nvim/lua/plug/_telescope.lua index 89e2269..62fae3c 100644 --- a/nvim/.config/nvim/lua/plug/_telescope.lua +++ b/nvim/.config/nvim/lua/plug/_telescope.lua @@ -9,7 +9,8 @@ require("telescope").setup { vimgrep_arguments = { 'rg', '--ignore-vcs', '--hidden', '--color=never', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case' - } + }, + generic_sorter = require('mini.fuzzy').get_telescope_sorter }, pickers = { buffers = {theme = "ivy"}, diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a13364c..770b1c0 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -27,10 +27,6 @@ require("packer").startup(function() use 'RRethy/vim-illuminate' -- highlight other occurences of the word under cursor use 'ojroques/vim-oscyank' -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank use 'ggandor/lightspeed.nvim' -- jump between letters with improved fFtT quicksearch, mimics sneak - -- use { -- weird errors currently - -- 'lukas-reineke/indent-blankline.nvim', -- show a vertical line for each indentation - -- config = function() require('plug._indent-blankline') end - -- } -- files use 'vifm/vifm.vim' -- integrate file manager use { @@ -56,7 +52,6 @@ require("packer").startup(function() } -- editing - use {'tpope/vim-commentary', event = "BufRead"} -- easily toggle comments for lines, paragraphs etc with gc use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr use { 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers @@ -144,6 +139,11 @@ require("packer").startup(function() -- -- nvim plugs + use { + 'echasnovski/mini.nvim', + branch = 'stable', + config = function() require('plug._mini') end + } use 'Iron-E/nvim-cartographer' -- makes it easier to set mappings through lua use 'marty-oehme/zettelkasten.nvim' -- simple static markdown linking use { From b947493765ead13a64eaf1cf4c8e7485b4b7d647 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 11 Apr 2022 13:05:32 +0200 Subject: [PATCH 06/13] bootstrap: Update pkg list with python-docs Added python-docs for offline python documentation availability, removed long-overdue polybar package which I have not been using for a couple of months. --- bootstrap/packages.tsv | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bootstrap/packages.tsv b/bootstrap/packages.tsv index 743f256..8283966 100644 --- a/bootstrap/packages.tsv +++ b/bootstrap/packages.tsv @@ -28,7 +28,7 @@ bearssl Implementation of the SSL/TLS protocol (RFC 5246) written in C A beets Flexible music library manager and tagger R bibclean BibTeX and Scribe bibliography prettyprinter and syntax checker A biber A Unicode-capable BibTeX replacement for biblatex users R -bibtool Command line manipulation of BibTeX files. A +bibtool A tool for manipulating BibTeX files R bind A complete, highly portable implementation of the DNS protocol R bluez Daemons for the bluetooth protocol stack R bluez-utils Development and debugging utilities for the bluetooth protocol stack R @@ -36,7 +36,7 @@ brightnessctl Lightweight brightness control tool R btop A monitor of system resources, bpytop ported to C++ R busted Elegant Lua unit testing (CLI) R caddy Fast web server with automatic HTTPS R -calcurse A text-based personal organizer. R +calcurse A text-based personal organizer R catdoc A convertor for Microsoft Word, Excel, PowerPoint and RTF Files to text R clipman A simple clipboard manager for Wayland A crda Central Regulatory Domain Agent for wireless networks R @@ -126,7 +126,7 @@ lswt List Wayland toplevels A lua-format LuaFormatter - Code formatter for Lua A lua-language-server Lua Language Server coded by Lua R lua51-busted Elegant Lua unit testing R -luacheck A tool for linting and static analysis of Lua code. A +luacheck A tool for linting and static analysis of Lua code R lynx A text browser for the World Wide Web R maim Utility to take a screenshot using imlib2 R man-db A utility for reading man pages R @@ -185,7 +185,6 @@ piavpn-bin Private Internet Access client A picom X compositor that may fix tearing issues R pipewire-alsa Low-latency audio/video router and processor - ALSA configuration R playerctl mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others. R -polybar A fast and easy-to-use status bar A powertop A tool to diagnose issues with power consumption and power management R prettier An opinionated code formatter for JS, JSON, CSS, YAML and much more R protonvpn-cli-ng A Community Linux CLI for ProtonVPN. A @@ -196,6 +195,7 @@ pyright Type checker for the Python language R python-adblock Brave's adblock library in Python R python-black Uncompromising Python code formatter R python-dictcc commandline tool for dict.cc A +python-docs Set of HTML documentation for python R python-html2text A HTML to markdown-structured text converter R python-openpyxl A Python library to read/write Excel 2007 xlsx/xlsm files R python-pagelabels Python library to manipulate PDF page numbers and labels. A From 71c41ecbde4648d4dc4e4b51762a07e16b0cf001 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 27 Apr 2022 13:00:09 +0200 Subject: [PATCH 07/13] bootstrap: Update package list script Takes simple options -h (show help), -v (verbose), -n (dry-run) when started. By default does not spam output of *all* recognized packages anymore but simply prints a diff at the end. Old output can be enabled with `-v` verbose option. Diff is shown even if dry-run mode is enabled so that using dry-run by default will show you a preview of what changed. --- bootstrap/update_package_list.sh | 40 ++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/bootstrap/update_package_list.sh b/bootstrap/update_package_list.sh index 8e46d62..8d35bf0 100755 --- a/bootstrap/update_package_list.sh +++ b/bootstrap/update_package_list.sh @@ -7,6 +7,24 @@ pkg_all=$(pacman -Qqett | grep -v "$(pacman -Qqg base-devel)") pkg_repo=$(pacman -Qqn) pkg_aur=$(pacman -Qqm) +while getopts "nvh" opt; do + case "$opt" in + n) DRYRUN=true ;; + v) VERBOSE=true ;; + h | *) + { + printf "\nUpdate the list of installed packages.\n\nWill compare packages committed to the dotfile repository\nand those currently installed (on an Arch system, using pacman).\nUpdates the list of committed packages in repository\nand prints out the differences as a diff.\n\nOptions:\n\n\t-h\tDisplay this help.\n\t-v\tShow verbose information.\n\t-n\tPrint out changes without changing anything (dry-run).\n" + exit 1 + } + ;; + esac +done + +print_msg() { + # shellcheck disable=2059 + [ -n "$VERBOSE" ] && printf "$@" +} + # tsv file: # packagename, description, source, target # toot a toot manager A D @@ -20,9 +38,9 @@ touch "${OUTPUT}_TEMP" for pkg in $pkg_all; do source="" - if $(echo "$pkg_repo" | grep -F -q -x "$pkg"); then + if echo "$pkg_repo" | grep -F -q -x "$pkg"; then source="R" - elif $(echo "$pkg_aur" | grep -F -q -x "$pkg"); then + elif echo "$pkg_aur" | grep -F -q -x "$pkg"; then source="A" else echo "ERROR: The package $pkg could not be found in repositories or AUR." @@ -39,9 +57,9 @@ for pkg in $pkg_all; do fi if [ -n "$found_line" ]; then target=$(echo "$found_line" | cut -f4) - printf "Updating pkg: %s:%s from: %s, for: %s\n" "$pkg" "$desc" "$source" "$target" + print_msg "Updating pkg: %s:%s from: %s, for: %s\n" "$pkg" "$desc" "$source" "$target" else - printf "Adding pkg: %s:%s from: %s, for: %s\n" "$pkg" "$desc" "$source" "$target" + print_msg "Adding pkg: %s:%s from: %s, for: %s\n" "$pkg" "$desc" "$source" "$target" fi printf "%s\t%s\t%s\t%s\n" "$pkg" "$desc" "$source" "$target" >>"${OUTPUT}_TEMP" @@ -51,11 +69,19 @@ done if [ -f "$OUTPUT" ]; then while read -r line; do if ! echo "$line" | cut -f1 | xargs -I _ grep -F -q -x _ <(echo "$pkg_all"); then - printf "REMOVED: %s" "$line" + printf "REMOVED: %s\n" "$line" fi - done <<<$(tail +2 "$OUTPUT") + done <<<"$(tail +2 $OUTPUT)" +fi + +# show file changes +if [ -f "$OUTPUT" ] && [ -f "$OUTPUT"_TEMP ]; then + changes=$(diff --color=always -y --suppress-common-lines "$OUTPUT" "$OUTPUT"_TEMP | tail -n+2) + printf "FILE CHANGES:\n=============\n%s" "$changes" fi # actually write to file -cat <(printf "Name\tDescription\tSource\tTarget\n") "${OUTPUT}_TEMP" >"$OUTPUT" +if [ -z "$DRYRUN" ]; then + cat <(printf "Name\tDescription\tSource\tTarget\n") "${OUTPUT}_TEMP" >"$OUTPUT" +fi rm "${OUTPUT}_TEMP" From 2216ba079d0476a88ededeec8c9a57502dfd233e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 27 Apr 2022 13:03:43 +0200 Subject: [PATCH 08/13] bootstrap: Update package list --- bootstrap/packages.tsv | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bootstrap/packages.tsv b/bootstrap/packages.tsv index 8283966..f3d2f0e 100644 --- a/bootstrap/packages.tsv +++ b/bootstrap/packages.tsv @@ -17,7 +17,7 @@ asciinema Record and share terminal sessions R asix-ax88179-dkms A kernel module for ASIX AX88178A AX88179 USB 3.0 network adapters A aspell-de German dictionary for aspell R aspell-en English dictionary for aspell R -atool A script for managing file archives of various types A +atool A script for managing file archives of various types R awesome Highly configurable framework window manager R barrier Open-source KVM software based on Synergy (GUI) R bash-bats Bash Automated Testing System R @@ -39,7 +39,6 @@ caddy Fast web server with automatic HTTPS R calcurse A text-based personal organizer R catdoc A convertor for Microsoft Word, Excel, PowerPoint and RTF Files to text R clipman A simple clipboard manager for Wayland A -crda Central Regulatory Domain Agent for wireless networks R cups-pk-helper A helper that makes system-config-printer use PolicyKit R dbus-broker Linux D-Bus Message Broker R dcnnt Yet another tool to connect Android phone with desktop similar to KDE Connect A @@ -55,7 +54,7 @@ dos2unix Text file format converter R duf Disk Usage/Free Utility R dunst Customizable and lightweight notification-daemon R dust A more intuitive version of du in rust R -efm-langserver General purpose Language Server R +efm-langserver General purpose Language Server A element-desktop Glossy Matrix collaboration client — desktop version. R entr Run arbitrary commands when files change R evince Document viewer (PDF, PostScript, XPS, djvu, dvi, tiff, cbr, cbz, cb7, cbt) R @@ -68,6 +67,7 @@ fvextra Extensions to fancyvrb, including automatic line breaking and improved m fwupd Simple daemon to allow session software to update firmware R fzf-tab-git Replace zsh's default completion selection menu with fzf. R gallery-dl Command-line program to download image-galleries and collections from several image hosting sites A +gamemode A daemon/lib combo that allows games to request a set of optimisations be temporarily applied to the host OS R gimp GNU Image Manipulation Program R git-lfs Git extension for versioning large files R gitea-tea-git Painless self-hosted Git service.. A @@ -87,7 +87,6 @@ gotty-bin Simple command line tool that turns your CLI tools into web applicatio grim Screenshot utility for Wayland R grub GNU GRand Unified Bootloader (2) R gsimplecal Simple and lightweight GTK calendar R -gst-libav Multimedia graph framework - libav plugin R gst-plugins-bad Multimedia graph framework - bad plugins R gstreamer-vaapi Multimedia graph framework - vaapi plugin R gucharmap Gnome Unicode Charmap R @@ -127,6 +126,7 @@ lua-format LuaFormatter - Code formatter for Lua A lua-language-server Lua Language Server coded by Lua R lua51-busted Elegant Lua unit testing R luacheck A tool for linting and static analysis of Lua code R +lutris Open Gaming Platform R lynx A text browser for the World Wide Web R maim Utility to take a screenshot using imlib2 R man-db A utility for reading man pages R @@ -171,7 +171,6 @@ nvm Node Version Manager - Simple bash script to manage multiple active node.js nzbget Download from Usenet using .nzb files R oh-my-zsh-git A community-driven framework for managing your zsh configuration. Includes 180+ optional plugins and over 120 themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community R os-prober Utility to detect other OSes on a set of drives R -p7zip Command-line file archiver with high compression ratio R parallel A shell tool for executing jobs in parallel R paru-bin Feature packed AUR helper A pass-coffin A password store extension that hides data inside a signed and encrypted coffin A @@ -182,7 +181,6 @@ pdftk Command-line tool for working with PDFs R peek Simple screen recorder with an easy to use interface R perf Linux kernel performance auditing tool R piavpn-bin Private Internet Access client A -picom X compositor that may fix tearing issues R pipewire-alsa Low-latency audio/video router and processor - ALSA configuration R playerctl mpris media player controller and lib for spotify, vlc, audacious, bmp, xmms2, and others. R powertop A tool to diagnose issues with power consumption and power management R @@ -272,22 +270,24 @@ vifm-git Ncurses based file manager with vi like keybindings A vim-language-server VimScript language server A virtualbox Powerful x86 virtualization for enterprise as well as home use R virtualbox-guest-iso The official VirtualBox Guest Additions ISO image R -visidata Terminal spreadsheet multitool for discovering and arranging data A +visidata Terminal spreadsheet multitool for discovering and arranging data R +vulkan-intel Intel's Vulkan mesa driver R wavemon Ncurses-based monitoring application for wireless network devices R waybar-git Highly customizable Wayland bar for Sway and Wlroots based compositors (GIT) A waylock A simple screenlocker for wayland compositors R wdisplays GUI display configurator for wlroots compositors A wev tool for debugging wayland events, similar to xev A wget Network utility to retrieve files from the Web R +wine A compatibility layer for running Windows programs R wireguard-tools next generation secure network tunnel - tools for configuration R wireless_tools Tools allowing to manipulate the Wireless Extensions R wpa_actiond Daemon that connects to wpa_supplicant and handles connect and disconnect events A wtype xdotool type for wayland R xdg-user-dirs Manage user directories like ~/Desktop and ~/Music R -xorg-xrandr Primitive command line interface to RandR extension R -xsv A fast CSV toolkit written in Rust A +xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R yaml-language-server-bin Language server implementation for YAML files and optional schema support A youtube-dl A command-line program to download videos from YouTube.com and a few more sites R +yt-dlp-git A youtube-dl fork with additional features and fixes (git) A ytfzf A posix script to find and watch youtube videos from the terminal. (Without API) A zathura-cb Adds comic book support to zathura R zathura-djvu DjVu support for Zathura R From cac0aee4ca71b7a8a64e8544d07c061f82f2b71f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 27 Apr 2022 13:50:08 +0200 Subject: [PATCH 09/13] keyd: Update conf files to new 2.0 syntax New config syntax uses [ids] section to select which input devices are affected instead of file names, so we can have all settings (for similarly set up keyboards) in a single default config file. The file itself needs to end in `.conf` instead of the old `.cfg` and there is a slight difference in syntax between the old `C` and the new `control` for mapping the control key. That is about it. --- .../keyd/SEMITEK USB-HID Gaming Keyboard.cfg | 33 ------------------- .../system-packages/etc/keyd/default.cfg | 9 ----- ...slated Set 2 keyboard.cfg => default.conf} | 8 ++++- install.sh | 1 - 4 files changed, 7 insertions(+), 44 deletions(-) delete mode 100644 bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg delete mode 100644 bootstrap/system-packages/etc/keyd/default.cfg rename bootstrap/system-packages/etc/keyd/{AT Translated Set 2 keyboard.cfg => default.conf} (92%) diff --git a/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg b/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg deleted file mode 100644 index d6287a8..0000000 --- a/bootstrap/system-packages/etc/keyd/SEMITEK USB-HID Gaming Keyboard.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Makes capslock to control/escape -# insert to paste -# right alt to enable German Umlaute (äÄöÖüÜ), -# sharp s (ß), and the Euro sign (€). -# Needs compose key to be set in xkb to work correctly: -# $ setxkbmap -option "compose:menu" - -capslock = overload(C, esc) -insert = S-insert -rightalt = layer(dia) -shift = layer(shift) -rightshift = layer(shift) - -[shift:S] - -rightalt = layer(shiftedDia) - -[dia] - -shift = layer(shiftedDia) -rightshift = layer(shiftedDia) - -a = macro(compose a ") -o = macro(compose o ") -u = macro(compose u ") -s = macro(compose s s) -e = macro(compose = e) - -[shiftedDia] - -a = macro(compose A ") -o = macro(compose O ") -u = macro(compose U ") diff --git a/bootstrap/system-packages/etc/keyd/default.cfg b/bootstrap/system-packages/etc/keyd/default.cfg deleted file mode 100644 index 373ebab..0000000 --- a/bootstrap/system-packages/etc/keyd/default.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# leftshift = oneshot(S) -# leftalt = oneshot(A) -# rightalt = oneshot(G) -# rightshift = oneshot(A) -# leftmeta = oneshot(M) -# rightmeta = oneshot(M) - -capslock = overload(C, esc) -insert = S-insert diff --git a/bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg b/bootstrap/system-packages/etc/keyd/default.conf similarity index 92% rename from bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg rename to bootstrap/system-packages/etc/keyd/default.conf index d6287a8..bb29a5b 100644 --- a/bootstrap/system-packages/etc/keyd/AT Translated Set 2 keyboard.cfg +++ b/bootstrap/system-packages/etc/keyd/default.conf @@ -5,7 +5,13 @@ # Needs compose key to be set in xkb to work correctly: # $ setxkbmap -option "compose:menu" -capslock = overload(C, esc) +[ids] + +* + +[main] + +capslock = overload(control, esc) insert = S-insert rightalt = layer(dia) shift = layer(shift) diff --git a/install.sh b/install.sh index 39c8692..0dad27e 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,6 @@ check_consent() { printf "%s %s " "$2" "$default_consent" read -r answer if [[ "$1" == "n" ]] && [[ "$answer" != y* ]]; then - echo first printf "%s\n" "$3" false elif [[ "$1" == "y" ]] && [[ "$answer" == n* ]]; then From 96439a5c9b2199616253fca209b562543c9b06b1 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 30 Apr 2022 20:50:25 +0200 Subject: [PATCH 10/13] tmux: Change todo.session setup Replaced old, never used, graphical taskwarrior task accomplishment overview with a more free-form calendar/journal page. It displays an overview of my upcoming appointments using calcurse on the one hand, and my personal snippet journal with the help of jrnl on the other. The last thing is a tiny empty pane allowing me just enough room to interact with jrnl, e.g. quickly writing new entries. --- tmux/.config/tmux/sessions/todo.session | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/tmux/.config/tmux/sessions/todo.session b/tmux/.config/tmux/sessions/todo.session index 285881c..d0faa7e 100644 --- a/tmux/.config/tmux/sessions/todo.session +++ b/tmux/.config/tmux/sessions/todo.session @@ -1,4 +1,4 @@ -rename-window tasksh +rename-window focus send-keys tasksh C-m "+TODAY" C-m new-window -n dash send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task next" C-m @@ -8,10 +8,8 @@ split-window -v "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task select-pane -t 1 split-window -v -l 5 send-keys "t" Space -new-window -n history -send-keys "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task ghistory.monthly" C-m -split-window -v -l 80% "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task ghistory.weekly" -split-window -v -l 60% "cd ${XDG_DATA_HOME:-~/.local/share}/task/; fd . | entr -c task ghistory.daily" +new-window -n journal +send-keys "calcurse" C-m +split-window -h -l 35% "ls ~/documents/records/jrnl.md | entr -c jrnl -5" split-window -v -l 10% -send-keys "nvim ${XDG_CONFIG_HOME:-~/.config}/task/taskrc" C-m select-window -t 2 From 9a46a94827825e8fce867ec06ee0bfb06f3aecbf Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 30 Apr 2022 20:53:00 +0200 Subject: [PATCH 11/13] nvim: Change blankline, Update treesitter settings Updated treesitter setting to remove use of deprecated 'maintained' option and simply replaced it to use 'all' treesitter syntaxes (haven't had a problem with it so far). Changed blankline options slightly to remove annoying animations and quick switching of which blankline it shows depending on where my cursor is -- both proved to be too much of a distraction when I just need to interact with the indentation context every now and again and it should just allow me a quick glance at the indentation level the rest of the time. --- nvim/.config/nvim/lua/plug/_mini.lua | 7 ++++++- nvim/.config/nvim/lua/plug/_treesitter.lua | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_mini.lua b/nvim/.config/nvim/lua/plug/_mini.lua index 15a498c..c0e78c7 100644 --- a/nvim/.config/nvim/lua/plug/_mini.lua +++ b/nvim/.config/nvim/lua/plug/_mini.lua @@ -1,2 +1,7 @@ require('mini.comment').setup() -require('mini.indentscope').setup({symbol = "│"}) +require('mini.indentscope').setup({ + symbol = "│", + draw = {animation = require('mini.indentscope').gen_animation('none')}, + options = {indent_at_cursor = false} +}) +require('mini.trailspace').setup() diff --git a/nvim/.config/nvim/lua/plug/_treesitter.lua b/nvim/.config/nvim/lua/plug/_treesitter.lua index 64b0513..22072a3 100644 --- a/nvim/.config/nvim/lua/plug/_treesitter.lua +++ b/nvim/.config/nvim/lua/plug/_treesitter.lua @@ -1,6 +1,6 @@ require'nvim-treesitter.configs'.setup { -- one of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = "maintained", + ensure_installed = "all", highlight = {enable = true}, incremental_selection = {enable = true}, textobjects = {enable = true}, From 95e2fea9510ddf5f329dd487b7cbfca89e68350f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 30 Apr 2022 21:00:05 +0200 Subject: [PATCH 12/13] nvim: Disable uninstalled python language servers Had to manually disable python lsps that are not on my system since neovim otherwise complains about it whenever I enter a new python filetype file. --- nvim/.config/nvim/lua/plug/_lsp.lua | 1 + sh/.local/bin/clip | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index ce2acaa..ccbbd85 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -92,6 +92,7 @@ local sumneko_root_path = "/usr/share/lua-language-server" require'navigator'.setup({ lsp = { servers = {'efm'}, + disable_lsp = {"pylsp", "jedi_language_server"}, sumneko_lua = { cmd = { "lua-language-server", "-E", sumneko_root_path .. "/main.lua" diff --git a/sh/.local/bin/clip b/sh/.local/bin/clip index ec89175..42e6147 100755 --- a/sh/.local/bin/clip +++ b/sh/.local/bin/clip @@ -3,9 +3,8 @@ # clip -- easy copying to clipboard manager with # wl-copy / xclip / xsel # -# clips the first argument to the clipboard -# or stdin if stdin is passed -# will copy png/jpg as image files +# clips arguments passed to the clipboard +# or stdin if stdin is passed. # # idea ~~stolen~~ creatively borrowed from # https://github.com/kyazdani42/dotfiles/blob/master/bin/copy From 35eae9b32c508c9ba2af71a232a80a3943bf3832 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 30 Apr 2022 21:02:04 +0200 Subject: [PATCH 13/13] bootstrap: Add ly display manager Added tui display manager to my system and I've been quite enjoying using it, may come in handy as well if I ever want to have dual X11 and Wayland setup or go back to a more rounded DE experience. (Not that I intend to, but still enjoying the little style ly brings to the boot screen.) --- bootstrap/packages.tsv | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/packages.tsv b/bootstrap/packages.tsv index f3d2f0e..72acc45 100644 --- a/bootstrap/packages.tsv +++ b/bootstrap/packages.tsv @@ -127,6 +127,7 @@ lua-language-server Lua Language Server coded by Lua R lua51-busted Elegant Lua unit testing R luacheck A tool for linting and static analysis of Lua code R lutris Open Gaming Platform R +ly TUI display manager A lynx A text browser for the World Wide Web R maim Utility to take a screenshot using imlib2 R man-db A utility for reading man pages R