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
This commit is contained in:
Gal on Sygin 2022-01-29 17:48:01 -05:00
parent cdabbc7858
commit 4bf2ff19f4
15 changed files with 188 additions and 42 deletions

View file

@ -0,0 +1 @@
Get-FlatpakInstance

View file

@ -0,0 +1,27 @@
[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

View file

@ -0,0 +1,14 @@
[CmdletBinding(SupportsShouldProcess,ConfirmImpact='low')]param(
[Parameter(ValueFromPipeline,ValueFromPipelineByPropertyName,ValueFromRemainingArguments)]
[string[]]$Instance
)
BEGIN {}
PROCESS {
$Instance | ForEach-Object {
if ($PSCmdlet.ShouldProcess("$_", "Kill-FlatpackInstance")) {
Write-Verbose "Performing: flatpak kill $_"
flatpak kill $_
}
}
}

19
flatpak/_.package.json Normal file
View file

@ -0,0 +1,19 @@
{
"package": {
"Name": "flatpak",
"Condition": [
{
"custom": null,
"System": null,
"Hostname": null,
"Username": null,
"CmdletExists": null,
"ModuleExists": null,
"AppExeExists": [
"flatpak"
],
"Logic": 0
}
]
}
}