Giter VIP home page Giter VIP logo

focusnotifier's Introduction

Focus Notifier

Focus Notifier Is a KWin script, service, and tool allowing access to information about the currently focused window.

This works for KDE only, and works across Wayland and X11.

This was intended to facillitate scripting with tools such as ydotool. (e.g. this will allow you to fire different input with ydotool depending on which program is in focus.)

Installation

This is available through the KDE store and should be able to be installed through the "Get New Scripts" button in "Window Management -> KWin Scripts" in the system settings. You may also install the kwin script manually by downloading this folder and placing it in ~/.local/share/kwin/scripts/.

Once installed, it should be enabled through the "Window Management -> KWin Scripts" view in the system settings.

Once installed and enabled, navigate to ~/.local/share/kwin/scripts/ and run the install.sh file. This will install the service and the activewindow command.

To uninstall, navigate to ~/.local/share/kwin/scripts/ run the uninstall.sh file, and disable and possibly delete the KWin script through the "Window Management -> KWin Scripts" view in the system settings.

How to use

Once installed, you should be able to run the command activewindow.

activewindow has the following subcommands:

  • help
  • get
    • pid (the process ID)
    • pname (the process name)
    • name (the window name)
    • class (the window class)
    • caption (the window's titlebar text, if applicable)

How it works

The KWin script listens to when focus is changed. It sends this information over DBus, which is then listened to by the listener script, which is run as a systemd service. The listener script stores this information in temp files, which can then be retrieved using the activewindow command.

focusnotifier's People

Contributors

c-massie avatar

Stargazers

Bojidar Marinov avatar Michaël Meyer avatar  avatar John avatar

Watchers

Michaël Meyer avatar  avatar

Forkers

areyouconfused

focusnotifier's Issues

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.