On Mon, Jun 01, 2015 at 11:57:48PM -0700, Pavel Aborilov wrote:
> Hi!
> 
> I want to use same keybinding to switch between app in tmux and qtile. How 
> to configure qtile to send that keybinding to tmux if window 'tmux' appear 
> in window name?

You can bind the key to a function (lazy.function(f)) which then look
at the current window's name and calls cmd_simulate_keypress() if it
matches tmux, or does whatever qtile specific action you want if it
isn't.

Tycho

> like this config for vim:
> 
> bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep 
> -iq vim && tmux send-keys C-h) || tmux select-pane -L"
> bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep 
> -iq vim && tmux send-keys C-j) || tmux select-pane -D"
> bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep 
> -iq vim && tmux send-keys C-k) || tmux select-pane -U"
> bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep 
> -iq vim && tmux send-keys C-l) || tmux select-pane -R"
> 
> 
> Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "qtile-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"qtile-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to