Skip to content

Commit

Permalink
Merge pull request #48 from TomfromBerlin/main
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
TomfromBerlin authored Nov 26, 2024
2 parents d1ecc13 + 374b5bc commit f7d6e29
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

# Mothers Little Helpers

**Do not clone this repository, it makes no sense. You should rather stare it, because it is just a collection of tips, tricks and scripts that you may need once or only once in a while.**

## 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.
Expand All @@ -13,15 +11,46 @@ This repository is provided to you in the hope that it will be helpful, but ever

Some of the scripts may have their own license, if not, the [MIT license](https://opensource.org/license/mit/) 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

- [How to make Debian 11 (bullseye) & unbound work together](/../../../../TomfromBerlin/Debian-Pihole-Unbound)
- [How to fix incorrect scaling of KDE Plasma when using a nvidia card with propietary dirvers](helpers/kde-nvidia)

## Functions

More information and how to use shell functions can be found [here](https://zsh.sourceforge.io/Doc/Release/Functions.html).

- [allcolors](helpers/scripts/functions/allcolors) - shows the escape sequences for colors in the terminal
- [chpwd](helpers/scripts/functions/chpwd) - auto-ls after each directory change (zsh only)
- [temp_conv](helpers/scripts/functions/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><summary>Details for temp_conv</summary>
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.`

</details>

- [title](helpers/scripts/funtions/title) - show command in window title bar (zsh only)
- [topcmd](helpers/scripts/functions/topcmd) - display frequently used commands of the current shell session or the entire command history.
- [zprofiler](helpers/scripts/zprofiler) - profiling of the Z shell with instructions for configuration, if necessary
Expand Down
2 changes: 1 addition & 1 deletion helpers/scripts/shlt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Example:

`shlt 10` will start the active shell 10 times as a subshell and exit to parent shell.

It is just a one-liner:
It is just an one-liner:

```
if [[ -z $1 ]]; then time $SHELL -i -c exit; else for i in {1..$1}; do time $SHELL -i -c exit; done; fi
Expand Down

0 comments on commit f7d6e29

Please sign in to comment.