GNU/Linux >> Tutoriels Linux >  >> Linux

Pouvez-vous basculer entre les fenêtres d'une application dans Openbox ?

Est-il possible de configurer un raccourci clavier dans Openbox pour basculer entre les fenêtres ouvertes au sein d'une application ? Tout comme vous pouvez le faire dans gnome 3 avec alt + [touche au-dessus de la tabulation] .

Réponse acceptée :

J'ai implémenté cette fonction en utilisant wmctrl.

La partie pertinente dans rc.xml d'openbox :

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

ci-dessous est le code dans 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. Qu'est-ce qu'un dotfile shell peut faire pour vous

  2. Comment puis-je exécuter une application OpenGL installée sur une machine Linux à partir de ma machine Windows ?

  3. Différence entre GNUWin32 et cygwin

  4. Signature d'une application Windows sur des distributions basées sur Linux

  5. Pouvez-vous faciliter le redimensionnement des fenêtres sur Ubuntu ?

Avez-vous besoin de Java ? Vous pouvez donc l'installer Java sur Linux

Comment basculer entre les fenêtres d'applications lorsque ` est dans une position décalée ?

Comment installer le serveur d'applications sur Windows Server 2012

Pouvez-vous vraiment développer avec des applications GUI Linux sur Windows 10 avec WSLg ? Que diriez-vous de PyCharm ?

Configuration d'un environnement de développement brillant sous Linux sur Windows 10

Les conteneurs Windows peuvent-ils être hébergés sur Linux ?