Install keyd (see https://github.com/rvaiya/keyd)
Save as /etc/keyd/default.conf:
[ids]
*| # 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.
| import { useState, useCallback } from 'react'; | |
| interface History<T> { | |
| history: T[]; | |
| head: T | undefined; | |
| previous: T | undefined; | |
| next: T | undefined; | |
| addItem: (item: T) => void; | |
| previousItem: () => void; | |
| nextItem: () => void; |
| Emacs defface | htmlfontify css class |
|---|---|
| font-lock-warning-face | warning |
| font-lock-function-name-face | function-name |
| font-lock-function-call-face | function-call |
| font-lock-variable-name-face | variable-name |
| font-lock-variable-use-face | variable-use |
| font-lock-keyword-face | keyword |
| font-lock-comment-face | comment |
| font-lock-comment-delimiter-face | comment-delimiter |
| import sqlite3 | |
| import os | |
| import json | |
| import argparse | |
| import datetime | |
| import sys # For sys.platform | |
| import shutil # For copying database, if enabled | |
| import configparser # For parsing profiles.ini | |
| def get_firefox_profile_path(profile_name=None, newest=False): |
Sync a Tab to a Directory with copyq, not setable from the cli tool, but is possible in the config.
(linux/macos: ~/.config/copyq/copyq.conf | windows: %APPDATA%\copyq\copyq.conf )
Config will default to 1 tab called &clipboard. The & marks the letter to activate with Alt