diff --git a/dmenu-ryzenctl b/dmenu-ryzenctl new file mode 100755 index 0000000..e61f45e --- /dev/null +++ b/dmenu-ryzenctl @@ -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" diff --git a/dmenu-transmission b/dmenu-transmission index ddf852a..fef695e 100755 --- a/dmenu-transmission +++ b/dmenu-transmission @@ -1,7 +1,7 @@ #!/bin/env bash load_config() { - source $HOME/.config/dmenu/config + source "$HOME"/.config/dmenu/config } move() { @@ -14,7 +14,7 @@ move() { "$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") @@ -22,7 +22,7 @@ move() { [ ! -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" else quick-notify "Transmission" "Couldn't move $1 to $choice" @@ -30,21 +30,26 @@ move() { } 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) - transmission-remote -t $id -rad - quick-notify "Transmission" "Removed $id" + transmission-remote -t "$id" -r + quick-notify "Transmission" "Removed $id" + ;; + Delete) + transmission-remote -t "$id" -rad + + quick-notify "Transmission" "Deleted $id" ;; Start) - transmission-remote -t $id -s + transmission-remote -t "$id" -s quick-notify "Transmission" "Started $id" ;; Stop) - transmission-remote -t $id -S + transmission-remote -t "$id" -S quick-notify "Transmission" "Stoped $id" ;; Move) - move $id + move "$id" ;; *) quick-notify "Transmission" "No action chosen" @@ -62,4 +67,4 @@ main() { menu } -main $@ +main $*