Article 6QR02 Plasma 5 global keyboard shortcut not working, how to debug?

Plasma 5 global keyboard shortcut not working, how to debug?

by
j12i
from LinuxQuestions.org on (#6QR02)
Hey!

I've adapted this script from technomancy:
Code:#!/bin/bash

# This example asks the user to pick a directory from ~/music or its
# first argument and queues up its contents via mpd. http://musicpd.org

music_home=${1:-"$HOME/music/"}

# Cache directory list
list_file="$music_home/.dirs"
if [ ! -f "$list_file" ]; then
find "$music_home" -type d | cut -c $(echo $music_home | wc -c)- > "$list_file"
fi

# Ask the user
chosen=`cat $list_file | rofi -dmenu -i`

# Add it to mpd
if [ "$chosen" != "" ]; then
pidof mpd -q || mpd
mpc clear
mpc add "$chosen"
mpc play
fiand when I run it from a Konsole window it works fine. But I've created a global shortcut from the Plasma settings menu, and when I press that shortcut, the dmenu comes up and allows me to select a folder, but after that nothing happens. Do I need to observe something when creating a shortcut like that? Is there a way I can see the error the script might throw?

This is on Slackware64 15.0, up to date. mpd, mpc and rofi from SBo.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments