Skip to content

Commit 81bc6d5

Browse files
committed
update: Add Windows Shutdown Prompt
1 parent 21c4884 commit 81bc6d5

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/main/kotlin/Main.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package io.github.amirisback
22

33
fun main() {
4-
showText("ABCDEFGHIJKLMNOPQRSTUVWQYZ")
4+
runPrompt(PROMPT_SHUTDOWN_SET)
55
}

src/main/kotlin/WindowsPrompt.kt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package io.github.amirisback
2+
3+
fun runPrompt(rule: String) {
4+
Runtime.getRuntime().exec(rule)
5+
}
6+
7+
const val PROMPT_SHUTDOWN_SET = "shutdown -s -t 3600"
8+
const val PROMPT_SHUTDOWN_CANCEL = "shutdown -a"

0 commit comments

Comments
 (0)