Files
winconfig/aliases.ps1
2023-08-18 12:35:59 +02:00

48 lines
1.2 KiB
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"
}
function mp4merge {
mp4merge.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 }
# CD zum Download Ordner
function cdd {
Set-Location ~/downloads
}
# Offene Ports anzeigen
function ports {
netstat -an | Select-String ABHÖREN
}
# PWD replacement
function pwd {
Get-Location
}
# touch replacement
function pwd {
New-Item
}