This commit is contained in:
2024-07-08 22:46:35 +02:00
parent 02f44c49d2
commit 27254d817a
56249 changed files with 808097 additions and 1 deletions

View File

@@ -0,0 +1,48 @@
## ROADMAP
* add web search
* add unit conversion
* add currency conversion
## release 15
* fix monitor preference
## release 14
* port to gnome 45
* remove blur background (permanently?)
* remove panel icon (temporarily?)
## release 11
* fix close on enter/click
## release 9
* add panel search icon
* fix close on escape
## release 8
* fix follow cursor, preferred monitor
## release 7
* improve background blurring
* add custom text color
* fix scroll issue
* fix fullscreen issue
## release 5
* add window borders
* add background blur
* add font-size settings
## release 4
* takes gnome's search outside of overview
* custom search window size
* bind to super+custom keys
* bind to preferred monitor or to cursor

View File

@@ -0,0 +1,676 @@
Version 3, 29 June 2007
GNU GENERAL PUBLIC LICENSE
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@@ -0,0 +1,62 @@
<br/>
<p align="center">
<h3 align="center">Search Light</h3>
<p align="center">
A GNOME Shell 42+ Extension
<br/>
<br/>
</p>
</p>
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/icedman)
![Contributors](https://img.shields.io/github/contributors/icedman/search-light?color=dark-green) ![Forks](https://img.shields.io/github/forks/icedman/search-light?style=social) ![Stargazers](https://img.shields.io/github/stars/icedman/search-light?style=social) ![Issues](https://img.shields.io/github/issues/icedman/search-light) ![License](https://img.shields.io/github/license/icedman/search-light)
![First Release](https://raw.githubusercontent.com/icedman/search-light/main/screenshots/Screenshot%20from%202022-11-03%2011-53-28.png)
This is a Gnome Shell extension that takes the apps search widget out of Overview. Like the macOS spotlight, or Alfred.
### Notice
* Gnome 46 port is ready for testing
* Gnome 45 port is ready for testing
* Gnome 44 and prior will be under g44 branch
### Features
* Popup search box
* Colors, background, borders customization
* Blurred background
* Multi-monitor support
## Blurred background
Blurred background feature requires **imagemagick** to be installed in the system which will generate the blurred image.
### Installation
Manual Installation:
- Clone this repo
```bash
$ git clone https://github.com/icedman/search-light
```
- Use the `Makefile` to build and install
```bash
$ cd search-light
$ make
```
From Gnome Extensions Repository
Visit [repository](https://extensions.gnome.org/extension/5489/search-light/)
### Keybinding
Ctrl+Cmd+Space (change at the preference page)
Cmd - your Windows logo, or the command logo on mac. Linux also calls this the 'Super' key.
### Credits
Blur-My-Shell for background blurring code.

View File

@@ -0,0 +1,251 @@
[Desktop Entry]
Name[af]=Sakrekenaar
Name[ar]=آلة حاسبة
Name[as]=গণক
Name[ast]=Calculadora
Name[az]=Hesaplayıcı
Name[be@latin]=Kalkulatar
Name[be]=Калькулятар
Name[bg]=Калкулатор
Name[bn_IN]=ক্যালকুলেটর
Name[bn]=ক্যালকুলেটর
Name[bs]=Računalo
Name[ca]=Calculadora
Name[ca@valencia]=Calculadora
Name[cs]=Kalkulačka
Name[cy]=Cyfrifiannell
Name[da]=Lommeregner
Name[de]=Taschenrechner
Name[dz]=རྩིས་འཕྲུལ།
Name[el]=Αριθμομηχανή
Name[en_CA]=Calculator
Name[en_GB]=Calculator
Name[en@shaw]=𐑒𐑨𐑤𐑒𐑿𐑤𐑱𐑑𐑼
Name[eo]=Kalkulilo
Name[es]=Calculadora
Name[et]=Kalkulaator
Name[eu]=Kalkulagailua
Name[fa]=ماشین‌حساب
Name[fi]=Laskin
Name[fo]=Roknimaskina
Name[fr]=Calculatrice
Name[fur]=Calcoladorie
Name[ga]=Áireamhán
Name[gd]=Àireamhair
Name[gl]=Calculadora
Name[gu]=કૅલ્ક્યુલેટર
Name[he]=מחשבון
Name[hi]=गणक
Name[hr]=Kalkulator
Name[hu]=Számológép
Name[hy]=Հաշվիչ
Name[id]=Kalkulator
Name[it]=Calcolatrice
Name[ja]=電卓
Name[ka]=კალკულატორი
Name[kk]=Калькулятор
Name[km]=ម៉ាស៊ីន​គិត​លេខ
Name[kn]=ಕ್ಯಾಲ್ಕುಲೇಟರ್
Name[ko]=계산기
Name[lt]=Skaičiuotuvas
Name[lv]=Kalkulators
Name[mai]=कैलकुलेटर
Name[mg]=Milina mpikajy
Name[mjw]=Calculator
Name[mk]=Калкулатор
Name[ml]=ഗണനി
Name[mn]=Тооны машин
Name[mr]=गणनयंत्र
Name[ms]=Kalkulator
Name[my]=ဂဏန်းတွက်စက်
Name[nb]=Kalkulator
Name[ne]=गणकयन्त्र
Name[nl]=Rekenmachine
Name[nn]=Kalkulator
Name[oc]=Calculadoira
Name[or]=କାଲକୁଲେଟର
Name[pa]=ਕੈਲਕੂਲੇਟਰ
Name[pl]=Kalkulator
Name[pt_BR]=Calculadora
Name[pt]=Calculadora
Name[ro]=Calculator
Name[ru]=Калькулятор
Name[si]=ගණකය
Name[sk]=Kalkulačka
Name[sl]=Računalo
Name[sq]=Makinë llogaritëse
Name[sr@latin]=Kalkulator
Name[sr]=Калкулатор
Name[sv]=Kalkylator
Name[ta]=கணிப்பான்
Name[te]=గణన పరికరం
Name[tg]=Калкулатор
Name[th]=เครื่องคิดเลข
Name[tk]=Çot
Name[tr]=Hesap Makinesi
Name[ug]=ھېسابلىغۇچ
Name[uk]=Калькулятор
Name[vi]=Máy tính bỏ túi
Name[xh]=Ikhaltyuleyitha
Name[zh_CN]=计算器
Name[zh_HK]=計數機
Name[zh_TW]=計算機
Name=Calculator
Comment[af]=Voer rekenkundige, wetenskaplike of finansiële berekeninge uit
Comment[ar]=قم بحسابات رياضية , علمية و رياضية
Comment[as]=গণিতিক, বিজ্ঞানভিত্তিক অথবা আৰ্থিক গণনাসমূহ কৰক
Comment[ast]=Fai cálculos aritméticos, científicos o financieros
Comment[be]=Арыфметычныя, навуковыя і фінансавыя разлікі
Comment[bg]=Извършване на аритметични, научни или финансови изчисления
Comment[bn_IN]=গণিত, বৈজ্ঞানিক অথবা অর্থনৈতিক প্রণালী করুন
Comment[bn]=গাণিতিক, বৈজ্ঞানিক অথবা অর্থনৈতিক গণনা সম্পাদন করা হবে
Comment[bs]=Obavi aritmetičke, naučne ili finansijske proračune
Comment[ca]=Realitzeu càlculs aritmètics, científics o financers
Comment[ca@valencia]=Realitza càlculs aritmètics, científics o financers
Comment[cs]=Provádějte aritmetické, vědecké i finanční výpočty
Comment[da]=Udfør aritmetiske, videnskabelige eller finansielle udregninger
Comment[de]=Arithmetische, wissenschaftliche und finanztechnische Berechnungen durchführen
Comment[dz]=མཚན་རིགས་ དངུལ་འབྲེལ་ ཡང་ན་ ཨང་རྩིས་ཀྱི་ རྩིས་ལས་ཀྱི་ ལས་འགན་བསྒྲུབ་
Comment[el]=Εκτελεί αριθμητικούς, επιστημονικούς ή εμπορικούς υπολογισμούς
Comment[en_CA]=Perform arithmetic, scientific or financial calculations
Comment[en_GB]=Perform arithmetic, scientific or financial calculations
Comment[en@shaw]=𐑐𐑼𐑓𐑹𐑥 𐑼𐑦𐑔𐑥𐑩𐑑𐑦𐑒, 𐑕𐑲𐑩𐑯𐑑𐑦𐑓𐑦𐑒 𐑹 𐑓𐑲𐑯𐑨𐑯𐑖𐑩𐑤 𐑒𐑨𐑤𐑒𐑿𐑤𐑱𐑖𐑩𐑯𐑟
Comment[eo]=Fari aritmetikajn, sciencajn aŭ financajn kalkulojn
Comment[es]=Realice cálculos aritméticos, científicos o financieros
Comment[et]=Aritmeetilised, teaduslikud ja finantsarvutused
Comment[eu]=Egin kalkulu aritmetikoak, zientifikoak edo finantzarioak
Comment[fa]=انجام محاسبات ریاضی، علمی و مالی
Comment[fi]=Suorita aritmeettisia, tieteellisiä tai talouslaskutoimituksia
Comment[fo]=Avrika talfrøðiskar, vísindaligar ella fíggjarligar útrokningar
Comment[fr]=Effectue des calculs arithmétiques, scientifiques ou financiers
Comment[fur]=Eseguìs calcui aritmetics, sientifics o finanziaris
Comment[gd]=Dèan cunntadh àireamhachd, saidheansail no ionmhais
Comment[gl]=Realice cálculos aritméticos, científicos ou financeiros
Comment[gu]=ગાણિતીક, વૈજ્ઞાનિક અથવા આર્થિક ગણતરીઓ કરો
Comment[he]=ביצוע חישובים פשוטים, מדעיים או כלכליים
Comment[hi]=अंकगणित, वैज्ञानिक, या वित्तीय गणना करें
Comment[hr]=Izvodite aritmetičke, znanstvene ili financijske izračune
Comment[hu]=Aritmetikai, tudományos vagy pénzügyi számítások végrehajtása
Comment[hy]=Կատարել թվաբանական, գիտական կամ ֆինանսական հաշվարկներ
Comment[id]=Lakukan perhitungan aritmetik, ilmiah, atau keuangan
Comment[it]=Esegue calcoli aritmetici, scientifici o finanziari
Comment[ja]=算術/科学/財務の計算を行います
Comment[kk]=Қарапайым, ғылыми не қаржылық есептеулерді жүргізу
Comment[km]=អនុវត្ត​ការ​គណនា​គណិតវិទ្យា វិទ្យាសាស្ត្រ ឬ​ហិរញ្ញវត្ថុ
Comment[kn]=ಗಣಿತ, ವೈಜ್ಞಾನಿಕ ಅಥವಾ ಹಣಕಾಸಿನ ಲೆಕ್ಕಚಾರಗಳನ್ನು ಮಾಡಿ
Comment[ko]=일반 연산, 과학, 재무용 계산을 합니다
Comment[lt]=Atlikti aritmetinius, mokslinius ar finansinius skaičiavimus
Comment[lv]=Veikt aritmētiskus, zinātniskus vai finansiālus aprēķinus
Comment[mjw]=Perform arithmetic, scientific or financial calculations
Comment[mk]=Извршете аритметички, научни или финансиски пресметки
Comment[ml]=അരിതമെറ്റിക്, ശാസ്ത്രീയം അല്ലെങ്കില്‍ ധനകാര്യ സംബന്ധമായ കണക്കുകൂട്ടലുകള്‍ നടത്തുക
Comment[mr]=अंकगणित, शास्त्रीय किंवा वित्तीय गणना चालवून पहा
Comment[ms]=Buat pengiraan aritmatik, saintifik dan kewangan
Comment[nb]=Utfør aritmetiske, vitenskapelige eller finansielle utregninger
Comment[ne]=अंकगणितीय, वैज्ञानिक वा आर्थिक गणनाहरू कार्यसम्पादन गर्नुहोस्
Comment[nl]=Voer rekenkundige, wetenschappelijke of financiële berekeningen uit
Comment[nn]=Utfør aritmetiske, vitskaplege eller finansielle utregningar
Comment[oc]=Efectua de calculs aritmetics, scientifics o financièrs
Comment[or]=ଗାଣିତିକ,ବୈଜ୍ଞାନିକ କିମ୍ବା ଆର୍ଥିକ ହିସାବ କରନ୍ତୁ
Comment[pa]=ਗਣਿਤ, ਵਿਗਿਆਨਕ ਜਾਂ ਵਿੱਤੀ ਗਣਨਾ ਕਰੋ
Comment[pl]=Wykonanie obliczeń arytmetycznych, naukowych lub finansowych
Comment[pt_BR]=Efetue cálculos aritméticos, científicos ou financeiros
Comment[pt]=Realize cálculos aritméticos, científicos ou financeiros
Comment[ro]=Efectuează calcule aritmetice, științifice și financiare
Comment[ru]=Вычисления: арифметические, научные и финансовые
Comment[sk]=Vykonáva aritmetické, vedecké alebo finančné výpočty
Comment[sl]=Izvajanje aritmetičnih, znanstvenih ali finančnih izračunov
Comment[sq]=Kryen llogari aritmetikore, shkencore ose financiare
Comment[sr@latin]=Izvršavajte aritmetičke, naučne ili finansijske proračune
Comment[sr]=Извршавајте аритметичке, научне или финансијске прорачуне
Comment[sv]=Utför aritmetiska, vetenskapliga eller finansiella beräkningar
Comment[ta]=கணித, அறிவியல் அல்லது பொருளாதார கணக்குகளை செய்கிறது.
Comment[te]=బీజీయ, శాస్త్రీయ లేదా ఆర్ధిక గణనలను ప్రదర్శించు
Comment[tg]=Иҷрои ҳисобҳои арифметикӣ, илмӣ ё молиявӣ
Comment[th]=คำนวณเลขคณิต ฟังก์ชันวิทยาศาสตร์ หรือการเงิน
Comment[tr]=Aritmetik, bilimsel ve finansal hesaplamalar gerçekleştirir
Comment[ug]=ئارىفمېتىكىلىق، ئىلمىي ياكى ئىقتىسادىي ھېساباتلارنى ئېلىپ بېرىش پروگراممىسى
Comment[uk]=Виконання арифметичних, наукових або фінансових розрахунків
Comment[vi]=Chạy phép tính kiểu số học, khoa học hay tài chính
Comment[zh_CN]=执行算术、科学或财务计算
Comment[zh_HK]=進行數字、科學或金融的計算
Comment[zh_TW]=進行數字、科學或財務計算
Comment=Perform arithmetic, scientific or financial calculations
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords[as]=গণনা;গণিতিক;বিজ্ঞানভিত্তিক;আৰ্থিক;
Keywords[be]=calculation;arithmetic;scientific;financial;вылічэнне;разлікі;арыфметыка;навука;фінансы;
Keywords[bg]=калкулатор;аритметични;научни;финансови;изчисления;calculation;arithmetic;scientific;financial;
Keywords[bn_IN]=গণনা;পাটিগণিত;বৈঞ্জানিক;অার্থিক;
Keywords[bs]=raču;aritmetika;naučni;finansijski;
Keywords[ca]=càlcul;aritmètic;científic;financer;
Keywords[ca@valencia]=càlcul;aritmètic;científic;financer;
Keywords[cs]=kalkulace;výpočty;vědecká;finanční;
Keywords[da]=udregning;aritmetik;videnskabelig;finansiel;regning;lommeregner;matematik;
Keywords[de]=Taschenrechner;Rechner;Arithmetisch;Wissenschaftlich;Finanztechnisch;
Keywords[el]=υπολογισμός;αριθμητικός;επιστημονικός;οικονομικός;calculation;arithmetic;scientific;financial;
Keywords[en_GB]=calculation;arithmetic;scientific;financial;
Keywords[eo]=kalkulilo;kalkuli;aritmetiko;scienca;financa;
Keywords[es]=cálculo;aritmética;científica;financiera;
Keywords[et]=arvutamine;arvutused;kalkuleerimine;kalkulaator;aritmeetika;teaduslik;finants;
Keywords[eu]=kalkulua;aritmetikoa;zientifikoa;finantzarioa;
Keywords[fa]=محاسبه;ریاضی;علمی;مالی;
Keywords[fi]=calculation;arithmetic;scientific;financial;laskenta;laskut;laskutoimitus;aritmetiikka;aritmeettinen;tieteellinen;tiede;talous;talouslaskut;
Keywords[fo]=útrokning;talfrøði;vísindaligur;fíggjarligur;rokning;lummaroknari;støddfrøði;
Keywords[fr]=calcul;arithmétique;scientifique;finances;financier;
Keywords[fur]=calcui;calcoladorie;aritmetic;sientific;finanziari;
Keywords[gd]=cunntadh;àireamhachadh;àireamhachd;saidheans;saidheansail;ionmhas;ionmhais;
Keywords[gl]=calculo;aritmético;científico;financeiro;
Keywords[gu]=ગણતરી;ગાણિતીક;વૈજ્ઞાનિક;આર્થિક;
Keywords[he]=חישוב;חשבון;מחשבון;מדעי;פיננסי;
Keywords[hi]=गणना; गणित; वैज्ञानिक; वित्तीय;
Keywords[hr]=izračuni;aritmetika;znanost;financije;
Keywords[hu]=számítás;aritmetikai;tudományos;pénzügyi;
Keywords[id]=kalkulasi;aritmetik;ilmiah;keuangan;
Keywords[it]=calcolo;calcolatrice;aritmetica;scientifica;finanziaria;
Keywords[ja]=calculation;arithmetic;scientific;financial;算術;科学;財務;calculator;計算機;
Keywords[kk]=calculation;arithmetic;scientific;financial;есептеу;калькулятор;арифметика;ғылыми;қаржылық;
Keywords[km]=អនុវត្ត​; ការ​គណនា​គណិតវិទ្យា; វិទ្យាសាស្ត្រ; ​ហិរញ្ញវត្ថុ;
Keywords[kn]=ಲೆಕ್ಕಾಚಾರ;ಅರಿತ್‌ಮೆಟಿಕ್;ವೈಜ್ಞಾನಿಕ;ಹಣಕಾಸು;
Keywords[ko]=calculation;계산;계산기;arithmetic;연산;scientific;과학;공학;financial;재무;
Keywords[lt]=skaičiavimai;aritmetika;moksliniai;finansiniai;
Keywords[lv]=aprēķins;aritmētika;zinātnisks;finansiāls;
Keywords[mjw]=calculation;arithmetic;scientific;financial;
Keywords[ml]=calculation;arithmetic;scientific;financial;
Keywords[mr]=कॅलक्युलेशन;अरिथमेटिक;साइंटिफिक;फाइनँशिअल;
Keywords[ms]=pengiraan;aritmatik;saintifik;kewangan;
Keywords[nb]=regning;aritmetikk,vitenskapelig;finans;
Keywords[ne]=अंकगणितीय;वैज्ञानिक;आर्थिक;गणनाहरू;
Keywords[nl]=calculation;arithmetic;scientific;financial;rekenkundig;wetenschappelijk;financieel;
Keywords[oc]=calcul;aritmetic;scientific;finances;financièr;
Keywords[or]=ହିସାବ;ଗାଣିତିକ;ବୈଜ୍ଞାନିକ;ଆର୍ଥିକ;
Keywords[pa]=ਗਣਨਾ;ਗਿਣਤੀ;ਹਿਸਾਬ;ਵਿਗਿਆਨਕ;ਵਿੱਤ;ਵਿੱਤੀ;
Keywords[pl]=obliczenia;liczenie;arytmetyczne;naukowe;finansowe;
Keywords[pt_BR]=cálculo;cálculos;aritmético;científico;científica;financeiro;financeira;aritmética;
Keywords[pt]=calcular;aritmética;científica;financeira;
Keywords[ro]=calculation;arithmetic;scientific;financial;calculare;aritmetic;științific;financiar;calculator;
Keywords[ru]=вычисление;арифметические;научные;финансовые;
Keywords[sk]=výpočty;aritmetické;vedecké;finančné;
Keywords[sl]=računanje;izračunavanje;aritmetika;znanstveni izračuni;finančni izračuni;računalo;kalkulator;abakus;
Keywords[sr@latin]=računanje;aritmetika;nauka;finansije;proračun;
Keywords[sr]=рачунање;аритметика;наука;финансије;прорачун;
Keywords[sv]=uträkning;aritmetik;vetenskaplig;finansiell;
Keywords[ta]=கணக்கிடுதல்;கணிதம்; அறிவியல்;பொருளாதாரம்;
Keywords[te]=calculation;arithmetic;scientific;financial;
Keywords[tg]=ҳисобкунӣ;арифметикӣ;илмӣ;молиявӣ;
Keywords[th]=คำนวณ;คิดเลข;เลขคณิต;วิทยาศาสตร์;การเงิน;
Keywords[tr]=hesaplama;aritmetik;bilimsel;finansal;
Keywords[ug]=calculation;arithmetic;scientific;financial;ھېسابلاش;
Keywords[uk]=калькулятор;арифметика;науковий;фінансовий;
Keywords[vi]=calculation;arithmetic;scientific;financial;bàn;tính;ban;tinh;toán;tài;chính;tai;chinh;khoa;học;hoc;
Keywords[zh_CN]=calculation;arithmetic;scientific;financial;计算;算术;科学;财务;
Keywords[zh_HK]=calculation;arithmetic;scientific;financial;科學;金融;計算;
Keywords[zh_TW]=calculation;arithmetic;scientific;financial;科學;金融;財務;計算;計算機;數字;數學;算數;算術;程式設計;單位轉換;轉換;
Keywords=calculation;arithmetic;scientific;financial;
Exec=gnome-calculator
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.Calculator
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Utility;Calculator;
X-Purism-FormFactor=Workstation;Mobile;

View File

@@ -0,0 +1,41 @@
uniform sampler2D tex;
uniform float red;
uniform float green;
uniform float blue;
uniform float blend;
uniform vec2 textureSize; // Size of the texture being sampled
// Function to perform a simple blur
vec4 blur(sampler2D texture, vec2 texCoord) {
vec4 sum = vec4(0.0);
float blurSize = 0.05; // Adjust this for different blur strengths
// Sample neighboring pixels and average their colors
sum += texture2D(texture, texCoord + vec2(-blurSize, -blurSize));
sum += texture2D(texture, texCoord + vec2(0.0, -blurSize));
sum += texture2D(texture, texCoord + vec2(blurSize, -blurSize));
sum += texture2D(texture, texCoord + vec2(-blurSize, 0.0));
sum += texture2D(texture, texCoord);
sum += texture2D(texture, texCoord + vec2(blurSize, 0.0));
sum += texture2D(texture, texCoord + vec2(-blurSize, blurSize));
sum += texture2D(texture, texCoord + vec2(0.0, blurSize));
sum += texture2D(texture, texCoord + vec2(blurSize, blurSize));
return sum / 9.0; // Adjust divisor for different blur strengths
}
void main() {
vec2 texCoord = cogl_tex_coord_in[0].st;
vec4 original = texture2D(tex, texCoord);
if (original.a >= 0.5) {
vec4 blurred = blur(tex, texCoord);
// blurred.a = original.a;
vec3 pix_color = blurred.rgb;
vec3 color = vec3(red * blurred.a, green * blurred.a, blue * blurred.a);
vec3 finalColor = mix(pix_color, color, blend * 0.75);
cogl_color_out = vec4(finalColor, (blurred.a + original.a)/2);
} else {
cogl_color_out = original;
}
}

View File

@@ -0,0 +1,139 @@
'use strict';
import Shell from 'gi://Shell';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
const getTintShaderSource = (extensionDir) => {
const SHADER_PATH = GLib.build_filenamev([
extensionDir,
'effects',
'blur_effect.glsl',
]);
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
export const BlurEffect = GObject.registerClass(
{},
class SearchLighBlurEffect extends Clutter.ShaderEffect {
_init(params) {
this._red = null;
this._green = null;
this._blue = null;
this._blend = null;
this._static = true;
// initialize without color as a parameter
let _color = params.color;
delete params.color;
super._init(params);
// set shader color
if (_color) this.color = _color;
}
preload(path) {
// set shader source
this._source = getTintShaderSource(path);
if (this._source) this.set_shader_source(this._source);
this.update_enabled();
}
get red() {
return this._red;
}
set red(value) {
if (this._red !== value) {
this._red = value;
this.set_uniform_value('red', parseFloat(this._red - 1e-6));
}
}
get green() {
return this._green;
}
set green(value) {
if (this._green !== value) {
this._green = value;
this.set_uniform_value('green', parseFloat(this._green - 1e-6));
}
}
get blue() {
return this._blue;
}
set blue(value) {
if (this._blue !== value) {
this._blue = value;
this.set_uniform_value('blue', parseFloat(this._blue - 1e-6));
}
}
get blend() {
return this._blend;
}
set blend(value) {
if (value > 0.5) {
value *= 0.75;
if (value < 0.5) {
value = 0.5;
}
}
if (this._blend !== value) {
this._blend = value;
this.set_uniform_value('blend', parseFloat(this._blend - 1e-6));
}
this.update_enabled();
}
set color(rgba) {
let [r, g, b, a] = rgba;
this.red = r;
this.green = g;
this.blue = b;
this.blend = a;
}
get color() {
return [this.red, this.green, this.blue, this.blend];
}
/// False set function, only cares about the color. Too hard to change.
set(params) {
this.color = params.color;
}
update_enabled() {
this.set_enabled(this.blend > 0 && this._static);
}
vfunc_paint_target(paint_node = null, paint_context = null) {
this.set_uniform_value('tex', 0);
if (paint_node && paint_context)
super.vfunc_paint_target(paint_node, paint_context);
else if (paint_node) super.vfunc_paint_target(paint_node);
else super.vfunc_paint_target();
}
}
);

View File

@@ -0,0 +1,10 @@
uniform sampler2D tex;
uniform float red;
uniform float green;
uniform float blue;
uniform float blend;
void main() {
vec4 c = texture2D(tex, cogl_tex_coord_in[0].st);
cogl_color_out = vec4(red * c.a * blend, green * c.a * blend, blue * c.a * blend, c.a * blend);
}

View File

@@ -0,0 +1,143 @@
// Adapted from from Blur-My-Shell
'use strict';
import Shell from 'gi://Shell';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
const getColorEffectShaderSource = (extensionDir) => {
const SHADER_PATH = GLib.build_filenamev([
extensionDir,
'effects',
'color_effect.glsl',
]);
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
/// New Clutter Shader Effect that simply mixes a color in, the class applies
/// the GLSL shader programmed into vfunc_get_static_shader_source and applies
/// it to an Actor.
///
/// Clutter Shader Source Code:
/// https://github.com/GNOME/clutter/blob/master/clutter/clutter-shader-effect.c
///
/// GJS Doc:
/// https://gjs-docs.gnome.org/clutter10~10_api/clutter.shadereffect
export const ColorEffect = GObject.registerClass(
{},
class SearchLightColorShader extends Clutter.ShaderEffect {
_init(params) {
this._red = null;
this._green = null;
this._blue = null;
this._blend = null;
this._static = true;
// initialize without color as a parameter
let _color = params.color;
delete params.color;
super._init(params);
// set shader color
if (_color) this.color = _color;
}
preload(path) {
// set shader source
this._source = getColorEffectShaderSource(path);
if (this._source) this.set_shader_source(this._source);
this.update_enabled();
}
get red() {
return this._red;
}
set red(value) {
if (this._red !== value) {
this._red = value;
this.set_uniform_value('red', parseFloat(this._red - 1e-6));
}
}
get green() {
return this._green;
}
set green(value) {
if (this._green !== value) {
this._green = value;
this.set_uniform_value('green', parseFloat(this._green - 1e-6));
}
}
get blue() {
return this._blue;
}
set blue(value) {
if (this._blue !== value) {
this._blue = value;
this.set_uniform_value('blue', parseFloat(this._blue - 1e-6));
}
}
get blend() {
return this._blend;
}
set blend(value) {
if (this._blend !== value) {
this._blend = value;
this.set_uniform_value('blend', parseFloat(this._blend - 1e-6));
}
this.update_enabled();
}
set color(rgba) {
let [r, g, b, a] = rgba;
this.red = r;
this.green = g;
this.blue = b;
this.blend = a;
}
get color() {
return [this.red, this.green, this.blue, this.blend];
}
/// False set function, only cares about the color. Too hard to change.
set(params) {
this.color = params.color;
}
update_enabled() {
this.set_enabled(this.blend > 0 && this._static);
}
vfunc_paint_target(paint_node = null, paint_context = null) {
this.set_uniform_value('tex', 0);
if (paint_node && paint_context)
super.vfunc_paint_target(paint_node, paint_context);
else if (paint_node) super.vfunc_paint_target(paint_node);
else super.vfunc_paint_target();
}
}
);

View File

@@ -0,0 +1,64 @@
'use strict';
/* PennerEasing */
export const Linear = {
easeNone: (t, b, c, d) => {
return (c * t) / d + b;
},
easeIn: (t, b, c, d) => {
return (c * t) / d + b;
},
easeOut: (t, b, c, d) => {
return (c * t) / d + b;
},
easeInOut: (t, b, c, d) => {
return (c * t) / d + b;
},
};
export const Bounce = {
easeIn: (t, b, c, d) => {
return c - Bounce.easeOut(d - t, 0, c, d) + b;
},
easeOut: (t, b, c, d) => {
if ((t /= d) < 1 / 2.75) {
return c * (7.5625 * t * t) + b;
} else if (t < 2 / 2.75) {
let postFix = (t -= 1.5 / 2.75);
return c * (7.5625 * postFix * t + 0.75) + b;
} else if (t < 2.5 / 2.75) {
let postFix = (t -= 2.25 / 2.75);
return c * (7.5625 * postFix * t + 0.9375) + b;
} else {
let postFix = (t -= 2.625 / 2.75);
return c * (7.5625 * postFix * t + 0.984375) + b;
}
},
easeInOut: (t, b, c, d) => {
if (t < d / 2) return Bounce.easeIn(t * 2, 0, c, d) * 0.5 + b;
else return Bounce.easeOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
},
};
var Back = {
easeIn: (t, b, c, d) => {
let s = 1.70158;
let postFix = (t /= d);
return c * postFix * t * ((s + 1) * t - s) + b;
},
easeOut: (t, b, c, d) => {
let s = 1.70158;
return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
},
easeInOut: (t, b, c, d) => {
let s = 1.70158;
if ((t /= d / 2) < 1)
return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;
let postFix = (t -= 2);
return (c / 2) * (postFix * t * (((s *= 1.525) + 1) * t + s) + 2) + b;
},
};

View File

@@ -0,0 +1,22 @@
uniform sampler2D tex;
uniform float red;
uniform float green;
uniform float blue;
uniform float blend;
vec3 greyscale(vec3 color, float str) {
float g = dot(color, vec3(0.299, 0.587, 0.114));
return mix(color, vec3(g), str);
}
vec3 greyscale(vec3 color) {
return greyscale(color, 1.0);
}
void main() {
vec4 c = texture2D(tex, cogl_tex_coord_in[0].st);
vec3 pix_color = greyscale(c.rgb);
vec3 color = vec3(red * c.a, green * c.a, blue * c.a);
cogl_color_out = vec4(mix(pix_color, color, blend), c.a);
}

View File

@@ -0,0 +1,150 @@
// Adapted from from Blur-My-Shell
// Adapted from https://gist.github.com/yiwenl/1c2ce935e66b82c7df5f
'use strict';
import Shell from 'gi://Shell';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
const getMonochromeShaderSource = (extensionDir) => {
const SHADER_PATH = GLib.build_filenamev([
extensionDir,
'effects',
'monochrome_effect.glsl',
]);
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
/// New Clutter Shader Effect that simply mixes a color in, the class applies
/// the GLSL shader programmed into vfunc_get_static_shader_source and applies
/// it to an Actor.
///
/// Clutter Shader Source Code:
/// https://github.com/GNOME/clutter/blob/master/clutter/clutter-shader-effect.c
///
/// GJS Doc:
/// https://gjs-docs.gnome.org/clutter10~10_api/clutter.shadereffect
export const MonochromeEffect = GObject.registerClass(
{},
class SearchLightMonochromeEffect extends Clutter.ShaderEffect {
_init(params) {
this._red = null;
this._green = null;
this._blue = null;
this._blend = null;
this._static = true;
// initialize without color as a parameter
let _color = params.color;
delete params.color;
super._init(params);
// set shader color
if (_color) this.color = _color;
}
preload(path) {
// set shader source
this._source = getMonochromeShaderSource(path);
if (this._source) this.set_shader_source(this._source);
this.update_enabled();
}
get red() {
return this._red;
}
set red(value) {
if (this._red !== value) {
this._red = value;
this.set_uniform_value('red', parseFloat(this._red - 1e-6));
}
}
get green() {
return this._green;
}
set green(value) {
if (this._green !== value) {
this._green = value;
this.set_uniform_value('green', parseFloat(this._green - 1e-6));
}
}
get blue() {
return this._blue;
}
set blue(value) {
if (this._blue !== value) {
this._blue = value;
this.set_uniform_value('blue', parseFloat(this._blue - 1e-6));
}
}
get blend() {
return this._blend;
}
set blend(value) {
if (value > 0.5) {
value *= 0.75;
if (value < 0.5) {
value = 0.5;
}
}
if (this._blend !== value) {
this._blend = value;
this.set_uniform_value('blend', parseFloat(this._blend - 1e-6));
}
this.update_enabled();
}
set color(rgba) {
let [r, g, b, a] = rgba;
this.red = r;
this.green = g;
this.blue = b;
this.blend = a;
}
get color() {
return [this.red, this.green, this.blue, this.blend];
}
/// False set function, only cares about the color. Too hard to change.
set(params) {
this.color = params.color;
}
update_enabled() {
this.set_enabled(this.blend > 0 && this._static);
}
vfunc_paint_target(paint_node = null, paint_context = null) {
this.set_uniform_value('tex', 0);
if (paint_node && paint_context)
super.vfunc_paint_target(paint_node, paint_context);
else if (paint_node) super.vfunc_paint_target(paint_node);
else super.vfunc_paint_target();
}
}
);

View File

@@ -0,0 +1,12 @@
uniform sampler2D tex;
uniform float red;
uniform float green;
uniform float blue;
uniform float blend;
void main() {
vec4 c = texture2D(tex, cogl_tex_coord_in[0].st);
vec3 pix_color = c.rgb;
vec3 color = vec3(red * c.a, green * c.a, blue * c.a);
cogl_color_out = vec4(mix(pix_color, color, blend), c.a);
}

View File

@@ -0,0 +1,150 @@
// Adapted from from Blur-My-Shell
'use strict';
import Shell from 'gi://Shell';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
const getTintShaderSource = (extensionDir) => {
const SHADER_PATH = GLib.build_filenamev([
extensionDir,
'effects',
'tint_effect.glsl',
]);
try {
return Shell.get_file_contents_utf8_sync(SHADER_PATH);
} catch (e) {
console.log(`[d2dl] error loading shader from ${SHADER_PATH}: ${e}`);
return null;
}
};
/// New Clutter Shader Effect that simply mixes a color in, the class applies
/// the GLSL shader programmed into vfunc_get_static_shader_source and applies
/// it to an Actor.
///
/// Clutter Shader Source Code:
/// https://github.com/GNOME/clutter/blob/master/clutter/clutter-shader-effect.c
///
/// GJS Doc:
/// https://gjs-docs.gnome.org/clutter10~10_api/clutter.shadereffect
export const TintEffect = GObject.registerClass(
{},
class SearchLightTintEffect extends Clutter.ShaderEffect {
_init(params) {
this._red = null;
this._green = null;
this._blue = null;
this._blend = null;
this._static = true;
// initialize without color as a parameter
let _color = params.color;
delete params.color;
super._init(params);
// set shader color
if (_color) this.color = _color;
}
preload(path) {
// set shader source
this._source = getTintShaderSource(path);
if (this._source) this.set_shader_source(this._source);
this.update_enabled();
}
get red() {
return this._red;
}
set red(value) {
if (this._red !== value) {
this._red = value;
this.set_uniform_value('red', parseFloat(this._red - 1e-6));
}
}
get green() {
return this._green;
}
set green(value) {
if (this._green !== value) {
this._green = value;
this.set_uniform_value('green', parseFloat(this._green - 1e-6));
}
}
get blue() {
return this._blue;
}
set blue(value) {
if (this._blue !== value) {
this._blue = value;
this.set_uniform_value('blue', parseFloat(this._blue - 1e-6));
}
}
get blend() {
return this._blend;
}
set blend(value) {
if (value > 0.5) {
value *= 0.75;
if (value < 0.5) {
value = 0.5;
}
}
if (this._blend !== value) {
this._blend = value;
this.set_uniform_value('blend', parseFloat(this._blend - 1e-6));
}
this.update_enabled();
}
set color(rgba) {
let [r, g, b, a] = rgba;
this.red = r;
this.green = g;
this.blue = b;
this.blend = a;
}
get color() {
return [this.red, this.green, this.blue, this.blend];
}
/// False set function, only cares about the color. Too hard to change.
set(params) {
this.color = params.color;
}
update_enabled() {
this.set_enabled(this.blend > 0 && this._static);
}
vfunc_paint_target(paint_node = null, paint_context = null) {
this.set_uniform_value('tex', 0);
if (paint_node && paint_context)
super.vfunc_paint_target(paint_node, paint_context);
else if (paint_node) super.vfunc_paint_target(paint_node);
else super.vfunc_paint_target();
}
}
);

View File

@@ -0,0 +1,939 @@
/* extension.js
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
*/
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import Gio from 'gi://Gio';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
import St from 'gi://St';
import Graphene from 'gi://Graphene';
import { trySpawnCommandLine } from 'resource:///org/gnome/shell/misc/util.js';
import { Timer } from './timer.js';
import { Style } from './style.js';
import { TintEffect } from './effects/tint_effect.js';
import { MonochromeEffect } from './effects/monochrome_effect.js';
import { BlurEffect } from './effects/blur_effect.js';
import { schemaId, SettingsKeys } from './preferences/keys.js';
import { KeyboardShortcuts } from './keybinding.js';
import {
Extension,
gettext as _,
} from 'resource:///org/gnome/shell/extensions/extension.js';
var SearchLight = GObject.registerClass(
{},
class SearchLight extends St.Widget {
_init() {
super._init();
this.name = 'searchLight';
this.offscreen_redirect = Clutter.OffscreenRedirect.ALWAYS;
this.layout_manager = new Clutter.BinLayout();
}
}
);
const BLURRED_BG_PATH = '/tmp/searchlight-bg-blurred.jpg';
export default class SearchLightExt extends Extension {
enable() {
Main.overview.graphene = Graphene;
this._style = new Style();
this._hiTimer = new Timer('hi-res timer');
this._hiTimer.initialize(15);
// for deferred or debounced runs
this._loTimer = new Timer('lo-res timer');
this._loTimer.initialize(750);
this._settings = this.getSettings(schemaId);
this._settingsKeys = SettingsKeys();
this._settingsKeys.connectSettings(this._settings, (name, value) => {
let n = name.replace(/-/g, '_');
this[n] = value;
switch (name) {
case 'show-panel-icon':
if (this._indicator) {
this._indicator.visible = value;
}
break;
case 'background-color':
case 'blur-background':
this._updateBlurredBackground();
this._updateCss();
break;
case 'border-radius':
break;
case 'shortcut-search':
this._updateShortcut();
break;
case 'secondary-shortcut-search':
this._updateShortcut2();
break;
case 'window-effect': {
this._updateWindowEffect();
break;
}
case 'window-effect-color': {
if (this.windowEffect) {
this.windowEffect.color = this.window_effect_color;
}
break;
}
}
});
Object.keys(this._settingsKeys._keys).forEach((k) => {
let key = this._settingsKeys.getKey(k);
let name = k.replace(/-/g, '_');
this[name] = key.value;
if (key.options) {
this[`${name}_options`] = key.options;
}
// console.log(`${name} ${key.value}`);
});
this._desktopSettings = new Gio.Settings({
schema_id: 'org.gnome.desktop.background',
});
this._desktopSettings.connectObject(
'changed::picture-uri',
() => {
this._updateBlurredBackground();
},
this
);
this.mainContainer = new SearchLight();
this.mainContainer._delegate = this;
this.container = new St.BoxLayout({
name: 'searchLightBox',
vertical: true,
reactive: true,
track_hover: true,
can_focus: true,
});
this.hide();
this.container._delegate = this;
Main.layoutManager.addChrome(this.mainContainer, {
affectsStruts: false,
affectsInputRegion: true,
trackFullscreen: false,
});
this.mainContainer.add_child(this.container);
this._setupBackground();
this.accel = new KeyboardShortcuts();
this.accel.enable();
this.accel2 = new KeyboardShortcuts();
this.accel2.enable();
this._updateShortcut();
this._updateShortcut2();
this._updateCss();
Main.overview.connectObject(
'overview-showing',
this._onOverviewShowing.bind(this),
'overview-hidden',
this._onOverviewHidden.bind(this),
this
);
Main.sessionMode.connectObject('updated', () => this.hide(), this);
Shell.AppSystem.get_default().connectObject(
'app-state-changed',
this._onAppStateChanged.bind(this),
this
);
global.display.connectObject(
'window-created',
(display, win) => {
if (this._visible) {
this.mainContainer.opacity = 0;
}
},
this
);
this._loTimer.runOnce(() => {
//this.show();
// console.log('SearchLightExt: ???');
}, 500);
Main.overview.searchLight = this;
let appInfo = Gio.DesktopAppInfo.new_from_filename(
`${this.path}/apps/org.gnome.Calculator.desktop`
);
let _providers = [];
// deferred startup for providers
let idx = 0;
_providers.forEach((p) => {
this._loTimer.runOnce(() => {
p.initialize();
}, idx * 5000);
});
this._loTimer.runOnce(() => {
this._createIndicator();
}, 1500);
this._updateProviders();
this._updateWindowEffect();
this._updateBlurredBackground();
}
disable() {
this._hiTimer?.shutdown();
this._loTimer?.shutdown();
this._hiTimer = null;
this._loTimer = null;
if (this._indicator) {
this._indicator.disconnectObject(this);
if (this._indicator.get_parent()) {
this._indicator.get_parent().remove_child(this._indicator);
}
this._indicator = null;
}
this._style.unloadAll();
this._style = null;
this._settingsKeys.disconnectSettings();
this._settings = null;
this._desktopSettings.disconnectObject();
this._desktopSettings = null;
if (this.accel) {
this.accel.disable();
delete this.accel;
this.accel = null;
}
if (this.accel2) {
this.accel2.disable();
delete this.accel2;
this.accel2 = null;
}
this._removeProviders();
this._providers = null;
Main.layoutManager.removeChrome(this.mainContainer);
this.mainContainer = null;
}
_createIndicator() {
if (this._indicator) return;
this._indicator = new St.Button({
style_class: 'panel-status-indicators-box',
});
let icon = new St.Icon({
gicon: new Gio.ThemedIcon({ name: 'search-symbolic' }),
});
icon.style = 'margin-top: 6px !important; margin-bottom: 6px !important;';
this._indicator.set_child(icon);
this._indicator.connectObject(
'button-press-event',
this._toggle_search_light.bind(this),
this
);
try {
Main.panel._rightBox.insert_child_at_index(this._indicator, 0);
this._indicator.visible = this.show_panel_icon;
} catch (err) {
console.log(err);
}
}
_createEffect(idx) {
let effect = null;
switch (idx) {
case 1: {
effect = new TintEffect({
name: 'color',
color: this.window_effect_color,
});
effect.preload(this.path);
break;
}
case 2: {
effect = new MonochromeEffect({
name: 'color',
color: this.window_effect_color,
});
effect.preload(this.path);
break;
}
case 3: {
effect = new BlurEffect({
name: 'color',
color: this.window_effect_color,
});
effect.preload(this.path);
break;
}
}
return effect;
}
_updateBlurredBackground() {
this.desktop_background = this._desktopSettings.get_string('picture-uri');
this.desktop_background_blurred = BLURRED_BG_PATH;
if (this.blur_background) {
// let color = this.background_color || [0, 0, 0, 0.5];
// let bg = this._desktopSettings.get_string('picture-uri');
// let a = Math.floor(100 - color[3] * 100);
// let rgb = this._style.hex(color);
// let cmd = `convert -scale 10% -blur 0x2.5 -resize 200% -fill "${rgb}" -tint ${a} "${bg}" ${BLURRED_BG_PATH}`;
let cmd = `convert -scale 10% -blur 0x2.5 -resize 200% "${this.desktop_background}" ${BLURRED_BG_PATH}`;
console.log(cmd);
trySpawnCommandLine(cmd);
}
}
_updateWindowEffect() {
// this.window_effect = 2;
// this.window_effect_color = [1, 0, 0, 0.5];
this.container.remove_effect_by_name('window-effect');
let effect = this._createEffect(this.window_effect);
if (effect) {
this.container.add_effect_with_name('window-effect', effect);
}
this.windowEffect = effect;
}
_updatePanelIcon(disable) {}
_updateProviders() {
this._removeProviders();
this._providers = [];
let _search = Main.overview.searchController;
if (!_search) return;
// add providers here
if (_search.addProvider) {
this._providers.forEach((p) => {
_search.addProvider(p);
});
}
}
_removeProviders() {
if (!this._providers) {
return;
}
let _search = Main.overview.searchController;
if (!_search) return;
if (_search.removeProvider) {
this._providers.forEach((p) => {
_search.removeProvider(p);
});
}
this._providers = null;
}
_setupBackground() {
if (this._background && this._background.get_parent()) {
this._background.get_parent().remove_child(this._background);
}
// blurred background image
// this._bgActor = new Meta.BackgroundActor();
// let bgSource = Main.layoutManager._backgroundGroup.get_child_at_index(0);
// this._bgActor.set_content(bgSource.get_content());
// this._blurEffect = new Shell.BlurEffect({
// name: 'blur',
// brightness: this.blur_brightness,
// sigma: this.blur_sigma,
// mode: Shell.BlurMode.ACTOR,
// });
if (!this._blurEffect) {
this._blurEffect = this._createEffect(1);
}
let background = new St.Widget({
name: 'searchLightBlurredBackground',
layout_manager: new Clutter.BinLayout(),
x: 0,
y: 0,
width: 20,
height: 20,
});
// let image = new St.Widget({
// name: 'searchLightBlurredBackgroundImage',
// x: 0,
// y: 0,
// width: 20,
// height: 20,
// effect: this._blurEffect,
// });
// image.add_child(this._bgActor);
// background.add_child(image);
// this._bgActor.clip_to_allocation = true;
// this._bgActor.offscreen_redirect = Clutter.OffscreenRedirect.ALWAYS;
this.mainContainer.insert_child_below(background, this.container);
this._background = background;
this._background.opacity = 0;
this._background.visible = false;
}
show() {
if (Main.overview.visible) return;
this._acquire_ui();
if (this._bgActor) {
let bgSource = Main.layoutManager._backgroundGroup.get_child_at_index(0);
this._bgActor.set_content(bgSource.get_content());
}
this.mainContainer.opacity = 0;
this._updateCss();
this._layout();
this.mainContainer.show();
this.container.show();
// fixes the background size relative to text - after adjusting font size
this._hiTimer.runOnce(() => {
this.mainContainer.opacity = 255;
this._layout();
}, 100);
this._add_events();
Meta.disable_unredirect_for_display(global.display);
}
hide() {
this._visible = false;
this._release_ui();
this._remove_events();
this.mainContainer.hide();
// this._hidePopups();
Meta.enable_unredirect_for_display(global.display);
}
_layout() {
this._queryDisplay();
if (!this.monitor) return;
// container size
this.width =
600 + ((this.sw * this.scaleFactor) / 2) * (this.scale_width || 0);
this.height =
400 + ((this.sh * this.scaleFactor) / 2) * (this.scale_height || 0);
// initial height
let font_size = 14;
if (this.font_size) {
font_size = this.font_size_options[this.font_size];
}
if (this.entry_font_size) {
font_size = this.entry_font_size_options[this.entry_font_size];
}
// let padding = {
// 14: 14 * 2.5,
// 16: 16 * 2.4,
// 18: 18 * 2.2,
// 20: 20 * 2.0,
// 22: 22 * 1.8,
// 24: 24 * 1.6,
// };
// this.initial_height = padding[font_size] * this.scaleFactor;
// this.initial_height += font_size * 2 * this.scaleFactor;
// console.log(`${this.initial_height} ${this._entry.height}`);
this.initial_height = this._entry.height + 4 * this.scaleFactor;
// position
let x = this.monitor.x + this.sw / 2 - this.width / 2;
let y = this.monitor.y + this.sh / 2 - this.height / 2;
this._visible = true;
this.container.set_size(this.width, this.initial_height);
this.mainContainer.set_size(this.width, this.initial_height);
this.mainContainer.set_position(x, y);
// background
if (this._background) {
if (this._bgActor) {
this._bgActor.set_position(this.monitor.x - x, this.monitor.y - y);
this._bgActor.set_size(this.monitor.width, this.monitor.height);
this._bgActor
.get_parent()
.set_size(this.monitor.width, this.monitor.height);
}
let padding = 0; //this.border_thickness || 0;
this._background.set_position(padding, padding);
this._background.set_size(
this.monitor.width - padding * 2,
this.monitor.height - padding * 2
);
}
}
_updateShortcut(disable) {
this.accel.unlisten();
let shortcut = '';
try {
shortcut = (this.shortcut_search || []).join('');
} catch (err) {
//
}
if (shortcut == '') {
shortcut = '<Control><Super>Space';
}
if (!disable) {
this.accel.listenFor(shortcut, this._toggle_search_light.bind(this));
}
}
_updateShortcut2(disable) {
this.accel2.unlisten();
let shortcut = '';
try {
shortcut = (this.secondary_shortcut_search || []).join('');
} catch (err) {
//
}
if (shortcut == '') {
shortcut = '<Control><Super>Space';
}
if (!disable) {
this.accel2.listenFor(shortcut, this._toggle_search_light.bind(this));
}
}
_queryDisplay() {
let idx = this.preferred_monitor || 0;
if (idx == 0) {
idx = Main.layoutManager.primaryIndex;
} else if (idx == Main.layoutManager.primaryIndex) {
idx = 0;
}
this.monitor =
Main.layoutManager.monitors[idx] || Main.layoutManager.primaryMonitor;
if (this.popup_at_cursor_monitor) {
let pointer = global.get_pointer();
Main.layoutManager.monitors.forEach((m) => {
if (
pointer[0] >= m.x &&
pointer[0] <= m.x + m.width &&
pointer[1] >= m.y &&
pointer[1] <= m.y + m.height
) {
this.monitor = m;
}
});
}
this.sw = this.monitor.width;
this.sh = this.monitor.height;
if (this._last_monitor_count != Main.layoutManager.monitors.length) {
this._settings.set_int(
'monitor-count',
Main.layoutManager.monitors.length
);
this._last_monitor_count = Main.layoutManager.monitors.length;
}
}
_acquire_ui() {
if (this._entry) return;
if (!Main.overview._toggle) {
Main.overview._toggle = Main.overview.toggle;
}
Main.overview.toggle = () => {
if (this._search && this._search.visible) {
this._search._text.get_parent().grab_key_focus();
}
};
if (!Main.overview._hide) {
Main.overview._hide = Main.overview.hide;
}
Main.overview.hide = () => {
this.mainContainer.opacity = 0;
Main.overview._hide();
};
this._queryDisplay();
this.scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._entry = Main.overview.searchEntry;
this._entryParent = this._entry.get_parent();
this._entry.add_style_class_name('slc');
this._search = Main.overview.searchController;
this._search.hide();
this._searchResults = this._search._searchResults;
this._searchParent = this._search.get_parent();
if (!this._searchResults._activateDefault) {
this._searchResults._activateDefault =
this._searchResults.activateDefault;
}
this._searchResults.activateDefault = () => {
// hide window immediately when activated
this.mainContainer.opacity = 0;
this._searchResults._activateDefault();
};
if (this._entry.get_parent()) {
this._entry.get_parent().remove_child(this._entry);
}
this.container.add_child(this._entry);
if (this._search.get_parent()) {
this._search.get_parent().remove_child(this._search);
}
this.container.add_child(this._search);
if (!this._search.__searchCancelled) {
this._search.__searchCancelled = this._search._searchCancelled;
this._search._searchCancelled = () => {};
}
this._search._text.get_parent().grab_key_focus();
this._textChangedEventId = this._search._text.connect(
'text-changed',
() => {
this.container.set_size(this.width, this.height);
this.mainContainer.set_size(this.width, this.height);
if (this._corners) {
this._corners[2].y = this.height - this._corners[1].height;
this._corners[3].y = this.height - this._corners[1].height;
this._edges[3].y = this.height - 2;
}
this._search.show();
}
);
this._search._text.get_parent().grab_key_focus();
}
_release_ui() {
if (this._entry) {
this._entry.get_parent().remove_child(this._entry);
this._entryParent.add_child(this._entry);
this._entry = null;
}
if (this._search) {
this._removeProviders();
this._search.hide();
this._search.get_parent().remove_child(this._search);
this._searchParent.add_child(this._search);
if (this._textChangedEventId) {
this._search._text.disconnect(this._textChangedEventId);
this._textChangedEventId = null;
}
if (this._search.__searchCancelled) {
this._search._searchCancelled = this._search.__searchCancelled;
this._search.__searchCancelled = null;
}
this._search = null;
if (this._searchResults._activateDefault) {
this._searchResults.activateDefault =
this._searchResults._activateDefault;
this._searchResults._activateDefault = null;
}
}
if (Main.overview._toggle) {
Main.overview.toggle = Main.overview._toggle;
Main.overview._toggle = null;
}
if (Main.overview._hide) {
Main.overview.hide = Main.overview._hide;
Main.overview._hide = null;
}
}
_updateCss(disable) {
let bg = this.background_color || [0, 0, 0, 0.5];
if (this.text_color && this.text_color[3] > 0) {
this.container.remove_style_class_name('light');
} else {
if (0.3 * bg[0] + 0.59 * bg[1] + 0.11 * bg[2] < 0.5) {
this.container.remove_style_class_name('light');
} else {
this.container.add_style_class_name('light');
}
}
this._background.remove_effect_by_name('blur');
if (this._blurEffect && this.blur_background) {
this._background.add_effect_with_name('blur', this._blurEffect);
this._blurEffect.color = bg;
}
this._background.visible = true;
this._background.opacity = 200;
let styles = [];
{
let ss = [];
if (!this.blur_background) {
let clr = this._style.rgba(this.background_color);
ss.push(`\n background: rgba(${clr});`);
}
if (
this.border_thickness
// && !this.blur_background
) {
let clr = this._style.rgba(this.border_color);
ss.push(`\n border: ${this.border_thickness}px solid rgba(${clr});`);
}
styles.push(`#searchLight {${ss.join(' ')}}`);
styles.push(`#searchLightBlurredBackground {${ss.join(' ')}}`);
}
// ss.push(`\n background-image: url("${bg}");`);
if (
this.blur_background &&
this.desktop_background_blurred &&
this.monitor
) {
let sw = this.monitor.width;
let sh = this.monitor.height;
let ss = [];
// ss.push(`\n background-image: url("${BLURRED_BG_PATH}");`);
ss.push(
`\n background-image: url("${this.desktop_background_blurred}");`
);
ss.push(`\n background-size: ${sw}px ${sh}px;`);
ss.push(`\n background-position: top center;`);
// ss.push(`\n border: 2px solid red;`);
this._background.style = ss.join(' ');
// styles.push(`#searchLightBlurredBackground {${ss.join(' ')}}`);
// styles.push(`#searchLight {${ss.join(' ')}}`);
} else {
this._background.style = '';
}
{
if (this.border_radius !== null) {
let rads = [0, 16, 18, 20, 22, 24, 28, 32];
let r = rads[Math.floor(this.border_radius)];
if (r) {
let st = `StBoxLayout.search-section-content { border-radius: ${r}px !important; }`;
st = '#searchLightBlurredBackgroundImage,\n' + st; // has no effect
st = '#searchLightBlurredBackground,\n' + st; // has no effect
st = '#searchLightBox,\n' + st;
st = '#searchLight,\n' + st;
styles.push(st);
}
}
}
if (this.font_size !== null) {
let f = this.font_size_options[this.font_size];
if (f) {
styles.push(`#searchLightBox * { font-size: ${f}pt !important; }`);
}
f = this.entry_font_size_options[this.entry_font_size];
if (f) {
styles.push(
`#searchLightBox > StEntry, #searchLightBox > StEntry:focus { font-size: ${f}pt !important; }`
);
}
}
let clr = this._style.rgba(this.text_color);
if ((this.text_color || [1, 1, 1, 1])[3] > 0) {
styles.push(`#searchLightBox * { color: rgba(${clr}) !important }`);
} else {
styles.push('/* empty */');
}
// console.log(styles);
this._style.build('custom-search-light', styles);
}
_toggle_search_light() {
if (this._inOverview) return;
if (!this._visible) {
this.show();
if (this._entry) {
global.stage.set_key_focus(this._entry);
}
} else {
global.stage.set_key_focus(null);
}
}
_add_events() {
global.stage.connectObject(
'notify::key-focus',
this._onKeyFocusChanged.bind(this),
'key-press-event',
this._onKeyPressed.bind(this),
this
);
global.display.connectObject(
'notify::focus-window',
this._onFocusWindow.bind(this),
'in-fullscreen-changed',
this._onFullScreen.bind(this),
this
);
}
_remove_events() {
global.display.disconnectObject(this);
global.stage.disconnectObject(this);
Main.overview.disconnectObject(this);
Main.sessionMode.disconnectObject(this);
Shell.AppSystem.get_default().disconnectObject(this);
}
_onOverviewShowing() {
this._inOverview = true;
}
_onOverviewHidden() {
this._inOverview = false;
}
_onAppStateChanged(st) {
this._lastAppState = st;
if (this._visible) {
this.mainContainer.opacity = 0;
}
}
_hidePopups() {
let popup = this._lastPopup;
this._lastPopup = null;
try {
if (!popup.close && popup._getTopMenu()) {
popup = popup._getTopMenu();
}
// elaborate way of hiding the popup
popup.opacity = 0;
this._startupSeq = this._hiTimer.runSequence([
{
func: () => {
popup.opacity = 0;
},
delay: 0,
},
{
func: () => {
popup._delegate.close(false);
},
delay: 250,
},
]);
} catch (err) {
console.log(err);
}
}
_onFocusWindow(w, e) {}
_onKeyFocusChanged(previous) {
if (!this._entry) return;
let focus = global.stage.get_key_focus();
let appearFocused =
this._entry.contains(focus) || this._searchResults.contains(focus);
if (!appearFocused) {
// popups are not handled well.. hide immediately
if (
focus &&
focus.style_class &&
focus.style_class.includes('popup-menu')
) {
this._lastPopup = focus;
this._hidePopups();
}
this.hide();
}
// hide window immediately when activated
if (focus.activate) {
if (!focus._activate) {
focus._activate = focus.activate;
focus.activate = () => {
this.mainContainer.opacity = 0;
focus._activate();
};
}
}
}
_onKeyPressed(obj, evt) {
if (!this._entry) return;
let focus = global.stage.get_key_focus();
if (!this._entry.contains(focus)) {
if (evt.get_key_symbol() === Clutter.KEY_Escape) {
this.hide();
return Clutter.EVENT_STOP;
}
this._search._text.get_parent().grab_key_focus();
}
return Clutter.EVENT_STOP;
}
_onFullScreen() {
this.hide();
}
}

View File

@@ -0,0 +1,64 @@
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
// from https://stackoverflow.com/questions/12325405/gnome-shell-extension-key-binding
export const KeyboardShortcuts = class {
constructor() {}
enable() {
this._grabbers = {};
this._eventId = global.display.connect(
'accelerator-activated',
(display, action, deviceId, timestamp) => {
this._onAccelerator(action);
}
);
}
disable() {
this.unlisten();
global.display.disconnect(this._eventId);
}
listenFor(accelerator, callback) {
let action = global.display.grab_accelerator(accelerator, 0);
if (action == Meta.KeyBindingAction.NONE) {
console.log(`Unable to grab accelerator ${accelerator}`);
return;
}
let name = Meta.external_binding_name_for_action(action);
Main.wm.allowKeybinding(name, Shell.ActionMode.ALL);
this._grabbers[action] = {
name: name,
accelerator: accelerator,
callback: callback,
};
console.log(`Grabbed ${accelerator}`);
}
unlisten() {
if (this._grabbers) {
Object.keys(this._grabbers).forEach((k) => {
Main.wm.removeKeybinding(this._grabbers[k].name, Shell.ActionMode.ALL);
// what the post in stackoverflow doesn't show is proper clean.. ungrab!
global.display.ungrab_accelerator(k);
});
}
this._grabbers = {};
}
_onAccelerator(action) {
let grabber = this._grabbers[action];
if (grabber) {
grabber.callback();
} else {
console.log(`No listeners ${action}`);
}
}
};

View File

@@ -0,0 +1,14 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "Take the apps search out of overview.",
"gettext-domain": "search-light",
"name": "Search Light",
"schema-id": "org.gnome.shell.extensions.search-light",
"shell-version": [
"45",
"46"
],
"url": "https://github.com/icedman/search-light",
"uuid": "search-light@icedman.github.com",
"version": 27
}

View File

@@ -0,0 +1,119 @@
'use strict';
import Gio from 'gi://Gio';
import GObject from 'gi://GObject';
// from Dash-to-Dock
export const MonitorsConfig = GObject.registerClass(
{
Signals: {
updated: {},
},
},
class MonitorsConfig extends GObject.Object {
static get XML_INTERFACE() {
return '<node>\
<interface name="org.gnome.Mutter.DisplayConfig">\
<method name="GetCurrentState">\
<arg name="serial" direction="out" type="u" />\
<arg name="monitors" direction="out" type="a((ssss)a(siiddada{sv})a{sv})" />\
<arg name="logical_monitors" direction="out" type="a(iiduba(ssss)a{sv})" />\
<arg name="properties" direction="out" type="a{sv}" />\
</method>\
<signal name="MonitorsChanged" />\
</interface>\
</node>';
}
static get ProxyWrapper() {
return Gio.DBusProxy.makeProxyWrapper(MonitorsConfig.XML_INTERFACE);
}
constructor() {
super();
this._monitorsConfigProxy = new MonitorsConfig.ProxyWrapper(
Gio.DBus.session,
'org.gnome.Mutter.DisplayConfig',
'/org/gnome/Mutter/DisplayConfig'
);
// Connecting to a D-Bus signal
this._monitorsConfigProxy.connectSignal('MonitorsChanged', () =>
this._updateResources()
);
this._primaryMonitor = null;
this._monitors = [];
this._logicalMonitors = [];
this._updateResources();
}
_updateResources() {
this._monitorsConfigProxy.GetCurrentStateRemote((resources, err) => {
if (err) {
logError(err);
return;
}
const [serial_, monitors, logicalMonitors] = resources;
let index = 0;
for (const monitor of monitors) {
const [monitorSpecs, modes_, props] = monitor;
const [connector, vendor, product, serial] = monitorSpecs;
this._monitors.push({
index: index++,
active: false,
connector,
vendor,
product,
serial,
displayName: props['display-name'].unpack(),
});
}
for (const logicalMonitor of logicalMonitors) {
const [x_, y_, scale_, transform_, isPrimary, monitorsSpecs] =
logicalMonitor;
// We only care about the first one really
for (const monitorSpecs of monitorsSpecs) {
const [connector, vendor, product, serial] = monitorSpecs;
const monitor = this._monitors.find(
(m) =>
m.connector === connector &&
m.vendor === vendor &&
m.product === product &&
m.serial === serial
);
if (monitor) {
monitor.active = true;
monitor.isPrimary = isPrimary;
if (monitor.isPrimary) this._primaryMonitor = monitor;
break;
}
}
}
const activeMonitors = this._monitors.filter((m) => m.active);
if (activeMonitors.length > 1 && logicalMonitors.length === 1) {
// We're in cloning mode, so let's just activate the primary monitor
this._monitors.forEach((m) => (m.active = false));
this._primaryMonitor.active = true;
}
this.emit('updated');
});
}
get primaryMonitor() {
return this._primaryMonitor;
}
get monitors() {
return this._monitors;
}
}
);

View File

@@ -0,0 +1,113 @@
'use strict';
import { PrefKeys } from './prefKeys.js';
export const schemaId = 'org.gnome.shell.extensions.search-light';
export const SettingsKeys = () => {
let settingsKeys = new PrefKeys();
settingsKeys.setKeys({
'border-radius': {
default_value: 0,
widget_type: 'scale',
},
'border-thickness': {
default_value: 0,
widget_type: 'dropdown',
test: { values: [0, 1, 2, 3] },
},
'border-color': {
default_value: [1, 1, 1, 1],
widget_type: 'color',
},
'scale-width': {
default_value: 0.2,
widget_type: 'scale',
},
'scale-height': {
default_value: 0.2,
widget_type: 'scale',
},
'background-color': {
default_value: [0, 0, 0, 0.5],
widget_type: 'color',
},
'preferred-monitor': {
default_value: 0,
widget_type: 'dropdown',
test: { values: [0, 1, 2] },
},
'msg-to-ext': {
default_value: '',
widget_type: 'string',
},
'secondary-shortcut-search': {
default_value: [],
widget_type: 'shortcut',
},
'shortcut-search': {
default_value: [],
widget_type: 'shortcut',
},
'popup-at-cursor-monitor': {
default_value: false,
widget_type: 'switch',
},
'blur-background': {
default_value: false,
widget_type: 'switch',
},
'blur-sigma': {
default_value: 30,
widget_type: 'scale',
},
'blur-brightness': {
default_value: 0.6,
widget_type: 'scale',
},
'font-size': {
default_value: 0,
widget_type: 'dropdown',
options: [0, 16, 18, 20, 22, 24],
},
'entry-font-size': {
default_value: 1,
widget_type: 'dropdown',
options: [0, 16, 18, 20, 22, 24],
},
'text-color': {
default_value: [1, 1, 1, 0],
widget_type: 'color',
},
'entry-text-color': {
default_value: [1, 1, 1, 0],
widget_type: 'color',
},
'show-panel-icon': {
default_value: false,
widget_type: 'switch',
},
'unit-converter': {
default_value: false,
widget_type: 'switch',
},
'currency-converter': {
default_value: false,
widget_type: 'switch',
},
'window-effect': {
default_value: 0,
widget_type: 'dropdown',
test: { values: [0, 1, 2] },
themed: true,
},
'window-effect-color': {
default_value: [1, 1, 1, 1],
widget_type: 'color',
themed: true,
},
});
return settingsKeys;
};

View File

@@ -0,0 +1,285 @@
import Gdk from 'gi://Gdk';
import GLib from 'gi://GLib';
export let PrefKeys = class {
constructor() {
this._keys = {};
}
setKeys(keys) {
Object.keys(keys).forEach((name) => {
let key = keys[name];
this.setKey(
name,
key.default_value,
key.widget_type,
key.key_maps,
key.test,
key.callback,
key.options
);
});
}
setKey(name, default_value, widget_type, maps, test, callback, options) {
this._keys[name] = {
name,
default_value,
widget_type,
value: default_value,
maps: maps,
test: test,
callback,
options,
object: null,
};
}
setValue(name, value) {
this._keys[name].value = value;
let settings = this._settings;
let keys = this._keys;
if (settings) {
let key = keys[name];
switch (key.widget_type) {
case 'switch': {
settings.set_boolean(name, value);
break;
}
case 'dropdown': {
settings.set_int(name, value);
break;
}
case 'scale': {
settings.set_double(name, value);
break;
}
case 'color': {
settings.set_value(name, new GLib.Variant('(dddd)', value));
break;
}
case 'shortcut': {
settings.set_value(name, new GLib.Variant('as', value));
break;
}
}
}
if (this._keys[name].callback) {
this._keys[name].callback(this._keys[name].value);
}
}
getKey(name) {
return this._keys[name];
}
getValue(name) {
let value = this._keys[name].value;
return value;
}
reset(name) {
this.setValue(name, this._keys[name].default_value);
}
resetAll() {
Object.keys(this._keys).forEach((k) => {
this.reset(k);
});
}
keys() {
return this._keys;
}
connectSettings(settings, callback) {
this._settingsListeners = [];
this._settings = settings;
let builder = this._builder;
let self = this;
let keys = this._keys;
Object.keys(keys).forEach((name) => {
let key = keys[name];
key.object = builder ? builder.get_object(key.name) : null;
switch (key.widget_type) {
case 'json_array': {
key.value = [];
try {
key.value = JSON.parse(settings.get_string(name));
} catch (err) {
// fail silently
}
break;
}
case 'switch': {
key.value = settings.get_boolean(name);
if (key.object) key.object.set_active(key.value);
break;
}
case 'dropdown': {
key.value = settings.get_int(name);
try {
if (key.object) key.object.set_selected(key.value);
} catch (err) {
//
}
break;
}
case 'scale': {
key.value = settings.get_double(name);
if (key.object) key.object.set_value(key.value);
break;
}
case 'color': {
key.value = settings.get_value(name).deepUnpack();
try {
if (key.object) {
key.object.set_rgba(
new Gdk.RGBA({
red: key.value[0],
green: key.value[1],
blue: key.value[2],
alpha: key.value[3],
})
);
}
} catch (err) {
//
}
break;
}
case 'shortcut': {
key.value = settings.get_value(name).deepUnpack();
break;
}
}
this._settingsListeners.push(
settings.connect(`changed::${name}`, () => {
let key = keys[name];
switch (key.widget_type) {
case 'json_array': {
key.value = [];
try {
key.value = JSON.parse(settings.get_string(name));
} catch (err) {
// fail silently
}
break;
}
case 'switch': {
key.value = settings.get_boolean(name);
break;
}
case 'dropdown': {
key.value = settings.get_int(name);
break;
}
case 'scale': {
key.value = settings.get_double(name);
break;
}
case 'color': {
key.value = settings.get_value(name).deepUnpack();
if (key.value.length != 4) {
key.value = [1, 1, 1, 0];
}
break;
}
case 'string': {
key.value = settings.get_string(name);
break;
}
case 'shortcut': {
key.value = settings.get_value(name).deepUnpack();
break;
}
}
if (callback) callback(name, key.value);
})
);
});
}
disconnectSettings() {
this._settingsListeners.forEach((id) => {
this._settings.disconnect(id);
});
this._settingsListeners = [];
}
connectBuilder(builder) {
this._builderListeners = [];
this._builder = builder;
let self = this;
let keys = this._keys;
Object.keys(keys).forEach((name) => {
let key = keys[name];
let signal_id = null;
key.object = builder.get_object(key.name);
if (!key.object) {
return;
}
switch (key.widget_type) {
case 'json_array': {
// unimplemented
break;
}
case 'switch': {
key.object.set_active(key.default_value);
signal_id = key.object.connect('state-set', (w) => {
let value = w.get_active();
self.setValue(name, value);
if (key.callback) {
key.callback(value);
}
});
break;
}
case 'dropdown': {
signal_id = key.object.connect('notify::selected-item', (w) => {
let index = w.get_selected();
let value = key.maps && index in key.maps ? key.maps[index] : index;
self.setValue(name, value);
});
break;
}
case 'scale': {
signal_id = key.object.connect('value-changed', (w) => {
let value = w.get_value();
self.setValue(name, value);
});
break;
}
case 'color': {
signal_id = key.object.connect('color-set', (w) => {
let rgba = w.get_rgba();
let value = [rgba.red, rgba.green, rgba.blue, rgba.alpha];
self.setValue(name, value);
});
break;
}
case 'button': {
signal_id = key.object.connect('clicked', (w) => {
if (key.callback) {
key.callback();
}
});
break;
}
}
// when do we clean this up?
this._builderListeners.push({
source: key.object,
signal_id: signal_id,
});
});
}
};

View File

@@ -0,0 +1,177 @@
// loosely based on JustPerfection & Blur-My-Shell
import Gdk from 'gi://Gdk';
import Gtk from 'gi://Gtk';
import Gio from 'gi://Gio';
import { ShortcutSettingWidget } from './shortcuts.js';
const GETTEXT_DOMAIN = 'search-light';
import { schemaId, SettingsKeys } from './preferences/keys.js';
import { MonitorsConfig } from './monitors.js';
import {
ExtensionPreferences,
gettext as _,
} from 'resource:///org/gnome/Shell/Extensions/js/extensions/prefs.js';
export default class Preferences extends ExtensionPreferences {
constructor(metadata) {
super(metadata);
let iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default());
let UIFolderPath = `${this.path}/ui`;
iconTheme.add_search_path(`${UIFolderPath}/icons`);
// ExtensionUtils.initTranslations(GETTEXT_DOMAIN);
}
find(n, name) {
if (n.get_name() == name) {
return n;
}
let c = n.get_first_child();
while (c) {
let cn = this.find(c, name);
if (cn) {
return cn;
}
c = c.get_next_sibling();
}
return null;
}
dump(n, l) {
let s = '';
for (let i = 0; i < l; i++) {
s += ' ';
}
print(`${s}${n.get_name()}`);
let c = n.get_first_child();
while (c) {
this.dump(c, l + 1);
c = c.get_next_sibling();
}
}
addMenu(window, builder) {
// let menu_util = builder.get_object('menu_util');
// window.add(menu_util);
// let gwc = this.find(window, 'GtkWindowControls');
// gwc.visible = false;
// console.log(gwc);
let headerbar = this.find(window, 'AdwHeaderBar');
if (!headerbar) {
return;
}
headerbar.pack_start(builder.get_object('info_menu'));
// setup menu actions
const actionGroup = new Gio.SimpleActionGroup();
window.insert_action_group('prefs', actionGroup);
// a list of actions with their associated link
const actions = [
{
name: 'open-bug-report',
link: 'https://github.com/icedman/search-light/issues',
},
{
name: 'open-readme',
link: 'https://github.com/icedman/search-light',
},
{
name: 'open-buy-coffee',
link: 'https://www.buymeacoffee.com/icedman',
},
{
name: 'open-license',
link: 'https://github.com/icedman/search-light/blob/master/LICENSE',
},
];
actions.forEach((action) => {
let act = new Gio.SimpleAction({ name: action.name });
act.connect('activate', (_) =>
Gtk.show_uri(window, action.link, Gdk.CURRENT_TIME)
);
actionGroup.add_action(act);
});
// window.remove(menu_util);
}
addButtonEvents(window, builder, settings) {
//
}
fillPreferencesWindow(window) {
let builder = new Gtk.Builder();
let UIFolderPath = `${this.path}/ui`;
builder.add_from_file(`${UIFolderPath}/general.ui`);
builder.add_from_file(`${UIFolderPath}/appearance.ui`);
builder.add_from_file(`${UIFolderPath}/accelerator.ui`);
builder.add_from_file(`${UIFolderPath}/menu.ui`);
window.add(builder.get_object('general'));
window.add(builder.get_object('appearance'));
window.set_search_enabled(true);
// builder.get_object("providers-group").visible = false;
let settings = this.getSettings(schemaId);
let settingsKeys = SettingsKeys();
settingsKeys.connectBuilder(builder);
settingsKeys.connectSettings(settings);
this.addButtonEvents(window, builder, settings);
this.addMenu(window, builder);
this._monitorsConfig = new MonitorsConfig();
this._monitorsConfig.connect('updated', () => this.updateMonitors());
// shortcuts widget
{
let placeholder = builder.get_object('shortcut-search-placeholder');
placeholder.append(
new ShortcutSettingWidget(
builder.get_object('accelerator'),
settings,
'shortcut-search',
window
)
);
}
{
let placeholder = builder.get_object(
'secondary-shortcut-search-placeholder'
);
placeholder.append(
new ShortcutSettingWidget(
builder.get_object('accelerator'),
settings,
'secondary-shortcut-search',
window
)
);
}
this._builder = builder;
this.updateMonitors();
}
updateMonitors() {
let monitors = this._monitorsConfig.monitors;
let count = monitors.length;
let list = new Gtk.StringList();
list.append('Primary Monitor');
for (let i = 0; i < count; i++) {
let m = monitors[i];
list.append(m.displayName);
}
this._builder.get_object('preferred-monitor').set_model(list);
}
}

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="search-light">
<schema path="/org/gnome/shell/extensions/search-light/" id="org.gnome.shell.extensions.search-light">
<key type="d" name="border-radius">
<default>0</default>
<summary>Border radius</summary>
<description>Set dash background border radius.</description>
</key>
<key type="(dddd)" name="border-color">
<default>(1.,1.,1.,1.)</default>
<summary>border color</summary>
<description>Set border color.</description>
</key>
<key type="i" name="border-thickness">
<default>0</default>
<summary>Border thickness</summary>
<description>Border thickness.</description>
</key>
<key type="(dddd)" name="background-color">
<default>(0.,0.,0.,0.25)</default>
<summary>Background color</summary>
<description>Set window background color.</description>
</key>
<key type="d" name="scale-width">
<default>0.1</default>
<summary>Scale width</summary>
<description>Rescale width/</description>
</key>
<key type="d" name="scale-height">
<default>0.1</default>
<summary>Scale height</summary>
<description>Rescale height/</description>
</key>
<key type="i" name="preferred-monitor">
<default>0</default>
<summary>Preferred monitor to dock</summary>
<description>Show dock on selected monitor.</description>
</key>
<key type="i" name="monitor-count">
<default>1</default>
<summary>Monitors Count</summary>
<description>Monitors found by the extension.</description>
</key>
<key type="as" name="shortcut-search">
<default><![CDATA[[]]]></default>
<summary>Shortcut</summary>
<description>Keyboard shortcut for search</description>
</key>
<key type="as" name="secondary-shortcut-search">
<default><![CDATA[[]]]></default>
<summary>Shortcut</summary>
<description>Keyboard shortcut for search</description>
</key>
<key type="b" name="popup-at-cursor-monitor">
<default>false</default>
<summary>Popup at Cursor</summary>
<description></description>
</key>
<key type="s" name="msg-to-pref">
<default>""</default>
<summary>MsgBus</summary>
<description>Preferences-Extension message bus</description>
</key>
<key type="s" name="msg-to-ext">
<default>""</default>
<summary>MsgBus</summary>
<description>Preferences-Extension message bus</description>
</key>
<key type="b" name="blur-background">
<default>false</default>
<summary>Enable background blur</summary>
<description></description>
</key>
<key type="d" name="blur-sigma">
<default>30</default>
<summary>Global sigma (gaussian blur radius) to use</summary>
</key>
<key type="d" name="blur-brightness">
<default>0.6</default>
<summary>Global brightness to use</summary>
</key>
<key type="i" name="font-size">
<default>0</default>
<summary>Text size</summary>
</key>
<key type="i" name="entry-font-size">
<default>1</default>
<summary>Entry text size</summary>
</key>
<key type="(dddd)" name="text-color">
<default>(1.,1.,1.,0.)</default>
<summary>text color</summary>
<description>Set text color.</description>
</key>
<key type="(dddd)" name="entry-text-color">
<default>(1.,1.,1.,0.)</default>
<summary>entry text color</summary>
<description>Set entry text color.</description>
</key>
<key type="b" name="show-panel-icon">
<default>false</default>
<summary>Show panel icon</summary>
<description></description>
</key>
<key type="b" name="unit-converter">
<default>false</default>
<summary>Show unit converter</summary>
<description></description>
</key>
<key type="b" name="currency-converter">
<default>false</default>
<summary>Show currency converter</summary>
<description></description>
</key>
<key type="i" name="window-effect">
<default>0</default>
<summary>Window effect</summary>
<description>Set window rendering effect.</description>
</key>
<key type="(dddd)" name="window-effect-color">
<default>(1.,1.,1.,1.)</default>
<summary>Rendering effect color</summary>
<description>Set the window rendering effect color.</description>
</key>
</schema>
</schemalist>

View File

@@ -0,0 +1,174 @@
// https://github.com/eonpatapon/gnome-shell-extension-caffeine
import Gdk from 'gi://Gdk';
import Gtk from 'gi://Gtk';
import GObject from 'gi://GObject';
const genParam = (type, name, ...dflt) =>
GObject.ParamSpec[type](
name,
name,
name,
GObject.ParamFlags.READWRITE,
...dflt
);
const _ = (t) => t;
export let ShortcutSettingWidget = class extends Gtk.Button {
static {
GObject.registerClass(
{
Properties: {
shortcut: genParam('string', 'shortcut', ''),
},
Signals: {
changed: { param_types: [GObject.TYPE_STRING] },
},
},
this
);
}
constructor(content, settings, key, window) {
super({ valign: Gtk.Align.CENTER, has_frame: false });
this._key = key;
this._settings = settings;
this.window = window;
this.content = content;
this.connect('clicked', this._onActivated.bind(this));
let label = new Gtk.ShortcutLabel({ disabled_text: _('New accelerator…') });
this._label = label;
this.set_child(label);
this.bind_property(
'shortcut',
label,
'accelerator',
GObject.BindingFlags.DEFAULT
);
[this.shortcut] = this._settings.get_strv(this._key);
}
_onActivated(widget) {
let ctl = new Gtk.EventControllerKey();
if (!this._editor) {
this._editor = new Gtk.Window({
title: 'Accelerator',
modal: true,
hide_on_close: true,
transient_for: widget.get_root(),
width_request: 480,
height_request: 320,
child: this.content,
});
}
this._editor.add_controller(ctl);
ctl.connect('key-pressed', this._onKeyPressed.bind(this));
this._editor.present();
}
_onKeyPressed(_widget, keyval, keycode, state) {
let mask = state & Gtk.accelerator_get_default_mod_mask();
mask &= ~Gdk.ModifierType.LOCK_MASK;
if (!mask && keyval === Gdk.KEY_Escape) {
this._editor.close();
return Gdk.EVENT_STOP;
}
if (keyval === Gdk.KEY_BackSpace) {
this.saveShortcut(); // Clear shortcut
return Gdk.EVENT_STOP;
}
if (
!this.isValidBinding(mask, keycode, keyval) ||
!this.isValidAccel(mask, keyval)
) {
return Gdk.EVENT_STOP;
}
this.saveShortcut(keyval, keycode, mask);
return Gdk.EVENT_STOP;
}
saveShortcut(keyval, keycode, mask) {
if (!keyval && !keycode) {
this.shortcut = '';
} else {
this.shortcut = Gtk.accelerator_name_with_keycode(
null,
keyval,
keycode,
mask
);
}
console.log('saved new shortcut');
this.emit('changed', this.shortcut);
this._settings.set_strv(this._key, [this.shortcut]);
// this._editor.destroy();
this._editor.close();
}
// Functions from https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/main/panels/keyboard/keyboard-shortcuts.c
keyvalIsForbidden(keyval) {
return [
// Navigation keys
Gdk.KEY_Home,
Gdk.KEY_Left,
Gdk.KEY_Up,
Gdk.KEY_Right,
Gdk.KEY_Down,
Gdk.KEY_Page_Up,
Gdk.KEY_Page_Down,
Gdk.KEY_End,
Gdk.KEY_Tab,
// Return
Gdk.KEY_KP_Enter,
Gdk.KEY_Return,
Gdk.KEY_Mode_switch,
].includes(keyval);
}
isValidBinding(mask, keycode, keyval) {
return !(
mask === 0 ||
(mask === Gdk.SHIFT_MASK &&
keycode !== 0 &&
((keyval >= Gdk.KEY_a && keyval <= Gdk.KEY_z) ||
(keyval >= Gdk.KEY_A && keyval <= Gdk.KEY_Z) ||
(keyval >= Gdk.KEY_0 && keyval <= Gdk.KEY_9) ||
(keyval >= Gdk.KEY_kana_fullstop &&
keyval <= Gdk.KEY_semivoicedsound) ||
(keyval >= Gdk.KEY_Arabic_comma && keyval <= Gdk.KEY_Arabic_sukun) ||
(keyval >= Gdk.KEY_Serbian_dje &&
keyval <= Gdk.KEY_Cyrillic_HARDSIGN) ||
(keyval >= Gdk.KEY_Greek_ALPHAaccent &&
keyval <= Gdk.KEY_Greek_omega) ||
(keyval >= Gdk.KEY_hebrew_doublelowline &&
keyval <= Gdk.KEY_hebrew_taf) ||
(keyval >= Gdk.KEY_Thai_kokai && keyval <= Gdk.KEY_Thai_lekkao) ||
(keyval >= Gdk.KEY_Hangul_Kiyeog &&
keyval <= Gdk.KEY_Hangul_J_YeorinHieuh) ||
(keyval === Gdk.KEY_space && mask === 0) ||
this.keyvalIsForbidden(keyval)))
);
}
isValidAccel(mask, keyval) {
return (
Gtk.accelerator_valid(keyval, mask) ||
(keyval === Gdk.KEY_Tab && mask !== 0)
);
}
};

View File

@@ -0,0 +1,76 @@
'use strict';
import Gio from 'gi://Gio';
import St from 'gi://St';
const CustomStylesPath = '/tmp';
export let Style = class {
constructor() {
this.styles = {};
this.style_contents = {};
}
unloadAll() {
let ctx = St.ThemeContext.get_for_stage(global.stage);
let theme = ctx.get_theme();
Object.keys(this.styles).forEach((k) => {
let fn = this.styles[k];
theme.unload_stylesheet(fn);
});
}
build(name, style_array) {
let fn = this.styles[name];
let ctx = St.ThemeContext.get_for_stage(global.stage);
let theme = ctx.get_theme();
let content = '';
style_array.forEach((k) => {
content = `${content}\n${k}`;
});
if (this.style_contents[name] === content) {
// console.log('skip regeneration');
return;
}
if (fn) {
theme.unload_stylesheet(fn);
} else {
fn = Gio.File.new_for_path(`${CustomStylesPath}/${name}.css`);
this.styles[name] = fn;
}
this.style_contents[name] = content;
const [, etag] = fn.replace_contents(
content,
null,
false,
Gio.FileCreateFlags.REPLACE_DESTINATION,
null
);
theme.load_stylesheet(fn);
// console.log(content);
}
rgba(color) {
let clr = color || [1, 1, 1, 1];
let res = clr.map((r) => Math.floor(255 * r));
res[3] = clr[3].toFixed(1);
return res.join(',');
}
hex(color) {
let r = Math.floor(color[0] * 255).toString(16);
let g = Math.floor(color[1] * 255).toString(16);
let b = Math.floor(color[2] * 255).toString(16);
if (r.length == 1) r += r;
if (g.length == 1) g += g;
if (b.length == 1) b += b;
let res = `#${r}${g}${b}`;
console.log(`${color} ${res}`);
return res;
}
};

View File

@@ -0,0 +1,73 @@
#searchLight {
/* border: 2px solid red; */
}
#searchLight .overview-tile,
#searchLight .search-provider-icon,
#searchLight .list-search-provider-content,
#searchLight .list-search-result {
background-color: transparent;
}
#searchLight .overview-tile:hover,
#searchLight .overview-tile:active,
#searchLight .overview-tile:focus,
#searchLight .search-provider-icon:hover,
#searchLight .list-search-provider-content:hover,
#searchLight .list-search-result:hover,
#searchLight .search-provider-icon:active,
#searchLight .list-search-provider-content:active,
#searchLight .list-search-result:active,
#searchLight .search-provider-icon:focus,
#searchLight .list-search-provider-content:focus,
#searchLight .list-search-result:focus {
background-color: rgba(0,0,0,0.4);
}
#searchLight .search-section-content {
background-color: rgba(0,0,0,0.2) !important;
}
#searchLightBox {
/*padding: 14px;*/
border: 0px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
}
#searchLightBox * {
color: white;
}
#searchLightBox.light * {
color: black;
}
#searchLightBox > StEntry:focus,
#searchLightBox > StEntry {
padding: 18px!important;
margin-top: 0px !important;
margin-bottom: 20px !important;
border-radius: 8px;
border: 0px !important;
border-width: 0px !important;
background: rgba(0,0,0,0);
/*font-size: 14pt !important;*/
}
#searchLightBox .app-well-app {
/*border: 2px solid red;*/
}
#searchLightBox.light StBoxLayout.search-section-content *:focus,
#searchLightBox.light StBoxLayout.search-section-content {
background: rgba(50,50,50,0.10) !important;
}
#searchLightBox StBoxLayout.search-section-content *:focus,
#searchLightBox StBoxLayout.search-section-content {
background: rgba(100,100,100,0.20) !important;
}
#searchLight #searchResultsContent {
padding-left: 12px;
padding-right: 12px;
}

