Request for testers – TabFern tab-at-a-time support

Three tabs open; two tabs closed but still saved!

My TabFern tab-management Chrome extension is ready for its next great leap and I need your help!  For years, TabFern has been all-or-nothing: all the tabs in a window are open, or none of them are.  Prerelease version 0.3.0-pre.1 removes that limitation.  If the instructions below are your speed, or you already know how to load unpacked Chrome extensions, would you please install TabFern 0.3.0-pre.1 and let me know how it works for you?  Please report problems through the GitHub issues page.  Once this release has had some testing, I will roll it out to the over 1,000 users of TabFern!  Thanks very much for your help, and for using TabFern!

(Reminder: as always — and especially when testing prereleases — backup early and often!  TabFern comes with no warranty of any kind!)

Installing

  1. Download the zip from here.
  2. Unzip it into a directory of your choice.
  3. In Chrome, go to chrome://extensions.
  4. Turn on the toggle in the upper-right that says “Developer mode”.
  5. Near the top left, click “Load unpacked”.
  6. Navigate to the directory where you unzipped the extension and hit OK.  (There’s no specific file to select — just go into the unzip location and then hit OK.)
  7. That’s it!  The TabFern popup window and the help window will open up.

Trying out Perl packages locally

I’ve really enjoyed Perl since I started using it in late 2016. I invite you to experiment with it yourself! For trying out packages from CPAN (Perl’s package archive) on your local system, I suggest:

  1. Install local::lib per https://metacpan.org/pod/local::lib#The-bootstrapping-technique
  2. Install cpanminus. If it’s not a system package on your distro, follow https://metacpan.org/pod/App::cpanminus#Installing-to-local-perl-(perlbrew,-plenv-etc.) .
  3. say cpanm App::cpmcpm is faster than cpanminus 😀
  4. To install a module, say cpm -gv Whatever::Module

Yes, this is more tedious than I would prefer! I’m sure there are shorter ways that are distro-specific, but the above should work just about anywhere.

Some sites that can help you learn:

Dragging tabs off a Chromium window (solved!)

For several months, I have not been able to drag tabs off a Chromium window. When I let go of the mouse button to release the tab, Chromium didn’t respond. That is finally fixed!

First, thanks to jangxx for discovering that turning off Chromium’s “Use system titlebar and borders” option fixes the problem. Unfortunately, my Chromium doesn’t have that option! I had to do it by hand:

  1. In the browser, go to chrome:settings
  2. Under Appearance, make sure “Theme” is “GTK+”. If it’s not, hit “Use GTK+”.
  3. In the browser, go to chrome:version
  4. Make a note of the “profile path”.
  5. Exit Chromium entirely.
  6. In a shell, cd to the profile path
  7. cp Preferences Preferences.bak
  8. Edit Preferences and change "custom_chrome_frame":false to "custom_chrome_frame":true
  9. Restart Chromium. You should be able to drag tabs!

Let me know if this helps you, or if you need more information about these steps. Happy browsing!

autom4te and m4sh for the impatient

autom4te is the engine beneath autoconf, but you can use it to generate your own portable shell scripts for other purposes.  For example, create this test.m4sh:

# test.m4sh
m4_errprintn([before init])
AS_INIT
m4_errprintn([before copyright])
AS_COPYRIGHT([CC0])
AS_WARN([warning])
AS_ECHO([Hello!])

# draws a box on stdout
AS_BOX([Test foo])

# Puts a box in the output as a comment
m4_text_box([testing foo])

foo=1
AS_IF([test "x$foo" = 'x1'],[
echo Foo is 1
])
m4_errprintn([at end])

Run autom4te:

$ autom4te -l M4sh -Wall -o test.sh test.m4sh 
before init
before copyright
at end

(Note that the m4_errprintn calls print while autom4te is running.)

Now you have test.sh:

$ ./test.sh
test.sh: WARNING: warning
Hello!
## -------- ##
## Test foo ##
## -------- ##
Foo is 1

