ショートカットを使用してウィンドウフォーカスを変更するようにxbindkeysを構成しています。たとえば、アプリケーションウィンドウ、たとえばターミネータウィンドウに焦点を合わせるためのショートカットを作成することができました。
wmctrl -xa terminator
残念ながら、それは常に同じターミネーターウィンドウに焦点を合わせているため、ターミネーターウィンドウを循環することができません。
ターミネーターウィンドウに焦点を合わせるコマンドを提案していただけますか。もう一度押すと、すべてのターミネーターウィンドウが循環します。
2013年3月30日更新
このスクリプト http://lars.st0ne.at/blog/switch%20between%20windows%20within%20the%20same%20applicationを変更して、次 のようなスクリプトを作成しました。
script.sh NAME
アプリケーションNAMEにフォーカスするか、NAMEのウィンドウがすでにフォーカスされている場合は、NAMEのすべてのウィンドウを循環しますが、正しく機能しません。
これがスクリプトです
win_class=$1 # 'terminator' # $1
# get list of all windows matching with the class above
win_list=$(wmctrl -x -l | grep -i $win_class | awk '{print $1}' )
# get id of the focused window
active_win_id=$(xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}')
# get next window to focus on, removing id active
switch_to=$(echo $win_list | sed s/.*$active_win_id// | awk '{print $1}')
# if the current window is the last in the list ... take the first one
if [ "$switch_to" == '' ];then
switch_to=$(echo $win_list | awk '{print $1}')
fi
# switch to window
wmctrl -i -a $switch_to
スクリプトはアプリケーションのウィンドウに焦点を合わせ、ウィンドウに到達するまでそれらを循環します。最後に作成されたと思います。その時点で、サイクリングは機能しなくなります。