View File

@@ -0,0 +1,406 @@
'use strict';
import GLib from 'gi://GLib';
export const Timer = class {
constructor(name) {
this._name = name;
this._subscribers = [];
this._subscriberId = 0xff;
}
initialize(resolution) {
this._resolution = resolution || 1000;
this._autoStart = true;
this._autoHibernate = true;
this._hibernating = false;
this._hibernatCounter = 0;
this._hibernateWait = 250 + this._resolution * 2;
}
shutdown() {
this._autoStart = false;
this._hibernating = false;
this.stop();
}
start(resolution) {
if (this.is_running()) {
// print('already running');
return;
}
this._resolution = resolution || 1000;
this._time = 0;
this._timeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
this._resolution,
this.onUpdate.bind(this)
);
this._hibernating = false;
this.onStart();
}
stop() {
if (!this.is_running()) {
// print('already stopped');
return;
}
GLib.source_remove(this._timeoutId);
this._timeoutId = null;
this.onStop();
}
restart(resolution) {
this.stop();
this.start(resolution || this._resolution || 1000);
}
pause() {
if (!this.is_running()) {
return;
}
this._paused = true;
this.onPause();
}
resume() {
if (!this.is_running()) {
return;
}
this._paused = false;
this.onResume();
}
hibernate() {
if (!this.is_running()) {
return;
}
this.stop();
this._hibernating = true;
this._hibernatCounter = 0;
}
is_running() {
return this._timeoutId != null;
}
toggle_pause() {
if (!this.is_running()) {
return;
}
if (!this._paused) {
this.pause();
} else {
this.resume();
}
}
onStart() {
// print(`started ${this._name} [${this.subscriberNames().join(',')}]`);
this._subscribers.forEach((s) => {
if (s.onStart) {
s.onStart(s);
}
});
}
onStop() {
this._subscribers.forEach((s) => {
if (s.onStop) {
s.onStop(s);
}
});
// print(`stopped ${this._name}`);
}
onPause() {
this._subscribers.forEach((s) => {
if (s.onPause) {
s.onPause(s);
}
});
}
onResume() {
this._subscribers.forEach((s) => {
if (s.onResume) {
s.onResume(s);
}
});
}
onUpdate() {
if (!this._timeoutId || this._paused) {
return true;
}
this._subscribers.forEach((s) => {
if (s.onUpdate) {
s.onUpdate(s, this._resolution);
}
});
this._time += this._resolution;
if (this._autoHibernate) {
if (!this._subscribers.length) {
this._hibernatCounter += this._resolution;
if (this._hibernatCounter >= this._hibernateWait) {
this.hibernate();
}
} else {
this._hibernatCounter = 0;
}
}
// print(`${this._time/1000} subs:${this._subscribers.length}`);
return true;
}
runningTime() {
return this._time;
}
subscribe(obj) {
if (!obj._id) {
obj._id = this._subscriberId++;
}
let idx = this._subscribers.findIndex((s) => s._id == obj._id);
if (idx == -1) {
this._subscribers.push(obj);
} else {
this._subscribers[idx] = {
...this._subscribers[idx],
...obj,
};
obj = this._subscribers[idx];
}
if (
(this._hibernating || this._autoStart) &&
this._subscribers.length == 1
) {
this.start(this._resolution);
}
// console.log(`subscribers: ${this.subscriberNames().join(',')}`);
return obj;
}
unsubscribe(obj) {
let idx = this._subscribers.findIndex((s) => s._id == obj._id);
if (idx != -1) {
if (this._subscribers.length == 1) {
this._subscribers = [];
} else {
this._subscribers = [
...this._subscribers.slice(0, idx),
...this._subscribers.slice(idx + 1),
];
}
}
}
subscriberNames() {
return this._subscribers.map((s) => {
if (s._name) {
return s._name;
}
return `${s._id}`;
});
}
dumpSubscribers() {
if (this._name) {
print('--------');
print(this._name);
}
this._subscribers.forEach((s) => {
print('--------');
Object.keys(s).forEach((k) => {
print(`${k}: ${s[k]}`);
});
});
}
runLoop(func, delay, name) {
if (typeof func === 'object') {
func._time = 0;
return this.subscribe(func);
}
let obj = {
_name: name,
_type: 'loop',
_time: 0,
_delay: delay,
_func: func,
onUpdate: (s, dt) => {
s._time += dt;
if (s._time >= s._delay) {
s._func(s);
s._time -= s._delay;
}
},
};
return this.subscribe(obj);
}
runUntil(func, delay, name) {
if (typeof func === 'object') {
func._time = 0;
return this.subscribe(func);
}
let obj = {
_name: name,
_type: 'until',
_time: 0,
_delay: delay,
_func: func,
onUpdate: (s, dt) => {
s._time += dt;
if (s._time >= s._delay) {
if (s._func(s)) {
this.unsubscribe(s);
}
s._time -= s._delay;
}
},
};
return this.subscribe(obj);
}
runOnce(func, delay, name) {
if (typeof func === 'object') {
func._time = 0;
return this.subscribe(func);
}
let obj = {
_name: name,
_type: 'once',
_time: 0,
_delay: delay,
_func: func,
onUpdate: (s, dt) => {
s._time += dt;
if (s._time >= s._delay) {
s._func(s);
this.unsubscribe(s);
}
},
};
return this.subscribe(obj);
}
runDebounced(func, delay, name) {
if (typeof func === 'object') {
func._time = 0;
return this.subscribe(func);
}
let obj = {
_name: name,
_type: 'debounced',
_time: 0,
_delay: delay,
_func: func,
onUpdate: (s, dt) => {
s._time += dt;
if (s._time >= s._delay) {
s._func(s);
this.unsubscribe(s);
}
},
};
return this.subscribe(obj);
}
runSequence(array, settings) {
if (typeof array === 'object' && !array.length) {
array._time = 0;
array._currentIdx = 0;
return this.subscribe(array);
}
let obj = {
_time: 0,
_currentIdx: 0,
_sequences: [...array],
...settings,
onUpdate: (s, dt) => {
let current = s._sequences[s._currentIdx];
if (!current) {
this.unsubscribe(s);
return;
}
s._time += dt;
if (s._time >= current.delay) {
current.func(current);
s._time = -current.delay;
s._currentIdx++;
if (s._currentIdx >= s._sequences.length && s._loop) {
s._currentIdx = 0;
}
}
},
};
return this.subscribe(obj);
}
runAnimation(array, settings) {
if (typeof func === 'object' && !array.length) {
func._time = 0;
return this.subscribe(func);
}
let duration = 0;
array.forEach((f) => {
if (!f._start) {
f._start = duration;
}
duration += f._duration;
});
let obj = {
_time: 0,
_duration: duration,
_loop: false,
_frames: [...array],
...(settings || {}),
onUpdate: (s, dt) => {
s._time += dt;
let frames = [];
if (s._frames) {
frames = s._frames.filter((f) => {
return f._start <= s._time && s._time < f._start + f._duration;
});
}
s._currentFrames = frames;
if (!s._func) {
s._func = (s) => {
s._currentFrames.forEach((f) => {
f._time = s._time - f._start;
f._func(f, s);
});
};
}
if (s._time > s._duration) {
this.unsubscribe(s);
s._time = s._duration;
s._func(s);
return;
}
s._func(s);
},
};
return this.subscribe(obj);
}
cancel(obj) {
if (obj) {
this.unsubscribe(obj);
}
}
};

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="AdwStatusPage" id="accelerator">
<property name="name">accelerator</property>
<property name="title" translatable="yes">Press shortcut keys...</property>
<property name="icon_name">preferences-desktop-keyboard-shortcuts-symbolic</property>
</object>
</interface>

