View previous topic :: View next topic |
Author |
Message |
awyrennwr n00b
Joined: 25 Sep 2014 Posts: 2 Location: United Kingdom
|
Posted: Fri Oct 03, 2014 9:35 pm Post subject: [SOLVED] Running programs with options as default |
|
|
I need to run anki with the option -b so that the default folder location changes to where I want it to be. I tried to set an alias which works when launching from a terminal but does not work when using dmenu in i3.
Is there a way I can get anki to always run with the -b option when opening it from dmenu?
Last edited by awyrennwr on Sat Oct 04, 2014 9:05 am; edited 1 time in total |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Sat Oct 04, 2014 1:09 am Post subject: Re: Running programs with options as default |
|
|
awyrennwr wrote: | I need to run anki with the option -b so that the default folder location changes to where I want it to be. I tried to set an alias which works when launching from a terminal but does not work when using dmenu in i3.
Is there a way I can get anki to always run with the -b option when opening it from dmenu? |
Yeah just have a wrapper script somewhere in your PATH, before the real program, that does:
Code: | #!/bin/sh
exec /usr/bin/anki -b "$HOME/blah" "$@" | or the like (idk what option you need, nor where the binary lives.)
/usr/local/bin should be in your PATH before /usr/bin for this sort of thing, or you can add $HOME/bin in your shell startup script, on a multi-user machine.
Either way chmod +x /usr/local/bin/anki (or whatever path you use). |
|
Back to top |
|
|
awyrennwr n00b
Joined: 25 Sep 2014 Posts: 2 Location: United Kingdom
|
Posted: Sat Oct 04, 2014 9:04 am Post subject: |
|
|
Brilliant, works perfectly now. Thanks a lot for the quick reply |
|
Back to top |
|
|
steveL Watchman
Joined: 13 Sep 2006 Posts: 5153 Location: The Peanut Gallery
|
Posted: Thu Oct 09, 2014 8:10 pm Post subject: |
|
|
You're welcome :-)
(it's always nice to get thanked :) |
|
Back to top |
|
|
|