Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This all sounds extremely interesting. Could you go into detail about how you've achieved these things?
 help



It's a lot of stuff accumulated over a long period of time, sort of pieced together... but here are some of the details:

The overall setup is X11 with a Sawfish window manager. X11 provides a lot of cool features like network transparency and automation and generally being wildly flexible. Sawfish is like the Emacs of window managers, written in a flavor of Lisp, and you can literally rewrite its code while it's running. So whenever I want something to work differently... I just find that part of the code, change it, and activate it.

If I manage to crash it, that's fine... Sawfish isn't the outer process for my session. For that, I have my .Xsession just do a simple loop. It keeps running until I touch a file called ~/.xlogout, and can restart the window manager or other tools if necessary.

I pretty much never log out or reboot unless it's time to do a dist-upgrade... which means once every couple years on average. Everything just stays running.

The main limit is that Xorg is usually compiled to use an 8-bit ID for each client, so it can only have 255 clients connected at once, which usually means a limit of 255 windows open at a time. But you can push this a bit using programs which do multiple windows in a single client connection, like "urxvtcd" in rxvt-unicode can have hundreds of terminals sharing just one client slot. I've occasionally had 500+ windows open on a single computer (though this is kind of a bad habit, and I try to keep it under 200).

I configured Sawfish to do soft tiling, and also to do tabbed windowing, and made all of it work via keyboard, including things like moving and resizing windows. Sawfish is also where I implemented the "every flavor of F1-F12" hotkeys thing, and implemented mouse warp, and it already had a lot of things built in like sloppy focus and the ability to add and remove desktops with a keypress.

I added another thing to it to save the contents of every desktop, every window, size and position and title and tab grouping, etc... every 15 seconds or so if it has changed since last time. This gets archived daily. So if the whole system crashes, or if I need to actually log out, or if something bugs out, I can restore things mostly how they were.

A lot of the stuff I don't have, like a task bar, or a desktop notifications system, is simple enough to do by just not installing one or not running any of the relevant programs or services.

As for traditional-ish desktop stuff, there's not much. I set the wallpaper using a small program I made decades ago, which basically just picks a file at random from a big nested directory structure of images I've accumulated over the years. I use a 2D grid style desktop pager in the corner of the screen to see which desktop I'm on, with Hyper+Arrows keys to navigate the grid, but I barely ever look at the widget and it sticks to the bottom stacking layer so other programs are free to draw over it. Similar story for a Conky instance configured in a thin vertical strip with all sorts of realtime system stats and any other info I care to put there. It's a quick, easy way to see what's going on, but I often cover it up and use that space for other things. It's basically just system stats rendered onto the wallpaper.

I mostly use keyboards with open-source firmware like QMK, with a pretty extensive personal keymap tailored to my needs and tastes. I also added some stuff to QMK, like a better MouseKeys motion mode called "inertia" mode, to make mouseless use easier. But on notebooks and legacy keyboards, I can at least use Kanata to get most of the same features.

Macros recording/playback is built into the keyboard, or X11 in general is pretty easy to automate with small programs or shell scripts or even one-liners. Like, with xdotool.

For remote controlling other systems, x2x is great. Ancient program which "just works". Or running remote programs on the local screen, ssh + normal X11 stuff. Or for a full remote desktop, there's VNC (there's a tigervnc xorg extension, and the tigervnc viewer is good too... I patched it to make it handle larger desktops better, and the patches are upstreamed).

(continued in next comment, my post was too long to fit in one comment)


(part 2/2)

I have my dotfiles and other stuff checked into Subversion, with different programs in different modules so I can build each host's config out of a set of modules, and not have to have everything checked out on every host. There's an article about the setup on my site. Git didn't exist at the time, but you could probably do something similar with git submodules. I run a revision control server of sorts in a lxc guest on one of my computers, to make it easy to sync things. Or depending on the nature of what I'm syncing, sometimes "unison" works better, or sometimes "syncthing", or sometimes git + github, or sometimes just rsync.