View File

@@ -0,0 +1,332 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="AdwPreferencesPage" id="appearance">
<property name="name">appearance</property>
<property name="title" translatable="yes">Appearance</property>
<property name="icon-name">overview-symbolic</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Text</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Text Color</property>
<property name="subtitle" translatable="yes">Select text color. Make value completely transparent to auto-adapt to background color.</property>
<property name="activatable-widget">text-color</property>
<child>
<object class="GtkColorButton" id="text-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="visible">false</property>
<property name="title" translatable="yes">Entry Text Color</property>
<property name="subtitle" translatable="yes">Select entry text color.</property>
<property name="activatable-widget">entry-text-color</property>
<child>
<object class="GtkColorButton" id="entry-text-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Text Size</property>
<property name="subtitle" translatable="yes">Set font size of search text and search result items.</property>
<property name="activatable-widget">font-size</property>
<child>
<object class="GtkDropDown" id="font-size">
<property name="valign">center</property>
<property name="model">font-size-model</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Search Text Size</property>
<property name="subtitle" translatable="yes">Set font size for search input text.</property>
<property name="activatable-widget">entry-font-size</property>
<child>
<object class="GtkDropDown" id="entry-font-size">
<property name="valign">center</property>
<property name="model">entry-font-size-model</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Appearance</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Width</property>
<property name="subtitle" translatable="yes">Set window width rescale.</property>
<property name="activatable-widget">scale-width</property>
<child>
<object class="GtkScale" id="scale-width">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">2</property>
<property name="adjustment">scale-width-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Height</property>
<property name="subtitle" translatable="yes">Set window height rescale.</property>
<property name="activatable-widget">scale-height</property>
<child>
<object class="GtkScale" id="scale-height">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">2</property>
<property name="adjustment">scale-height-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Border Thickness</property>
<property name="subtitle" translatable="yes">Set border thickness.</property>
<property name="activatable-widget">border-thickness</property>
<child>
<object class="GtkDropDown" id="border-thickness">
<property name="valign">center</property>
<property name="model">border-thickness-model</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Border Radius</property>
<property name="subtitle" translatable="yes">Set window border radius.</property>
<property name="activatable-widget">border-radius</property>
<child>
<object class="GtkScale" id="border-radius">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">false</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">0</property>
<property name="adjustment">border-radius-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Border Color</property>
<property name="subtitle" translatable="yes">Select border color.</property>
<property name="activatable-widget">border-color</property>
<child>
<object class="GtkColorButton" id="border-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window Effect</property>
<property name="subtitle" translatable="yes">Set window rendering effect.</property>
<property name="activatable-widget">window-effect</property>
<child>
<object class="GtkDropDown" id="window-effect">
<property name="valign">center</property>
<property name="model">window-effect-model</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window Effect Color</property>
<property name="subtitle" translatable="yes">Select window effect color.</property>
<property name="activatable-widget">window-effect-color</property>
<child>
<object class="GtkColorButton" id="window-effect-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Background</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Background Color</property>
<property name="subtitle" translatable="yes">Set search window background color.</property>
<property name="activatable-widget">background-color</property>
<child>
<object class="GtkColorButton" id="background-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Background Blur</property>
<property name="subtitle" translatable="yes">Add background blur with current wallpaper. Requires imagemagick installed.</property>
<property name="activatable-widget">blur-background</property>
<child>
<object class="GtkSwitch" id="blur-background">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="visible">false</property>
<property name="title" translatable="yes">Sigma</property>
<property name="subtitle" translatable="yes">The intensity of the blur.</property>
<property name="activatable-widget">blur-sigma</property>
<child>
<object class="GtkScale" id="blur-sigma">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">200px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">0</property>
<property name="adjustment">blur-sigma-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="visible">false</property>
<property name="title" translatable="yes">Brightness</property>
<property name="subtitle" translatable="yes">The brightness of the blur effect, a high value might make the text harder to read.</property>
<property name="activatable-widget">blur-brightness</property>
<child>
<object class="GtkScale" id="blur-brightness">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">200px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">2</property>
<property name="adjustment">blur-brightness-adjust</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="border-radius-adjust">
<property name="lower">0</property>
<property name="upper">7</property>
<property name="step-increment">1</property>
</object>
<object class="GtkAdjustment" id="scale-width-adjust">
<property name="lower">0.0</property>
<property name="upper">1.0</property>
<property name="step-increment">0.01</property>
</object>
<object class="GtkAdjustment" id="scale-height-adjust">
<property name="lower">0.0</property>
<property name="upper">1.0</property>
<property name="step-increment">0.01</property>
</object>
<object class="GtkStringList" id="border-thickness-model">
<items>
<item translatable="yes">None</item>
<item>1px</item>
<item>2px</item>
</items>
</object>
<object class="GtkStringList" id="font-size-model">
<items>
<item translatable="yes">Default</item>
<item>16pt</item>
<item>18pt</item>
<item>20pt</item>
<item>22pt</item>
</items>
</object>
<object class="GtkStringList" id="entry-font-size-model">
<items>
<item translatable="yes">Default</item>
<item>16pt</item>
<item>18pt</item>
<item>20pt</item>
<item>22pt</item>
<item>24pt</item>
</items>
</object>
<object class="GtkAdjustment" id="blur-sigma-adjust">
<property name="lower">0</property>
<property name="upper">200</property>
<property name="step-increment">1</property>
</object>
<object class="GtkAdjustment" id="blur-brightness-adjust">
<property name="lower">0.0</property>
<property name="upper">1.0</property>
<property name="step-increment">0.01</property>
</object>
<object class="GtkStringList" id="window-effect-model">
<items>
<item translatable="yes">None</item>
<item translatable="yes">Tint</item>
<item translatable="yes">Monochrome</item>
<!-- <item translatable="yes">(Test)</item> -->
</items>
</object>
</interface>

View File

@@ -0,0 +1,133 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="AdwPreferencesPage" id="general">
<property name="name">general</property>
<property name="title" translatable="yes">General</property>
<property name="icon-name">general-symbolic</property>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Keybindings</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow" id="key-binding-text">
<property name="title" translatable="yes">Search</property>
<property name="subtitle" translatable="yes">Set keyboard shortcut to popup Search box. Backspace to clear.
</property>
<child>
<object class="GtkBox" id="shortcut-search-placeholder">
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="secondary-key-binding-text">
<property name="title" translatable="yes">Secondary Accelerator</property>
<property name="subtitle" translatable="yes">Set another shortcut. Backspace to clear.
</property>
<child>
<object class="GtkBox" id="secondary-shortcut-search-placeholder">
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes">Multi-Monitor</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Preferred Monitor</property>
<property name="subtitle" translatable="yes">Show search box on selected monitor.</property>
<property name="activatable-widget">preferred-monitor</property>
<child>
<object class="GtkDropDown" id="preferred-monitor">
<property name="valign">center</property>
<property name="model">preferred-monitor-model</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="popup-at-cursor-monitor-row">
<property name="title" translatable="yes">Popup at Cursor Monitor</property>
<property name="subtitle" translatable="yes">Show search box at the monitor where cursor is located.</property>
<property name="activatable-widget">popup-at-cursor-monitor</property>
<child>
<object class="GtkSwitch" id="popup-at-cursor-monitor">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="providers-group">
<property name="title" translatable="yes">Providers</property>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Currency Conversion</property>
<property name="subtitle" translatable="yes">Enable currency conversion provider.</property>
<property name="activatable-widget">currency-converter</property>
<child>
<object class="GtkSwitch" id="currency-converter">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Unit Conversion</property>
<property name="subtitle" translatable="yes">Enable unit conversion provider.</property>
<property name="activatable-widget">unit-converter</property>
<child>
<object class="GtkSwitch" id="unit-converter">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="title" translatable="yes"/>
<property name="description" translatable="yes"/>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Icon</property>
<property name="subtitle" translatable="yes">Show search icon panel box.</property>
<property name="activatable-widget">show-panel-icon</property>
<child>
<object class="GtkSwitch" id="show-panel-icon">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkStringList" id="preferred-monitor-model">
<items>
<item translatable="yes">Primary Monitor</item>
<item translatable="yes">Secondary Monitor</item>
<item translatable="yes">Monitor 3</item>
<item translatable="yes">Monitor 4</item>
<item translatable="yes">Monitor 5</item>
<item translatable="yes">Monitor 6</item>
</items>
</object>
</interface>

View File

@@ -0,0 +1,4 @@
<svg width="16" height="16" enable-background="new" version="1.1" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="7" width="11" height="1" fill="#363636"/>
<rect transform="rotate(90)" x="2" y="-8" width="11" height="1" fill="#363636"/>
</svg>

After

Width:  |  Height:  |  Size: 249 B

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg7"
sodipodi:docname="applications.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview9"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="44.6875"
inkscape:cx="5.5944056"
inkscape:cy="8"
inkscape:window-width="1500"
inkscape:window-height="963"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg7" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text { color:#363636; }</style>
</defs>
<path
d="M 2,1 C 0.892,1 0,1.892 0,3 v 9 c 0,1.108 0.892,2 2,2 h 12 c 1.108,0 2,-0.892 2,-2 V 3 C 16,1.892 15.108,1 14,1 Z m 0,1 h 12 c 0.554,0 1,0.446 1,1 H 1 C 1,2.446 1.446,2 2,2 Z M 1,3 h 14 v 9 c 0,0.554 -0.446,1 -1,1 H 2 C 1.446,13 1,12.554 1,12 Z"
style="fill:currentColor"
class="ColorScheme-Text"
id="path5"
sodipodi:nodetypes="sssssssssssccsccssssc" />
<g
id="g68"
transform="translate(0.3993007,0.15314685)">
<path
d="M 9.5,4 C 9.223,4 9,4.223 9,4.5 v 2 A 0.499,0.499 0 0 0 9.5,7 h 2 C 11.777,7 12,6.777 12,6.5 v -2 C 12,4.223 11.777,4 11.5,4 Z M 10,5 h 1 v 1 h -1 z"
fill="#363636"
id="path2" />
<path
d="M 4,6 C 3.446,6 3,6.446 3,7 v 3 c 0,0.554 0.446,1 1,1 h 3 c 0.554,0 1,-0.446 1,-1 V 7 C 8,6.446 7.554,6 7,6 Z m 0,1 h 3 v 3 H 4 Z"
fill="#363636"
id="path8" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg7"
sodipodi:docname="panel.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview9"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="44.6875"
inkscape:cx="5.5944056"
inkscape:cy="8"
inkscape:window-width="1500"
inkscape:window-height="963"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg7" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text { color:#363636; }</style>
</defs>
<path
d="M 2,1 C 0.892,1 0,1.892 0,3 v 9 c 0,1.108 0.892,2 2,2 h 12 c 1.108,0 2,-0.892 2,-2 V 3 C 16,1.892 15.108,1 14,1 Z m 0,1 h 12 c 0.554,0 1,0.446 1,1 H 1 C 1,2.446 1.446,2 2,2 Z M 1,4 h 14 v 8 c 0,0.554 -0.446,1 -1,1 H 2 C 1.446,13 1,12.554 1,12 Z"
style="fill:currentColor"
class="ColorScheme-Text"
id="path5"
sodipodi:nodetypes="sssssssssssccsccssssc" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg7"
sodipodi:docname="top-panel.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview9"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="44.6875"
inkscape:cx="5.5944056"
inkscape:cy="8"
inkscape:window-width="1500"
inkscape:window-height="963"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg7" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text { color:#363636; }</style>
</defs>
<path
d="M 2,1 C 0.892,1 0,1.892 0,3 v 9 c 0,1.108 0.892,2 2,2 h 12 c 1.108,0 2,-0.892 2,-2 V 3 C 16,1.892 15.108,1 14,1 Z m 0,1 h 12 c 0.554,0 1,0.446 1,1 H 1 C 1,2.446 1.446,2 2,2 Z M 1,3 h 14 v 9 c 0,0.554 -0.446,1 -1,1 H 2 C 1.446,13 1,12.554 1,12 Z m 3,7 c -0.554,0 -1,0.446 -1,1 0,0.554 0.446,1 1,1 h 8 c 0.554,0 1,-0.446 1,-1 0,-0.554 -0.446,-1 -1,-1 z"
style="fill:currentColor"
class="ColorScheme-Text"
id="path5"
sodipodi:nodetypes="sssssssssssccsccsssscsssssss" />
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
enable-background="new"
version="1.1"
id="svg16"
sodipodi:docname="general-symbolic.svg"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs20" />
<sodipodi:namedview
id="namedview18"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="24.174578"
inkscape:cx="13.98163"
inkscape:cy="8.3765683"
inkscape:window-width="1500"
inkscape:window-height="963"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g14" />
<g
fill="#363636"
id="g14"
transform="rotate(90,7.75,8.25)">
<path
d="m 2.9500144,1 c -0.277,0 -0.5,0.223 -0.5,0.5 v 6.5547 a 2.5,2.5 0 0 1 0.5,-0.054688 2.5,2.5 0 0 1 0.5,0.050781 v -6.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z m 0.5,11.945 a 2.5,2.5 0 0 1 -0.5,0.05469 2.5,2.5 0 0 1 -0.5,-0.05078 v 1.5508 c 0,0.277 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223 0.5,-0.5 v -1.5547 z"
id="path2" />
<path
d="M 7.5,1 C 7.223,1 7,1.223 7,1.5 V 3.0547 A 2.5,2.5 0 0 1 7.5,3.000012 2.5,2.5 0 0 1 8,3.050793 v -1.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z M 8,7.9453 A 2.5,2.5 0 0 1 7.5,7.999988 2.5,2.5 0 0 1 7,7.949207 v 6.5508 c 0,0.277 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223 0.5,-0.5 v -6.5547 z"
id="path4" />
<path
d="m 12.049986,1.0001482 c -0.277,0 -0.5,0.223 -0.5,0.5 v 6.5547 a 2.5,2.5 0 0 1 0.5,-0.054688 2.5,2.5 0 0 1 0.5,0.050781 v -6.5508 c 0,-0.277 -0.223,-0.5 -0.5,-0.5 z m 0.5,11.9450008 a 2.5,2.5 0 0 1 -0.5,0.05469 2.5,2.5 0 0 1 -0.5,-0.05078 v 1.5508 c 0,0.276999 0.223,0.5 0.5,0.5 0.277,0 0.5,-0.223001 0.5,-0.5 v -1.5547 z"
id="path6" />
<circle
cx="2.9500144"
cy="10.5"
id="circle8"
r="1.5" />
<circle
cx="7.5"
cy="5.5"
r="1.5"
id="circle10" />
<circle
cx="12.049986"
cy="10.500149"
id="circle12"
r="1.5" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg7"
sodipodi:docname="heart-filled-symbolic.svg"
inkscape:version="1.2 (dc2aedaf03, 2022-05-15)"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview9"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="31.598834"
inkscape:cx="4.6046002"
inkscape:cy="6.2344072"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg7"
inkscape:showpageshadow="0"
inkscape:deskcolor="#d1d1d1" /><defs
id="defs3"><style
id="current-color-scheme"
type="text/css">.ColorScheme-Text { color:#363636; }</style></defs><path
d="M 11.846993,1.3381264 C 10.739505,1.3069919 9.6587026,1.7072882 8.8403186,2.4589575 L 7.981904,3.2284167 7.1190425,2.4589575 C 5.9848678,1.4359762 4.3836806,1.1023952 2.9337159,1.5827525 1.4793039,2.0586601 0.3940558,3.2773422 0.08716067,4.7762309 -0.21973329,6.2751198 0.29620488,7.8229343 1.4392744,8.8370195 L 7.981904,14.663563 14.520086,8.8370195 C 15.854409,7.685054 16.343662,5.8303457 15.75211,4.171338 15.160562,2.5123304 13.608299,1.3870507 11.846993,1.3381264 Z m 0,0"
fill="#222222"
id="path866"
style="stroke-width:1.13863" /></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" enable-background="new"><defs><filter id="a" color-interpolation-filters="sRGB"><feBlend mode="darken" in2="BackgroundImage"/></filter></defs><g transform="matrix(0 -1 -1 0 -413 -83.997)" color="#000" fill="#dedede"><rect y="-418" x="-92.997" width="2" style="marker:none" ry="1" rx="1" height="2" overflow="visible" enable-background="new"/><rect y="-422" x="-92.997" width="2" style="marker:none" ry="1" rx="1" height="2" overflow="visible" enable-background="new"/><rect y="-426" x="-92.997" width="2" style="marker:none" ry="1" rx="1" height="2" overflow="visible" enable-background="new"/></g></svg>

After

Width:  |  Height:  |  Size: 667 B

View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
viewBox="0 0 16 16"
id="svg7"
sodipodi:docname="overview.svg"
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview9"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="44.6875"
inkscape:cx="5.5944056"
inkscape:cy="8"
inkscape:window-width="1500"
inkscape:window-height="963"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g68"
inkscape:snap-bbox="true"
inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true" />
<defs
id="defs3">
<style
id="current-color-scheme"
type="text/css">.ColorScheme-Text { color:#363636; }</style>
</defs>
<path
d="M 2,1 C 0.892,1 0,1.892 0,3 v 9 c 0,1.108 0.892,2 2,2 h 12 c 1.108,0 2,-0.892 2,-2 V 3 C 16,1.892 15.108,1 14,1 Z m 0,1 h 12 c 0.554,0 1,0.446 1,1 H 1 C 1,2.446 1.446,2 2,2 Z M 1,3 h 14 v 9 c 0,0.554 -0.446,1 -1,1 H 2 C 1.446,13 1,12.554 1,12 Z"
style="fill:currentColor"
class="ColorScheme-Text"
id="path5"
sodipodi:nodetypes="sssssssssssccsccssssc" />
<g
id="g68"
transform="translate(0.3993007,0.15314685)">
<path
d="m 3.1756095,3.5602457 c -0.8440582,0 -1,0.446 -1,1 v 5.5732153 c 0,0.677136 0.446,1 1,1 H 12.02579 c 0.554,0 0.999999,-0.446 0.999999,-1 V 4.5602457 c 0,-0.554 -0.445999,-1 -0.999999,-1 z m 0,1 H 12.02579 V 10.133461 H 3.1756095 Z"
fill="#363636"
id="path8"
sodipodi:nodetypes="sssssssssccccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@@ -0,0 +1,3 @@
<svg width="16" height="16" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="m4.4647 3.9648c-0.12775 0-0.2555 0.048567-0.35339 0.14649-0.19578 0.19586-0.19578 0.51116 0 0.70703l3.1816 3.1816-3.1816 3.1816c-0.19578 0.19586-0.19578 0.51116 0 0.70703 0.19578 0.19586 0.51118 0.19586 0.70704 0l3.1816-3.1816 3.1816 3.1816c0.19578 0.19586 0.51114 0.19586 0.70704 0 0.19578-0.19586 0.19578-0.51116 0-0.70703l-3.1816-3.1816 3.1816-3.1816c0.19578-0.19586 0.19578-0.51116 0-0.70703-0.19578-0.19586-0.51118-0.19586-0.70704 0l-3.1816 3.1816-3.1816-3.1816c-0.09789-0.097928-0.22564-0.14649-0.35339-0.14649z" fill="#363636" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.9149" style="paint-order:stroke fill markers"/>
</svg>

After

Width:  |  Height:  |  Size: 740 B

View File

@@ -0,0 +1,7 @@
<svg width="16" height="16" enable-background="new" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g fill="#363636">
<path d="m8 3a6 6 0 0 0-6 6 6 6 0 0 0 6 6 6 6 0 0 0 6-6h-1a5 5 0 0 1-5 5 5 5 0 0 1-5-5 5 5 0 0 1 5-5z"/>
<path d="m8.1719 0.67188-0.70703 0.70703 2.1211 2.1211-2.1211 2.1211 0.70703 0.70703 2.8281-2.8281-0.70703-0.70703z"/>
<rect x="8" y="3" width="2" height="1"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 406 B

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 2.953125 1.074219 l 2.417969 13.210937 l 3.238281 -2.398437 l 2.054687 2.648437 c 1.03125 1.433594 3.148438 -0.210937 2.011719 -1.5625 l -2.015625 -2.59375 l 2.984375 -2.175781 z m 0 0" fill="#222222"/></svg>

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 2.953125 1.074219 l 2.417969 13.210937 l 3.238281 -2.398437 l 2.054687 2.648437 c 1.03125 1.433594 3.148438 -0.210937 2.011719 -1.5625 l -2.015625 -2.59375 l 2.984375 -2.175781 z m 0 0" fill="#222222"/></svg>

After

Width:  |  Height:  |  Size: 346 B

View File

@@ -0,0 +1,253 @@
<?xml version="1.0"?>
<interface>
<object class="GtkBox" id="general">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkListBox">
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">32</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Background Color</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkColorButton" id="background-color">
<property name="valign">center</property>
<property name="hexpand">false</property>
<property name="width-request">70px</property>
<property name="height-request">45px</property>
<property name="show-editor">true</property>
<property name="use-alpha">true</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Set search window background color.</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">32</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Border Radius</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkScale" id="border-radius">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">false</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">0</property>
<property name="adjustment">border-radius-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Set window background border radius.</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">32</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Width</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkScale" id="scale-width">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">2</property>
<property name="adjustment">scale-width-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Set window width rescale.</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">32</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Height</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
<attributes>
<attribute name="weight" value="PANGO_WEIGHT_BOLD"/>
</attributes>
</object>
</child>
<child>
<object class="GtkScale" id="scale-height">
<property name="valign">center</property>
<property name="hexpand">true</property>
<property name="width-request">140px</property>
<property name="draw-value">true</property>
<property name="value-pos">right</property>
<property name="orientation">horizontal</property>
<property name="digits">2</property>
<property name="adjustment">scale-height-adjust</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Set window height rescale.</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkAdjustment" id="border-radius-adjust">
<property name="lower">0</property>
<property name="upper">6</property>
<property name="step-increment">1</property>
</object>
<object class="GtkAdjustment" id="scale-width-adjust">
<property name="lower">0.0</property>
<property name="upper">1.0</property>
<property name="step-increment">0.01</property>
</object>
<object class="GtkAdjustment" id="scale-height-adjust">
<property name="lower">0.0</property>
<property name="upper">1.0</property>
<property name="step-increment">0.01</property>
</object>
</interface>

View File

@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface domain="blur-my-shell@aunetx">
<menu id="info_menu_model">
<section>
<item>
<attribute name="label" translatable="yes">Project page</attribute>
<attribute name="action">prefs.open-readme</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Buy me a coffee</attribute>
<attribute name="action">prefs.open-buy-coffee</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Report a Bug</attribute>
<attribute name="action">prefs.open-bug-report</attribute>
</item>
<item>
<attribute name="label" translatable="yes">License</attribute>
<attribute name="action">prefs.open-license</attribute>
</item>
<!--
<submenu>
<attribute name="label" translatable="yes">Donate</attribute>
<item>
<attribute name="label">GitHub</attribute>
<attribute name="action">prefs.donate-github</attribute>
</item>
<item>
<attribute name="label">Ko-fi</attribute>
<attribute name="action">prefs.donate-kofi</attribute>
</item>
</submenu>
-->
</section>
</menu>
<object class="GtkMenuButton" id="info_menu">
<property name="menu-model">info_menu_model</property>
<property name="icon-name">heart-filled-symbolic</property>
</object>
<object class="AdwPreferencesPage" id="menu_util"/>
</interface>