mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-16 01:40:35 -06:00
fixes
- ability to set no overlay added - added relative path to winutildir
This commit is contained in:
parent
c490cbff1a
commit
f50845078e
@ -20,11 +20,13 @@ function Set-WinUtilTaskbaritem {
|
|||||||
- Set-WinUtilTaskbaritem -state "Paused"
|
- Set-WinUtilTaskbaritem -state "Paused"
|
||||||
|
|
||||||
.PARAMETER overlay
|
.PARAMETER overlay
|
||||||
Overlay icon to display on the taskbar item, there are the presets 'logo' and 'checkmark' or you can specify a path/link to an image file.
|
Overlay icon to display on the taskbar item, there are the presets 'None', 'logo' and 'checkmark' or you can specify a path/link to an image file.
|
||||||
CTT logo preset:
|
CTT logo preset:
|
||||||
- Set-WinUtilTaskbaritem -overlay "logo"
|
- Set-WinUtilTaskbaritem -overlay "logo"
|
||||||
Checkmark preset:
|
Checkmark preset:
|
||||||
- Set-WinUtilTaskbaritem -overlay "checkmark"
|
- Set-WinUtilTaskbaritem -overlay "checkmark"
|
||||||
|
No overlay:
|
||||||
|
- Set-WinUtilTaskbaritem -overlay "None"
|
||||||
Custom icon:
|
Custom icon:
|
||||||
- Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
|
- Set-WinUtilTaskbaritem -overlay "C:\path\to\icon.png"
|
||||||
|
|
||||||
@ -62,6 +64,9 @@ function Set-WinUtilTaskbaritem {
|
|||||||
'checkmark' {
|
'checkmark' {
|
||||||
$sync["Form"].taskbarItemInfo.Overlay = (ConvertTo-Bitmap -image $winutildir["checkmark.png"])
|
$sync["Form"].taskbarItemInfo.Overlay = (ConvertTo-Bitmap -image $winutildir["checkmark.png"])
|
||||||
}
|
}
|
||||||
|
'None' {
|
||||||
|
$sync["Form"].taskbarItemInfo.Overlay = $null
|
||||||
|
}
|
||||||
default {
|
default {
|
||||||
if (Test-Path $overlay) {
|
if (Test-Path $overlay) {
|
||||||
$sync["Form"].taskbarItemInfo.Overlay = (ConvertTo-Bitmap -image $overlay)
|
$sync["Form"].taskbarItemInfo.Overlay = (ConvertTo-Bitmap -image $overlay)
|
||||||
|
@ -434,14 +434,14 @@ $sync["SearchBar"].Add_TextChanged({
|
|||||||
$winutildir = @{}
|
$winutildir = @{}
|
||||||
|
|
||||||
# Set the path for the winutil directory
|
# Set the path for the winutil directory
|
||||||
$winutildir["path"] = "$env:LOCALAPPDATA\winutil"
|
$winutildir["path"] = "$env:LOCALAPPDATA\winutil\"
|
||||||
if (-NOT (Test-Path -Path $winutildir["path"])) {
|
if (-NOT (Test-Path -Path $winutildir["path"])) {
|
||||||
New-Item -Path $winutildir["path"] -ItemType Directory
|
New-Item -Path $winutildir["path"] -ItemType Directory
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set the path for the logo and checkmark images
|
# Set the path for the logo and checkmark images
|
||||||
$winutildir["logo.png"] = "$env:LOCALAPPDATA\winutil\cttlogo.png"
|
$winutildir["logo.png"] = $winutildir["path"] + "cttlogo.png"
|
||||||
$winutildir["logo.ico"] = "$env:LOCALAPPDATA\winutil\cttlogo.ico"
|
$winutildir["logo.ico"] = $winutildir["path"] + "cttlogo.ico"
|
||||||
if (-NOT (Test-Path -Path $winutildir["logo.png"])) {
|
if (-NOT (Test-Path -Path $winutildir["logo.png"])) {
|
||||||
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile $winutildir["logo.png"]
|
Invoke-WebRequest -Uri "https://christitus.com/images/logo-full.png" -OutFile $winutildir["logo.png"]
|
||||||
}
|
}
|
||||||
@ -449,6 +449,7 @@ if (-NOT (Test-Path -Path $winutildir["logo.png"])) {
|
|||||||
if (-NOT (Test-Path -Path $winutildir["logo.ico"])) {
|
if (-NOT (Test-Path -Path $winutildir["logo.ico"])) {
|
||||||
ConvertTo-Icon -bitmapPath $winutildir["logo.png"] -iconPath $winutildir["logo.ico"]
|
ConvertTo-Icon -bitmapPath $winutildir["logo.png"] -iconPath $winutildir["logo.ico"]
|
||||||
}
|
}
|
||||||
|
|
||||||
$winutildir["checkmark.png"] = "$env:LOCALAPPDATA\winutil\cttcheckmark.png"
|
$winutildir["checkmark.png"] = "$env:LOCALAPPDATA\winutil\cttcheckmark.png"
|
||||||
if (-NOT (Test-Path -Path $winutildir["checkmark.png"])) {
|
if (-NOT (Test-Path -Path $winutildir["checkmark.png"])) {
|
||||||
Invoke-WebRequest -Uri "https://christitus.com/images/checkmark.png" -OutFile $winutildir["checkmark.png"]
|
Invoke-WebRequest -Uri "https://christitus.com/images/checkmark.png" -OutFile $winutildir["checkmark.png"]
|
||||||
|
Loading…
Reference in New Issue
Block a user