add sudo.

This commit is contained in:
CronyAkatsuki 2022-10-04 20:00:31 +02:00
parent daeb39954f
commit 07c88bb41b

View File

@ -5,14 +5,14 @@
source $HOME/.config/dmenu/config
get_category () {
category=$( ryzenset list | $DMENU -p "Choose profile category:")
category=$( sudo ryzenset list | $DMENU -p "Choose profile category:")
[ -z "$category" ] && exit 0
}
get_category
current_temp=$(sudo $HOME/bin/chad/get-tctl-limit)
current_temp=$(sudo get-tctl-limit)
[ "$current_temp" = "60" ] && current_mode="normal mode"
[ "$current_temp" = "65" ] && current_mode="light gaming"
@ -23,12 +23,12 @@ current_temp=$(sudo $HOME/bin/chad/get-tctl-limit)
while [ -z "$profile" ]
do
profile=$(ryzenset list $category | $DMENU -p "Current: $current_mode:")
profile=$(sudo ryzenset list $category | $DMENU -p "Current: $current_mode:")
[ -z "$profile" ] && get_category
done
if ryzenset set "$profile"; then
if sudo ryzenset set "$profile"; then
quick-notify "Ryzenset" "Setting $profile"
else
quick-notify "Ryzenset" "Failed to set $game"