Compare commits

..

No commits in common. "fd20fb257668bd28ea6800eca8cc1edd6966ec27" and "5a9a4e7162456207237ca7add16253cf06cc0ec6" have entirely different histories.

87 changed files with 108 additions and 17924 deletions

4
.gitignore vendored
View file

@ -39,5 +39,5 @@ vifminfo.json
colorscheme.yml
# taskwarrior
office/.config/task/task-sync.rc
office/.config/task/contexts
taskwarrior/.config/task/task-sync.rc
taskwarrior/.config/task/contexts

View file

@ -56,7 +56,6 @@ Enjoy!
* [`pass`](pass/README.md) - Password management suite
* [`bibtex`](bibtex/README.md) - LateX/BibteX/pandoc plaintext writing & reference suite
* [`git`](git/README.md) - distributed version control system.
* [`office`](office/README.md) - office/productivity software for writing e-mail and setting appointments
## Notes

View file

@ -37,9 +37,7 @@ 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
chafa Image-to-text converter supporting a wide range of symbols and palettes, transparency, animations, etc. R
cinny-desktop-bin Matrix client focusing primarily on a simple, elegant and secure interface (binary release) A
clipman A simple clipboard manager for Wayland A
cups-pdf PDF printer for cups 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
@ -48,7 +46,7 @@ dell-command-configure Configure various BIOS features on Dell laptops A
devour Window Manager agnostic swallowing feature for terminal emulators A
dhcpcd RFC2131 compliant DHCP client daemon R
diff-so-fancy Good-looking diffs with diff-highlight and more R
distrobox Use any linux distribution inside your terminal. A
docker Pack, ship and run any application as a lightweight container R
docker-compose Fast, isolated development environments using Docker R
docx2txt Recovers text from DOCX files, with good formatting. R
dos2unix Text file format converter R
@ -56,6 +54,7 @@ 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 A
element-desktop Glossy Matrix collaboration client — desktop version. R
enca Charset analyser and converter R
entr Run arbitrary commands when files change R
evince Document viewer (PDF, PostScript, XPS, djvu, dvi, tiff, cbr, cbz, cb7, cbt) R
@ -71,7 +70,7 @@ fonts-cjk Linux 下的免费商用字体包 A
freerdp Free implementation of the Remote Desktop Protocol (RDP) R
fvextra Extensions to fancyvrb, including automatic line breaking and improved math mode R
fwupd Simple daemon to allow session software to update firmware R
fzf-tab-bin-git Replace zsh's default completion selection menu with fzf (git version). This package also compiles the optional binary module. A
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
@ -81,10 +80,12 @@ gitui Blazing fast terminal-ui for git written in Rust R
gk6x-bin Configure keys, macros, and lighting on GK6X keyboards (GK64, GK84, GK61, etc) A
glances CLI curses-based monitoring tool R
glfw-wayland A free, open source, portable framework for graphical application development (wayland) R
glow Command-line markdown renderer R
glow Markdown renderer for the CLI R
gnome-keyring Stores passwords and encryption keys R
gnu-netcat GNU rewrite of netcat, the network piping application R
gnumeric A GNOME Spreadsheet Program R
gnuplot Plotting package which outputs to X11, PostScript, PNG, GIF, and others R
go Core compiler tools for the Go programming language R
go-md2man A markdown to manpage generator R
gomuks A terminal based Matrix client written in Go A
gopls Language server for Go programming language R
@ -92,6 +93,7 @@ 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
@ -105,17 +107,14 @@ intel-ucode Microcode update files for Intel CPUs R
iputils Network monitoring tools, including ping R
ipython An enhanced Interactive Python shell. R
iucode-tool Tool to manipulate Intel® IA-32/X86-64 microcode bundles R
iwd Internet Wireless Daemon R
jabref-latest GUI frontend for BibTeX, written in Java; latest main (master) version from git A
jiq-bin Interactive JSON query tool using jq expressions A
jmtpfs FUSE and libmtp based filesystem for accessing MTP (Media Transfer Protocol) devices A
jpdftweak A Swiss Army Knife GUI application for PDF documents A
jrnl Collect your thoughts and notes without leaving the command line R
jupyter-nbclient A tool for running Jupyter Notebooks in different execution contexts. R
kanshi Dynamic output configuration for Wayland WMs R
keyd A key remapping daemon for linux. A
khal CLI calendar application build around CalDAV R
khard Console address book manager R
khard Console CardDAV client R
kitty A modern, hackable, featureful, OpenGL-based terminal emulator R
kubo IPFS implementation in Go R
lazygit Simple terminal UI for git commands R
@ -124,8 +123,6 @@ libqalculate Multi-purpose desktop calculator R
libreoffice-fresh LibreOffice branch which contains new features and program enhancements R
libva-intel-driver VA-API implementation for Intel G45 and HD Graphics family R
licenses A set of common license files R
libvirt API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc) R
linux The Linux kernel and modules R
linux-firmware Firmware files for Linux R
linux-headers Headers and scripts for building modules for the Linux kernel R
linux-lts The LTS Linux kernel and modules R
@ -148,7 +145,6 @@ masterpdfeditor-free A complete solution for creation and editing PDF files - Fr
mbsync-git free (GPL) mailbox synchronization program A
mediainfo Supplies technical and tag information about a video or audio file (CLI interface) R
mermaid-cli Generation of diagram and flowchart from text in a similar manner as markdown (CLI) A
micro Modern and intuitive terminal-based text editor R
mimeo Open files by MIME-type or file name using regular expressions. A
minidlna A DLNA/UPnP-AV Media server (aka ReadyDLNA) R
minio-client Replacement for ls, cp, mkdir, diff and rsync commands for filesystems and object storage R
@ -180,14 +176,14 @@ nmap Utility for network discovery and security auditing R
nodejs-markdownlint-cli MarkdownLint Command Line Interface A
nodejs-pandiff Prose diffs for any document format supported by Pandoc A
npm A package manager for javascript R
nss-mdns glibc plugin providing host name resolution via mDNS R
nsxiv Neo (or New or Not) Simple (or Small or Suckless) X Image Viewer A
ntfs-3g NTFS filesystem driver and utilities R
ntp Network Time Protocol reference implementation R
nushell A new type of shell R
nvm Node Version Manager - Simple bash script to manage multiple active node.js versions R
nzbget Download from Usenet using .nzb files R
offpunk-git Fork of the command-line Gemini client AV-98 with added offline capabilities A
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 A
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
otf-nerd-fonts-fira-code Monospaced font with programming ligatures. Patched with Nerd Fonts icons. A
parallel A shell tool for executing jobs in parallel R
@ -195,20 +191,16 @@ paru-bin Feature packed AUR helper 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
pbzip2 Parallel implementation of the bzip2 block-sorting file compressor R
pdfjs PDF reader in javascript R
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
perl-authen-sasl Perl/CPAN Module Authen::SASL : SASL authentication framework R
pigz Parallel implementation of the gzip file compressor 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
podman Tool and library for running OCI-based containers in pods R
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 Official ProtonVPN metapackage that installs protonvpn-gui and protonvpn-cli, maintained by the ProtonVPN team. A
ptpython Python REPL build on top of prompt_toolkit A
pulsemixer CLI and curses mixer for pulseaudio R
pv A terminal-based tool for monitoring the progress of data through a pipeline. R
pyright Type checker for the Python language R
@ -231,8 +223,6 @@ python-pyqt6-datavisualization Python bindings for QtDataVisualization R
python-pyqt6-networkauth Python bindings for QtNetworkAuth R
python-readability-lxml Fast html to text parser (article readability tool) python library R
python-slugify A Python slugify application that handles unicode R
python-tasklib Python library for interacting with taskwarrior databases R
qemu-base A basic QEMU setup for headless environments R
qt5-wayland Provides APIs for Wayland R
qt5-xmlpatterns Support for XPath, XQuery, XSLT and XML schema validation R
qt6-svg Classes for displaying the contents of SVG files R
@ -242,7 +232,6 @@ quarto-cli-bin An open-source scientific and technical publishing system built o
qutebrowser A keyboard-driven, vim-like browser based on PyQt5 R
redshift Adjusts the color temperature of your screen according to your surroundings. R
refind An EFI boot manager R
refind-btrfs Generate rEFInd manual boot stanzas from Btrfs snapshots A
reflector A Python 3 module and script to retrieve and filter the latest Pacman mirror list. R
remind A sophisticated calendar and alarm program. R
remmina remote desktop client written in GTK+ R
@ -259,14 +248,12 @@ shellcheck-bin Shell script analysis tool (binary release, static) A
shfmt Format shell programs R
slurp Select a region in a Wayland compositor R
smartmontools Control and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives R
snap-pac Pacman hooks that use snapper to create pre/post btrfs snapshots like openSUSE's YaST 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
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
swayidle Idle management daemon for Wayland R
swww Efficient animated wallpaper daemon for wayland, controlled at runtime. A
systemd-sysvcompat sysvinit compat for systemd R
task-spooler Queue up tasks from the shell for batch execution A
taskopen Script for taking notes and open urls with taskwarrior A
tasksh A shell command that wraps Taskwarrior commands A
@ -274,12 +261,14 @@ tea A command line tool to interact with Gitea servers R
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
timg Terminal Image and Video Viewer A
tlp Linux Advanced Power Management R
tmux A terminal multiplexer R
toilet free replacement for the FIGlet utility. A
topgrade-bin Invoke the upgrade procedure of multiple package managers A
tomb Crypto Undertaker, a simple tool to manage encrypted storage R
topgrade Invoke the upgrade procedure of multiple package managers R
traceroute Tracks the route taken by packets over an IP network R
translate-shell A command-line interface and interactive shell for Google Translate R
transmission-qt Fast, easy, and free BitTorrent client (Qt GUI) R
@ -308,6 +297,7 @@ 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 R
vulkan-intel Intel's Vulkan mesa driver R
wavemon Ncurses-based monitoring application for wireless network devices R
waybar Highly customizable Wayland bar for Sway and Wlroots based compositors R
waylock A simple screenlocker for wayland compositors R
@ -317,7 +307,6 @@ wezterm A GPU-accelerated cross-platform terminal emulator and multiplexer R
wget Network utility to retrieve files from the Web R
wireguard-tools next generation secure network tunnel - tools for configuration R
wireless_tools Tools allowing to manipulate the Wireless Extensions R
wlopm Wayland output power management. A
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
@ -325,7 +314,7 @@ xsv A CLI for indexing, slicing, analyzing, splitting and joining CSV files R
yaml-language-server YAML Language Server R
yarn Fast, reliable, and secure dependency management R
youtube-dl A command-line program to download videos from YouTube.com and a few more sites R
yt-dlp A youtube-dl fork with additional features and fixes 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 R
zathura-cb Adds comic book support to zathura R
zathura-djvu DjVu support for Zathura R
@ -333,5 +322,5 @@ zathura-pdf-mupdf PDF support for Zathura (MuPDF backend) (Supports PDF, ePub, a
zotero-bin Zotero Standalone. Is a free, easy-to-use tool to help you collect, organize, cite, and share your research sources. A
zq Tooling for super-structured data A
zsh-autosuggestions Fish-like autosuggestions for zsh R
zsh-fast-syntax-highlighting Optimized and extended zsh-syntax-highlighting A
zsh-fast-syntax-highlighting-git Optimized and extended zsh-syntax-highlighting R
zsh-pure-prompt Pretty, minimal and fast ZSH prompt A

Can't render this file because it contains an unexpected character in line 277 and column 64.

View file

@ -9,7 +9,7 @@ PassCmd "pass show misc/gmail-app-password | head -n1"
# PassCmd "gpg2 -q --for-your-eyes-only --no-tty -d ~/.mailpass.gpg"
#
# Use SSL
TLSType IMAPS
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
# Throttle simultaneous access to make google happy
PipelineDepth 60

View file

@ -5,31 +5,11 @@ bind index,pager g noop # don't send group-replies with g
bind index gg first-entry
bind index G last-entry
bind index <space> collapse-thread
# view manipulation
bind attach,browser,index,pager \CF next-page
bind attach,browser,index,pager \CB previous-page
bind attach,browser,index,pager \Cu half-up
bind attach,browser,index,pager \Cd half-down
bind browser,index,pager \Ce next-line
bind browser,index,pager \Cy previous-line
bind index s toggle-new
bind index S set-flag
macro index \CS "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
bind index,pager w display-toggle-weed
# Thread manipulation
bind pager d noop
bind index,pager dd delete-message
bind index,pager dT delete-thread
bind index,pager dt delete-subthread
bind pager,index gt next-thread
bind pager,index gT previous-thread
bind pager,index za collapse-thread
bind pager,index zA collapse-all
bind pager,index zr reconstruct-thread
bind pager,index zR entire-thread
bind index,pager \CF next-page
bind index,pager \CB previous-page
bind index,pager N search-opposite # vim-like search
bind index s toggle-new
macro index \CS "T~U<enter><tag-prefix><clear-flag>N<untag-pattern>.<enter>" "mark all messages as read"
# Email completion bindings
bind editor <Tab> complete-query
@ -53,7 +33,7 @@ bind index,pager <up> sidebar-prev
bind index,pager <right> sidebar-open
# search navigation
macro index a "<limit>all\n" "show all messages (undo limit)"
bind browser,index,pager N search-opposite # vim-like search
# notmuch search navigation
bind index \\ vfolder-from-query # notmuch search
# pager navigation
bind pager,attach h exit
@ -68,20 +48,14 @@ bind compose p postpone-message
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 noop # to avoid accidentally sending replies
bind index,pager rr group-reply
bind index,pager ro reply
bind index,pager R group-reply
# open urls found in the e-mail
macro index,pager \CU "|urlview<enter>" "call urlview to open links"
# Refresh far imap email
macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; sync-mail<enter><sync-mailbox>" "refresh all e-mail"
macro index o "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; sync-mail gmail-inbox<enter><sync-mailbox>" "refresh inbox e-mail"
macro index O "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; mail-check<enter><sync-mailbox>" "refresh all e-mail"
macro index o "<sync-mailbox><shell-escape>export MBSYNC_PRE=true; mail-check gmail-inbox<enter><sync-mailbox>" "refresh inbox e-mail"
# Saner copy/move dialogs
macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"
# Send mail to taskwarrior
macro index,pager T "<pipe-message>mutt2task -c -d -t<enter>" "add mail as task to taskwarrior with custom description and tags"
macro index,pager t "<pipe-message>mutt2task -c<enter>" "add mail as task to taskwarrior"

View file

@ -0,0 +1,4 @@
#!/usr/bin/env sh
# Ensure the neomutt cache directories exist
[ -d "${XDG_CACHE_HOME:-~/.cache}/neomutt" ] || mkdir -p "${XDG_CACHE_HOME:-~/.cache}/neomutt/hcache"

15
mail/README.md Normal file
View file

@ -0,0 +1,15 @@
# e-mail module
[aerc](https://aerc-mail.org/) - terminal mail client
[isync](https://isync.sourceforge.io/mbsync.html) - mirror your Imapped mail directory locally with two way synchronization
[notmuch](https://notmuchmail.org/) - index and search your mail
The current mail setup uses `mbsync` (from the isync project) to locally mirror the GMail imap folder.
It, as of now, needs to be manually run by invoking `mbsync gmail` -- which expects your username and password to reside in a [`pass`](/pass) accessible file called `misc/aerc-gmail-app-password`.
In other words --- this is very specific to my setup and if transferring the options, please customize to your needs.
Then, `notmuch` can be run on the local maildir to generate and indexed full-text search engine.
Right now, `notmuch` can only be used through its cli, it is not yet connected to `aerc`.
`aerc` picks up the maildir created by `mbsync` in `~/documents/mail` and works on it.
`mbsync` syncs any changes made back to the remote imap directory.

View file

@ -27,9 +27,10 @@ require("packer").startup(function()
-- vim plugs
-- essential
use {
'numToStr/Navigator.nvim',
'marty-oehme/Navigator.nvim',
branch = 'feat/add-wezterm-navigation',
config = function() require('Navigator').setup() end
} -- allow seamless navigation between vim buffers and tmux/wezterm splits
} -- allow seamless navigation between vim buffers and tmux splits
use 'jeffkreeftmeijer/vim-numbertoggle' -- toggles numbers to absolute for all buffers but the current which is relative
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

View file

@ -1,16 +0,0 @@
[calendars]
[[calendar_local]]
path = ~/documents/calendars/*
type = discover
color = auto
[locale]
timeformat = %H:%M
dateformat = %Y-%m-%d
longdateformat = %Y-%m-%d
datetimeformat = %Y-%m-%d %H:%M
longdatetimeformat = %Y-%m-%d %H:%M
[default]
default_calendar = Activities

View file

@ -1,27 +0,0 @@
#!/usr/bin/env sh
#
# Wraps around the calcurse invocation and syncs calendar data
# to local vdir - given by default below.
#
# For now ONLY PROVIDES ONE-WAY Synchronization, see below.
# The path in which *the calendars* reside (i.e. toplevel with access to all paths)
CAL_PATH="$HOME/documents/calendars"
calcurse() {
find "$CAL_PATH" -maxdepth 1 -type d -exec calcurse-vdir import {} \;
}
# Enable two-way sync. One issue is that calcurse would sync everything
# into the top-level path (or the selected calendar path) since it makes
# not the same differentiation as the vdir between calendars.
# FIXME Not sure how to resolve currently.
#
# The below works as a simple two-way synchronization on exiting calcurse.
# To function the invocation has to be turned from a function above to an
# executable shell-script file instead.
# trap 'calcurse_export' 0
#
# calcurse_export() {
# calcurse-vdir export "$CAL_PATH"
# }

View file

@ -1,4 +0,0 @@
#!/usr/bin/env sh
# Ensure the neomutt cache directories exist
[ -d "${XDG_CACHE_HOME:-$HOME/.cache}/neomutt" ] || mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/neomutt/hcache"

View file

@ -1,6 +0,0 @@
#!/usr/bin/env sh
# Ensure necessary taskwarrior includes exist
[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/task/contexts" ] || touch "${XDG_CONFIG_HOME:-$HOME/.config}/task/contexts"
[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/task/task-sync.rc" ] || touch "${XDG_CONFIG_HOME:-$HOME/.config}/task/task-sync.rc"
[ -e "${XDG_CONFIG_HOME:-$HOME/.config}/task/colorscheme" ] || touch "${XDG_CONFIG_HOME:-$HOME/.config}/task/colorscheme"

View file

@ -1,20 +0,0 @@
[General]
EDITOR = nvim
taskbin = task
path_ext = /usr/share/taskopen/scripts
[Actions]
note_custom_ext.regex = "^Note\\.(.*)"
note_custom_ext.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.$LAST_MATCH"
notes.regex = "^Note"
notes.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.md"
links.regex = "^https?://"
links.command = "xdg-open $FILE"
mail.regex = "^<.*@.*>$"
mail.command = "notmuch show mid:${FILE:1:-1}"
[CLI]

View file

@ -1 +0,0 @@
COMMAND xdg-open

View file

@ -1,39 +0,0 @@
[general]
status_path = "~/.local/vdirsyncer/status/"
[pair calendar]
a = "calendar_local"
b = "calendar_nextcloud"
collections = ["from a", "from b"]
metadata = ["displayname", "color"]
conflict_resolution = "b wins"
[storage calendar_local]
type = "filesystem"
path = "~/documents/calendars/"
fileext = ".ics"
[storage calendar_nextcloud]
type = "caldav"
url = "https://files.martyoeh.me/remote.php/dav/"
username.fetch = ["shell", "pass personal/files.martyoeh.me/me | awk -F': ' '{print $2}'"]
password.fetch = ["shell", "pass personal/files.martyoeh.me/me | head -n1"]
[pair contacts]
a = "contacts_local"
b = "contacts_nextcloud"
collections = ["from a", "from b"]
metadata = ["displayname", "description"]
conflict_resolution = "b wins"
[storage contacts_local]
type = "filesystem"
path = "~/documents/contacts/"
fileext = ".vcf"
[storage contacts_nextcloud]
type = "carddav"
url = "https://files.martyoeh.me/remote.php/dav/"
username.fetch = ["shell", "pass personal/files.martyoeh.me/me | awk -F': ' '{print $2}'"]
password.fetch = ["shell", "pass personal/files.martyoeh.me/me | head -n1"]

View file

@ -1,100 +0,0 @@
#!/usr/bin/env python
"""
Creates a new task with corresponding description and tags.
Description and tags can be supplied via commandline through `-d` and `-t` options,
or interactively by using the options without supplying a string for them. E.g.:
`mutt2task` => task: Reply to <subject> from <sender>
`mutt2task -d "hello" -t one two` => task: hello +one +two
`mutt2task -d -t` => asks you interactively for description and tags
"""
import argparse
import email
import sys
import re
from tasklib import TaskWarrior, Task
def get_args():
parser = argparse.ArgumentParser(
description="Creates a task with given message and annotates the task with message id"
)
parser.add_argument(
"-d",
"--description",
nargs="?",
const=True,
default=None,
help="Supply a description for the task. Use the option as a flag to supply description interactively.",
)
parser.add_argument(
"-t",
"--tags",
nargs="*",
help="Supply any number of tags for the task. Use the option as a flag to supply tags interactively.",
)
parser.add_argument(
"-c",
"--clean",
action="store_true",
help="Remove subject annoyances like RE FWD on a best-effort basis.",
)
return parser.parse_args()
args = get_args()
def clean_subject(subject):
to_remove = ["fwd", "re", "fw", "aw", "wg", "sv", "vs", "ref", "tr"]
for abbrev in to_remove:
patt = re.compile(r"^{}(?: |:)\s*".format(abbrev), re.IGNORECASE)
subject = patt.sub("", subject)
return subject
def get_task_description(message):
subject = clean_subject(message["subject"]) if args.clean else message["subject"]
description = 'Reply to "{}" from {}'.format(
subject, message["from"].split(" <")[0]
)
# automatically set description if one provided
if args.description and isinstance(args.description, str):
description = args.description
# otherwise let user enter one if option has been passed
elif args.description:
inp = input("Enter task description or press enter for default: ")
description = inp if inp else description
return description
def get_task_tags():
tags = ["mail"]
if args.tags and len(args.tags) > 0:
tags = sum([tag.split(" ") for tag in args.tags], [])
elif args.tags is not None and len(args.tags) == 0:
inp = input("Enter task tags or press enter for default: ")
tags = inp.split(" ") if inp else tags
return tags
def main():
try:
message = email.message_from_file(sys.stdin)
if not message:
print("Something went wrong, cannot parse mail.")
sys.exit(1)
tw = TaskWarrior("~/.local/share/task", create=False)
sys.stdin = open("/dev/tty") # make user able to add input again
task = Task(tw, description=get_task_description(message), tags=get_task_tags())
task.save()
task.add_annotation(message['message-id'])
except Exception as e:
print(e)
sys.exit(2)
if __name__ == "__main__":
main()

View file

@ -1,42 +0,0 @@
# office module
neomutt - terminal mail client
[mbsync](https://isync.sourceforge.io/mbsync.html) - mirror your Imapped mail directory locally with two-way synchronization
[notmuch](https://notmuchmail.org/) - index and search your mail
msmtp - send mail through shell commands
imapfilter - rule-based filtering engine for your incoming mail
vdirsyncer - mirror your contacts and calendars locally with two-way synchronization
khal - terminal vdir-compatible calendar client
calcurse - a pretty terminal calendar client, but not very vdir compatible
taskwarrior - a super flexible terminal to-do list
The module has three areas of concern: a functioning mail suite (receiving, sending, searching), to-do management, and contacts and calendaring.
Take care that most of the credential/account setup of course is highly specific to my setup and should be changed as required.
## mail
The current mail setup uses `mbsync` (from the isync project) to locally mirror the GMail imap folder.
It is run through a `sync-mail` script which can invoke pre- and post-sync hooks
(e.g. run your incoming mail through filters as soon as they arrive or ingest them into full-text search engines).[^1]
The sync script also automatically unlocks any pass directory so that credentials can be put into their respective applications and the directory closes again after use.
`msmtp` is used for mail sending by neomutt (and git if using git send-email).
`neomutt` then picks up the mail directory filled by `mbsync` and lets you browse it, respond to mail or create new ones.
[^1]: That being said, the script is a little dusty and could probably use a little overhaul. It *works* but could be more fantastic I feel.
## calendar and contacts
For calendars and contacts, the wonderful `vdirsyncer` is used to sync everything from a remote Dav client (hard-coded to my server currently) to the local directories in documents.
This is then picked up by `khal` to allow you to browse and edit your events, and create new ones - all of which in turn ends up remotely.
You can also browse your events locally with `calcurse` which will import them on each startup, but will not sync back yet;
meaning, any changes you do through the application will not reflect themselves back on any of your other connected devices unfortunately.
## tasks
Task management is done through the wonderful `taskwarrior`. I mostly use it as-is from the commandline, with some personal tweaks to urgencies and task dependencies.
The goal here is to integrate taskwarrior relatively tightly into mail
(e.g. receiving a mail and turning it into a task, then being able to go back from the task to the respective mail)
and calendaring (turning a to-do into a calendar event, and creating to-dos for individual events right from the calendar),
but those goals are still a ways off and the suite is working fine enough for now.

View file

@ -15,9 +15,7 @@ c.aliases["add-shaarli"] = "spawn --userscript shaarli_add.sh"
c.aliases["send-to-archive"] = "open https://web.archive.org/web/{url}"
# save current page to pdf file
c.aliases["save-to-pdf"] = "spawn --userscript pagetopdf.sh"
# open sci-hub pdf for doi
c.aliases["send-to-scihub"] = "spawn --userscript doi2scihub"
c.aliases["save_to_pdf"] = "spawn --userscript pagetopdf.sh"
# translate current page / selection with google translate
c.aliases["translate-page-google"] = "spawn --userscript translate_google.sh"
@ -25,17 +23,8 @@ c.aliases[
"translate-selection-google"
] = "spawn --userscript translate_google.sh --text"
# open the current page in more readable version
c.aliases["readable"] = "spawn --userscript readability"
# print picture of current url as qr code
c.aliases["show-qr"] = "spawn --userscript qr"
# add a task of current page to taskwarrior
c.aliases["taskadd"] = "spawn --userscript taskadd"
# try to remove the cookie banner from a website
c.aliases["cookie-block"] = "spawn --userscript qute-cookie-block"
# open last downloads in dmenu-like
c.aliases["recent-downloads"] = "spawn --userscript open_download"

View file

@ -1,14 +1,14 @@
c.content.blocking.enabled = True
c.content.blocking.method = "both"
c.content.blocking.adblock.lists = [
"https://www.malwaredomainlist.com/hostslist/hosts.txt",
"https://someonewhocares.org/hosts/hosts",
"https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext",
"http://www.malwaredomainlist.com/hostslist/hosts.txt",
"http://someonewhocares.org/hosts/hosts",
"http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext",
"https://secure.fanboy.co.nz/fanboy-cookiemonster.txt",
]
c.content.blocking.hosts.lists = [
"https://winhelp2002.mvps.org/hosts.zip",
"https://malwaredomains.lehigh.edu/files/justdomains.zip",
"http://winhelp2002.mvps.org/hosts.zip",
"http://malwaredomains.lehigh.edu/files/justdomains.zip",
]
c.content.blocking.whitelist = ["piwik.org"]
c.content.autoplay = False

View file

@ -60,13 +60,13 @@ config.bind(
)
# Download shortcuts
config.bind(lleader + "dd", "download", mode="normal")
config.bind(lleader + "dp", "save-to-pdf", mode="normal")
config.bind(lleader + "dp", "save_to_pdf", mode="normal")
# open last download
config.bind("gD", "recent-downloads", mode="normal")
config.bind("gD", "spawn --userscript open_download")
config.bind('"w', "add-wallabag", mode="normal") # add current page to wallabag
config.bind(";w", "hint links run add-wallabag") # add link to wallabag
config.bind(";w", "hint links userscript wallabag_add.sh") # add link to wallabag
config.bind('"s', "add-shaarli", mode="normal")
config.bind('"a', "send-to-archive", mode="normal")
@ -76,10 +76,7 @@ config.bind('"T', "translate-selection-google", mode="normal")
config.bind('"q', "show-qr")
config.bind('"p', "send-to-scihub", mode="normal") # view current page doi on scihub
config.bind(";p", "hint links run send-to-scihub") # view linked doi on scihub
config.bind(lleader + "r", "readable", mode="normal")
config.bind(lleader + "r", "spawn --userscript readability")
# set stylesheets for the browser to use
config.bind(

View file

@ -1,7 +1,7 @@
from qutebrowser.api import interceptor
c.url.searchengines = {
"sci": "https://sci-hub.ru/{}",
"#sci": "https://sci-hub.do/{}",
"DEFAULT": "https://search.martyoeh.me/?q={}",
"al": "https://wiki.archlinux.org/index.php/{}",
"alt": "https://alternativeto.net/software/{}/?license=opensource",

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#consent-page > div > div > div > form > div.wizard-body > div.actions.couple > a"/>
<wait/>
<click element="#select-legit-all-purpose > span.toggleAll.toggle-accpet-all"/>
<click element="#consent-page > div > form > div.page-footer > div > div > button"/>
</block>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#yDmH0d > c-wiz > div > div > div.NIoIEf > div.G4njw > div.qqtRac > div > div > div > a"/>
<wait/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(3) > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(4) > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(5) > div.IgeUeb > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > form > div > button"/>
</block>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- TODO: You cannot block cookies on ebay -->
<click element="#gdpr-banner > div.gdpr-banner__wrapper > div > a"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#onetrust-reject-all-handler"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#gdpr-single-choice-overlay > div > div.wt-overlay__footer.wt-pt-xs-3 > div.wt-overlay__footer__action.wt-display-flex-md.wt-flex-grow-md-1.wt-order-xs-1.wt-order-md-neg1.wt-justify-content-flex-end > button"/>
<wait/>
<click element="#gdpr-privacy-settings > div > div.wt-overlay__footer.wt-align-items-center > div.wt-overlay__footer__action > div > div:nth-child(3) > button"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- TODO: Facebook changes IDs of buttons -->
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#wrapper > div.notification-banner > div > a"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<remove element=".hide-consent"/>
</block>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#EDu5ze > div"/>
<wait/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(4) > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(5) > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > div:nth-child(6) > div.IgeUeb > div.uScs5d > div > div.uScs5d > div:nth-child(1) > div > button"/>
<click element="#yDmH0d > c-wiz > div > div > div > div.VP4fnf > form > div > button"/>
</block>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- WARNING: The cookie-free version of this websites looks very different-->
<click element="#modal-host > div > div > div > div > div > div > div.css-zndjj2 > a"/>
<wait time="1000"/>
<click element="#__next > div.css-qbih8b > div > button.css-1glzvq1"/>
</block>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#onetrust-pc-btn-handler"/>
<click element="#cookie-preferences > div.save-preference-btn-container > button"/>
</block>

View file

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- TODO: You cannot block cookies, only accept? -->
<click element="body > div.RnEpo.Yx5HN > div > div > div > div.mt3GC > button.aOOlW.HoLwm"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#artdeco-global-alert-container > div.artdeco-global-alert.artdeco-global-alert--NOTICE.artdeco-global-alert--COOKIE_CONSENT > section > div > div.artdeco-global-alert-action__wrapper > button:nth-child(1)"/>
<wait time="1500"/>
<click element="body > header > a:nth-child(1) > li-icon"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#modal-host > div > div > div > div > div > div > div.css-zndjj2 > a"/>
<wait time="1000"/>
<click element="#__next > div.css-1m0hjq0 > div > button.css-1mzn52w"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#modal-host > div > div > div > div > div > div > div.css-zndjj2 > a"/>
<wait/>
<click element="#__next > div.css-1m0hjq0 > div > button.css-1mzn52w"/>
</block>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#wcpConsentBannerCtrl > div._2j0fmugLb1FgYz6KPuB91w > button:nth-child(2)"/>
<wait/>
<click element="#_1dp8Vp5m3HwAqGx8qBmFV2_c1_reject"/>
<click element="#_1dp8Vp5m3HwAqGx8qBmFV2_c2_reject"/>
<click element="#_1dp8Vp5m3HwAqGx8qBmFV2_c3_reject"/>
<click element="#wcpCookiePreferenceCtrl > div.AFsJE948muYyzCMktdzuk > div > div.nohp3sIG12ZBhzcMnPala > button._3tOu1FJ59c_xz_PmI1lKV5._1zNQOqxpBFSokeCLGi_hGr"/>
</block>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- TODO: Clicking on the button does not work -->
<!-- <click element="#cookie-disclosure > div.cta-btn-container > button:nth-child(2)"/> -->
<!-- TODO: Workaround: Close -->
<click element="#cookie-disclosure > div.btn-container > button > span.icon-close"/>
</block>

View file

@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<!-- CANNOT OPT OUT OF EVERYTHING -->
<!-- TODO: Does not work? -->
<click element="#site-content > div.gdpr.shown.expanded.expanded-dock.css-17nqy7q.e1x0szx60 > div.css-183a15u.ejw0p350 > div > div.css-1s2i4vk > a"/>
<debug/>
<wait/>
<debug msg="After"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(1) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(2) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(3) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(4) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(5) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(6) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(7) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(8) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(9) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(10) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(11) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(12) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-2 > tbody > tr:nth-child(14) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(1) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(2) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(3) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(4) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(5) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(6) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(7) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(8) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(9) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(10) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(11) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(12) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(13) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(14) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(15) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(16) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(17) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(18) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-3 > tbody > tr:nth-child(19) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(1) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(2) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(3) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(4) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(7) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#gdpr-faq-cookie-table-4 > tbody > tr:nth-child(8) > td:nth-child(5) > a:nth-child(2)"/>
<click element="#opt-out-of-new-york-times-nonessential-trackers"/>
<!-- TODO: Close the new tab -->
<!-- TODO: Close the banner -->
</block>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#manageCookiesLink"/>
<wait time="1000"/>
<click element="#performance"/>
<click element="#functional"/>
<click element="#submitCookiesBtn"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#SHORTCUT_FOCUSABLE_DIV > div:nth-child(6) > div._3q-XSJ2vokDQrvdG6mR__k > section > div > section > section > form:nth-child(1) > button"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#cookie-link-manage"/>
<!-- TODO: Not sure clicking the right thing -->
<click element="#cookie-btn-allow"/>
</block>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="body > div.ff-sans.ps-fixed.z-nav-fixed.ws4.sm\\:w-auto.p32.bg-black-750.fc-white.bar-lg.b16.l16.r16.js-consent-banner > div > button.grid--cell.s-btn.s-btn__filled.js-cookie-settings"/>
<wait time="1000"/>
<click element="#onetrust-pc-sdk > div > div.s-modal--footer.mt0.grid.gs8.gsx > button.grid--cell.s-btn.s-btn__primary.save-preference-btn-handler.onetrust-close-btn-handler.js-consent-banner-hide.js-consent-save"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#rejectAllButton"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#react-root > div > div > div.css-1dbjc4n.r-13qz1uu.r-417010 > main > div > div > div.css-1dbjc4n.r-1awozwy.r-1m3jxhj.r-1upvrn0.r-18u37iz.r-1d7fvdj.r-d9fdf6.r-tvv088.r-13qz1uu > div.css-18t94o4.css-1dbjc4n.r-1niwhzg.r-11mg6pl.r-sdzlij.r-1phboty.r-rs99b7.r-18kxxzh.r-1q142lx.r-1w2pmg.r-19u6a5r.r-1mnahxq.r-ero68b.r-1gg2371.r-1ny4l3l.r-1fneopy.r-o7ynqc.r-6416eg.r-lrvibr > div > span"/>
</block>

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<remove element=".oaDry"/>
</block>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<block>
<click element="#consent-page > div > div > div > form > div.wizard-body > div.actions.couple > a"/>
<wait time="2000"/>
<!-- This is not my spelling mistake :) vvvvvv -->
<click element="#select-legit-all-purpose > span.toggleAll.toggle-accpet-all"/>
<click element="#consent-page > div > form > div.page-footer > div > div > button"/>
</block>

View file

@ -1,116 +0,0 @@
#!/usr/bin/env python3
"""
Goes to the sci-hub page for the current article, based on DOI.
Based on the work in
https://github.com/cadadr/configuration/blob/4b6a241d04d113f322b960890a0d0a0ab783a7b3/dotfiles/qutebrowser/userscripts/doi
with much gratitude.
The program can be invoked with DOI on a page selected, through the hinting mode when selecting a DOI link or on a publisher page (any page where doi meta-tags are set) - works on ScienceDirect, Taylor&Francis, Springer, etc.
That means you can give it a doi through a link or on the current page, for example with the following mappings:
```python
config.bind('"p', "spawn --userscript doi2scihub")
config.bind(';p', "hint links userscript doi2scihub")
```
You can also pass the doi as the (only) argument to the userscript:
```
:spawn --userscript doi2scihub https://doi.org/10.37394/23207.2021.18.68
`
Updates its sci-hub link based on the one listed on sci-hub wiki page.
"""
import os
import re
import sys
import html.parser
import requests
mode = os.getenv("QUTE_MODE")
text = None
class DoiTagParser(html.parser.HTMLParser):
doi = None
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
if self.doi == None and tag == "meta":
if (
("name", "citation_doi") in attrs
or ("name", "dc.identifier") in attrs
or ("scheme", "doi") in attrs
):
for att in attrs:
if att[0] == "content":
self.doi = att[1]
break
class SciHubLinkParser(html.parser.HTMLParser):
current = None
link_patt = re.compile(r"^(?P<url>https?://sci-hub\..+)/about$")
def handle_starttag(self, tag: str, attrs: list[tuple[str, str | None]]) -> None:
if self.current == None and tag == "a":
for att in attrs:
if att[0] == "href" and self.link_patt.match(att[1] or ""):
match = self.link_patt.match(att[1] or "")
self.current = match["url"] if match and match["url"] else None
def get_scihub_url(wiki_page: str = "https://wikiless.org/wiki/Sci-Hub"):
resp = requests.get(wiki_page)
parser = SciHubLinkParser()
parser.feed(resp.text)
return parser.current or "https://sci-hub.ru"
# use doi argument if we got one
if len(sys.argv) > 1:
text = sys.argv[1]
# use the hinted url
elif mode == "hints":
text = os.getenv("QUTE_URL", "").strip()
# use the current selection
elif mode == "command" and os.getenv("QUTE_SELECTED_TEXT"):
text = os.getenv("QUTE_SELECTED_TEXT", "").strip()
# just try to find a doi on current page
elif os.getenv("QUTE_HTML"):
with open(os.getenv("QUTE_HTML", ""), "r") as source:
parser = DoiTagParser()
parser.feed(source.read())
text = parser.doi
with open(os.getenv("QUTE_FIFO", ""), "w") as fifo:
if not text:
fifo.write(f'message-warning "Could not find a valid DOI"')
sys.exit()
# DOI syntax: https://www.doi.org/doi_handbook/2_Numbering.html#2.2.
#
# Note that this probably matches a subset of possible DOIs, as it
# seems that theres no practical limitation on neither the length nor
# the contents of the DOI. But IMHO this is a healthy subset.
doi_re = re.compile(
# match possible URI prefix
r"(?P<blah>((https?)?://)?doi\.org/)?"
# match actual DOI
r"(?P<meat>[a-zA-Z0-9\./\-_]+)"
)
match = doi_re.match(text)
if match is None or match["meat"] is None:
fifo.write(
f"message-warning \"'{text}' is probably not a DOI, or update regexp\""
)
else:
url = get_scihub_url()
doi = match["meat"]
fifo.write(f"open -t {url}/{doi}")

View file

@ -13,7 +13,6 @@
# POWERMENU_LOCKSCREEN_CMD=""
# POWERMENU_LOGOUT_CMD=""
# POWERMENU_SUSPEND_CMD=""
# POWERMENU_HIBERNATE_CMD=""
# Command chooser options
# POWERMENU_PICKER_CMD=""
# POWERMENU_PICKER_OPTS=""
@ -27,7 +26,6 @@ elif [ "${POWERMENU_SHOW_ICONS:-1}" -eq 1 ]; then
reboot_btn=""
lock_btn=""
suspend_btn="鈴"
hibernate_btn="鈴"
logout_btn=""
fi
if [ "${POWERMENU_SHOW_TEXT:-1}" -eq 1 ]; then
@ -35,7 +33,6 @@ if [ "${POWERMENU_SHOW_TEXT:-1}" -eq 1 ]; then
reboot_btn="${reboot_btn} Restart"
lock_btn="${lock_btn} Lock Screen"
suspend_btn="${suspend_btn} Suspend"
hibernate_btn="${hibernate_btn} Hibernate"
logout_btn="${logout_btn} Log Out"
fi
@ -49,7 +46,7 @@ fi
selector_program="${POWERMENU_PICKER_CMD:-bemenu}"
selector_opts="${POWERMENU_PICKER_OPTS:--i}"
menu=$(printf "%s\n" "$lock_btn" "$suspend_btn" "$power_off_btn" "$reboot_btn" "$hibernate_btn" "$logout_btn")
menu=$(printf "%s\n" "$lock_btn" "$suspend_btn" "$power_off_btn" "$reboot_btn" "$logout_btn")
# shellcheck disable=SC2086
result=$(printf "%s" "$menu" | $selector_program $selector_opts --prompt "$prompt")
@ -81,11 +78,6 @@ case "$result" in
;;
"Suspend" | "$suspend_btn")
if [ -n "$POWERMENU_SUSPEND_CMD" ]; then eval "$POWERMENU_SUSPEND_CMD"; else
systemctl suspend-then-hibernate
fi
;;
"Hibernate" | "$hibernate_btn")
if [ -n "$POWERMENU_HIBERNATE_CMD" ]; then eval "$POWERMENU_HIBERNATE_CMD"; else
systemctl hibernate
fi
;;

View file

@ -92,36 +92,24 @@ _alreadyexists() { # 1=video_regex
fi
}
_should_archive() {
if [ -n "$ARCHIVE_FOLDER" ]; then
return 0
else
return 1
fi
}
_download_cmd() {
"$YT_DL_CMD" \
-o "$TEMP_FOLDER/$YT_DL_TITLE.%(ext)s" \
-o "$DL_FOLDER/$YT_DL_TITLE.%(ext)s" \
"${YT_DL_OPTS[@]}" \
"$*"
}
download() { # 1=url
# # download the video to download folder
if ! _alreadyexists "$yt_dl_fname" || ! _should_archive; then
if ! _alreadyexists "$yt_dl_fname"; then
_download_cmd "$*"
file=$(_findfile "$TEMP_FOLDER" "$yt_dl_fname")
mv "$file" "$DL_FOLDER"
if _should_archive; then
# yt-dl never knows the exact filename in advance
file=$(_findfile "$DL_FOLDER" "$yt_dl_fname")
if [ -z "$file" ]; then exit 1; fi
_call_archive "$file" "$ARCHIVE_FOLDER"
fi
# yt-dl never knows the exact filename in advance
file=$(_findfile "$DL_FOLDER" "$yt_dl_fname")
if [ -z "$file" ]; then exit 1; fi
_call_archive "$file" "$ARCHIVE_FOLDER"
# only link old file if one exists
elif _should_archive; then
else
archive_file=$(_findfile "$ARCHIVE_FOLDER" "$yt_dl_fname")
echo "$archive_file" | while read -r file; do
echo "file $file exists, not downloading duplicate"
@ -131,9 +119,8 @@ download() { # 1=url
}
setup() {
TEMP_FOLDER="${TEMP_FOLDER:-${HOME}/downloads}"
DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/inbox}"
ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}/archive}"
DL_FOLDER="${DL_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}}/inbox"
ARCHIVE_FOLDER="${ARCHIVE_FOLDER:-${XDG_VIDEOS_DIR:-$HOME/videos}}/archive"
YT_DL_CMD="${YT_DL_CMD:-yt-dlp}"
yt_default_opts=(-f "best[height\<=1080]" --retries 15 --embed-subs --sub-lang "en,de,es,fr")
declare -a YT_DL_OPTS=${YT_DL_OPTS:-( "${yt_default_opts[@]}" )}

View file

@ -5,5 +5,4 @@ After=network.target network-online.target dbus.socket gpg-agent.socket
[Service]
Type=oneshot
# workaround to allow relative executable invocation (i.e. current users' home dir)
ExecStart=/bin/bash -c '%h/.local/bin/sync-mail'
ExecStart=/home/marty/.local/bin/mail-check

View file

@ -20,17 +20,7 @@ export LIBRARYROOT="${LIBRARYROOT:-$HOME/documents/library}"
export BIBFILE="${BIBFILE:-$LIBRARYROOT/academia/academia.bib}"
# these are my personal 'important' application settings
if exist nvim; then
export EDITOR="nvim"
elif exist vim; then
export EDITOR="vim"
elif exist vi; then
export EDITOR="vi"
elif exist micro; then
export EDITOR="micro"
else
export EDITOR="nano"
fi
export EDITOR="nvim"
export BROWSER="qutebrowser"
export TERMINAL="wezterm"
export PAGER="less"

View file

@ -84,10 +84,6 @@ export LESSHISTFILE="XDG_STATE_HOME/lesshst"
export MPLAYER_HOME="$XDG_CONFIG_HOME/mplayer"
export NODE_REPL_HISTORY="$XDG_STATE_HOME/node_repl_history"
export NVM_DIR="$XDG_DATA_HOME/nvm"
if [ ! -e "$PYTHONSTARTUP" ]; then
mkdir -p "$XDG_CONFIG_HOME/python"
touch "$PYTHONSTARTUP"
fi
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc"
export SQLITE_HISTORY="$XDG_STATE_HOME/sqlite_history"
export TEXMFVAR="$XDG_CACHE_HOME/texlive/texmf-var"

View file

@ -1,5 +1,7 @@
#!/usr/bin/env sh
alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc'
# invoking t starts the task shell
# passing arguments along passes them straight through to taskwarrior instead
t() {
@ -15,21 +17,3 @@ t() {
# this is not very pretty and not super portable (needs ps) but
# works for now. from here: https://unix.stackexchange.com/a/72564/414758
if [ "$(ps -p $$ -o comm --no-headers)" = "zsh" ]; then compdef t=task; fi
# Make taskopen XDG conforming. If changing here, also change in taskrc alias.
alias taskopen='taskopen --config=${XDG_CONFIG_HOME:-~/.config}/task/taskopenrc'
alias ta="task add"
alias tal="task log"
alias tan="task annotate"
alias tn="task next +READY"
alias tun="task next urgency \> 4"
alias tra="task active"
alias trw="task end.after:today-1wk completed"
alias tad="task +ACTIVE done"
alias tas="task +ACTIVE stop"
alias to="task open"

View file

@ -0,0 +1,19 @@
# Themes are in this file so it can be ignored by
# git and theme changes don't show up as committable
# edits.
# Color theme (uncomment one to use)
#include /usr/share/doc/task/rc/light-16.theme
#include /usr/share/doc/task/rc/light-256.theme
#include /usr/share/doc/task/rc/dark-16.theme
#include /usr/share/doc/task/rc/dark-256.theme
#include /usr/share/doc/task/rc/dark-red-256.theme
#include /usr/share/doc/task/rc/dark-green-256.theme
#include /usr/share/doc/task/rc/dark-blue-256.theme
#include /usr/share/doc/task/rc/dark-violets-256.theme
#include /usr/share/doc/task/rc/dark-yellow-green.theme
#include /usr/share/doc/task/rc/dark-gray-256.theme
#include /usr/share/doc/task/rc/dark-gray-blue-256.theme
include /usr/share/doc/task/rc/solarized-dark-256.theme
#include /usr/share/doc/task/rc/solarized-light-256.theme
#include /usr/share/doc/task/rc/no-color.theme

View file

@ -0,0 +1,10 @@
[General]
taskbin = task
path_ext = /usr/share/taskopen/scripts
[Actions]
notes.regex = "Note"
notes.command = "$EDITOR ${XDG_DATA_HOME:-~/.local/share}/task/notes/$UUID.md"
[CLI]

View file

@ -23,7 +23,6 @@ weekstart=monday
# Make daily burndown default alias
alias.burndown=burndown.daily
alias.open=exec taskopen "--config=${XDG_CONFIG_HOME:-$HOME/.config}/task/taskopenrc"
# Sort the columns a little differently
active.indicator=>

View file

@ -3,9 +3,6 @@
mod="Mod4"
modemod="Mod1"
term=${TERMINAL:-foot}
time_to_lockscreen=300
time_to_screendim=600
time_to_suspend=1200
## OPTIONS
riverctl spawn "dbus-update-activation-environment SEATD_SOCK DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
@ -244,19 +241,8 @@ killall waybar
exec waybar &
# start dynamic display configuration
killall kanshi
exec kanshi &
# start screen idle locking/dimming/sleep tool
killall swayidle
exec swayidle \
timeout "${time_to_lockscreen}" 'lockscreen' \
timeout "${time_to_screendim}" 'wlopm --off "*"' \
timeout "${time_to_suspend}" 'systemctl suspend-then-hibernate' \
resume 'wlopm --on "*"' \
after-resume 'wlopm --on "*"' \
before-sleep 'lockscreen' &
killall clipman
exec wl-paste -t text --watch clipman store &
# bash ~/.config/bin/gtktheme # setting our gtk variables

View file

@ -58,20 +58,6 @@ local function setup()
wezterm.sleep_ms(1000)
os.remove(name)
end)
wezterm.on("toggle-leader", function(window, pane)
wezterm.log_info("toggling the leader")
local overrides = window:get_config_overrides() or {}
if not overrides.leader then
wezterm.log_info("leader wasn't set")
overrides.leader = { key = "s", mods = "SUPER" };
else
wezterm.log_info("leader was set")
overrides.leader = nil
end
window:set_config_overrides(overrides)
end)
end
return { setup = setup }

View file

@ -73,8 +73,7 @@ local keys = {
key = 'l',
mods = 'LEADER',
action = act.EmitEvent 'ActivatePaneDirection-Right'
},
{ key = 'a', mods = 'CTRL|ALT', action = act.EmitEvent 'toggle-leader'}
}
}
-- Leader + number to activate that tab
@ -109,6 +108,6 @@ local key_tables = {
{ key = 'g', mods = 'CTRL', action = act.ScrollToTop },
{ key = 'G', mods = 'CTRL', action = act.ScrollToBottom },
{ key = 'Escape', action = 'PopKeyTable' }
},
}
}
return { keys = keys, key_tables = key_tables }

View file

@ -31,6 +31,7 @@ source /usr/share/fzf/key-bindings.zsh
[ -e $PLUG_FOLDER/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ] && source $PLUG_FOLDER/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[ -e $PLUG_FOLDER/alias-tips/alias-tips.plugin.zsh ] && source $PLUG_FOLDER/alias-tips/alias-tips.plugin.zsh
[ -e $PLUG_FOLDER/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh ] && source $PLUG_FOLDER/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh
[ -e $PLUG_FOLDER/zsh-vi-mode/zsh-vi-mode.plugin.zsh ] && source $PLUG_FOLDER/zsh-vi-mode/zsh-vi-mode.plugin.zsh
unset PLUG_FOLDER
# simple fzf-tab settings