I use a Linux distro with kde, so I have a lot of customization available. I like trying other distros in VMs, but stuff like windows (no need to copy really kde is similar by default) and Mac is a pain in the ass to use that way. so, I want to know what your os does that you think I should copy using kde’s customization. I’m looking for Mac in particular (bc I haven’t used it before) but any OS or desktop environment is fair game.
- super+u shows a wofi menu allowing me to fuzzy find a credential from my password manager and copy its username
- super+p same thing but for passwords
- super+o same thing but for TOTP codes
- super+t allows me to select an area of the screen, take a screenshot, run it through OCR, translate it to English via the deepl API, and then pop up the result as a desktop notification and also copy it to the clipboard. (I’m not fluent in the language of the country I live in)
- ”lock” and „request” based suspend management, so my backup scripts or other long running jobs can keep the computer from sleeping until they are done.
Grim, slurp, tesseract, and apparently the deepl SDK for Ruby? That was an interesting choice, younger me.
#! /bin/zsh
# Select an area of the screen, Screenhot, OCR, and translate it to english.
temp_image=$(mktemp --suffix '.png')
grim -g "$(slurp)" "$temp_image"
# DPI of 120 seems to work OK for screenshots.
source_text=$(tesseract "$temp_image" - --dpi 120 -l pol+deu)
translated_text=$(~/scripts/translate "$source_text")
wl-copy $translated_text
notify-send 'Translation: ' "$translated_text" --expire-time=60000 --category 'translation'
rm $temp_image
Translate script:
#! /bin/ruby
require_relative 'deepl_request'
puts Translator::DeeplRequest
.new(ARGV.join ' ')
.translation
This script is a bit hacky and one-off, I wouln’t just copy-paste it.
I never really looked into Linux or any alternate OSs before now. This thread is super interesting and a very fun read.
if you ever feel like trying it, Linux is easy to try in a virtual machine or on real hardware (do not install it to your main machine when you first try it except in a vm, which does not change your system). I’d recommend trying fedora workstation and fedora kde because they are decent examples of the best two desktop environments. mint exists as well, but I personally wouldn’t recommend it. btw, there is no “best” distro, just find one that works for you and ignore the tribalism.
download a virtual machine app (I’d recommend virtual box, boxes is great too but iirc its Linux only), download the .iso file (this is the installer) for the distro you want to try from the official website, in your app of choice create a virtual machine and select the file you downloaded. from there you just follow the installer. it may help to look up how to use the app you chose bc VMs can be a little iffy. if you’ve ever used an emulator, it’s a similar process but with ISOs instead of roms.
It is gnome, but https://aylur.github.io/astal/showcases/ is pretty awesome if you’ve done any React development. Pretty much coded up my own desktop environment with typescript and tsx for layout stuff. Lot’s of fun widgets.
Note that I use nixos so pretty much everything is hand picked instead of a prebuilt ready to go environment. Hyprland for the basic desktop, Astal for my desktop shell with widgets, toolbars, etc.
What’s performance like using a desktop with a translation layer like that? Does it feel as responsive as a native desktop?
Pretty snappy. All the gnome APIs are written in C. It doesn’t run on node, it runs on gnome-javascript (gjs) which exposes all the C APIs through JavaScript. If you use the Astal wrappers its pretty painless but using the gnome APIs directly in gjs is a little weird since you have to consider things like memory management.
Caps Lock recapped to compose. Much more useful, especially for those of us who sometimes need to type “other” letters, but prefer US dvorak keyboard layout.
While I agree with the general premise that Caps Lock is in a terrible place – that’s prime real estate and people just don’t use it that much, I swap Caps Lock and Control and have Menu remapped to Compose. If you’re typing English, you’re gonna use Control a lot more than Compose.
I don’t really need the compose key, but rebinding caps does sound tempting. But what to bind it to… Hmm
I bound it to normal shift, because I fat-finger caps instead of shift all the time anyway lol
I have it activate a layer when held where all the other keys are remapped.
I also use a 45% keyboard (https://wilba.tech/jd45) and its done in the keyboard’s firmware (https://qmk.fm/), so I need the extra keys.
I have an older model of the JD45 with a full bottom row.
I’ve been meaning to get my hands on a QMK board, but didn’t get around to it yet. Having an extra layer with macros or something sounds super powerful. I wonder whether I’m able to replicate a similar behavior without touching the board’s firmware. But I guess with enough registered keybinds it should work lol
what’s the compose key? never heard of it but any excuse to not waste a key on caps lock sounds great.
Basically, hitting compose causes the next two keystrokes to “combine”. For example, / + o = ø, as well as the other letters that are useful to us with extra letters in the alphabet. In addition to that it provides a myriad of other characters such as copyright, trademark, just to name a few.
https://en.wikipedia.org/wiki/Compose_key
Works in X11 and Wayland.
Not as powerful as Emacs’s input methods, but it covers a lot of common cases.
Yes, love the compose key. My native language (Dutch) uses accents occasionally, but typing on a regular Dutch layout with dead keys is awful, especially as a software dev who uses loose quotes a lot.
It’s also great for symbols. No more ddg’ing “euro symbol” and copying from Wikipedia, just type compose, e, =.
Does dutch have ß as well?
Also, noggie keyboard is alright for normal typing, but once you get into more geeky computery, some characters are awfully placed. ’ " / { > just to name a few. That’s why I started using US layout to begin with, and I later migrated to YS Dvorak because I’m that guy (PS: You should totally switch to Dvorak, bro)
No thankfully Dutch doesn’t have any additional letters, just accents.
I have been wanting to try different keyboard layouts for a while. The issue is that my employer probably wouldn’t be super happy with like 50% output for some days or weeks.
On Linux Mint I can resize windows by hitting super+z, close windows with super+c, and move them around with super+left drag. There are others too, but I use these constantly. I was worried when I switched from Windows that I’d lose my shortcuts, but it turned out that there even more options on Mint.