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:
parent
cdabbc7858
commit
4bf2ff19f4
15 changed files with 188 additions and 42 deletions
1
flatpak/Aliases/lsfpk.ps1
Normal file
1
flatpak/Aliases/lsfpk.ps1
Normal file
|
@ -0,0 +1 @@
|
|||
Get-FlatpakInstance
|
27
flatpak/Get-FlatpakInstance.ps1
Normal file
27
flatpak/Get-FlatpakInstance.ps1
Normal 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
|
14
flatpak/Kill-FlatpakInstance.ps1
Normal file
14
flatpak/Kill-FlatpakInstance.ps1
Normal 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
19
flatpak/_.package.json
Normal 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
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue