fix theme, fix urls

This commit is contained in:
Don Harper 2025-06-17 22:14:34 -05:00
parent 3cdc1b9c0e
commit 199c6f4cb8
203 changed files with 603 additions and 53 deletions

View file

@ -0,0 +1,31 @@
---
date: "2025-06-17T04:00:00-07:00"
title: "Check-in 2025Q2"
tags: ["tui","cli","nixos","xps"]
categories: ["personal"]
#image: ""
#series: [""]
summary: "Check point 2025Q2"
---
Well, aside from the [burst of posts](/posts/2025/06/tui-challenge-day-1/), it as been a spell since I last posted
[something](/posts/2024/01/check-in-2024-01/). Sorry about that.
# Computer
Well, I think my little ['Challenge with NixOS'](/posts/2023/01/nixos-challenge-pt-1/) which I started way back in
January 2023 has been passed. I have one local server, one local 'appliance', and one VPS *not* on NixOS. Everything
else has been converted for a while. Keeping my laptops' config synced turned out to be a good thing. My [main
laptop](/tags/xps) ate its drive just before work one morning, I was able to grab the [pixelbook](/tags/pixelbook) and
start working as it was fully configured, and the needed data was synced in place. Nice.
Speaking of pixelbooks, I picked up a 'new' 2017 PixelBook. This one is the i7 with a nvme drive and a battery in great
shape. I can take it to the office and never have to plug it in using it for my video calls and music player.
# Other stuff
Still at the same job I started back November 2016. Yikes. I will try to update this more with more technical stuff, I
hope.
Oh, I changed the theme because the old one had not been updated in a long time, and I was getting tired of the security
notifications.

View file

