Git Product home page Git Product logo

ulauncher-window-switcher's Introduction

Linux/X11 Window Switcher plugin for Ulauncher

This is a plugin for Ulauncher that lets you search & switch between Linux/X11 Windows by name:

The default keyword in win, so just run Ulauncher, then type win <query> to filter the window list, then select a window from the list to switch to that window.

I used window icons from the Obsidian Icon pack

Requirements

You need wmctrl installed. See: https://www.freedesktop.org/wiki/Software/wmctrl/

For Debian/Ubuntu, you can do:

$ sudo apt install wmctrl

ulauncher-window-switcher's People

Contributors

dflock avatar furgerf avatar fx-kirin avatar systemoperator avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ulauncher-window-switcher's Issues

Switched window doesn't have focus

I'm using Pop!_OS 22.04.

The window-switching works great, except that the window I switch to doesn't have focus; meaning that, for example, in my code editor, I have to click before I can start typing. This happens even if I previously had focus and switch back to the same window again using this plugin; it somehow manages to lose focus in the process, and I must click or otherwise manually regain focus.

Unfortunately this makes the plugin unusable for me :/

Crashing on launch

I'm trying to use this extension on Arch and it crashes and exits right away.

The related error message seems to be:

2021-04-16 09:54:28,304 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.dflock.ulauncher-window-switcher" exited instantly with code 1
2021-04-16 09:54:28,304 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.dflock.ulauncher-window-switcher" failed with an error: ImportError: Requiring namespace 'Gdk' version '3.0', but '4.0' is already loaded

Since Arch is a bit aggressive with updating Gnome I suspect that 3.0 might be widely used by some other distros, but maybe it's possible to write the extension in such a way that it supports both versions?

Icons issue

Hi, I moved the icon folder "Obsidian" into usr/share/icons as suggested but nothing changes. Did I do something wrong? thanks a lot

Not working, stuck at loading

image

OS: Elementary OS 5.1.7 Hera based on Ubuntu 18.04 LTS using Pantheon Desktop.

Error from terminal log

2021-12-04 18:09:44,873 | DEBUG | ulauncher.ui.windows.UlauncherWindow: show_results() | render 1 results
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Client.py", line 54, in on_message
    self.extension.trigger_event(event)
  File "/usr/lib/python3/dist-packages/ulauncher/api/client/Extension.py", line 52, in trigger_event
    action = listener.on_event(event, self)
  File "/home/omar/.local/share/ulauncher/extensions/com.github.dflock.ulauncher-window-switcher/main.py", line 80, in on_event
    window["ws"], ws_dict[window["ws"]], w_idx
KeyError: 0
com.github.dflock.ulauncher-window-switcher | 2021-12-04 18:09:44,874 | DEBUG | ulauncher.api.client.Client: on_message() | Incoming event KeywordQueryEvent

No window detected

Good day, I'm on debian 12 stable, xfce, installing the extension does not work, does not detect the any window

image

Extension crashes immediately

After installing, the extension crashes and the following message appears:

The extension exited instantly. Please check the logs.

I can't even change and save the keyword for triggering the extension.

OS: Ubuntu 16.04
python -V: Python 2.7.12
python3 -V: Python 3.5.2

Launching with ulauncher -v shows (when restarting ulauncher with this extension already installed) or when freshly installing the extension:

2021-06-24 14:42:12,064 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.dflock.ulauncher-window-switcher" exited instantly with code 1
2021-06-24 14:42:12,066 | ERROR | ulauncher.api.server.ExtensionRunner: _run_process() | Extension "com.github.dflock.ulauncher-window-switcher" failed with an error: SyntaxError: invalid syntax

When installing and saving the settings:

Message: 'com.github.dflock.ulauncher-window-switcher'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.dflock.ulauncher-window-switcher'

Where ulauncher -v showed:

2021-06-24 15:08:53,306 | ERROR | ulauncher.ui.windows.PreferencesUlauncherDialog: on_scheme_callback() | Unexpected API error. KeyError: 'com.github.dflock.ulauncher-window-switcher'
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.dflock.ulauncher-window-switcher'
2021-06-24 15:11:16,124 | INFO | ulauncher.ui.windows.PreferencesUlauncherDialog: prefs_extension_update_prefs() | Update extension preferences: {'pref.window_switcher_kw': 'win', 'id': 'com.github.dflock.ulauncher-window-switcher', 'callback': '__jp10'}

Sometimes, I could grab the following error:

Message: 'com.github.dflock.ulauncher-window-switcher'
Error Name: UnhandledError
Type: KeyError

Stacktrace:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 198, in on_scheme_callback
    resp = rt.dispatch(self, scheme_request.get_uri())
  File "/usr/lib/python3/dist-packages/ulauncher/utils/Router.py", line 49, in dispatch
    return callback(context, url_params)
  File "/usr/lib/python3/dist-packages/ulauncher/ui/windows/PreferencesUlauncherDialog.py", line 444, in prefs_extension_update_prefs
    controller = ExtensionServer.get_instance().get_controller(ext_id)
  File "/usr/lib/python3/dist-packages/ulauncher/api/server/ExtensionServer.py", line 76, in get_controller
    return self.controllers[extension_id]
KeyError: 'com.github.dflock.ulauncher-window-switcher'

Once, I only got:

Message: undefined
Error Name: undefined
Type: undefined

Stacktrace:

undefined

Loading...

I am using Ulauncher v5.10.0 on Kubuntu 20,04 with i3-gaps as the window manager.

When trying to switch windows and after typing 'win ' ulauncher displays a single item 'Loading...' - but nothing ever loads. No entries are made in the logs so I am unsure what is causing the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.