diff --git a/blocks.def/battery_button.sh b/blocks.def/battery_button.sh new file mode 100755 index 0000000..e38cadd --- /dev/null +++ b/blocks.def/battery_button.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +case "$1" in + 1) SUDO_ASKPASS=$HOME/.local/bin/dpass sudo -A "$TERMINAL" -e "powertop" ;; + 2) SUDO_ASKPASS=$HOME/.local/bin/dpass sudo -A powertop --html=$HOME/.cache/powerreport.html && xdg-open $HOME/.cache/powerreport.html ;; +esac