StaticPH / dotfiles

My dotfiles, helper scripts, and other assorted things

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotfiles

Cargo crates:

  • cargo-clone — Should really be a built-in feature. Seriously, there should be a builtin way to just download an arbitrary crate without needing a Cargo.toml file.
  • cargo-show — Should really be a built-in feature.
  • cargo-update — Should really be a built-in feature.
  • cargo-whatfeatures — Should really be a built-in feature.
  • hyperfine — Benchmarking tool. Installed via some package manager in all cases.
  • ripgrep — A grep-like tool which is much better for searching recursively.
  • fd-find — Find files within a path fast, maybe do something with them.
  • cargo-cache — When cargo clean isn't good enough.
  • cargo-feature — Convenient tool for changing enabled features of installed crates.
  • durt — Calculate the size of a directory and all of the files within, displaying the results.
  • tabulate — A tool that helps format data into nice tables.
  • bat — Like cat, but with syntax highlighting and a few other niceties.
  • genact — Honestly, this one I just keep for the amusement.
  • git-delta — Powerful diff tool with support for side-by-side view and Git repository diffs [1].
  • sccache — Basically ccache with support for cloud storage and Rust binaries [1]. Installed via some package manager in all cases.
  • ptail — tail -f, but only show a certain number of lines at a time.
  • miniserve — Easy and surprisingly capable http server with support for file uploading [1].
  • runiq — Filter duplicate entries from textual input without inherently sorting the output.
  • mdcat — Like cat, but for markdown.
  • desed — Debug sed commands pseudo-interactively [2].
  • interactive-rebase-tool — TUI for git rebase -i. AKA girt/girt-git [3].
  • dprint — Code formatter for a handful of languages. One of annoyingly few decent JavaScript formatters that don't require NodeJS to run [1].
  • gping — Ping command, but with a graph [1].
  • git-hist — A CLI tool to quickly browse the git history of files on a terminal.
  • shellharden — A syntax highlighter and a tool to semi-automate the rewriting of scripts to ShellCheck conformance, mainly focused on quoting.
  • tailspin — Smart log file highlighter.
  • oxipng — Multithreaded lossles (and optionally lossy) PNG/APNG optimizer

(1): Standalone binary can also be downloaded with the program-fetch utility.
(2): NOTE: This does not appear to work in Mintty, or at least not with my current setup (but I suspect the former).
(3): Because of how I have my current Windows machine set up, I am unable to use this by configuring Git's sequence.editor to call it automatically for git rebase -i; use the irebase wrapper script instead.

Python packages installed via pipx:

  • ipython — Powerful Python REPL.
  • litecli — CLI for SQLite databases with auto-completion and syntax highlighting.
  • git-filter-repo — Quickly rewrite Git repository history (filter-branch replacement). Installed via some package manager in all cases.
  • icdiff — Show more granular differences between files in a colored 2-column view; supports Git repository diffs with included git-icdiff shell script [1].
  • sqlitebiter — A CLI tool to convert CSV, Excel, HTML, JSON, and more to a SQLite database file

(1): NOTE: The version of icdiff on PyPI has been out of date for a while now. Install manually from the GitHub repository. Coercing pipx may require some effort.

Ruby gems:

  • lolcat — Output text in rainbow colors!
  • manpages — Adds support for man pages to rubygems.
  • rubygems-update — Update the gem utility itself.
  • binman — (Optional) Generate man pages from comment headers.
  • unibits — (Optional) Visualize different Unicode encodings in the terminal.
  • uniscribe — (Optional) Describes Unicode characters with their name and shows compositions.

Installed as standalone binaries and scripts (~/.local/bin):

  • jq — Command line JSON processor Installed via some package manager in all cases.
  • shellcheck — Static analysis tool for shell scripts [1].
  • mandelbrot — Just because, a modified version of Charles Cooke's 16-color Mandelbrot.
  • fzf — Fuzzy finder.
  • pandoc — General markup converter [1].
  • imagemagick — Command line image processing swiss army knife; see also GraphicsMagick.
  • pip-autoremove — Remove a package and its unused dependencies.
  • mvn — Apache Maven build automation tool; typically used for Java projects.
  • showimg — Displays a number of image formats in Mintty; see https://github.com/mintty/utils
  • prettyping — A wrapper around the standard ping tool, making the output prettier and easier to read [2].
  • treef — Reads paths from stdin and formats them as a tree, like the tree utility.

(1): Standalone binary can also be downloaded with the program-fetch utility.
(2): NOTE: Unsurprisingly, does not work with Windows' ping command.

Fonts

  • DejaVu Sans Mono Nerd Font Complete
  • (Optional) Noto Emoji Nerd Font Complete
  • (Optional) Twemoji (Color)
  • (Optional) Apple Color Emoji
  • (Optional) Cascadia Code
  • (Optional) Hasklig
  • (Optional) Roboto Mono

Other

  • JDK 1.8

X11

Make numpad behave the way I always expect it to: setxkbmap -model pc105 -layout us -rules evdev -option "lv3:ralt_switch" -option "numpad:microsoft"

Windows-only improvements to Python virtualenv activation

The patch-python-venv-activate script is used to patch the default venv activation script[1][2], to implement the following changes:
-- Allow restoration of existing python aliases(and functions) in MSYS2 (system python, not MSYS2) upon venv deactivation.
-- Automatically alias python to use winpty and the venv specific python executable (sometimes simply changing the path is insufficient).
-- Alias _python to use the venv specific python executable WITHOUT winpty (unalias upon deactivation).
-- Automatically alias pip to use the venv specific python executable.
NOTE: Although remembering existing aliases (or wrapper functions) for pip is possible, it is not currently supported through this patch.
NOTE: Use of this patch opens up the possibility of executing malicious code upon deactivating a venv. USE AT YOUR OWN RISK!
NOTE: This script and the patch it applies are intended ONLY for use on Microsoft Windows operating systems, expects the use of a Python install targetting Windows, and assumes winpty and cygpath executables are on the system PATH.

(1): This can normally be found at "<PATH_TO_SYSTEM_PYTHON_INSTALL>/Lib/venv/scripts/common/activate".
(2): Though it is recommended to patch the default activation script, which is used as a template when creating new virtual environments, this script can also be applied to the activation script for specific virtual environments on an individual basis, which will be necessary to apply the change to existing virtual environments.

WIP:

  • Add git and python venv integration to prompts.

TODO:

  • Add svn integration to prompts.
  • Improve git integration for prompts.
  • Investigate pipipxx, pyvenv, rbenv.
  • Rewrite nanorc file for markdown; probably reference my existing one and the version provided by nano itself.
  • Finagle with nanorc syntax for nanorc files in an attempt to eliminate highlighting overlap between menus, functions, and options.
  • Add script (or at least put together a thorough guide) for symlinking various config files to the appropriate locations required for their utilization by sudo/root user on relevant environments; reasonable as it is, it irritates me that my user-customized defaults for programs like nano and gdb can't just magically know that I want to load config files from the normal user's home-directory despite not being executed as that user.
  • Add alternate .nanorc with slightly modified interface coloring for use by sudo/root user on relevant environments.

Notes:

  • I've been informed that ansi escape codes, at least for color, may not work on MacOS if using the \e or \033 prefix. If that is indeed the case, instances of those will likely need to be replaced with \x1B. However, as I haven't been using a Mac for anything, and don't particularly expect that to change for the near future, I currently see no real need for me to change anything. This note is really just here for posterity.
  • Version 1.2.1 of the interactive-rebase-tool, which used pancurses, seems to be more cooperative on my machine than subsequent versions, which use crossterm. And by "more cooperative", I mean "properly responds to keyboard input, and is just actually usable". I'm fairly confident this is a problem with my setup, though, rather than with the implementation of the tool itself.

Help on line ending normalization:

I have not tested, but I suspect that line endings for files may need to be changed depending on the system.

For system-global configurations, a gitattributes file should be at echo "$(git --exec-path 2>/dev/null)" | sed "s/libexec.*/etc\/gitattributes/"

About

My dotfiles, helper scripts, and other assorted things

License:GNU General Public License v3.0


Languages

Language:Shell 98.2%Language:Python 1.1%Language:GDB 0.6%Language:Batchfile 0.1%