From 944eae8eda53029f3adc73092b5ce43159c76ae1 Mon Sep 17 00:00:00 2001 From: Joachim Kaufmann Date: Fri, 20 Jan 2023 12:23:09 +0100 Subject: [PATCH] Windows Terminal hints --- README.md | 35 ++++++++++++++++------- install.sh => install-wsl.sh | 0 run-wsl.sh | 17 +++++++++++ terminal/Microsoft.PowerShell_profile.ps1 | 1 + 4 files changed, 42 insertions(+), 11 deletions(-) rename install.sh => install-wsl.sh (100%) mode change 100755 => 100644 create mode 100644 run-wsl.sh create mode 100644 terminal/Microsoft.PowerShell_profile.ps1 diff --git a/README.md b/README.md index d546f71..a40b146 100644 --- a/README.md +++ b/README.md @@ -24,17 +24,6 @@ sudo apt install gcc sudo apt install ripgrep sudo apt-get install fd-find ``` - -### Windows Terminal - -Install a Nerd font on the OS: - -https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup - -https://www.nerdfonts.com/font-downloads - -Configure this new font within Windows Terminal Settings. - ### Using Windows Clipboard with Neovim https://github.com/neovim/neovim/wiki/FAQ#how-to-use-the-windows-clipboard-from-wsl @@ -59,3 +48,27 @@ vim.g.clipboard = { cache_enabled = false } ``` + +## Windows Terminal + +### Install a Nerd font on the OS: + +https://learn.microsoft.com/en-us/windows/terminal/tutorials/custom-prompt-setup + +https://www.nerdfonts.com/font-downloads + +Configure this new font within Windows Terminal Settings. + +### Customize PowerShell-Prompt with "Oh My Posh" + +https://learn.microsoft.com/de-de/windows/terminal/tutorials/custom-prompt-setup + +An example powershell profile file can be found in "terminal/Microsoft.PowerShell_profile.ps1". + +### Powershell Profile + +The currently used profile path is stored with the system variable "$PROFILE". + +https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.3 + + diff --git a/install.sh b/install-wsl.sh old mode 100755 new mode 100644 similarity index 100% rename from install.sh rename to install-wsl.sh diff --git a/run-wsl.sh b/run-wsl.sh new file mode 100644 index 0000000..7b90e1e --- /dev/null +++ b/run-wsl.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $(/etc/init.d/apache2 status | grep -v grep | grep 'apache2 is running' | wc -l) > 0 ] +then + + echo "Apache is currently running." + + sudo service apache2 stop + sudo service apache2 start + +else + + echo "Apache is not running." + + sudo service apache2 start +fi + diff --git a/terminal/Microsoft.PowerShell_profile.ps1 b/terminal/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..46f0077 --- /dev/null +++ b/terminal/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1 @@ +oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\catppuccin_frappe.omp.json" | Invoke-Expression \ No newline at end of file