Files
winconfig/aliases.ps1
2023-01-04 19:30:40 +01:00

26 lines
934 B
PowerShell

# Öffnet die winconfig in VSC
function edit {
Set-Location ~/.winconfig/
code .
}
# Speicherplatz anzeigen lassen
function space {
Get-CimInstance -ClassName Win32_LogicalDisk | Select-Object -Property DeviceID,@{'Name' = 'FreeSpace (GB)'; Expression= { [int]($_.FreeSpace / 1GB) }}
}
# Speichert das Youtube Video als mp3 im aktuellen Ordner
function ymp3 {
yt-dlp --extract-audio --audio-format mp3 --format "bestaudio" -ffmpeg-location "C:\Program Files\ffmpeg\ffmpeg.exe"
}
# Update
function update {
Start-Process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -Verb RunAs -ArgumentList "-command allupdates | Out-Host" -Wait -WindowStyle Normal
}
# Startet das install Script
Set-Alias -name install -value "~\.winconfig\install.ps1"
# Diverses
${function:cdl} = { Set-Location ~\Downloads }
Set-Alias trash Clear-RecycleBin
function touch($file) { "" | Out-File $file -Encoding ASCII }