Skip to content

Commit

Permalink
fix(power-mode): add hint message
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed May 17, 2022
1 parent 021be2a commit 01d71d9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion addons/power-mode/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ commas.context.provide('cli', {
command: 'power',
async handler({ argv }, event) {
const [status] = argv
event.sender.send('toggle-power-mode', status !== 'off')
const enabled = status !== 'off'
event.sender.send('toggle-power-mode', enabled)
if (enabled) {
return `
Power mode is turned on. Enter
commas power off
to exit power mode.
`.trim()
}
},
})

0 comments on commit 01d71d9

Please sign in to comment.