I have a little python program constantly monitor the title of the focused window, and look for anything which looks like a filesystem path. This gets saved to a ramdisk, like ~/ram/last-dir and ~/ram/focused-window-title, so other programs can use this info for context-sensitive things. Hotkeys which react in different ways in different programs, or always know what directory to work in, or whatever.

I also basically keylog myself, with another little python program I wrote. It monitors the title of the focused window, logs the timestamp when each window was focused, and logs the quantity of input events... but not the actual individual content of keystrokes. So I can tell which window was used when and how active I was, but not exactly what I was typing.

To make these title-based things work better, I make sure to put useful info into my window titles. Zsh is configured to put the command line (so far) into the title, along with the current host and path, or put the finished command line into the title while a program is running. I added a browser extension to put the current URL into the window title. I configured Vim to put useful info into the title. Etc. So the logs are very detailed. This info comes in handy quite often, and is also used for other things like generating a heat map graph of my erratic sleep schedule, and predicting when I'll be awake so I can schedule appointments more easily. Can also easily tell exactly how much time I spent working on pretty much anything, for invoicing clients or working toward productivity goals or whatever.

I've put together several things which work in a daily log directory... like ~/daily/YYYY/MM/DD/ . There's a key to open a shell in today's directory, or open a minimalist filemanager there. I made a screenshot program which saves things there... like, press a key, click or drag to select what I want to save onscreen, then it shows a preview I can edit if I want, and asks for a title, with recent titles available for easy recall or searching or tab completion so I can save a series of images without having to retype the title... and then it saves to a timestamped file in today's dir. Shift+Screenshot to do the whole screen, Ctrl+Screenshot to turn off all controls and just save automatically using the most recent title, Meta+Screenshot if I want to add metadata (like open "hacker-news.2026-09-24_11:59:23.png.md" in Vim to save extra notes). Or any combination of modifiers to combine effects.

And, of course, a nice terminal and shell. I've found rxvt-unicode is lightweight and can run hundreds of terminals with near zero resource use. And zsh is very powerful and customizable. But YMMV, use whatever you like. Build up your own vocabulary of tools over time, and the shell becomes incredibly powerful.

I've had the same $HOME, basically, since I first installed Linux in the 1900s. It occasionally gets moved from one hard drive to another, and now is scattered across an entire network of many hosts, with pretty much everything replicated and synced and backed up... but it's still the same data, collected and curated and organized and optimized over decades. When one's computing environment is stable and built for user empowerment instead of corporate growth... one can really settle in and get everything "just right".

I've also had mostly the same browser session for like 15 years. Even when switching between browsers. The session is much like my $HOME filesystem, just an organized hierarchy of arbitrary stuff, whatever I found useful or notable or worth keeping. At first, I did this using Tabs Outliner in Chrome, but it has degraded over the years and has a lot of the best features paywalled, and it doesn't work on Firefox, and it didn't adapt well to Manifest V3, and it's buggy and unreliable and awkward now... so I made my own replacement. I suck at naming things though, so I just called it "TK's Tree Style Tab Outliner". Still working on the feature to auto-sync between browsers, but at least it can export and import manually and do automatic backups, to make sure data won't be lost.

... which reminds me. It's also very helpful to run Chrome (or Firefox, or whatever) in a memory jail cgroup so it won't grow until it squeezes every other program into swap space. A cgroup like this also makes it easy to pause and unpause the entire browser session so it won't do anything while you're not actively using it. Slow down the memory leaking, reduce CPU use to zero to make the rest of the system run faster and cooler and make the battery last longer, and completely stop data leaking out to corporations while the browser is idle. Yet another thing I made a little script for.

And a ton of other things which didn't even come to mind, because I'm so accustomed to it that I don't even think about it any more.

Most of this is niche and weird and probably has very few users, and took a lot of time to discover and integrate... but a lot of the stuff people want in a desktop is already possible and has been for a long time, if you're willing to look around and try things until you find what works for you. Just try to use systems which are designed to be powerful and flexible, and you'll never hit the ceiling. It may be harder initially, compared to something mainstream, but you'll be able to go a lot farther with it.


Thanks so much for this detailed write-up! It's always enlightening to learn about different setups, especially when they have been painstakingly crafted over multiple decades.

Bump



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: