3

So tabbed outputs it's xid when you run it. How could I put this into an alias dynamically?

I'm looking to do something like:

alias zathura = tabbed -c zathura -e ${tabbed Xid goes here} & disown

2 Answers 2

1

You need to use command substitution in your alias:

alias zathura='zathura -e $( tabbed -c ) & disown'

Note that the alias's replacement text needs to be 'quoted in single quotes' to prevent tabbed -c from being expanded immediately when the alias is defined.

1

Alternatively, you can make use of tabbed's -r command:

alias zathura='tabbed -c -r 2 zathura -e id'

Relevant documentation from the man page for tabbed:

-r narg
               will replace the narg th argument in command with the window id, rather than appending it to the end.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .