[take me back]

day 3 - Only built for [cuban] links

Yesterday I sought to replicate the way I use dmenu with browsers inside tmux with TUI links2. Today I've added a bunch more options to the pseudo pop-up menu from yesterday.

tmenu-links

tmenu-links

tmenu-links.ksh

'tis a hackjob

The script itself is placed in ~/bin/tmenu-links. Then a keybinding is added to tmux: bind-key F4 split -l5 ~/bin/tmenu-links.

( or bind-key -T prefix F4 split -l 5 "~/bin/tmenu-links" in .tmux.conf

Now if you do prefix F4, the current tmux window is split and an interactive menu presents itself with several options:

Caution the next three actions expect to be run from a tmux window that already has links in a single pane open.

Finally the load bookmark option prompts the user to type a part of the previously bookmarked urls or their labels. A numbered array of matching urls is then printed and the user can press the appropriate number to open links in a new tmux window with the loaded bookmark.

note: the bookmarks.txt database uses a pipe to separate the labels from the urls. Don't label your bookmarks with a pipe in them or you're going to have a bad time.

1) triapul_gopher gopher://triapul.cz
2) triapul http://triapul.cz/
Open bookmark number? (q to cancel) 

Special thanks to the openbsd matrix channel: #openbsd:matrix.org who helped me brainstorm the solution to my dmenu tmux adaptation!

Gentle monochrome

Now for the clarity through struggle part of the challenge.