You are not logged in.
the answer is probably simple. but here's the idea.
i use cmus as my music player. at the moment, i have to open a terminal and then type 'cmus'. i'd like to set up a keybinding to run cmus. (incidentally, i'm trying to do this in i3.)
the code
exec cmus
doesn't work, presumably because 'cmus' has to be loaded from within the terminal. (is that right?) what's the syntax for passing on the command 'cmus' to the terminal? what's the best way to do this?
Last edited by anti-destin (2012-03-15 23:52:40)
Offline
Offline
at least, starting a terminal and executing a command works with
xterm -e <command>
so in your example it should read
xterm -e cmus
Simply add the parameters behin the command as you usually do.
--
Thomas
Offline
bindsym mod+c exec urxvtc -name cmus -e cmus
urxvtc => Your terminal here if you use something else. Most support -name and -e. Please read their man pages.
-name => Useful for xprop. It assigns the WM_CLASS which can be used for tagging clients.
man urxvt
-e command [arguments]
Run the command with its command-line arguments in the urxvt
window; also sets the window title and icon name to be the basename
of the program being executed if neither -title (-T) nor -n are
given on the command line. If this option is used, it must be the
last on the command-line. If there is no -e option then the default
is to run the program specified by the SHELL environment variable
or, failing that, sh(1).
Last edited by Earnestly (2012-03-15 19:19:25)
Offline
thanks for the suggestions, everyone. the '-e' switch worked. i don't know how i missed that.
Offline