Compare commits
No commits in common. "ad07f55ac6fa4b89e91651ee628ab634909013fa" and "11ac914eea1a834abd534b8b63e0a20ab7b5ff93" have entirely different histories.
ad07f55ac6
...
11ac914eea
@ -3,7 +3,6 @@
|
||||
{{- $category := promptString "Server category" -}}
|
||||
{{- $color := promptString "Prompt color (see https://unix.stackexchange.com/questions/269077/tput-setaf-color-table-how-to-determine-color-codes)" -}}
|
||||
{{- $vimexec := promptString "Which vi executable to use? (vi, vim, nvim)" -}}
|
||||
{{- $promptType := promptString "Which prompt to use? (starship, oh-my-posh, none)" -}}
|
||||
[data]
|
||||
name = "{{ $name }}"
|
||||
email = "{{ $email }}"
|
||||
@ -11,4 +10,3 @@
|
||||
|
||||
bash.prompt.category = "{{ $category }}"
|
||||
bash.prompt.color = "{{ $color }}"
|
||||
bash.prompt.type = "{{ $promptType }}"
|
||||
|
||||
@ -1,6 +1,4 @@
|
||||
{{ if eq .bash.prompt.type "oh-my-posh" }}
|
||||
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\atomic.omp.json" | Invoke-Expression
|
||||
{{ end }}
|
||||
|
||||
function Get-LastN {
|
||||
param (
|
||||
@ -23,20 +21,6 @@ function Net-Cat() {
|
||||
Test-NetConnection -ComputerName $computerName -Port $port -InformationLevel Detailed
|
||||
}
|
||||
|
||||
# History with search
|
||||
function hist {
|
||||
$find = $args
|
||||
Write-Host "Finding in full history using {`$_ -like `"*$find*`"}"
|
||||
Get-Content (Get-PSReadlineOption).HistorySavePath | ? {$_ -like "*$find*"} | Get-Unique | more
|
||||
}
|
||||
# Reverse History Search
|
||||
# Found at https://stackoverflow.com/questions/62883762/powershell-bind-arrow-keys-to-command-history-search
|
||||
#
|
||||
# Set-PSReadlineKeyHandler will list all mapped keys
|
||||
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
|
||||
Set-PSReadlineKeyHandler -Key PageUp -Function HistorySearchBackward
|
||||
Set-PSReadlineKeyHandler -Key PageDown -Function HistorySearchForward
|
||||
|
||||
# Navigate one directory up
|
||||
function Go-One-Level-Up {
|
||||
cd ..
|
||||
@ -54,12 +38,3 @@ Set-Alias ... Go-Two-Levels-Up
|
||||
# More Aliases
|
||||
Set-Alias vi nvim
|
||||
Set-Alias vim nvim
|
||||
Set-Alias ll dir
|
||||
|
||||
function gg {
|
||||
git graph
|
||||
}
|
||||
|
||||
{{ if eq .bash.prompt.type "starship" }}
|
||||
Invoke-Expression (&starship init powershell)
|
||||
{{ end }}
|
||||
|
||||
@ -16,7 +16,7 @@ function backup
|
||||
|
||||
function forget
|
||||
{
|
||||
restic forget --keep-daily 2 --keep-weekly 2 --keep-monthly 5
|
||||
restic --keep-daily 2 --keep-weekly 2 --keep-monthly 5
|
||||
}
|
||||
|
||||
function list()
|
||||
@ -30,5 +30,4 @@ switch($action) {
|
||||
"list" { list }
|
||||
"snapshots" { restic snapshots }
|
||||
"stats" { restic stats }
|
||||
default { Write-Host "xxx" }
|
||||
}
|
||||
|
||||
@ -17,7 +17,6 @@ $kubernetes\
|
||||
[](fg:#212736 bg:#1d2230)\
|
||||
$time\
|
||||
[ ](fg:#1d2230)\
|
||||
$battery \
|
||||
\n$character"""
|
||||
|
||||
[os]
|
||||
@ -96,25 +95,6 @@ style = "fg:#769ff0 bg:#212736"
|
||||
format = '[[ $symbol $context \($namespace\)](fg:#769ff0 bg:#212736)]($style)'
|
||||
disabled = false
|
||||
|
||||
[battery]
|
||||
#full_symbol = '🔋 '
|
||||
#charging_symbol = '⚡️ '
|
||||
#discharging_symbol = '💀 '
|
||||
#style = "bg:#1d2230"
|
||||
#format = '[[$symbol$percentage](bg:#1d2230)]($style) '
|
||||
|
||||
[[battery.display]]
|
||||
threshold = 30
|
||||
style = 'bold red'
|
||||
|
||||
[[battery.display]]
|
||||
threshold = 50
|
||||
style = 'bold yellow'
|
||||
|
||||
[[battery.display]]
|
||||
threshold = 80
|
||||
style = 'bold green'
|
||||
|
||||
[custom.category]
|
||||
command = 'echo "[{{ .bash.prompt.category }}]"'
|
||||
when = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user