@ -0,0 +1,129 @@
---
date: "2025-06-08T04:00:00-07:00"
title: "TUI Challenge: Day 1"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "TUI Challenge starts"
---
*tap, tap* Is this thing on? When was the last time I published anything? Oh, back on [January 15, 2024](/posts/2024/01/check-in-2024-01). Oops.
Well, I had to clean up a few things to get this back working with updates to [hugo](https://gohugo.io), the static blogging engine I use for the site.
So, what prompted me to fire this up again, and actually make it work (unlike the last few times I was going to start this)?
Well, I listen to a bunch of podcasts from [Jupiter Broadcasting](https://jupiterbroadcasting.com),
including one called [Linux Unplugged](https://linuxunplugged.com), and they are running a [7 day TUI Challenge](https://github.com/JupiterBroadcasting/linux-unplugged/blob/main/challenges/TUI-Challenge.md).
Now, since I normally read my email and RSS feeds in a TUI app, and I use VIM as my editor and IDE, I figured it would be fairly easy for me to take part.
The two big things I use a GUI for are [web browsing with qutebrowser](https://www.qutebrowser.org) and watch youtube vids with MPV, I should be able to adapt.
Anyway, Day 1 challenge is to write document using a TUI editor of at least 200 words. There are bonus points for using scripts to help things out, and I guess the script I use to start editing a file should work:
```
#!/usr/bin/env bash
#===============================================================================
#
# FILE: dopost
#
# USAGE: ./dopost
#
# DESCRIPTION: make a new post for hugo
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Don Harper (), duck@duckland.org
# ORGANIZATION:
# CREATED: 02/02/2019 08:35:34 PM CDT
# REVISION: Based off of genpost.sh
#===============================================================================
set -o nounset # Treat unset variables as an error
trap onexit 1 2 3 15 ERR EXIT
#--- onexit() -----------------------------------------------------
# @param $1 integer (optional) Exit status. If not set, use `$?'
function onexit() {
local exit_status=${1:-$?}
if [ "${exit_status}" == 0 ]
then
exit
fi
notify-send "Exiting ${myname} with $exit_status"
cd
exit "${exit_status}"
}
myname="$(basename ${0} .sh)"
Title="untitled"
Category="none"
TAGS="tagless"
while getopts "t:T:c:h" OPTIONS
do
case ${OPTIONS} in
t) Title="$OPTARG" ;;
c) Category="$OPTARG" ;;
T) TAGS="$OPTARG" ;;
*)
echo "$0 -t '<title>' -c '<category>' [-T '<tags[,tags2]>']"
exit 1
;;
esac
done
shift
if [ "${Title}" == "untitled" ]
then
echo "Missing title"
echo "$0 -t '<title>' -c '<category>' [-T '<tags[ tags2]>']"
exit 1
fi
if [ "${Category}" == "none" ]
then
echo "Missing category"
echo "$0 -t '<title>' -c '<category>' [-T '<tags[ tags2]>']"
exit 1
fi
if $(echo "${TAGS}" | grep -q ' ')
then
TAGS=$(echo "${TAGS}" | sed 's/ /", "/g')
fi
BASE="${HOME}/src/WWW/sites/duckland.org"
DATE=$(date +%F)
YEAR=$(echo $DATE | awk -F- '{print $1}')
MON=$(echo $DATE | awk -F- '{print $2}')
Name=$(echo ${Title} | sed -e 's/^ //' -e 's/,//' -e 's/ ://' -e 's/ /-/g' -e 's/\?//' -e 's/\!//' | tr '[A-Z]' '[a-z]' )
cd ${BASE}
git co draft
printf "title - %s\nname - %s\n" "$Title" "$Name"
OUTPUTDIR="${BASE}/content/posts/${YEAR}/${MON}/"
mkdir -p ${OUTPUTDIR}
OUTPUT="${OUTPUTDIR}/${Name}.md"
echo "---" > ${OUTPUT}
echo "date: \"${DATE}T04:00:00-07:00\"" >> ${OUTPUT}
echo "title: \"${Title}\"" >> ${OUTPUT}
echo "tags: [\"${TAGS}\"]" >> ${OUTPUT}
echo "categories: [\"${Category}\"]" >> ${OUTPUT}
echo "#image: \"\"" >> ${OUTPUT}
echo "#series: [\"\"]" >> ${OUTPUT}
echo "summary: \"\"" >> ${OUTPUT}
echo "Victor_Hugo: \"true\"" >> ${OUTPUT}
echo "Focus_Keyword: \"\"" >> ${OUTPUT}
echo "---" >> ${OUTPUT}
echo "" >> ${OUTPUT}
#cd ~/src/www.duckland.org
#tmux neww -n "New Post" -t 30 "cd ~/src/www.duckland.org ; hugo serve -D -F"
#tmux split-window -h "${EDITOR} ${OUTPUT}"
#tmux select-layout main-vertical
#. ~/.myapps
#$TERMPROG -e tmuxp load duckland
tmuxinator start duckland
```
As the TUI Challenge has a scoring system, I am claiming 10 points for editing a file under vim, and an additional 10 points as my script does a bit of formating, for a total of 20 points.

View file

@ -0,0 +1,60 @@
---
date: "2025-06-09T04:00:00-07:00"
title: "TUI Challenge: Day 2"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "Email in the Terminal!"
---
Hey, look! Another day, another post. Today's challenge is *Email Management*. Since I already live in
[neomutt](https://neomutt.org), I should probably describe my setup.
## Receiving Email and filtering
Much to my shame, I am still receiving my email with Gmail. But, it is on my list to migrate somewhere else this year.
I think I have narrowed it down to two providers, but that is not what I am doing today.
I do have IMAP enabled on my account so I can read my email without going to gmail.com. For filtering, I use a tool
called [gmailctl](https://github.com/mbrt/gmailctl) which allows me to control gmail's filters from my computer. It
works by connecting to gmail and pulling down the filter definition file, and then firing up my default editor. Once I
am happy with the changes, it will upload it back to gmail.
To actually retrieve my emails, I use mbsync which is part of the [isync](https://isync.sourceforge.io/mbsync.html)
suite. You follow the directions, and it will sync your email down. This tool will work with any IMAP server, so when I
finally leave gmail, it will still work. One of the nice things is that since it is written in python, you can re-map
folder (labels in gmail-speak) to something different locally. For example, I map *All Mail* on google's side to
*All-Mail* on my side.
I use a [systemd timer](https://wiki.archlinux.org/title/Systemd/Timers) to schedule the sync runs.
I also run [notmuch](https://notmuchemail.org) to index my mail so I can search it in my MUA (Mail User Agent) of
choice.
## Reading Email
I have been using mainly a TUI to read my email since I started on the internet. Back in the beginning, it was because
there where no GUI email applications, and it was before the WWW (yes, I am that old). Over the years, I have used elm
(fun fact, for a while, I was the Debian package maintainer for elm!), pine, and an Emacs email client (do not remember the
name anymore). But the client I have been using since I started using back when it was new is [mutt](https://mutt.org),
although I have switched to [neomutt](https://neomutt.org) a while back. Neomutt is mutt with a bunch of patches
included, but it is a great MUA on its own.
One of the killer features (for me, anyway) is that I can configure neomutt to use notmuch and it makes searching for a
specific email a breeze.
For my address book, I use a program called [khard](https://github.com/lucc/khard) which I sync with my google address
book using [vdirsyncer](https://github.com/pimutils/vdirsyncer) which I will talk more about on Day 6.
## Sending Email
I used to use gmail's SMTP service, but sometime this year, the have changed their sending limits to an aggressively low
number which would cause me to not to be able to send an email for hours, sometimes days. I typically do not send a lot
of emails (mainly less than 10 automated reports to myself a day), so this was annoying. I switched to using the free
tier at [smtp2go](https://smtp2go.com) and I have had zero issues sending email since then. My needs to not really
require any of their paid plans, but I am thinking about getting the smallest paid plan to help support the service.
## Daily totals
I come into today with 20 points. How did I do today? Well, the basic for setting up an email tui is 20 points, 5
points for filtering, and 10 points for using a TUI address book for a daily total of 35, bring my total to 55 points!

View file

@ -0,0 +1,41 @@
---
date: "2025-06-10T04:00:00-07:00"
title: "TUI Challenge: Day 3"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "A Web of Trouble"
---
# Day 3 of the TUI Challenge is about browsing the web in the terminal.
I use to use browsers like
[lynx](https://lynx.invisible-island.net) or [elinks](http://elinks.or.cz) back in the early days of the web when I had
a slow connection like dial-up or a wireless modem from the late 1990's. Back then, web sites were much simpler than
today. An advance web site might have tables! So, in those days, a text browser worked well. But, how about now in the
era of Web 2.0 or even Web 3.0?
The challenge today is to use a text browser to visit two web sites and summarize them. And then, things got hard.
I was actually trying to use lynx for my daily web usage, and I was looking up how to configure
[newsboat](https://newsboat.org) so I can forward an article via email now and later to add to my task tracker.
The two sites I that I was trying to find the answer on I was trying to look at was [reddit](https://www.reddit.com) and
[github](https://github.com) which gave problems. I think the 'new' Reddit has a lot of JavaScript which these two text
browsers do not support. My solution was to use [old.reddit.com](https://old.reddut.com) which is the classical
interface which is closer to Web 1.0.
GitHub was all but useless in my text browsers. It was too hard to get past all the items normally hidden behind js
menus. And, after a few page views, it stopped showing me anything from the repos I was trying to visit. I am not sure
if the site thought I was an AI scraper and just stopped showing me anything or if there was something else.
In the end, I was able to use old Reddit, Google Groups, and the newsboat web site to figure out what I wanted to do:
```
bind m article,articlelist pipe-to "neomutt -s\"RSS Article\" me@example.com" -- "Email article"
```
## Daily totals
Score time! [Yesterday](/posts/2025/06/tui-challenge-day-2/) left us with 55 points. The challenge of doing research on
at least two site and summarizing it is worth 20 points. In the bonus points include 5 for filling out a form which I
did many times on my search engine page, which gives me 25 points for the day, and a running total of 80 points.

View file

@ -0,0 +1,29 @@
---
date: "2025-06-11T04:00:00-07:00"
title: "TUI Challenge: Day 4"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "A Song For The Terminal"
---
# Day 4: Let the music play!
The challenge is stream music from the terminal. Easy. I moved to self-hosting my music by
using a server [navidrome](https://www.navidrome.org). I have been happy with this solution for a long time. I have a
[an android client](https://f-droid.org/en/packages/github.daneren2005.dsub) which caches locally so I can listen on the
go without killing my cell bill.
For the desktop, I have been using [feishin](https://github.com/jeffvli/feishin) which is an electron app. I stumbled
across [naviterm](https://gitlab.com/detoxify92/naviterm/) a couple of weeks ago. The author has been very receptive to
issues and feature requests which is great. It connects to my navidrome server, and once I queue up a playlist, it
hands off to [mpv](https://mpv.io) to play the music. Works like a treat. It also supports the same DBUS protocol that
[playerctl](https://github.com/altdesktop/playerctl) supports so none of my scripts to display current song or change or
pause songs needed to change to use it.
## Daily totals
Score time! [Yesterday](/posts/2025/06/tui-challenge-day-3/) left us with 80 points. Scoring today is pretty easy. 10
points for playing music, 5 for creating a playlist (I have over 50), and 10 for streaming the music. So, 25 points
today added to the 80 from yesterday gives us 105.

View file

@ -0,0 +1,36 @@
---
date: "2025-06-12T04:00:00-07:00"
title: "TUI Challenge: Day 5"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "A Song For The Terminal"
---
# Day 5: File management.
'Wait!' you say 'You live at the terminal, what is wrong with *ls*, *cp*, or *mv*?' Well, most
of the time, that is fine, but there are times when I need to rename a bunch of files (cleaning up my MP3 collection) or
quickly review some source files. In those cases, what do I use?
## vifm
[vifm](https://github.com/vifm/vifm) is a 'file manager with curses interface, which provides Vim-like environment for
managing objects within file systems, extended with some useful ideas from mutt.' When you start it up, you are great
with a split window with directory listing on both side. Using the normal vi keys moving around. You can select
multiple files, and then do things like mass rename or move the file to the other pane. Very quick and easy. I have
used this to bulk rename mp3s in a directory to my new naming standard. I could write a script, but I have messed that
up in the past, and part of why I need this type of tool to clean up.
## ranger
[ranger](https://github.com/ranger/ranger) is a 'VIM-inspired filemanager for the console'. This is a tri-pane
arrangement Contents of the parent directory, current directory, details of what you are looking at. This last part is
the useful part. If you have selected a directory, it will show the contents of the directory. If you are looking at a
text file, it will show the contents of the file. The lets you review many files without using a pager or an editor to
review the contents.
## Daily totals
Score time! [Yesterday](/posts/2025/06/tui-challenge-day-4/) left us with 105 points. On the score. Using a tui
filemanager, 10 points. 5 points for the bulk renaming. I have done any scripting with these type of tools, so no more
points there. Total today, 15 points, and a grand running total is now 120.

View file

@ -0,0 +1,83 @@
---
date: "2025-06-13T04:00:00-07:00"
title: "TUI Challenge: Day 6"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "Every Task In Its Place"
---
# Day 6: Task Management
Another fairly easy day for me as I already mainly use TUI and CLI for task and calendar management.
## Task management
```
Monthly Burndown
250 |
|
| .
| . .
| . . . . . .
| . . . . . . . . . . . . . Done
| . . . . . . . . . . . . + Started
125 | . . . . . . . . . . . . X Pending
| . . . . . . . . . . X . . . .
| . . . . . X X X . . X . . . . . . . .
| X X X X X X X X X X X . X X X X X . . . .
| X X X X X X X X X X X X X X X X X . X X X
| X X X X X X X X X X X X X X X X X X X X X
| X X X X X X X X X X X X X X X X X X X X X
| X X X X X X X X X X X X X X X X X X X X X
0 +---------------------------------------------------------------
10 11 12 01 02 03 04 05 06 07 08 09 10 11 12 01 02 03 04 05 06
2023 2024 2025
Net Fix Rate: 1.8/d
Estimated completion: 2025-08-03 (7w)
```
I have been using [taskwarrior](https://taskwarrior.org) for years now. It is a simple command line tool for
maintaining your task list. It stores its data in simple text files so backing it up is easy. I use a simple TUI
called [vit](https://github.com/vit-project/vit) for viewing and interacting with my tasks.
I use taskwarrior for a mix of things I have to do for the family and work, and as a reminder system for websites,
projects, and/or media I want to visit but I do not have time for. I even wrote a script to convert emails from neomutt
or news articles from [newsboat](https://newsboat.org), a TUI RSS reader, to tasks:
```
#!/usr/bin/env bash
set -o nounset # Treat unset variables as an error
tmpfile=$(mktemp)
cat /dev/stdin > "${tmpfile}"
subj=$(grep -E ^'(Subject|Title)': "${tmpfile}" | sed -e 's/^Subject: //' -e 's/^Title: //')
id=$(task add pri:H due:2d +email "${subj}" | grep ^Created | sed 's/^Created task \(.*\)./\1/')
cat "${tmpfile}" | onenote "${id}" -
echo "${id}"
rm -f "${tmpfile}"
```
I also have a daily report sent to me in email with my current top tasks, any due today or overdue, as well as my
schedule over the next three days.
To keep all my tasks together, I use [taskd](https://gothenburgbitfactory.org/taskd/) which I run in a
[container](https://github.com/ogarcia/docker-taskd)..
## Calendar
For managing my calendar, I use [khal](https://github.com/pimutils/khal/) for my text based calendar. For the above
mentioned reporting, I use `khal` to list my events. When I need a TUI, I use `ikhal` which is part of the khal
package. This is a nice TUI with vim keys for navigation and gives me a great overview of my events.
I sync this using [vdirsyncer](https://github.com/pimutils/vdirsyncer) to sync my calendars (and address book) with my
[NextCloud](https://nextcloud.com) server. I use a custom vdirsyncer profile to sync NextCloud with Google for the
shared family calendars.
## Daily totals
After [yesterday](/posts/2025/06/tui-challenge-day-5/) I have accrued 120 points. How does today help that score? Well,
completion of task management and calendars nets 20 points, with 5 bonus points for syncing and 10 bonus points for
scripting reports using these tools, for a total of 35 points today, and a running total of 155 points.

View file

@ -0,0 +1,69 @@
---
date: "2025-06-14T04:00:00-07:00"
title: "TUI Challenge: Day 7"
tags: ["cli","tui"]
categories: ["personal","sa"]
#image: ""
series: ["tuichallenge"]
summary: "This is the end, my friend"
---
# Day 7: System Monitoring
Today's task was around system monitoring which is something I have used before as I do not have any GUI system
monitoring apps installed.
![clockwise, top left: glances, trippy, btm, btop](/uploads/2025/06/tui-challenge-day-7.webp "clockwise, top left:
glances, trippy, bottom, btop") _clockwise, top left: [glances](https://github.com/nicolargo/glances),
[trippy](https://github.com/fujiapple852/trippy/), [bottom](https://github.com/ClementTsang/bottom),
[btop](https://github.com/aristocratos/btop)_
Most of the time, when you laptop/server is running great, you do not worry about what is running or how much CPU/RAM is
being consumed. But, then you notice that program start-up seemed awfully slow or that remote site was a bit slow or
did not respond at all. What now? Monitoring tools to the rescue!
## [glances](https://github.com/nicolargo/glances)
I just found this tool recently. It gives a great overview of not just what process are running, but how your network
interfaces are doing, disk i/o as well as filesystem usage, and an overview of the IRQ in use. Truly, your system at a
glance. The only metric it is missing for me is temperature of the CPU and drives.
## [trippy](https://github.com/fujiapple852/trippy/)
Trippy is another new find for me. It is traceroute, but all TUI up. It is easy to read, has a stop-light icon on the
far right to let you know the status of each hop. Nice.
## [bottom](https://github.com/ClementTsang/bottom)
Bottom is another system resource monitor, but instead of just columns of numbers, you get a real-time chart of CPU,
RAM, and network usage, along with an overview of system tempatures, disk usage (but not disk I/O), and a process
overview. This is a great tool to leave up running while you are trying to track down some issue as you can see the
historical trends.
## [btop](https://github.com/aristocratos/btop)
btop is my go-to top replacement. I even have a bash alias for top calling btop: `alias top=btop` and a key sequence
for my tmux config to call it up: `bind '~' split-window "exec btop"`. btop shows the same types of information as
bottom, but goes into more details. Disk display, for example, has not just space used but disk I/O as well. It
offers a lot of configuration options. For example, in the above picture, it is using the catppuccin_mocha theme to
match the rest of my desktop, both GUI and TUI apps. Nice.
## Challenge
The challenge today was to use the tools at least twice and note an observation. In the above picture, I was just
starting a NixOS update and rebuild, so you can see the CPU, RAM, and network starting to get used more.
## Daily totals
[Yesterday](/posts/2025/06/tui-challenge-day-6/) left me with 155 points. Today's basic challenge was worth 10 points,
with a bonus of 5 points for customizing the display of the tool (btop's theme). I did not do the other bonus of
scripting alerts as I already have another system for that. So, 15 points today, brings the total to 170.
## Challenge Bonus points
There is a bonus 30 points up for grabs if I use a terminal multiplexer. As seen in the picture above, that is tmux
with the first pane split into four to show the tools off, but I also have panes for my email, RSS reader, mastodon
client, and ssh shells on a couple other machines.
And for added geek points:
```
[don@loki:~] $ tmux list-sessions
chat: 2 windows (created Sat Jun 14 22:34:14 2025)
duckland: 3 windows (created Sat Jun 14 22:44:28 2025) (attached)
loki: 5 windows (created Sat Jun 14 22:29:16 2025)
nixos: 2 windows (created Sat Jun 14 22:29:49 2025)
```
Which brings my grand total to 200!