Giter VIP home page Giter VIP logo

Comments (5)

Favo02 avatar Favo02 commented on June 12, 2024 1

I think the idea to ignore Apps matching a regex is a great idea, I will implement for sure this in the next update.

Thanks for the feedback and for the idea!

from workspaces-by-open-apps.

bakedbean avatar bakedbean commented on June 12, 2024

added this to extension.js which fixed it for me:

if (app.get_id().match(/window/i)) return false;

Could probably figure out a way to test for the regex pattern while iterating icons_ignored, but I'm not sure this isn't an issue specific to my system.

from workspaces-by-open-apps.

bakedbean avatar bakedbean commented on June 12, 2024

I got this working locally:

const windows = workspace
      .list_windows()
      // filter out ignored apps
      .filter(win => {
        if (!win) return false
        const app = Shell.WindowTracker.get_default().get_window_app(win)
        if (!app) return false
        // perform case insensitivity regex match on ignored strings
        const matches = this._settings.icons_ignored.filter(i => {
          const regex = new RegExp(i, 'i');
          return regex.test(app.get_id());
        });
        return !this._settings.icons_ignored.includes(app.get_id()) && matches.length < 1
      })

It's a bit aggressive and could easily wind up ignoring valid things... happy to toss up a PR but you can probably come up with something better.

from workspaces-by-open-apps.

Favo02 avatar Favo02 commented on June 12, 2024

That's pretty much what I will do, I will probably add a label in settings to inform that regex are supported, that's all.

I'd be happy if you want to open a PR.

from workspaces-by-open-apps.

Related Issues (20)

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.