Wow, this is awesome! My OS is heavily scripted and keybound, thanks to 15 years of cumulative incremental fixes and a kick-ass WM. The one thing that's frustrated me is the relative black box that my browser represents, and writing a shim between my WM and browser tabs has been on my TODO list for a long, long time (through a couple of aborted attempts due to a combination of Chrome's at-the-time obsolete documentat…
would you mind providing context /docs to some of your fixes and scripts so I can observe/install some of them?
I can give you one of my favorite examples. I have a pretty intense job, and I've struggled to some degree with the way stress eats into both my work productivity and my well-being after work. I wrote this script to mitigate the bouts of workday akrasia that induce me to almost-unconsciously procrastinate, as well as the unfortunate habit of checking work email/Slack after work hours or while on breaks (one of the pitfalls of not physically separating my work and recreational machines).
I use a simple launcher app called gmrun, which allows defining custom protocol prefixes. I've defined a few of these protocols, but my favorite is "m:", which switches "modes" on my laptop. Appending a prefix-string of either "work", "rec", or "all" rewrites my i3 config file to switch to the corresponding "mode" by selectively disabling a set of switch-to-workspace keybindings. It's about 100 lines of straightforward Python code incl docs and newlines, took me half an hour, and it paid for the time I put into it in less than a week. Probably a _dozen_ times a day, I catch myself trying to switch to the workspace that has my messenger apps or personal browser windows, and disabling the keybinding is enough to short-circuit the stress-driven impulse to distract and procrastinate and remember that I am trying to do focused work. It works very similarly for checking my email/Slack after work hours, something I almost never do now for the same reasons.
This is pretty tuned to my situation, OS setup, and personality, but that's pretty much the point: I'm extremely spoiled by Linux, i3, etc due to having a system that's been custom-fitted to my every need every moment of my computing life since late high school. If there's a rough edge, I sand it; if there's an optimization opportunity, I take it (if the ROI seems clearly worth it).
Not to get on my soapbox, but it saddens me a little that so many people I talk to, particularly technical ones, have become disconnected from just how many affordances general-purpose computers can offer without ever being _forced_ to avoid choosing the ease of a one-size-fits-all approach.