The problem# In a shell script, I wanted to use inotifywait's --monitor option to watch for changes to files, but I didn't care how many changes had been made, only whether or not changes had been made. I wanted to use --monitor as if more changes where made later, I still wanted to get notified...
The problem# I had a script where at some point a program I did not directly control would create a file, but I wanted that file's permissions to be different than those it got created with. The simple solution was to run chmod in a loop waiting for it to succeed with a short sleep delay between...
The problem# I make heavy use of virtual desktops, so I use browser windows on multiple desktops. When logging into a site that uses passkeys, KeePassXC pops up a dialog on the desktop its main window is on, which is usually not the desktop my browser window is on. Then I have to switch over to...
The problem# For a compile-on-save workflow where some computation is done in response to every change to a file, if there may sometimes be many changes close together, it may be wasteful to respond to all of them. This is often handled by debouncing the events: instead of responding to every...
The problem# Last time, I presented a script read_keypress.sh which would read any single keypress in a shell script. For printable characters, it's straightforward what this means, but for keys like left arrow (đ ), it's not obvious how to deal with them. The solution# keytest.sh demonstrates...
The problem# For certain applications it can be useful to get many quick responses from the computer, so we would like it to react to individual keypresses instead of requiring an entire command to be typed out and confirmed by pressing Enter. While this is a common feature of GUI and TUI toolkits...
The problem# Last week, I mentioned that I needed a hack to kill xprop that seemed like it should be unnecessary. Specifically, I had its output piped to a Bash while read loop and once that had found a line to act on, there was no further need to get more lines from xprop, but break or exit...
The problem# I have my window manager set to not focus new windows because I dislike having a new window pop up while typing and having the keystrokes surprisingly sent to the new window instead of the one I thought I was typing in. While this is usually what I want, this does mean extra clicks...
Hello world! I am kicking off my blog as part of an online bookclub that I just joined. Phil Eaton is hosting the book club, and this go around we are covering âDatabase Design and Implementationâ by Edward Sciore. Chapter 2 of the book covers isolation levels, and in particular it mentioned the...
The problem# When doing an incremental backup, any moved file on the source filesystem usually results in recopying the file to the destination filesystem. For a large file this can both be slow and possibly waste space if the destination keeps around deleted files (e.g. ZFS holding on to old...
A really great post by Jeremy Keith: You can choose to make it really complicated. Convince yourself that âthe modern webâ is inherently complex and convoluted. But then look at what makes it complex and convoluted: toolchains, build tools, pipelines, frameworks, libraries, and abstractions....
A great interview in VICE today with an engineer who quit GitHub over their ICE contract. Sophie Haskins: It certainly frustrates me how apolitical tech is. Itâs so individualistic and siloed. Itâs unacceptable. The idea of tech for its own sake, and tech on its own terms makes me angry to no...