PowerShell_Scripts/flatpak/Get-FlatpakInstance.ps1
Gal on Sygin 4bf2ff19f4 A lot of changes
+ PowerLine prompt now shows degraded systemctl state (When Apllicable)
+ Get-PlexInfo notifies if PLEX creds are needed and are missing
+ XDG env are setup if missing on linux
+ vi/vim command will launch editor, but prefer vi/vim/nvim if exists
+ new chezmoi package: auto loading completion
+ new flatpak package: List and Kill commands added
+ new zfs package: zls command added
2022-01-29 17:52:59 -05:00

27 lines
724 B
PowerShell

[CmdletBinding()]param(
[string[]]$Instance, [string[]]$Application, [string[]]$Runtime
)
$local:cols = [ordered]@{
'instance'= 'Instance'
'pid'= 'PID'
'application'= 'Application'
'runtime' = 'Runtime'
}
$local:paks = @(
$($cols.Values -join "`t")) + $(
flatpak ps "--columns=$($cols.Keys -join ',')"
) -join "`n" |
ConvertFrom-Csv -Delimiter "`t" |
Where-Object {
$local:p = $_
(-not $Instance -or $( $_ -in $Instance )
) -and (-not $Application -or $(
$Application | Where-Object { $($p.Application) -match $_ }
)) -and (-not $Runtime -or $(
$Runtime | Where-Object { $($p.Runtime) -match $_ }
))
}
$paks