Author Topic: keyboard shortcuts  (Read 2648 times)

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
keyboard shortcuts
« on: April 22, 2014, 16:18:06 »
How can I pass the name of the folder to a program with a keyboard shortcut?

This version also does not work.
Code: [Select]
picard "$(dirname %f)"
« Last Edit: April 26, 2014, 14:41:06 by aboettger »

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: keyboard shortcuts
« Reply #1 on: April 26, 2014, 14:51:23 »
This works for me:

Call system command with arguments
Code: [Select]
gmb_call_picard "%f"
gmb_call_picard
Code: [Select]
#!/bin/bash -
picard "$(dirname "$1")"

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: keyboard shortcuts
« Reply #2 on: April 26, 2014, 14:57:08 »
And an other example:

Call system command with arguments
Code: [Select]
gmb_call_easytag "%f"
gmb_call_easytag
Code: [Select]
#!/bin/bash -
easytag "$(dirname "$1")"

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: keyboard shortcuts
« Reply #3 on: April 28, 2014, 01:48:33 »
It's because the command is called directly, not through a shell, you can call the shell instead by using 'bash -c "command arguments"' though quoting gets messy real fast.
Maybe I could add a "run shell command" that runs the command through the shell.

aboettger

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: keyboard shortcuts
« Reply #4 on: April 28, 2014, 02:04:33 »
The call by "bash-c "shell_command"" also works only when I start gmusicbrowser from the terminal.