My fellow nerds: a question about your personal machines:

What is your favourite quality-of-life tweak you've made to your system?

An alias? A utility, a setting, something in .bashrc or ~/bin?

I'd like to know.

@mhoye I defined the right ALT key as the Compose Key.
@molenaar @mhoye I install WinCompose.exe on my Windows computers to allow me to use RAlt as a compose key

@molenaar

I remap Caps as my Compose key

$ setxkbmap -option compose:caps

and use it DOZENS of times every day.

It's especially handy if you create your own ~/.XCompose file where you can include the system one

include "%L"

and then define your own atop it, so I have added some custom arrows, vertical ellipsis, the "Enter" key (⏎), and a number of emoji like

<Multi_key> <greater> <colon> <parenright> : "😈" U1F608 # SMILING FACE WITH HORNS

Also, it pays to skim through all the `<Multi_Key>` items in the system file to learn what's in there. Em- and En-dashes, horizontal ellipsis, diacritics, superscript/subscript numbers, and so much more.

@mhoye

As a side note, after messing with the ~/.XCompose file, you may need to restart applications for them to pick up the new key mappings.
@mhoye the prompt starts with a # and ends with a newline, so I can more easily copy the command out to share with others
@arrjay @mhoye oh, I like that. My prompt has very bright colours in it so I can easily pick it out from between two long program outputs when scrolling back
@arrjay @mhoye at work I set mine to start with `:` and end with `;`, so one can not only copy the command but also the user, machine and path, and still be executable.
@mdione @arrjay @mhoye I do that! But I tend to edit down copied-out history anyway (remove my hostname etc), so I might as well not be doing it
@jmtd @mhoye @arrjay right. This is mostly for keeping record of manual procedures and their outputs.

@mhoye Definitely my aliases. When I discovered those it changed the command line for me.

The best ones are just being able to type the name of one of my machines and have it ssh straight into it. Another one does the ssh but then runs a command to get the temp (it can get hot) and exits.

And I can never remember the command that this alias runs:
alias ns='netstat -alnp --protocol=inet | grep -v CLOSE_WAIT | cut -c-6,21-94 | tail -n +2'

but I use that a lot.

@stevenixon @mhoye oh that one about typing a machine name to ssh into it is fantastic - imma do that right now! The perfect add-on to finally learning how to ssh in using keys rather than a password.

@stevenixon

While I use a few aliases, I find that shell-functions are more predictable, especially with how they handle arguments. But yes, such time-savers, especially for convoluted/obtuse arguments.

I really need to move some of my common shell-history items into more static/persistent entries as aliases/functions in my shell RC file so I'm not relying on history quite so much 😬

@mhoye

@stevenixon @mhoye yeah mine is `rbash` (remote bash) and it takes the name of a system and name of an environment as arguments. Handles ssh or kubectl or whatever else under the hood to just get me bash on some server, container, or pod.

`rbash cms production`

@mhoye Rebinding caps lock to control. For some reason it’s one of the biggest keys on the keyboard but aside from this hack I never use it

@pwbrooks @mhoye

me too, always rebind caps lock. there were old keyboards where that's where ctrl was placed, Sun keyboards I think.

@dlakelan @pwbrooks Sun keyboards, IBMs and the earliest Apples had control in the right place and I never knew why they switched it. I was ride-or-die Sun Type 6 for a while and I still sometimes miss it.

@mhoye @pwbrooks

If you're an emacs user or use emacs style key bindings in another editor etc, it can be literally the difference between being physically injured and being pain free.

@mhoye

VT52 had Control and Caps Lock, in that order, to the left of A. That takes me back!

@dlakelan @pwbrooks

@mhoye @dlakelan @pwbrooks I know some people who just hoarded Sun Type 6 keyboards so they have replacements if they fail.
@dlakelan
yes, my Apple //e had the Ctrl key where the Caps Lock is now. I didn't like it at all when I had to switch to the current position of the Ctrl key
@pwbrooks @mhoye
@dlakelan
e.g., Ctrl-S, the combination I used and still use most, was easier with the old position of the Ctrl key. And yes, I just checked: both DEC and Sun keyboards (both much used by me) had the Ctrl key on the same row as the S key.
@pwbrooks @mhoye
@dlakelan @pwbrooks @mhoye most PC keyboards had the same layout until the mid-90s.

@pwbrooks @mhoye

I use emacs, so first thing on new computer - caps lock becomes ESC.

@pwbrooks @mhoye this combined with the fact that Ctrl-[ generates ESC means your hands don't have to leave the home row to switch modes for vim-style editing

@mhoye

heh. Using a super simple window manager like LXQt. No fancy animations, no transparency, just simple, highly responsive controls and displays. Is it perfect? No. But, man is it less distracting.

@jrconlin
Came to say the same about i3wm. I initially gave it a go just out of curiosity, but now a tiling window manager just feels like the correct way to computer, and any other graphical shell feels like a mess.
@mhoye
@stib @jrconlin @mhoye ... and keyboard-driven for the most part, which reduces the mousing around quite a bit. (I like XMonad as well, tend to alternate between them.)
@tim_lavoie @jrconlin @mhoye I swap from my home workstation with Arch/i3 to an office iMac. OSX has a bonkers system for fullscreen windows and the keyboard shortcuts for tiling involve finding the fn key and doing two-handed chords, which is just destroying my last shreds of respect for the OS.

@stib @tim_lavoie @mhoye

Not fully related, but I will say that the fn key is remarkably well named.

As in:

"Dammit! Where the heck is the fn key!?"

@jrconlin @mhoye I run everything fullscreen anyway, regardless of OS. I used to use a tiling wm on Linux but it had enough sharp edges that I now just use the default wm on Ubuntu.
@jrconlin @mhoye definitely window manager. I use Rectangle.
@mhoye rebinding caps-lock to escape (seriously: saves a lot of strain on my left wrist)
@gvwilson @mhoye when I used emacs, I similarly swapped caps lock to control. Now, my caps lock is an alt-gr.
@nxskok
I have Ctrl on Capslock and Esc on Tab, because Tab is a thumb key on my #ZSAMoonlander.
@gvwilson @mhoye
@mhoye BlueTooth audio receiving in from my phone, where I listen to pod-casts. (a2dp)
It mixes with whatever else I'm doing and just works. Media controls work (after I enabled that systemd service)
@mhoye Consistent keyboard shortcuts across all machines for things like moving between workspaces, popping up apps, etc.

@mhoye I pull my shell configuration into a separate folder, so that I can organize it better. This makes it so you can conditionally load it in the actual shell RC file, with minimum edits.

EG: I have a `$HOME/.bash.d` folder with files used for various tools (asdf, aliases, work-specific tools, etc.), then do an `if [[ -d "$HOME/.bash.d" ]]; then` and source each file present.

@ballpointcarrot @mhoye +1 I'm doing the same but in $XDG_CONFIG_DIR ($HOME/.config) :)
@mhoye i recently tried out paperwm on linux. Really nice with touch pad on a limited screen. Just some small things bothered me, so i went back to normal window manager. But that bothered me even more. So now i use scrollable window manager. :)

@mhoye
1. Running Linux
2. Cinnamon DE (although Plasma 6/Wayland is okay too)
3. Firefox (based) browser with uBlock and uMatrix

All the other stuff is secondary benefits, although Arch based distro and the AUR rank at the top of those secondary benefits.

@mhoye Non-nerdy: Adblocking since forever; Nerdy: Using QWERTY instead of QWERTZ
@mhoye One was taking more control over versions with Guix (https://guix.gnu.org), GNU stow/xstow,, and SDKman (https://sdkman.io).
GNU Guix transactional package manager and distribution — GNU Guix

Guix is a distribution of the GNU operating system. Guix is technology that respects the freedom of computer users. You are free to run the system for any purpose, study how it works, improve it, and share it with the whole world.

@mhoye Another improvement has been adopting Nushell (https://www.nushell.sh/) as my primary $WORK shell
Nushell

A new type of shell.

@mhoye this one alias:

alias l='ls -Nlrt'

then: install micro, the text editor

then: create ~/bin for all the weird little toadstools that accrue on my systems.

@mhoye i have `h` aliased[0] to a history of directories, navigable with fzf[1].

i have various uses of fzf sprinkled all over my setup, and it's been a huge improvement in everything i've applied it to.

[0]. https://code.p1k3.com/gitea/brennen/bpb-kit/src/branch/main/home/.sh_common#L169
[1]. https://github.com/junegunn/fzf

bpb-kit

Dotfiles, utilities, and other apparatus.

p1k3 gitea
@brennen @mhoye i just started using fzf and it really is great! perfect little bit of interactivity to glue a workflow together. wish i'd started using it years ago
@aparrish @mhoye yeah, i have probably been sort of tiresome to my nerd friends about this one, but it's such a good little abstraction.
@mhoye I deal with a lot of virtual environments for Python projects (every repository has one) and activating them was a pain since environment names don't autocomplete. I made this bash function and now it's all automatic (triggered by a cd): https://github.com/leouieda/dotfiles/blob/main/bash/.bash/functions/yavanna.sh
@mhoye
I switched my fixed-width fonts — terminal, IDEs, etc. — to Comic Mono. It feels more legible than any other font I’ve tried before, and it adds a bit of whimsy to a boring environment.
@dcoderlt @mhoye Comic fonts are literally designed for legibitility and are awesome. I will die on that hill.

@dianaprobst @dcoderlt @mhoye
People don't understand the constraints of the typefaces (I refuse to use the word font for this) were under at the time.

It had to function at very low resolutions on computer screens AND look good in print AND line up the columns of text the same in either display format, while maintaining legibility.

The idea that it was possible to use a "handwritten" style font to display menus and title bars was wild, and I used it as a system typeface at one point.

@mhoye
As an experience designer that works with several & various development teams - using ephemeral containers with mounted directory as prototype/development environments, effortlessly using different versions of the same programming language and different languages as long as there’s memory and storage.

Also have a “remove crud.sh” script that clears unneeded cache directories and storage-guzzling auto-update applications.

@dahukanna can you tell us more about this? I’ve seen something like this as part of deployment practices but not as a local ergonomic approach.

@mhoye

I work with multiple dev teams that require arduous & OS specific instructions for development environment setup for UI + UI API microservices, where I’m reviewing UI code or even writing/updating the CSS to reflect the intended experience.

By running that code in an ephemeral container (not image) with git repo directory mounted, I completely skip “arduous setup instructions”. I also can run a multi-project “polyglot” language set up.

I have a presentation on this approach from 2017.