diff --git a/scripts/README.md b/scripts/README.md index a1f7d53..42fc6bb 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -19,7 +19,6 @@ else mkdir -p ~/.local git clone https://gitea.quad.moe/quad/win3-resources.git ~/.local/gpd-win3 echo -e "\n# GPD Win 3 scripts\nPATH=\"\${PATH}:\${HOME}/.local/gpd-win3/scripts\"" >> ~/.bashrc - echo "tdp check" >> ~/.bashrc printf "$(tput setaf 2)-- Install finished. Please open a new terminal to use the scripts --$(tput sgr0)\n" fi ``` @@ -102,4 +101,17 @@ Example commands: ```bash # Reload touchscreen module touch-fix -``` \ No newline at end of file +``` + +## GPD Prompt + +This is a customized version of my bash prompt that adds a TDP display after the hostname: + +![../img/gpd-prompt.png] + +This script collection must be installed for it to work. +To use it, open your `~/.bashrc` file and add the following line: + +``` +source gpd-prompt +``` diff --git a/scripts/gpd-prompt b/scripts/gpd-prompt new file mode 100755 index 0000000..cdf030b --- /dev/null +++ b/scripts/gpd-prompt @@ -0,0 +1,5 @@ +function set_gpd_prompt() { + export PS1="\[\e[1;32m\]\h ($(tdp check | cut -d ' ' -f3))\[\e[m\] - \[\e[1;31m\]\u\[\e[m\] - \[\e[1;34m\]\W\[\e[m\] \\$ " +} + +PROMPT_COMMAND=set_gpd_prompt