2020-03-22 23:19:52 +01:00
#!/bin/bash
dir = $1
wm_focus( ) {
2021-03-30 11:31:26 +02:00
awesome-client 'awesome.emit_signal("navigator::focus", "' " $dir " '")'
2020-03-22 23:19:52 +01:00
}
case " $dir " in
2023-09-24 20:03:21 +02:00
"left" )
if [ " $( tmux display-message -p '#{pane_at_left}' ) " -ne 1 ] ; then tmux select -pane -L; else wm_focus; fi
; ;
"right" )
if [ " $( tmux display-message -p '#{pane_at_right}' ) " -ne 1 ] ; then tmux select -pane -R; else wm_focus; fi
; ;
"up" )
if [ " $( tmux display-message -p '#{pane_at_top}' ) " -ne 1 ] ; then tmux select -pane -U; else wm_focus; fi
; ;
"down" )
if [ " $( tmux display-message -p '#{pane_at_bottom}' ) " -ne 1 ] ; then tmux select -pane -D; else wm_focus; fi
; ;
2020-03-22 23:19:52 +01:00
esac
2023-09-24 20:03:21 +02:00
awesome-client 'require("naughty").notify({title = "awesomewm-vim-tmux-navigator", text = "tmux_focus.sh is deprecated. Please update your tmux keybinds."})'