Skip to content

TomfromBerlin/mothers-little-helpers

Repository files navigation

Views Unique Viewers

Mothers Little Helpers

Disclaimer

This repository is provided to you in the hope that it will be helpful, but everything comes without any warranty and the owner of this repository is in no way responsible for any kind of harm, even if your cat dies while using one or more or all of these files.

Licence

Some of the scripts may have their own license, if not, the MIT license applies.

Usage

Copy the desired files into a dedicated directory where zsh can find it (e.g. ~/.config/zsh/plugins or ~/zsh/plugins; any directory in your fpath will be fine). Then (re)start zsh and the functions resp. scripts should be available on your system.

If you use any kind of framework, please refer to their documentation to find out the proper directory and possible difficulties.

Tips & Tricks

Functions

More information and how to use shell functions can be found here.

  • allcolors - shows the escape sequences for colors in the terminal
  • chpwd - auto-ls after each directory change (zsh only)
  • temp_conv - Script to convert temperature values (Celsius, Fahrenheit, Kelvin). The output includes joules and electron volts. You will be asked to enter the value you want to convert and will receive all conversions as a result.
Details for temp_conv You will be prompted for nessecary input and the output is colored. If you want to have background information type `absolute_zero` at the command line and press enter (you must not run the script for this function). For conversion type `temp_conv` at the command line, press Enter and use one of the following options (case insensitive):
Command Option Purpose
temp_conv CF for Celsius -> Fahrenheit -> Kelvin -> Joule -> Electron Volt conversion
temp_conv FC for Fahrenheit -> Celsius -> Kelvin -> Joule -> Electron Volt conversion
temp_conv KC for Kelvin -> Celsius -> Fahrenheit -> Joule -> Electron Volt conversion
absolute_zero further information about the Third Law of Thermodynamics and more...

For example, if you have a temperature in Fahrenheit and want to convert it to Kelvin, you need to run the script and enter "fc" when prompted and press Enter. The following prompt looks like this:

Please enter a value for Fahrenheit:

Enter a value (e.g. 100) and receive the output presenting the results. It looks like this:

The conversion formula is (100°F − 32) × 5/9 and gives 37.7778°C, which is 310.928 Kelvin, 4.29283e-21 Joules and 3.60816e+06 eV.

  • title - show command in window title bar (zsh only)
  • topcmd - display frequently used commands of the current shell session or the entire command history.
  • zprofiler - profiling of the Z shell with instructions for configuration, if necessary
  • zsh_wifi_signal - shows wifi signal strength in a terminal (zsh only)

Scripts

  • zramswap - install a compressed swapfile in RAM
  • shlt - measure loading time of the shell
  • zrecompile - compile functions and dot-files, if necessary (zsh only)
  • PS4-demo - demonstrate the functionality of the PS4 prompt variable
  • what_shell - show the (sub-)shell that is currently used. usage: source what_shell (the file should live somewhere in your $PATH)

Information tools for command line

  • screenFetch - The Bash Screenshot Information Tool
  • Neofetch - command-line system information tool