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 = {}
|
local theme = {}
|
||||||
|
|
||||||
theme.font = "Fantasque Sans Mono 8"
|
theme.font = "Liberation Sans 8"
|
||||||
|
|
||||||
theme.bg_normal = "#222222"
|
theme.bg_normal = "#222222"
|
||||||
theme.bg_focus = "#535d6c"
|
theme.bg_focus = "#535d6c"
|
||||||
|
|
|
@ -200,26 +200,13 @@ screen.connect_signal("property::geometry", set_wallpaper)
|
||||||
|
|
||||||
local mymem = lain.widget.mem {
|
local mymem = lain.widget.mem {
|
||||||
settings = function()
|
settings = function()
|
||||||
local mem_spacer = ""
|
widget:set_markup(" mem " .. mem_now.perc .. " swp " .. math.floor((mem_now.swapused / mem_now.swap) * 100))
|
||||||
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 .. " ")
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
local mycpu = lain.widget.cpu {
|
local mycpu = lain.widget.cpu {
|
||||||
settings = function()
|
settings = function()
|
||||||
local cpu_spacer = ""
|
widget:set_markup(" cpu " .. cpu_now.usage)
|
||||||
if cpu_now.usage < 10 then
|
|
||||||
cpu_spacer = " "
|
|
||||||
end
|
|
||||||
widget:set_markup(" cpu " .. cpu_spacer .. cpu_now.usage)
|
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,15 @@
|
||||||
#
|
#
|
||||||
# This script sends a canned email response to those who've errone-
|
# This script sends a canned email response to those who've errone-
|
||||||
# ously emailed me at <amcooper@gmail.com>. Once I've manually
|
# ously emailed me at <amcooper@gmail.com>. Once I've manually
|
||||||
# tagged those emails `misdirected`, it iterates over those emails and
|
# moved those emails into the `misdirected` folder, it iterates
|
||||||
# responds.
|
# over those emails and responds.
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if [[ -z "$(notmuch search tag:misdirected)" ]] ; then
|
MISDIRECTED_DIR=/home/adam/Maildir/misdirected
|
||||||
echo "[autoreply.sh] Currently no emails are tagged 'misdirected'. Exiting..."
|
|
||||||
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -20,24 +22,20 @@ while IFS= read -r -d '' file ; do
|
||||||
echo "[loop] Preparing the email..."
|
echo "[loop] Preparing the email..."
|
||||||
|
|
||||||
# Make a temporary file
|
# Make a temporary file
|
||||||
temporary_file=$(mktemp /tmp/autoreply-XXXXX)
|
temporary_file=$(mktemp /tmp/autoreplyXXXXX)
|
||||||
echo "[debug] Temporary file: $temporary_file" # debug
|
|
||||||
|
|
||||||
# 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>"
|
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"
|
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
|
# 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"
|
cp /home/adam/dotfiles/arch/bin/autoreply/misdirected_email_autoreply.txt "$temporary_file"
|
||||||
cat /home/adam/dotfiles/bin/autoreply/misdirected_email_autoreply.txt >> "$temporary_file"
|
|
||||||
printf "\n\nOn $date, $recipient wrote:\n" >> "$temporary_file"
|
|
||||||
|
|
||||||
# Append email body to temporary file
|
# Append email body to temporary file
|
||||||
discard="0"
|
discard="0"
|
||||||
while IFS= read -r line ; do
|
while IFS= read -r line ; do
|
||||||
if [[ $discard = "1" ]]; then
|
if [[ $discard = "1" ]]; then
|
||||||
echo "> $line" >> "$temporary_file"
|
echo "$line" >> "$temporary_file"
|
||||||
else
|
else
|
||||||
if [[ -z "$line" ]]; then
|
if [[ -z "$line" ]]; then
|
||||||
discard="1"
|
discard="1"
|
||||||
|
@ -46,16 +44,15 @@ while IFS= read -r -d '' file ; do
|
||||||
done < "$file"
|
done < "$file"
|
||||||
|
|
||||||
# Send the email!
|
# Send the email!
|
||||||
printf "[debug] Outgoing email:\n$(cat "$temporary_file")\n" # debug
|
|
||||||
echo "[loop] Sending reply to $recipient ... "
|
echo "[loop] Sending reply to $recipient ... "
|
||||||
cat "$temporary_file" | msmtp --read-envelope-from --read-recipients
|
neomutt -s "$subject" -c amcooper@gmail.com "$recipient" < "$temporary_file"
|
||||||
cat "$temporary_file" | notmuch insert --folder=Sent -inbox -unread +sent +misdirected-reply
|
|
||||||
|
|
||||||
# Remove the misdirected tag
|
# Move the misdirected email into `INBOX/cur`
|
||||||
notmuch tag -misdirected -- tag:misdirected
|
echo "[loop] Moving the emails..."
|
||||||
|
mv "$file" /home/adam/Maildir/INBOX/cur
|
||||||
|
|
||||||
echo "[loop] Done."
|
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!"
|
echo "[autoreply.sh] All done!"
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
#
|
#
|
||||||
# Convenience script to start up my usual TUIs
|
# 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 newsboat --command newsboat
|
||||||
alacritty msg create-window --title aerc --command aerc
|
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-lualine/lualine.nvim",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
{ "echasnovski/mini.nvim", version = false },
|
|
||||||
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
{
|
{
|
||||||
|
@ -129,19 +128,10 @@ require("lazy").setup({
|
||||||
vim.o.timeoutlen = 300 -- 0? 500? 300?
|
vim.o.timeoutlen = 300 -- 0? 500? 300?
|
||||||
end,
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
win = {
|
window = {
|
||||||
border = "single",
|
border = "single",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
keys = {
|
|
||||||
{
|
|
||||||
"<leader>?",
|
|
||||||
function()
|
|
||||||
require("which-key").show({ global = false })
|
|
||||||
end,
|
|
||||||
desc = "Buffer Local Keymaps (which-key)",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ray-x/lsp_signature.nvim",
|
"ray-x/lsp_signature.nvim",
|
||||||
|
@ -406,17 +396,6 @@ require("lazy").setup({
|
||||||
{ "kovisoft/paredit" },
|
{ "kovisoft/paredit" },
|
||||||
--{ "monkoose/parsley", event = "VeryLazy" },
|
--{ "monkoose/parsley", event = "VeryLazy" },
|
||||||
{ "monkoose/nvlime", ft = { "lisp" }, dependencies = { "monkoose/parsley" } },
|
{ "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
|
--[[ mason
|
||||||
|
@ -789,8 +768,6 @@ require('nvim-treesitter.configs').setup({
|
||||||
|
|
||||||
vim.treesitter.language.register("html", "handlebars")
|
vim.treesitter.language.register("html", "handlebars")
|
||||||
|
|
||||||
require('mini.icons').setup()
|
|
||||||
|
|
||||||
-- Tweak GitSigns blame color
|
-- Tweak GitSigns blame color
|
||||||
-- This differentiates the cursorline from the git blame text
|
-- This differentiates the cursorline from the git blame text
|
||||||
vim.cmd("highlight GitSignsCurrentLineBlame gui=bold guifg=#339944")
|
vim.cmd("highlight GitSignsCurrentLineBlame gui=bold guifg=#339944")
|
||||||
|
|
|
@ -28,6 +28,7 @@ color listfocus_unread color238 color47 standout
|
||||||
color info color141 color236
|
color info color141 color236
|
||||||
|
|
||||||
confirm-exit yes
|
confirm-exit yes
|
||||||
|
define-filter "nitter feeds" "tags !# \"nitter_personal\" and tags !# \"nitter_institutional\" and tags !# \"nitter_noise\""
|
||||||
feed-sort-order firsttag
|
feed-sort-order firsttag
|
||||||
|
|
||||||
# Dracula highlights
|
# Dracula highlights
|
||||||
|
@ -43,7 +44,7 @@ highlight article ":.*\\(image\\)$" blue default
|
||||||
highlight article ":.*\\(embedded flash\\)$" magenta default
|
highlight article ":.*\\(embedded flash\\)$" magenta default
|
||||||
|
|
||||||
keep-articles-days 45
|
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
|
max-items 4096
|
||||||
notify-program "/usr/bin/notify-send"
|
notify-program "/usr/bin/notify-send"
|
||||||
urls-source "freshrss"
|
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: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:nuggets Articles:tags # \"nuggets\""
|
||||||
"query:podcasts Articles:tags # \"podcasts\""
|
"query:podcasts Articles:tags # \"podcasts\""
|
||||||
"query:release_notes Articles:tags # \"release_notes\""
|
"query:release_notes Articles:tags # \"release_notes\""
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export XDG_DATA_HOME="$HOME/.config/local/share"
|
export XDG_DATA_HOME="$HOME/.config/local/share"
|
||||||
export XDG_CACHE_HOME="$HOME/.config/cache"
|
export XDG_CACHE_HOME="$HOME/.config/cache"
|
||||||
export XDG_STATE_HOME="$HOME/.config/local/state"
|
|
||||||
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
|
||||||
|
|
||||||
export HISTSIZE=9998
|
export HISTSIZE=9998
|
||||||
|
|
|
@ -140,9 +140,6 @@ source /home/adam/.config/broot/launcher/bash/br
|
||||||
# tea
|
# tea
|
||||||
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/adam/.config/tea/autocomplete.zsh"
|
PROG=tea _CLI_ZSH_AUTOCOMPLETE_HACK=1 source "/home/adam/.config/tea/autocomplete.zsh"
|
||||||
|
|
||||||
# leetcode
|
|
||||||
eval "$(leetcode completions)"
|
|
||||||
|
|
||||||
# ripgrep-all
|
# ripgrep-all
|
||||||
rga-fzf() {
|
rga-fzf() {
|
||||||
RG_PREFIX="rga --files-with-matches"
|
RG_PREFIX="rga --files-with-matches"
|
||||||
|
|
Loading…
Reference in a new issue