Stunning, right? 😉

The number one gotcha

If you forget AS_INIT, you will get no output and no error message.  You have been warned.

Commands used in this example

  • AS_INIT: required.  At the top of the input file.
  • AS_COPYRIGHT: puts the text you give it into the output as a comment at the top of the generated script file.
  • AS_WARN: prints a warning when the generated script runs
  • AS_ECHO: prints to stdout when the generated script runs
  • m4_errprintn: prints to stderr when autom4te runs.  No effect on the generated script.
  • AS_BOX: prints the “Test foo” box in the example output, when the generated script runs
  • m4_text_box: puts into the generated script file a comment like this one:
## ----------- ##
## testing foo ##
## ----------- ##
  • AS_IF: a shell conditional, but more portable.
  • test: the clunky, old-school (but very portable) way of checking conditionals.  For maximum portability, don’t let any argument to test be the empty string (hence the xs in the test command above)

Happy hacking!

Music of the Day

The “Desert Princess” house mix by Wav-E, distributed by Cafe de Anatolia:

Good variety and nice beats!  I think I’m on my third consecutive play-through 🙂 .

This mix reminds me of some albums from Cyan Music, as did the last Cafe de Anatolia set I wrote about.  I haven’t checked Cyan’s catalog recently and it is clearly time to do so 🙂 .  Any recent favorites you’d recommend?

Music of the Day

Cafe De Anatolia – Ethno Deep Summer Mix (by Professor)

2 hr. of music that is quite unlike my usual fare, but that I am enjoying! I am up to 1:09:03. So far, mellow with a nice beat and mostly instrumental.

Update: the section starting at ~1:09:43 reminds me very much of a Cyan Music album, though I can’t recall which one. Something by Fortadelis, maybe? Let me know what you think in the comments!

Happy Memorial Day!

Music of the Day

From the same group as last time, but at a slower tempo. There’s plenty of interesting material in this set — don’t plan to listen just before bedtime 😉 .

Repeating the last ‘:’ (Ex) command in Vim

Sometimes I run a complicated search-and-replace (:s/../../) in Vim, and I then want to repeat it somewhere else. In the past, I have always hit :, up-arrow to retrieve the command from the history. It should be no surprise by now that there is an easier way!

@: in normal mode (at-sign, colon) will repeat the last : command. Once you have done @:, you can hit @@ to re-run the command. Quick and easy!

This works because the : register, ":, holds the last Ex command. @ runs a macro, and knows that using the : register means you want to repeat an Ex command. @@ runs the last macro, so works for @: just as it does for @a or any other normal-mode macro.

I found ": in :help registers when I was looking for a register that held the filename of the file open in another window, as opposed to the alternate filename in the current window. Details of ": are at :help ": (believe it or not! 😉 ).

Lightweight Markdown-to-PDF converter: pfft

I just released the first version of my new Markdown-to-PDF converter, pfft.  It runs on Linux, at least as far back as Ubuntu 18.04.

Why yet another converter when pandoc and many others already do the job?  Size.  Pandoc uses TeX to generate PDFs.  All the other converters I found use a Web browser in one way or another to make the PDF.  Pandoc is 50 MB by itself, not counting TeX!  In less than 1.2 MB (a 5.25″ floppy 😉 ) and a single file, pfft will do the job.

Of course, there is a catch: pfft uses Pango and Cairo to make the PDFs.  Those have their own dependencies, but are installed on many Ubuntu systems by default!  So pfft itself does not add to the dependency load those systems already carry.

(By the way, I use and appreciate both TeX and Pandoc.  They are great tools!  But, like all tools, there are some use cases they are not great at.  I wanted a small converter, and now I have one! 🙂 )

Please give pfft a try and let me know how it works for you!  And, if you’re planning to do Hacktoberfest this year, know that I am happy to receive pull requests — there’s lots of room for features and polish in pfft.  Check out the issues list for some ideas, and feel free to add suggestions of your own.  Happy hacking!