Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Running programs with options as default
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
awyrennwr
n00b
n00b


Joined: 25 Sep 2014
Posts: 2
Location: United Kingdom

PostPosted: Fri Oct 03, 2014 9:35 pm    Post subject: [SOLVED] Running programs with options as default Reply with quote

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
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Oct 04, 2014 1:09 am    Post subject: Re: Running programs with options as default Reply with quote

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
View user's profile Send private message
awyrennwr
n00b
n00b


Joined: 25 Sep 2014
Posts: 2
Location: United Kingdom

PostPosted: Sat Oct 04, 2014 9:04 am    Post subject: Reply with quote

Brilliant, works perfectly now. Thanks a lot for the quick reply
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Oct 09, 2014 8:10 pm    Post subject: Reply with quote

You're welcome :-)

(it's always nice to get thanked :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum