Update formatting.
This commit is contained in:
parent
41754e8ad1
commit
e1c508c53b
16 changed files with 287 additions and 278 deletions
|
@ -1,47 +1,46 @@
|
|||
#!/bin/sh
|
||||
|
||||
# dmenu script for quickly setting ryzenadj profiles with my other script easily
|
||||
load_config () {
|
||||
. $HOME/.config/dmenu/config
|
||||
load_config() {
|
||||
. $HOME/.config/dmenu/config
|
||||
}
|
||||
|
||||
get_category () {
|
||||
category=$( sudo ryzenset list | $DMENU -i -p "Choose profile category:")
|
||||
get_category() {
|
||||
category=$(sudo ryzenset list | $DMENU -i -p "Choose profile category:")
|
||||
|
||||
[ -z "$category" ] && exit 0
|
||||
[ -z "$category" ] && exit 0
|
||||
}
|
||||
|
||||
get_current_profile () {
|
||||
current_mode=$(sudo ryzenset get)
|
||||
get_current_profile() {
|
||||
current_mode=$(sudo ryzenset get)
|
||||
}
|
||||
|
||||
menu () {
|
||||
while [ -z "$profile" ]
|
||||
do
|
||||
profile=$(sudo ryzenset list $category | $DMENU -i -p "Current: $current_mode:")
|
||||
menu() {
|
||||
while [ -z "$profile" ]; do
|
||||
profile=$(sudo ryzenset list $category | $DMENU -i -p "Current: $current_mode:")
|
||||
|
||||
[ -z "$profile" ] && get_category
|
||||
done
|
||||
[ -z "$profile" ] && get_category
|
||||
done
|
||||
}
|
||||
|
||||
launch_profile () {
|
||||
if sudo ryzenset set "$profile"; then
|
||||
quick-notify "Ryzenset" "Setting $profile"
|
||||
else
|
||||
quick-notify "Ryzenset" "Failed to set $game"
|
||||
fi
|
||||
launch_profile() {
|
||||
if sudo ryzenset set "$profile"; then
|
||||
quick-notify "Ryzenset" "Setting $profile"
|
||||
else
|
||||
quick-notify "Ryzenset" "Failed to set $game"
|
||||
fi
|
||||
}
|
||||
|
||||
main () {
|
||||
load_config
|
||||
main() {
|
||||
load_config
|
||||
|
||||
get_category
|
||||
get_category
|
||||
|
||||
get_current_profile
|
||||
get_current_profile
|
||||
|
||||
menu
|
||||
menu
|
||||
|
||||
launch_profile
|
||||
launch_profile
|
||||
}
|
||||
|
||||
main $@
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue