Coder Social home page Coder Social logo

Add gnome shell search provider about tilix HOT 22 OPEN

gnunn1 avatar gnunn1 commented on June 19, 2024
Add gnome shell search provider

from tilix.

Comments (22)

alex285 avatar alex285 commented on June 19, 2024

Terminix also has an identical search to Gnome Terminal, with Regex.
But has no search provider though. Do you want to change the subject to search provider?

from tilix.

brunelli avatar brunelli commented on June 19, 2024

Oh... After reading your comment I finally found it!

But that are some issues with it:

  • The search widget is weird, and it gets in front of the content. Maybe it would look better if it was like the one in Nautilus?
  • A search provider would be awesome, because it would help to find things between sessions and tiles.

I'll change the title, thanks.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

I liked your idea of emulating the Nautilus search, how about this? I moved the Revealer (i.e. the slider) out of the overlay and made it a peer to the terminal so now it pushes the terminal down when revealed. I also tried to make it more compact by moving the options into a menu button.

screenshot from 2016-01-22 20-52-13

from tilix.

bilelmoussaoui avatar bilelmoussaoui commented on June 19, 2024

Looks better! maybe showing the number of the results somewhere too?

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Unfortunately the terminal widget I'm using doesn't support things like showing the number of results or highlighting all matches. You can see the docs for it here if interested: https://developer.gnome.org/vte/0.40/VteTerminal.html

from tilix.

brunelli avatar brunelli commented on June 19, 2024

Really a improvement!

I was playing a bit with it and ended up with this:

139590d8-c14a-11e5-895e-c1edc149bd57

It mixes up a bit the current status of searching in Epiphany with the upcoming Nautilus search.

Also, maybe the checkboxes should be changed to ON/OFF switchers.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

That looks great, thanks a lot for taking the time to do this, let me see what I can do to emulate it. I particularly like how you have the options right after the search box which follows the flow of a user does a search, much better then at the end where I have it.

With respect to switches, Gnome HIG is to use switches for hardware devices (i.e. like the terminal bell in preferences) and checkbuttons for options which is the case here.

https://developer.gnome.org/hig/stable/switches.html.en

from tilix.

brunelli avatar brunelli commented on June 19, 2024

Nice, thanks for point to the HIG! I was a little confused because the new Nautilus search uses a switcher to turn on/off the "Search Subfolders" option.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Here's what have now, based on brunellli's mockup. BTW what icons are you using in that mockup, like them better then ones I'm using, if they are part of standard icon themes I'll look into switching.

screenshot from 2016-01-23 17-16-45

from tilix.

bilelmoussaoui avatar bilelmoussaoui commented on June 19, 2024

@gnunn1 the icons are go-up-symbolic and go-down-symbolic i guess

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

That's what I'm using already, I guess it's just differences in icon packs
(I'm using Moka)

On Sat, Jan 23, 2016 at 5:21 PM, Bilal Elmoussaoui <[email protected]

wrote:

@gnunn1 https://github.com/gnunn1 the icons are go-up-symbolic and
go-down-symbolic i guess


Reply to this email directly or view it on GitHub
#48 (comment).

from tilix.

bilelmoussaoui avatar bilelmoussaoui commented on June 19, 2024

The default icons(Adwaita) are the same as in the mockup of @brunelli

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Improved search box rolled out with 0.45, going to edit this to just reflect the search provider enhancement.

from tilix.

bilelmoussaoui avatar bilelmoussaoui commented on June 19, 2024

Btw, the next and previous need to be marked as insensitive if there's no more previous/next results ! 👍

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Good point, the find previous/next does return a bool indicating whether a match is found, so I couldn't make the buttons insensitive until at least one failure happened. There is also the wrap around option that this would need to work with as well.

I'll play around with it and see if some sort of reasonable behavior can be achieved.

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

Gnome search provider is dependent on #24, adding DBus support.

from tilix.

dsboger-zz avatar dsboger-zz commented on June 19, 2024

According to [1], if your application is a GApplication and it does not override the default command line argument parsing function, it is very simple to make it DBus-activatable. I can make a simple PR to enable that it that is the case.

[1] https://wiki.gnome.org/HowDoI/DBusApplicationLaunching

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

I looked at that link, from a code perspective Terminix should work with this as I am using the built-in command line handling for GTKApplication. If you have time to put together a PR for this that would be great. Note I do override the local handling but that's only there from when I was debugging and the value it returns indicates default processing should continue, I'll remove it though as it adds no value.

The gnome-search-provider does require a specific interface to be implemented though:

https://developer.gnome.org/SearchProvider/

If you want to go further and write some D code to tackle that as well I'd be happy to accept a PR here too, but it might be a bit of effort as D does not have great integration with DBus at this point. I can give you some more detailed thoughts on this if you want to try though.

from tilix.

dsboger-zz avatar dsboger-zz commented on June 19, 2024

Well, I've done the easy part, i.e. sent a PR that makes Terminix DBus activatable. Works For Me.

I've also investigated the state of DBus bindings for D. I looked at ddbus [1] and dbus-d (last commit 8 years old) [2], but it seems both lack support for dictionary type, which is required by the GetResultMetas method of the search provider. I've reported an issue [3] in ddbus asking if there are plans to support dictionary types. I don't think I can move any further than that by now, as I'm not a D programmer, have only basic knowledge of DBus and no experience with language bindings whatsoever.

EDIT: Feel free to drop some ideas, as I may try to dig deeper when I have the chance.

[1] https://github.com/trishume/ddbus
[2] http://www.dsource.org/projects/dbus-d/
[3] trishume/ddbus#3

from tilix.

gnunn1 avatar gnunn1 commented on June 19, 2024

My plan was to leverage the existing DBus support in GtkD, see here for the docs for DBusServer as a starting point. GtkD already supports Dictionary and I'd strongly prefer to stick with this implementation because it fits in seamlessly since Terminix is already using GtkD for the user interface.

The issue with the GtkD implementation is that it is low level with callbacks requiring C functions declared in D versus extern. I'd want to wrap this to make it more user friendly and to allow DBus to interface easily with D objects/delegates which is what the library at [1] is doing. So essentially a composite approach where we would use a similar style to [1] but based on the existing GtkD APIs instead of re-importing the C functions and introducing a potentially different memory management strategy.

This is a fair amount of work and this feature, while nice to have, isn't critical so for me this is somewhat low priority.

from tilix.

bijanbina avatar bijanbina commented on June 19, 2024

Hi,
sorry to interrupt. here I created a minimal working example of gnome-search-provider which is based on cosimoc work. (it upgraded to support gnome 3.20 and maded more minimal).
just think that it may helpful to you.

from tilix.

vaijab avatar vaijab commented on June 19, 2024

I am not trying to push or anything. I just wanted to say that I used to use gnome search to switch between terminals quite a lot when I was using gnome-terminal. It is very handy.

from tilix.

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.