Utility Scripts

Useful scripts for various tasks

Available Scripts

These utility scripts are available on this system:

USBSwitch
Python

Collects and analyzes USB device information, identifying power-switchable hubs and saving the data to a JSON file.

clipboard-diff
Bash

Compares the content of a file with the current clipboard content and displays a formatted diff.

file-concat
Bash

Combines multiple files from a source directory into a single output file with headers indicating the original file path.

pw-gen
Bash

Generates a random password of variable length (22-26 characters) and copies it to the clipboard, with support for both Wayland and X11 environments.

git-watcher
Bash

Scans for git repositories on the system and maintains a tracking file with their paths, with options to install as a systemd service that runs daily.

command-with-tail
Bash

Executes a command and shows its output in a live-updating, visually formatted box with colored borders, displaying only the last N lines as the command runs.

file-versioner
Bash

Implements a simple file versioning system that monitors specified files for changes and automatically creates versioned backups when changes are detected.

git-checks
Python

Recursively finds git repositories and checks their status, reporting which ones have uncommitted changes, with an option for interactive shell mode.

tailer
Bash

Monitors a file for changes and outputs new content when the file is modified, with smart handling for file deletion and recreation.

shell-search
Python

Advanced search utility that finds strings in files with line and column output, supports replacing text, and maintains a config file with ignored patterns per directory.

wakeup
Bash

Wake-on-LAN utility that stores MAC addresses for host targets and sends wake packets using multiple methods (etherwake and wakeonlan) for reliability.

toggle-yubikey-nano
Bash

Toggles a YubiKey USB device on/off by binding/unbinding it from the USB driver, allowing quick physical disabling of the device without unplugging.

yubikey-passthrough
Bash

Toggles attachment of a YubiKey USB device to a VirtualBox VM, allowing it to be used either by the host or virtual machine.

send-to-local
Bash

Transfers a file to a local server by sending the file data through a TCP tunnel to localhost port 2225, including filename and size metadata.

py_filter
Python

Processes Python files to convert docstrings into Doxygen-compatible comments, enhancing documentation by adding @brief tags for functions and classes.

force-clean-user-journal
Bash

Finds and removes all user-specific systemd journal files with interactive confirmation before deletion.