Install keyd (see https://github.com/rvaiya/keyd)
Save as /etc/keyd/default.conf:
[ids]
*| #!/usr/bin/env -S uv run --script | |
| # /// script | |
| # requires-python = ">=3.11" | |
| # dependencies = [ | |
| # "kdl-py", | |
| # ] | |
| # /// | |
| from pathlib import Path | |
| import kdl |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>The Flicker — Local Stimulus</title> | |
| <style> | |
| html, | |
| body { | |
| margin: 0; |
| # Large type for a 4k TV | |
| xterm*background: #121619 | |
| xterm*foreground: white | |
| xterm.*backarrowKey: false | |
| XTerm*ttyModes: erase ^? | |
| XTerm*VT100.Translations: \ | |
| #override <Key>BackSpace: string(0x7f) \n\ |
| #!/bin/bash | |
| technically_not_a_slur() { | |
| local insults=( | |
| "absolute MELONHEAD" | |
| "a SENTIENT CABBAGE" | |
| "MOONFACE with empty space between ears" | |
| "TURNIP with a pulse" | |
| "PUMPKIN-headed waste of seeds" | |
| "SAUSAGE BRAINED WATERHEAD" |
| # brnm from shell on a folder. | |
| brnm() { | |
| local dir="${1:-.}" | |
| # Check if we can write to the directory | |
| if [[ -w "$dir" ]]; then | |
| emacsclient --tty --eval "(dired-rename-from-shell \"$dir\")" | |
| else | |
| echo "Directory not writable, using sudo..." | |
| emacsclient \ | |
| --tty \ |
Install keyd (see https://github.com/rvaiya/keyd)
Save as /etc/keyd/default.conf:
[ids]
*Tested on Windows 11 / mpv.exe is in user path.
Running mpv via Electron on Windows, assuming the goal is to run MPV as a standalone so the Electron app can close without affecting mpv.
As opposed to exec, we use spawn as the method to fork the process, spawn returns a stream of io, in this example, we 'ignore' stdio.