Update scripts.
This commit is contained in:
parent
e1c508c53b
commit
f58138fca7
7
dmenu-ryzenctl
Executable file
7
dmenu-ryzenctl
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. $HOME/.config/dmenu/config
|
||||||
|
profile=$(cat /tmp/ryzenadj-service.profile)
|
||||||
|
new=$(printf "normal\\nperformance\\nmax-performance" | dmenu -p "Currently $profile: ")
|
||||||
|
[ "$new" = "" ] && exit
|
||||||
|
ryzenctl $new && quick-notify "RyzenCTL" "$new started"
|
@ -1,7 +1,7 @@
|
|||||||
#!/bin/env bash
|
#!/bin/env bash
|
||||||
|
|
||||||
load_config() {
|
load_config() {
|
||||||
source $HOME/.config/dmenu/config
|
source "$HOME"/.config/dmenu/config
|
||||||
}
|
}
|
||||||
|
|
||||||
move() {
|
move() {
|
||||||
@ -14,7 +14,7 @@ move() {
|
|||||||
"$HOME/games/torrents"
|
"$HOME/games/torrents"
|
||||||
)
|
)
|
||||||
|
|
||||||
current=$(transmission-remote -t $1 -i | grep -i location | awk '{print $2}')
|
current=$(transmission-remote -t "$1" -i | grep -i location | awk '{print $2}')
|
||||||
|
|
||||||
choice=$(printf '%s\n' "${paths[@]}" | $DMENU -i -p "Current: $current")
|
choice=$(printf '%s\n' "${paths[@]}" | $DMENU -i -p "Current: $current")
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ move() {
|
|||||||
|
|
||||||
[ ! -d "$choice" ] && mkdir -p "$choice"
|
[ ! -d "$choice" ] && mkdir -p "$choice"
|
||||||
|
|
||||||
if transmission-remote -t $1 --move $choice; then
|
if transmission-remote -t "$1" --move "$choice"; then
|
||||||
quick-notify "Transmission" "Moved $1 to $choice"
|
quick-notify "Transmission" "Moved $1 to $choice"
|
||||||
else
|
else
|
||||||
quick-notify "Transmission" "Couldn't move $1 to $choice"
|
quick-notify "Transmission" "Couldn't move $1 to $choice"
|
||||||
@ -30,21 +30,26 @@ move() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
menu() {
|
menu() {
|
||||||
case "$(printf "Start\\nStop\\nMove\\nRemove" | $DMENU -i -p "Torrent Action: ")" in
|
case "$(printf "Start\\nStop\\nMove\\nRemove\\nDelete" | $DMENU -i -p "Torrent Action: ")" in
|
||||||
Remove)
|
Remove)
|
||||||
transmission-remote -t $id -rad
|
transmission-remote -t "$id" -r
|
||||||
quick-notify "Transmission" "Removed $id"
|
quick-notify "Transmission" "Removed $id"
|
||||||
|
;;
|
||||||
|
Delete)
|
||||||
|
transmission-remote -t "$id" -rad
|
||||||
|
|
||||||
|
quick-notify "Transmission" "Deleted $id"
|
||||||
;;
|
;;
|
||||||
Start)
|
Start)
|
||||||
transmission-remote -t $id -s
|
transmission-remote -t "$id" -s
|
||||||
quick-notify "Transmission" "Started $id"
|
quick-notify "Transmission" "Started $id"
|
||||||
;;
|
;;
|
||||||
Stop)
|
Stop)
|
||||||
transmission-remote -t $id -S
|
transmission-remote -t "$id" -S
|
||||||
quick-notify "Transmission" "Stoped $id"
|
quick-notify "Transmission" "Stoped $id"
|
||||||
;;
|
;;
|
||||||
Move)
|
Move)
|
||||||
move $id
|
move "$id"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
quick-notify "Transmission" "No action chosen"
|
quick-notify "Transmission" "No action chosen"
|
||||||
@ -62,4 +67,4 @@ main() {
|
|||||||
menu
|
menu
|
||||||
}
|
}
|
||||||
|
|
||||||
main $@
|
main $*
|
||||||
|
Loading…
Reference in New Issue
Block a user