Skip to content

tfpf/dotfiles

Repository files navigation

style package

No part of the code in this repository has been written by or in consultation with artificial intelligence chatbots. All of it is purely a product of natural intelligence (or stupidity, as the case may be).


These are the configuration files I use on Linux, macOS and Windows to set up a consistent development environment. Also included are some whimsical utilities I developed purely out of spite and found quite useful.

Custom Prompt

custom-prompt contains code to create a prompt for Bash or Zsh with information about the current Git repository and the current Python virtual environment, and report the running time of long commands. A session may typically look like this.

All symbols seen in the screenshot above may not be rendered correctly in the table below. If you see vertical hollow rectangles (or other substitute characters), you may want to install a patched font from Nerd Fonts.

Component Meaning
 workstation-a39b0e49 Host name
 ~/Documents/projects/dotfiles Current working directory
 main Git branch currently checked out
 0c5803a2a496 󰓼 v1.8.3 Commit currently checked out and associated tag (if any)
 1 1 file modified
 1 1 file staged for next commit
 1 1 file not tracked
 +1,−4 Local 1 commit ahead of and 4 commits behind remote
 dotfiles Current Python virtual environment
% Default prompt symbol
▶% Prompt symbol in subshell

If the terminal is not the active window when a long command terminates, a desktop notification will also be sent; this is done using OSC 777 on macOS and Windows, and libnotify on Linux. (Needless to say, on Linux, X11 is assumed, since there is no server to query the active window on Wayland.)

To actually get the custom prompt in Bash or Zsh, compile the code to obtain custom-bash-prompt and custom-zsh-prompt (or download them from the latest release), copy/move them to a directory which is in PATH, and use them as done in .bash_aliases or .zshrc.

Diff

diff contains a script to show the differences between two files or directories. It is intended to be used as an external diff tool for Git, and set up as seen in .gitconfig. As in the case of the custom prompt, copy/move diff/diff.py to a directory which is in PATH to enable this use case.

git ss 848d7de

The diffs it generates have no bells and whistles, but are usually more precise than those generated by Git (and thus also by GitHub). It is also better at detecting renames. Finally, it can also diff two files directly.

diff.py .config/wireplumber/*/*

About

My programming environment configuration files and some whimsical utilities

Topics

Resources

License

Stars

Watchers

Forks