winutil/functions/private/Invoke-WinUtilSnapFlyout.ps1
Chris Titus bf271b89e9
Test 2024 01 15 (#1456)
* File Converter

* Adding wiki directory where we can start storing all the wikis for now (#1405)

* change logseq url and add .net 8 (#1385)

* Update applications.json

Add Official logseq url 
Add .net runtime 8.0

* compile with new logseq and .net 8 runtime

* add thorium avx2

* Compile Winutil

* Anoter one of those huge PRs
- Fix version inefficiency the version is already stored in sync, no need to slow down loading by one extra replace.
- Created custom dialog and About message
- Create a menu with Import/Export values
	- press on teh Settings cog in the right upper corner and save all the checkboxes
	- then you can either load them or load and run automatically
- Made Import Export load accross the whole app
- Optimized the way checkbox controls are looked up, it is 20% faster now
- Added a switch to load all the boxes from a config file
	- example: .winutil.ps1 -Config "C:UsersasdfDesktop\111.json"
- Added a switch to run all the action in unattended mode by passing -Run siwthc
	- example: .winutil.ps1 -Config "C:UsersasdfDesktop\111.json" -Run
	- This will run all the tweaks and install all the apps

* Fixing a couple of bugs and blur fonts, also menu now closes when focus is lost

* Remove Cider Music Player (#1400)

* Update winutil.ps1

* Update applications.json

* Compile Winutil

* Checking in wiki files. Once you get wiki going you will be able to just copy this content to the wiki. Or leave it as-is, which maybe better because than the community could edit it

* Adding microwin usage error wiki

* fixing link the the new wiki location

* Adding automation section to the readme

* Fixing doc errors

* Adding conda and a couple or tools used by scientists, also fixing a nesty bug with winget if you don't specify scope=machine tools like python will not work correctly

* fix application mismatch

* Update applications.json

---------

Co-authored-by: Cristian Negulescu <cristian@clamsen.com>
Co-authored-by: Chris Titus <dfm.titus@gmail.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Tommi Pöntinen <98650216+hamburgerghini1@users.noreply.github.com>
Co-authored-by: Chris Titus <contact@christitus.com>

* Compile Winutil

* remove files application (#1408)

* Update README.md (#1421)

* Compile Winutil

* Update links, descriptions + add choco id for twinkle tray (#1426)

* update twinkle tray

* update wingetui

* update wisetoys link

* update floorp link

* Compile Winutil

* Add some useful programs and fix an app's url (#1427)

* fix the link for strawberry music player

The existing one opens a python library

* feat: add some useful apps

* changed the link in the wrong place

* Compile Winutil

* Added new toggle tweak button (#1434)

* add new ToggleSwitch

* add new function to disable/enable toggle button

* add new name of the button for the given toggle

* added new toggle tweak

* Compile Winutil

* Feat: Add Microsoft Power BI program (#1438)

* Compile Winutil

* Fix Fredium App Link (#1440)

* Update applications.json (#1448)

Updated the link to Prism Launcher to point to the correct url

* Compile Winutil

* fix for bug with selecting presets and toggle switches (#1447)

* Update Invoke-WPFPresets.ps1

* Update Invoke-WPFPresets.ps1

* Compile Winutil

* Update winutil.ps1

---------

Co-authored-by: KonTy <9524513+KonTy@users.noreply.github.com>
Co-authored-by: Cristian Negulescu <cristian@clamsen.com>
Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com>
Co-authored-by: KonTy <KonTy@github.com>
Co-authored-by: Tommi Pöntinen <98650216+hamburgerghini1@users.noreply.github.com>
Co-authored-by: Munkk <152475628+munkk01@users.noreply.github.com>
Co-authored-by: DeveloperDurp <developerdurp@durp.info>
Co-authored-by: OmriOn <76548146+OmriOn@users.noreply.github.com>
Co-authored-by: Keshav S <55992029+Keshav13142@users.noreply.github.com>
Co-authored-by: Vuk Lekić <vuklekic22@gmail.com>
Co-authored-by: André Gonzalez <lopescg@gmail.com>
Co-authored-by: playgroundsskiff <149293245+playgroundsskiff@users.noreply.github.com>
Co-authored-by: BusterBean <73446417+BusterBean@users.noreply.github.com>
2024-01-25 14:44:51 -06:00

34 lines
1.2 KiB
PowerShell

function Invoke-WinUtilSnapFlyout {
<#
.SYNOPSIS
Disables/Enables Snap Assist Flyout on startup
.PARAMETER Enabled
Indicates whether to enable or disable Snap Assist Flyout on startup
#>
Param($Enabled)
Try{
if ($Enabled -eq $false){
Write-Host "Enabling Snap Assist Flyout On startup"
$value = 1
}
else {
Write-Host "Disabling Snap Assist Flyout On startup"
$value = 0
}
# taskkill.exe /F /IM "explorer.exe"
$Path = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
taskkill.exe /F /IM "explorer.exe"
Set-ItemProperty -Path $Path -Name EnableSnapAssistFlyout -Value $value
Start-Process "explorer.exe"
}
Catch [System.Security.SecurityException] {
Write-Warning "Unable to set $Path\$Name to $Value due to a Security Exception"
}
Catch [System.Management.Automation.ItemNotFoundException] {
Write-Warning $psitem.Exception.ErrorRecord
}
Catch{
Write-Warning "Unable to set $Name due to unhandled exception"
Write-Warning $psitem.Exception.StackTrace
}
}