Added support for a custom dmenu runner.
This commit is contained in:
parent
e1a9b14f8c
commit
d60f62f0f1
@ -3,9 +3,11 @@
|
||||
# Feed this script a link or it will get it from your clipboard and it will give dmenu
|
||||
# with some choice of programs to open the link with.
|
||||
|
||||
source $HOME/.config/dmenu/config
|
||||
|
||||
[ -z "$@" ] && link=$(xclip -o) || link="$@"
|
||||
|
||||
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | dmenu -p "Open link with what program?")" in
|
||||
case "$(printf "mpv\\nbrowser\\ncopy url\\nw3m" | $DMENU -p "Open link with what program?")" in
|
||||
mpv) "$VIDEO" "$link" ;;
|
||||
browser) "$BROWSER" "$link" > /dev/null;;
|
||||
"copy url") echo "$link" | xclip -selection clipboard ;;
|
||||
|
@ -2,6 +2,8 @@
|
||||
|
||||
# dmenu script for quickly running specific ryzenadj commands
|
||||
|
||||
source $HOME/.config/dmenu/config
|
||||
|
||||
current_temp=$(sudo ryzenadj -i | grep 'tctl-temp' | awk '{ print $6 }')
|
||||
slow_time=$(sudo ryzenadj -i | grep 'slow-time' | awk '{ print $4 }')
|
||||
|
||||
@ -11,7 +13,7 @@ slow_time=$(sudo ryzenadj -i | grep 'slow-time' | awk '{ print $4 }')
|
||||
[ "$current_temp" = "75.000" ] && current_mode="heavy programs"
|
||||
[ "$current_temp" = "85.000" ] && current_mode="heavy gaming pro"
|
||||
|
||||
case "$(printf "normal mode\\nlight gaming\\nheavy gaming\\nheavy programs\\nheavy gaming pro" | dmenu -p "Current: $current_mode")" in
|
||||
case "$(printf "normal mode\\nlight gaming\\nheavy gaming\\nheavy programs\\nheavy gaming pro" | $DMENU -p "Current: $current_mode")" in
|
||||
"normal mode") sudo ryzenadj --slow-time=30 --vrmmax-current=30000 --tctl-temp=60 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --max-performance; break ;;
|
||||
"light gaming") sudo ryzenadj --slow-time=30 --vrmmax-current=35000 --tctl-temp=65 --stapm-limit=10000 --stapm-time=300 --fast-limit=12000 --slow-limit=11000 --max-performance; break ;;
|
||||
"heavy gaming") sudo ryzenadj --slow-time=60 --vrmmax-current=60000 --tctl-temp=70 --stapm-limit=20000 --stapm-time=1000 --fast-limit=25000 --slow-limit=21000 --max-performance; break ;;
|
||||
|
Loading…
Reference in New Issue
Block a user