Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/horacehylee/shutd
Auto shutdown utility tool for Windows with popup and snooze features
https://github.com/horacehylee/shutd
golang shutdown shutdown-helper shutdown-manager shutdown-timer snooze windows
Last synced: 29 days ago
JSON representation
Auto shutdown utility tool for Windows with popup and snooze features
- Host: GitHub
- URL: https://github.com/horacehylee/shutd
- Owner: horacehylee
- License: mit
- Created: 2022-02-02T11:38:46.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-01T07:51:41.000Z (about 2 years ago)
- Last Synced: 2024-06-21T02:15:50.445Z (6 months ago)
- Topics: golang, shutdown, shutdown-helper, shutdown-manager, shutdown-timer, snooze, windows
- Language: Go
- Homepage:
- Size: 355 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🛑 Shutd
> Auto shutdown utility tool for Windows with popup and snooze features
![Screenshot](./screenshot.png)
## 🔨 Build
`-ldflags -H=windowsgui` compile flags is to avoid opening a console at application startup
```
go install -ldflags -H=windowsgui ./cmd/shutd
```## 🛠Usage
If wanted to run it sliently (i.e. without any console popup) at start up, you may do the following
(Not sure why simply running `shutd.exe` in Startup with `-ldflags -H=windowsgui` could not trigger the shutdown properly)
1. Create a `shutd.vbs` at any folder
```
Set WshShell = CreateObject("WScript.Shell")
gopath = WshShell.ExpandEnvironmentStrings("%GOPATH%")
WshShell.Run chr(34) & gopath & "\bin\shutd.exe" & Chr(34), 0
Set WshShell = Nothing
```2. Create a shortcut and choose `shutd.vbs` that you created as target
3. Move the shortcut to start up folder, simply search `Startup` from Windows explorer
4. You should be able to see `shutd.exe` running in task manager next time when it starts up
## âš™ Configuration
Following set of default configurations will be generated under home directory `%USERPROFILE%/.shutd.yaml`
Feel free to tweak it for your liking
After updated the configuration, `shutd` will automatically pick up the latest config, no need to restart it manually
```yaml
startTime: "01:00"
snoozeInterval: 15
notification:
before: 10
duration: 10
```| Property | Default Value | Remarks |
| ----------------------- | ------------- | ------------------------------------------------------------------- |
| `startTime` | "01:00" | Time for auto shutdown |
| `snoozeInterval` | 15 | Minutes that will snooze for shutdown |
| `notification.before` | 10 | Minutes before shutdown for snooze popup notification |
| `notification.duration` | 10 | Minutes for snnoze popup notification to default to not snooze |## 📃 Logging
Log file will be generated under you home directory `%USERPROFILE%/.shutd.log`
Troubleshoot error there if wanted
## 🚢 Release
```
go install github.com/mitchellh/gox@latestgox -os=windows -ldflags -H=windowsgui -output ./build/{{.Dir}}_{{.OS}}_{{.Arch}} ./cmd/shutd
```## 📜 License
Distributed under the MIT License. See [LICENSE](./LICENSE) for more information.