GNU/Linux >> Linux の 問題 >  >> Linux

Openboxのアプリケーション内でWindowsを切り替えることはできますか?

アプリケーション内で開いているウィンドウを切り替えるために、Openboxでキーバインディングを設定することは可能ですか? gnome3でalt+[タブの上のキー]を使用できるのと同じように。

承認された回答:

wmctrlを使用してこの関数を実装しました。

openboxのrc.xmlの関連部分:

<keybind key="A-space">
  <action name="execute">
    <execute>wmctrl-switch-by-application</execute>
  </action>
</keybind>

以下は、wmctrl-switch-by-applicationのコードです:

# taken from https://unix.stackexchange.com/questions/26546/can-you-switch-between-windows-within-an-application-in-openbox
# taken from: http://www.st0ne.at/?q=node/58

# get id of the focused window
active_win_id=$(xprop -root | grep '^_NET_ACTIVE_W' | awk -F'# 0x' '{print $2}')

# get window manager class of current window
win_class=$(wmctrl -x -l | grep $active_win_id | awk '{print $2 " " $3}' )

# get list of all windows matching with the class above
win_list=$(wmctrl -x -l | grep -- "$win_class" | awk '{print $1}' )

# get next window to focus on
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 [ -z "$switch_to" ];then
   switch_to=$(echo $win_list | awk '{print $1}')
fi

# switch to window
wmctrl -i -a $switch_to

Linux
  1. Linux マシンにインストールされた OpenGL アプリケーションを Windows マシンから実行するにはどうすればよいですか?

  2. Ubuntu でウィンドウのサイズを簡単に変更できますか?

  3. vimでjキーとkキーを切り替えるにはどうすればよいですか?

  1. シェルドットファイルでできること

  2. Lsでアンカー^$を使用できますか?

  3. Linux で Xcode を実行できますか?

  1. WindowsとLinuxの間にSSH接続を確立します

  2. GNUWin32 と cygwin の違い

  3. Linux ベースのディストリビューションで Windows アプリケーションに署名する