This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Restore original and remove new power scheme, if User signals interruption | |
# Restore trap necessary, otherwise script will not work in subsequent instances | |
restore () { | |
powercfg -setactive "$activescheme" 2> /dev/null | |
powercfg -delete "$newscheme" 2> /dev/null | |
} | |
trap restore SIGINT |