-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsomnia.nuspec
71 lines (56 loc) · 5.38 KB
/
insomnia.nuspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>insomnia</id>
<version>1.1.0.0</version>
<packageSourceUrl>https://github.com/brogers5/chocolatey-package-insomnia/tree/v1.1.0.0</packageSourceUrl>
<owners>sublym0nal</owners>
<title>Insomnia (Native)</title>
<authors>David Anson</authors>
<projectUrl>https://dlaa.me/Insomnia/</projectUrl>
<iconUrl>https://cdn.jsdelivr.net/gh/brogers5/chocolatey-package-insomnia@fcb4dc80f3f7db8ad5290e1732791c36f0f0ef55/insomnia.png</iconUrl>
<copyright>Copyright (C) David L. A. Anson 2010-2011</copyright>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<tags>insomnia sleep s3 hibernate s4 power utility portable foss</tags>
<summary>A simple utility to temporarily stop your computer from going to sleep.</summary>
<description><![CDATA[
---
### [choco://insomnia](choco://insomnia)
To use choco:// protocol URLs, install [(unofficial) choco:// Protocol support ](https://community.chocolatey.org/packages/choco-protocol-support)
---
---
### Looking for the .NET version? Check out the [insomnia-dotnet](https://community.chocolatey.org/packages/insomnia-dotnet) package!
---
# Insomnia
The default power settings for Windows are configured so a computer will go to sleep after 15-30 minutes of inactivity (e.g., no mouse or keyboard input). This is great because a computer that's not being used doesn't need to be running at full power. By letting an idle machine enter sleep mode, the user benefits from a significant reduction in electricity use, heat generation, component wear, etc.. And because sleep preserves the state of everything in memory, it's quick to enter, quick to exit, and doesn't affect your workflow. All the same applications continue running, windows stay open and where they were, and so on. Sleep mode is a *Good Thing*.
But sometimes a computer is busy even though you aren't using the mouse and keyboard; common examples include playing a movie, burning a DVD, streaming music, etc.. In these cases, you do **not** want the machine to go to sleep because you're using it - even though you're not *actually* using it! So most media players and disc burners tell Windows not to go to sleep while they're running. In fact, there's a dedicated API for exactly this purpose: the [SetThreadExecutionState Win32 Function](https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setthreadexecutionstate).
But what about those times when the computer is doing something useful and the relevant program does not suppress the default sleep behavior? It might be downloading a large file, re-encoding a music collection, or backing up the hard drive, for example. In times like this, you don't want the machine to go to sleep **right now**, but are otherwise happy with the default sleep behavior. Unfortunately, the easiest way to temporarily suppress sleeping is to go to Control Panel, open the Power Options page, change the power plan settings, commit them - and then remember to undo everything when you're done. It's not hard; but it's kind of annoying...
![Insomnia Screenshot](https://cdn.jsdelivr.net/gh/brogers5/chocolatey-package-insomnia@fcb4dc80f3f7db8ad5290e1732791c36f0f0ef55/Screenshot.png)
**Insomnia makes it better!** Insomnia is a simple program that calls the `SetThreadExecutionState` API to disable sleep mode for as long as it's running. Closing the Insomnia window immediately returns to whatever sleep mode was in effect before it was run. Yes, it's that simple!
**Aside:** To be clear, the *display* can still go to sleep and power off - it's just sleep for the *computer* that is blocked. Similarly, if you *tell* the machine to go to sleep by hitting the power button, it will still do so.
## Package Parameters
* `/NoShim` - Opt out of creating a GUI shim.
* `/NoDesktopShortcut` - Opt out of creating a Desktop shortcut.
* `/NoProgramsShortcut` - Opt out of creating a Programs shortcut in your Start Menu.
* `/Start` - Automatically start Insomnia after installation completes.
## Package Notes
The software's author recommends using the 32-bit binary, due to its universal compatibility with modern consumer versions of Windows and consuming the fewest system resources. However, the package will default to consuming the 64-bit binary on a 64-bit OS. If you'd prefer to adopt the author's recommendation, be sure to use the `--forcex86` switch when installing.
---
For future upgrade operations, consider opting into Chocolatey's `useRememberedArgumentsForUpgrades` feature to avoid having to pass the same arguments with each upgrade:
```
choco feature enable -n=useRememberedArgumentsForUpgrades
```
]]></description>
<releaseNotes>https://dlaa.me/blog/post/10144913</releaseNotes>
</metadata>
<files>
<file src="tools\chocolateybeforemodify.ps1" target="tools" />
<file src="tools\chocolateyinstall.ps1" target="tools" />
<file src="tools\chocolateyuninstall.ps1" target="tools" />
<file src="tools\Insomnia.zip" target="tools" />
<file src="tools\LICENSE.txt" target="tools" />
<file src="tools\VERIFICATION.txt" target="tools" />
</files>
</package>