Compare commits
No commits in common. "e992db6c07247d375db1aaecfb0bb73671076fac" and "952d12d56012ee01dafd679bba8089b594d07752" have entirely different histories.
e992db6c07
...
952d12d560
11 changed files with 213 additions and 255 deletions
|
@ -11,7 +11,7 @@ local themes_path = gfs.get_themes_dir()
|
|||
|
||||
local theme = {}
|
||||
|
||||
theme.font = "Fantasque Sans Mono 8"
|
||||
theme.font = "Liberation Sans 8"
|
||||
|
||||
theme.bg_normal = "#222222"
|
||||
theme.bg_focus = "#535d6c"
|
||||
|
|
|
@ -200,26 +200,13 @@ screen.connect_signal("property::geometry", set_wallpaper)
|
|||
|
||||
local mymem = lain.widget.mem {
|
||||
settings = function()
|
||||
local mem_spacer = ""
|
||||
local swp_spacer = ""
|
||||
local swp_display = math.floor((mem_now.swapused / mem_now.swap) * 100)
|
||||
if mem_now.perc < 10 then
|
||||
mem_spacer = " "
|
||||
end
|
||||
if swp_display < 10 then
|
||||
swp_spacer = " "
|
||||
end
|
||||
widget:set_markup(" mem " .. mem_spacer .. mem_now.perc .. " swp " .. swp_spacer .. swp_display .. " ")
|
||||
widget:set_markup(" mem " .. mem_now.perc .. " swp " .. math.floor((mem_now.swapused / mem_now.swap) * 100))
|
||||
end
|
||||
}
|
||||
|
||||
local mycpu = lain.widget.cpu {
|
||||
settings = function()
|
||||
local cpu_spacer = ""
|
||||
if cpu_now.usage < 10 then
|
||||
cpu_spacer = " "
|
||||
end
|
||||
widget:set_markup(" cpu " .. cpu_spacer .. cpu_now.usage)
|
||||
widget:set_markup(" cpu " .. cpu_now.usage)
|
||||
end
|
||||
}
|
||||
|
||||
|
|
|
@ -4,13 +4,15 @@
|
|||
#
|
||||
# This script sends a canned email response to those who've errone-
|
||||
# ously emailed me at <amcooper@gmail.com>. Once I've manually
|
||||
# tagged those emails `misdirected`, it iterates over those emails and
|
||||
# responds.
|
||||
# moved those emails into the `misdirected` folder, it iterates
|
||||
# over those emails and responds.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ -z "$(notmuch search tag:misdirected)" ]] ; then
|
||||
echo "[autoreply.sh] Currently no emails are tagged 'misdirected'. Exiting..."
|
||||
MISDIRECTED_DIR=/home/adam/Maildir/misdirected
|
||||
|
||||
if [[ -z "$(ls -A "$MISDIRECTED_DIR/cur")" ]] && [[ -z "$(ls -A "$MISDIRECTED_DIR/new")" ]]; then
|
||||
echo "[autoreply.sh] The misdirected folders are currently empty. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -20,24 +22,20 @@ while IFS= read -r -d '' file ; do
|
|||
echo "[loop] Preparing the email..."
|
||||
|
||||
# Make a temporary file
|
||||
temporary_file=$(mktemp /tmp/autoreply-XXXXX)
|
||||
echo "[debug] Temporary file: $temporary_file" # debug
|
||||
temporary_file=$(mktemp /tmp/autoreplyXXXXX)
|
||||
|
||||
# Pull sender (i.e. recipient of my email), subject, and date from email
|
||||
# Pull sender (i.e. recipient of my email) and subject from email
|
||||
recipient="$(perl -lane 'print if /^From:/' "$file" | cut -d' ' -f2-)" ### "Frantz Fanon <ffanon@riseup.net>"
|
||||
subject="Re: $(perl -lane 'print if /^Subject:/' "$file" | cut -d' ' -f2-)" ### "Re: Lorem ipsum baby"
|
||||
date="$(perl -lane 'print if /^Date:/' "$file" | cut -d' ' -f2-)"
|
||||
|
||||
# Copy canned message to temporary file
|
||||
printf "To: $recipient\nFrom: adam@theadamcooper.com\nCc: amcooper@gmail.com\nDate: $(date +'%a, %d %b %Y %R %z')\nSubject: $subject\n\n" > "$temporary_file"
|
||||
cat /home/adam/dotfiles/bin/autoreply/misdirected_email_autoreply.txt >> "$temporary_file"
|
||||
printf "\n\nOn $date, $recipient wrote:\n" >> "$temporary_file"
|
||||
cp /home/adam/dotfiles/arch/bin/autoreply/misdirected_email_autoreply.txt "$temporary_file"
|
||||
|
||||
# Append email body to temporary file
|
||||
discard="0"
|
||||
while IFS= read -r line ; do
|
||||
if [[ $discard = "1" ]]; then
|
||||
echo "> $line" >> "$temporary_file"
|
||||
echo "$line" >> "$temporary_file"
|
||||
else
|
||||
if [[ -z "$line" ]]; then
|
||||
discard="1"
|
||||
|
@ -46,16 +44,15 @@ while IFS= read -r -d '' file ; do
|
|||
done < "$file"
|
||||
|
||||
# Send the email!
|
||||
printf "[debug] Outgoing email:\n$(cat "$temporary_file")\n" # debug
|
||||
echo "[loop] Sending reply to $recipient ... "
|
||||
cat "$temporary_file" | msmtp --read-envelope-from --read-recipients
|
||||
cat "$temporary_file" | notmuch insert --folder=Sent -inbox -unread +sent +misdirected-reply
|
||||
neomutt -s "$subject" -c amcooper@gmail.com "$recipient" < "$temporary_file"
|
||||
|
||||
# Remove the misdirected tag
|
||||
notmuch tag -misdirected -- tag:misdirected
|
||||
# Move the misdirected email into `INBOX/cur`
|
||||
echo "[loop] Moving the emails..."
|
||||
mv "$file" /home/adam/Maildir/INBOX/cur
|
||||
|
||||
echo "[loop] Done."
|
||||
|
||||
done < <(notmuch search --output=files --format=text0 tag:misdirected)
|
||||
done < <(find "$MISDIRECTED_DIR" -path "$MISDIRECTED_DIR/tmp" -prune -o -type f -print0)
|
||||
|
||||
echo "[autoreply.sh] All done!"
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
#
|
||||
# Convenience script to start up my usual TUIs
|
||||
|
||||
alacritty msg create-window --title joplin --command /home/adam/.config/nvm/versions/node/v20.11.1/bin/joplin
|
||||
alacritty msg create-window --title joplin --command $NVM_BIN/joplin
|
||||
alacritty msg create-window --title newsboat --command newsboat
|
||||
alacritty msg create-window --title aerc --command aerc
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#! /bin/bash
|
||||
QT_SCALE_FACTOR=0.8 /usr/bin/zoom &
|
|
@ -107,7 +107,6 @@ require("lazy").setup({
|
|||
},
|
||||
"nvim-lualine/lualine.nvim",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
{ "echasnovski/mini.nvim", version = false },
|
||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||
"neovim/nvim-lspconfig",
|
||||
{
|
||||
|
@ -129,19 +128,10 @@ require("lazy").setup({
|
|||
vim.o.timeoutlen = 300 -- 0? 500? 300?
|
||||
end,
|
||||
opts = {
|
||||
win = {
|
||||
window = {
|
||||
border = "single",
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>?",
|
||||
function()
|
||||
require("which-key").show({ global = false })
|
||||
end,
|
||||
desc = "Buffer Local Keymaps (which-key)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
|
@ -406,17 +396,6 @@ require("lazy").setup({
|
|||
{ "kovisoft/paredit" },
|
||||
--{ "monkoose/parsley", event = "VeryLazy" },
|
||||
{ "monkoose/nvlime", ft = { "lisp" }, dependencies = { "monkoose/parsley" } },
|
||||
{
|
||||
'MeanderingProgrammer/markdown.nvim',
|
||||
-- name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim
|
||||
dependencies = {
|
||||
'nvim-treesitter/nvim-treesitter', -- Mandatory
|
||||
'nvim-tree/nvim-web-devicons', -- Optional but recommended
|
||||
},
|
||||
config = function()
|
||||
require('render-markdown').setup({})
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
--[[ mason
|
||||
|
@ -789,8 +768,6 @@ require('nvim-treesitter.configs').setup({
|
|||
|
||||
vim.treesitter.language.register("html", "handlebars")
|
||||
|
||||
require('mini.icons').setup()
|
||||
|
||||
-- Tweak GitSigns blame color
|
||||
-- This differentiates the cursorline from the git blame text
|
||||
vim.cmd("highlight GitSignsCurrentLineBlame gui=bold guifg=#339944")
|
||||
|
|
|
@ -28,6 +28,7 @@ color listfocus_unread color238 color47 standout
|
|||
color info color141 color236
|
||||
|
||||
confirm-exit yes
|
||||
define-filter "nitter feeds" "tags !# \"nitter_personal\" and tags !# \"nitter_institutional\" and tags !# \"nitter_noise\""
|
||||
feed-sort-order firsttag
|
||||
|
||||
# Dracula highlights
|
||||
|
@ -43,7 +44,7 @@ highlight article ":.*\\(image\\)$" blue default
|
|||
highlight article ":.*\\(embedded flash\\)$" magenta default
|
||||
|
||||
keep-articles-days 45
|
||||
macro p set browser "mpv --player-operation-mode=pseudo-gui -- %u &"; one; set browser w3m -- "Play media file in mpv"
|
||||
macro p set browser "mpv --player-operation-mode=pseudo-gui -- %u &"; one; set browser w3m
|
||||
max-items 4096
|
||||
notify-program "/usr/bin/notify-send"
|
||||
urls-source "freshrss"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
https://s.france24.com/media/display/1b3b9962-45d6-11ef-856d-005056a90284/w:1024/p:16x9/2024-07-12T013153Z_1056985909_RC26T8AZ5PZ7_RTRMADP_3_NATO-SUMMIT-BIDEN.JPG "/home/adam/2024-07-12T013153Z_1056985909_RC26T8AZ5PZ7_RTRMADP_3_NATO-SUMMIT-BIDEN.JPG"
|
|
@ -1,4 +1,7 @@
|
|||
"query:miscellany Articles:tags # \"miscellany\""
|
||||
"query:nitter_personal Articles:tags # \"nitter_personal\""
|
||||
"query:nitter_institutional Articles:tags # \"nitter_institutional\""
|
||||
"query:nitter_noise Articles:tags # \"nitter_noise\""
|
||||
"query:nuggets Articles:tags # \"nuggets\""
|
||||
"query:podcasts Articles:tags # \"podcasts\""
|
||||
"query:release_notes Articles:tags # \"release_notes\""
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_DATA_HOME="$HOME/.config/local/share"
|
||||
export XDG_CACHE_HOME="$HOME/.config/cache"
|
||||
export XDG_STATE_HOME="$HOME/.config/local/state"
|
||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||
|
||||
export HISTSIZE=9998
|
||||
|
|
|
@ -140,9 +140,6 @@ source /home/adam/.config/broot/launcher/bash/br
|
|||
# tea
|
||||
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/adam/.config/tea/autocomplete.zsh"
|
||||
|
||||
# leetcode
|
||||
eval "$(leetcode completions)"
|
||||
|
||||
# ripgrep-all
|
||||
rga-fzf() {
|
||||
RG_PREFIX="rga --files-with-matches"
|
||||
|
|
Loading…
Reference in a new issue