Hi, On Tue, Mar 3, 2020 at 11:16 AM Dario Lesca <d.le...@solinos.it> wrote: > > Hi everybody, this is my first message on this ML, but I am a Gnome > user since always. > > Now I want produce a little personal gnome shell extension with this > features: > > A little button on top bar, or somewhere, when pressing this button, > push a Alt+Tab event and focus windows swap like I press the ALT+TAB > button > > What internal gnome shell function I must use? > There is some example to copy for do that? > > For now I have found this method via a little Phyton script > > #!/usr/bin/python3 > import pyautogui > pyautogui.hotkey('alt', 'tab')
Instead of emulating the key-press events, you could attempt to call the switcher directly. Check how GNOME Shell constructs the AppSwitcherPopup and use it directly in your extension. https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/master/js/ui/windowManager.js#L1986 That seems to be instantiated in Main.wm._startSwitcher. > > But in order to let it work, must install on Fedora 31 some extra > package[1] (python3-tkinter, python3-devel, scrot, ecc) for use > pyautogui.hotkey() > > Then before to do that on other my system, I try to ask you if there is > an internal gnome shell function to call for do same thing. > > Many thanks for your attention and patient. > > [1] - > https://stackoverflow.com/questions/49231756/how-to-install-pyautogui-on-fedora-27 > > > -- > Dario Lesca > (inviato dal mio Linux Fedora 31 Workstation) > > _______________________________________________ > javascript-list mailing list > javascript-list@gnome.org > https://mail.gnome.org/mailman/listinfo/javascript-list _______________________________________________ javascript-list mailing list javascript-list@gnome.org https://mail.gnome.org/mailman/listinfo/javascript-list