pax_global_header 0000666 0000000 0000000 00000000064 13262614637 0014524 g ustar 00root root 0000000 0000000 52 comment=3399905df988d93e5e16f4c85ff5e7fcae852047
gnome-shell-extension-taskbar-57.0/ 0000775 0000000 0000000 00000000000 13262614637 0017330 5 ustar 00root root 0000000 0000000 gnome-shell-extension-taskbar-57.0/LICENSE 0000664 0000000 0000000 00000104513 13262614637 0020341 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
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.
Copyright (C)
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 .
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:
Copyright (C)
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
.
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
.
gnome-shell-extension-taskbar-57.0/README 0000664 0000000 0000000 00000004743 13262614637 0020220 0 ustar 00root root 0000000 0000000 GNOME Shell Extension TaskBar
Copyright (C) 2013-2018 zpydr
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/.
zpydr@openmailbox.org
Version 57 for GNOME 3.10 - 3.28
https://extensions.gnome.org/extension/584/taskbar/
https://github.com/zpydr/gnome-shell-extension-taskbar/
TaskBar Wiki (Installation - Settings - Translation - Troubleshooting)
https://github.com/zpydr/gnome-shell-extension-taskbar/wiki/
Arch Linux User Repository
https://aur.archlinux.org/packages/gnome-shell-extension-taskbar/
Debian / Ubuntu PPA Repository
https://launchpad.net/~zpydr/+archive/gnome-shell-extension-taskbar/
GNOME Shell Extension TaskBar is free software and released under the GNU General Public License (GPL)
https://www.gnu.org/licenses/
TaskBar displays icons of running applications on the top panel or alternatively on a new bottom panel.
Activate, minimize or close tasks with a simple click.
TaskBar is a dock-like windows list on the top/bottom bar.
Options:
Desktop button - toggle desktop view
Workspace button - switch workspaces left/right-click: cycle forward/backwards
Appview button - left/right-click: toggle appview/overview
Favorites - add from dash
Align position
Resize panels + adjust icon, label and content sizes
Top/bottom panel background color + opacity
Bottom panel tray button - activate the message tray
Tasks on all workspaces
Group/sort tasks
Tasks label
Tasks application menu
Close tasks with a right/middle click
Activate tasks on hover
Scroll tasks/workspaces
Separators
Thumbnail/label-preview
Preview color + opacity
Keybindings
Color or hide menu buttons
Disable hot corner
Export/import settings
Translation:
Chinese by wsxy162
Czech by Michal Růžička
French by narzb
German by jonnius
Russian by dersteinkauz
Spanish by Testoriano
Credit to Xes, flubshi, rogst, Baltix, boennhoff,
skoslowski, rgeary1, hkskoglund, Michal Růžička,
skochxxl, tuhaihe, to-ba, tobimensch, navarrano,
unixfox, jkosecki, Taz8du29, diegosanz
gnome-shell-extension-taskbar-57.0/README.md 0000664 0000000 0000000 00000007572 13262614637 0020622 0 ustar 00root root 0000000 0000000 
**GNOME Shell Extension TaskBar**
Copyright (C) 2013-2018 zpydr
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/.
zpydr@openmailbox.org


**Version 57 for GNOME 3.10 - 3.28**
https://extensions.gnome.org/extension/584/taskbar/
https://github.com/zpydr/gnome-shell-extension-taskbar/
TaskBar Wiki (Installation - Settings - Translation - Troubleshooting)
https://github.com/zpydr/gnome-shell-extension-taskbar/wiki/
Arch Linux User Repository
https://aur.archlinux.org/packages/gnome-shell-extension-taskbar/
Debian / Ubuntu PPA Repository
https://launchpad.net/~zpydr/+archive/gnome-shell-extension-taskbar/
GNOME Shell Extension TaskBar is free software and released under the GNU General Public License (GPL)
https://www.gnu.org/licenses/
TaskBar displays icons of running applications on the top panel or alternatively on a new bottom panel.
Activate, minimize or close tasks with a simple click.
TaskBar is a dock-like windows list on the top/bottom bar.
Options:
Desktop button - toggle desktop view
Workspace button - switch workspaces left/right-click: cycle forward/backwards
Appview button - left/right-click: toggle appview/overview
Favorites - add from dash
Align position
Resize panels + adjust icon, label and content sizes
Top/bottom panel background color + opacity
Bottom panel tray button - activate the message tray
Tasks on all workspaces
Group/sort tasks
Tasks label
Tasks application menu
Close tasks with a right/middle click
Activate tasks on hover
Scroll tasks/workspaces
Separators
Thumbnail/label-preview
Preview color + opacity
Keybindings
Color or hide menu buttons
Disable hot corner
Export/import settings
Translation:
Chinese by wsxy162
Czech by Michal Růžička
French by narzb
German by jonnius
Russian by dersteinkauz
Spanish by Testoriano
Credit to Xes, flubshi, rogst, Baltix, boennhoff, skoslowski, rgeary1, hkskoglund, Michal Růžička, skochxxl, tuhaihe, to-ba, tobimensch, navarrano, unixfox, jkosecki, Taz8du29, diegosanz
gnome-shell-extension-taskbar-57.0/TaskBar.pot 0000664 0000000 0000000 00000044632 13262614637 0021414 0 ustar 00root root 0000000 0000000 # GNOME Shell Extension TaskBar
# Copyright (C) 2013-2018 zpydr
#
# Version 57
#
# 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 .
#
# zpydr@openmailbox.org
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-05 13:16+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: prefs.js:121 prefs.js:127
msgid "About"
msgstr ""
#: prefs.js:133 prefs.js:139
msgid "Version"
msgstr ""
#: prefs.js:135 prefs.js:141
msgid "GNOME Shell Version"
msgstr ""
#: prefs.js:149 prefs.js:155
msgid "Report a Bug"
msgstr ""
#: prefs.js:153 prefs.js:159
msgid "Donate for TaskBar"
msgstr ""
#: prefs.js:157 prefs.js:163
msgid "Become a Friend of GNOME"
msgstr ""
#: prefs.js:161 prefs.js:167
msgid "Free Software Foundation"
msgstr ""
#: prefs.js:166 prefs.js:182
msgid "RESET ALL !"
msgstr ""
#: prefs.js:169 prefs.js:185
msgid "Reset All TaskBar Settings to the Original TaskBar Settings"
msgstr ""
#: prefs.js:176 prefs.js:960 prefs.js:192 prefs.js:978
msgid "TaskBar"
msgstr ""
#: prefs.js:189 prefs.js:275 prefs.js:205 prefs.js:291
msgid "Overview"
msgstr ""
#: prefs.js:192 prefs.js:225 prefs.js:208 prefs.js:241
msgid "Tasks"
msgstr ""
#: prefs.js:198 prefs.js:226 prefs.js:986 prefs.js:214 prefs.js:242
#: prefs.js:1004
msgid "Desktop Button"
msgstr ""
#: prefs.js:204 prefs.js:227 prefs.js:999 prefs.js:220 prefs.js:243
#: prefs.js:1017
msgid "Workspace Button"
msgstr ""
#: prefs.js:210 prefs.js:228 prefs.js:1012 prefs.js:226 prefs.js:244
#: prefs.js:1030
msgid "Appview Button"
msgstr ""
#: prefs.js:216 prefs.js:229 prefs.js:1025 prefs.js:232 prefs.js:245
#: prefs.js:1043
msgid "Favorites"
msgstr ""
#: prefs.js:223 prefs.js:239
msgid "Align"
msgstr ""
#: prefs.js:252 prefs.js:291 prefs.js:268 prefs.js:307
msgid "Top Panel"
msgstr ""
#: prefs.js:258 prefs.js:293 prefs.js:274 prefs.js:309
msgid "Bottom Panel"
msgstr ""
#: prefs.js:264 prefs.js:280
msgid "Reset Overview Tab"
msgstr ""
#: prefs.js:267 prefs.js:283
msgid "Reset the Overview Tab to the Original Overview Settings"
msgstr ""
#: prefs.js:288 prefs.js:413 prefs.js:304 prefs.js:429
msgid "Panels"
msgstr ""
#: prefs.js:296 prefs.js:312
msgid "Align TaskBar"
msgstr ""
#: prefs.js:311 prefs.js:327
msgid "Panel Size"
msgstr ""
#: prefs.js:324 prefs.js:340
msgid "Adjust TaskBar Icon Size"
msgstr ""
#: prefs.js:337 prefs.js:353
msgid "Adjust TaskBar Label Size"
msgstr ""
#: prefs.js:350 prefs.js:366
msgid "Adjust Panel Content Size"
msgstr ""
#: prefs.js:358 prefs.js:374
msgid "Anchor Point"
msgstr ""
#: prefs.js:366 prefs.js:382
msgid ""
"Panel Background\n"
"Color & Opacity"
msgstr ""
#: prefs.js:394 prefs.js:397 prefs.js:410 prefs.js:413
msgid "Reset Color"
msgstr ""
#: prefs.js:401 prefs.js:417
msgid "Reset Panels Tab"
msgstr ""
#: prefs.js:404 prefs.js:420
msgid "Reset the Panels Tab to the Original Panels Settings"
msgstr ""
#: prefs.js:426 prefs.js:511 prefs.js:442 prefs.js:529
msgid "Tasks (I)"
msgstr ""
#: prefs.js:429 prefs.js:445
msgid "Tasks on All Workspaces"
msgstr ""
#: prefs.js:435
msgid "Sort Tasks by Application"
msgstr ""
#: prefs.js:438 prefs.js:448 prefs.js:482 prefs.js:492 prefs.js:530
#: prefs.js:809 prefs.js:893 prefs.js:1073 prefs.js:1090 prefs.js:454
#: prefs.js:466 prefs.js:500 prefs.js:510 prefs.js:548 prefs.js:827
#: prefs.js:911 prefs.js:1091 prefs.js:1108
msgid "OFF"
msgstr ""
#: prefs.js:439 prefs.js:455
msgid "Sort"
msgstr ""
#: prefs.js:440 prefs.js:456
msgid "Sort Workspace"
msgstr ""
#: prefs.js:445 prefs.js:463
msgid "Tasks Label"
msgstr ""
#: prefs.js:449 prefs.js:1075 prefs.js:467 prefs.js:1093
msgid "Window Title"
msgstr ""
#: prefs.js:450 prefs.js:1074 prefs.js:1091 prefs.js:468 prefs.js:1092
#: prefs.js:1109
msgid "App Name"
msgstr ""
#: prefs.js:455 prefs.js:473
msgid "Tasks Label Width (150 px)"
msgstr ""
#: prefs.js:463 prefs.js:481
msgid "Tasks Container Width (0 Tasks)"
msgstr ""
#: prefs.js:471 prefs.js:489
msgid "Space between Tasks (4 px)"
msgstr ""
#: prefs.js:479 prefs.js:497
msgid "Tasks Application Menu"
msgstr ""
#: prefs.js:483 prefs.js:493 prefs.js:501 prefs.js:511
msgid "Middle Click"
msgstr ""
#: prefs.js:484 prefs.js:494 prefs.js:502 prefs.js:512
msgid "Right Click"
msgstr ""
#: prefs.js:489 prefs.js:507
msgid "Close Tasks"
msgstr ""
#: prefs.js:499 prefs.js:517
msgid "Reset Tasks (I) Tab"
msgstr ""
#: prefs.js:502 prefs.js:520
msgid "Reset the Tasks (I) Tab to the Original Tasks Settings"
msgstr ""
#: prefs.js:524 prefs.js:602 prefs.js:542 prefs.js:620
msgid "Tasks (II)"
msgstr ""
#: prefs.js:527 prefs.js:545
msgid "Scroll Tasks"
msgstr ""
#: prefs.js:531 prefs.js:810 prefs.js:549 prefs.js:828
msgid "Standard"
msgstr ""
#: prefs.js:532 prefs.js:811 prefs.js:550 prefs.js:829
msgid "Invert"
msgstr ""
#: prefs.js:537 prefs.js:555
msgid "Active Task Frame"
msgstr ""
#: prefs.js:543 prefs.js:561
msgid "Inactive Task Frame"
msgstr ""
#: prefs.js:549 prefs.js:567
msgid "Activate Tasks on Hover"
msgstr ""
#: prefs.js:555 prefs.js:573
msgid "Hover Delay"
msgstr ""
#: prefs.js:563 prefs.js:581
msgid "Blink Tasks on Alert"
msgstr ""
#: prefs.js:569 prefs.js:587
msgid "Blink Rate"
msgstr ""
#: prefs.js:577 prefs.js:595
msgid "Blink Color"
msgstr ""
#: prefs.js:590 prefs.js:608
msgid "Reset Tasks (II) Tab"
msgstr ""
#: prefs.js:593 prefs.js:611
msgid "Reset the Tasks II Tab to the Original Tasks II Settings"
msgstr ""
#: prefs.js:615 prefs.js:764 prefs.js:633 prefs.js:782
msgid "Tasks (III)"
msgstr ""
#: prefs.js:618 prefs.js:636
msgid ""
"Active Task Background\n"
"Color & Opacity"
msgstr ""
#: prefs.js:619 prefs.js:637
msgid ""
"Active Task Background Color & Opacity\n"
"Click the color button to set the color and opacity of the active task "
"background. This opens a new window with a table of preset colors to choose "
"from. Click the '+' button under 'Custom' to customize color and opacity. "
"Clicking '+' changes the window. In the center is a color picker, the left "
"slider changes color and the bottom slider changes opacity. At the top, a "
"indicator and entry field displays hexadecimal values in the form: #RRGGBB, "
"where RR (red), GG (green) and BB (blue) are values between 00 and FF. When "
"selected, customized colors will be available in all color settings. Back on "
"the 'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the background color.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:636 prefs.js:654
msgid ""
"Inactive Tasks Background\n"
"Color & Opacity"
msgstr ""
#: prefs.js:637 prefs.js:655
msgid ""
"Inactive Tasks Background Color & Opacity\n"
"Click the color button to set the color and opacity of inactive task "
"backgrounds. This opens a new window with a table of preset colors to choose "
"from. Click the '+' button under 'Custom' to customize color and opacity. "
"Clicking '+' changes the window. In the center is a color picker, the left "
"slider changes color and the bottom slider changes opacity. At the top, a "
"indicator and entry field displays hexadecimal values in the form: #RRGGBB, "
"where RR (red), GG (green) and BB (blue) are values between 00 and FF. When "
"selected, customized colors will be available in all color settings. Back on "
"the 'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the background color.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:654 prefs.js:672
msgid "Active Task Label Color"
msgstr ""
#: prefs.js:655 prefs.js:673
msgid ""
"Active Task Label Color & Opacity\n"
"Click the color button to set the color and opacity of the active task "
"label. This opens a new window with a table of preset colors to choose from. "
"Click the '+' button under 'Custom' to customize color and opacity. Clicking "
"'+' changes the window. In the center is a color picker, the left slider "
"changes color and the bottom slider changes opacity. At the top, a indicator "
"and entry field displays hexadecimal values in the form: #RRGGBB, where RR "
"(red), GG (green) and BB (blue) are values between 00 and FF. When selected, "
"customized colors will be available in all color settings. Back on the "
"'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the label color.\n"
"Toggle task labels at the 'Tasks (I)' tab.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:672 prefs.js:690
msgid "Inactive Tasks Label Color"
msgstr ""
#: prefs.js:673 prefs.js:691
msgid ""
"Inactive Tasks Label Color & Opacity\n"
"Click the color button to set the color and opacity of inactive task labels. "
"This opens a new window with a table of preset colors to choose from. Click "
"the '+' button under 'Custom' to customize color and opacity. Clicking '+' "
"changes the window. In the center is a color picker, the left slider changes "
"color and the bottom slider changes opacity. At the top, a indicator and "
"entry field displays hexadecimal values in the form: #RRGGBB, where RR "
"(red), GG (green) and BB (blue) are values between 00 and FF. When selected, "
"customized colors will be available in all color settings. Back on the "
"'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the label color.\n"
"Toggle task labels at the 'Tasks (I)' tab.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:690 prefs.js:708
msgid "Active Task Frame Color"
msgstr ""
#: prefs.js:691 prefs.js:709
msgid ""
"Active Task Frame Color & Opacity\n"
"Click the color button to set the color and opacity of the active task "
"frame. This opens a new window with a table of preset colors to choose from. "
"Click the '+' button under 'Custom' to customize color and opacity. Clicking "
"'+' changes the window. In the center is a color picker, the left slider "
"changes color and the bottom slider changes opacity. At the top, a indicator "
"and entry field displays hexadecimal values in the form: #RRGGBB, where RR "
"(red), GG (green) and BB (blue) are values between 00 and FF. When selected, "
"customized colors will be available in all color settings. Back on the "
"'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the frame color.\n"
"Toggle the active task frame at the 'Tasks (II)' tab.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:708 prefs.js:726
msgid "Inactive Tasks Frame Color"
msgstr ""
#: prefs.js:709 prefs.js:727
msgid ""
"Inactive Tasks Frame Color & Opacity\n"
"Click the color button to set the color and opacity of inactive task frames. "
"This opens a new window with a table of preset colors to choose from. Click "
"the '+' button under 'Custom' to customize color and opacity. Clicking '+' "
"changes the window. In the center is a color picker, the left slider changes "
"color and the bottom slider changes opacity. At the top, a indicator and "
"entry field displays hexadecimal values in the form: #RRGGBB, where RR "
"(red), GG (green) and BB (blue) are values between 00 and FF. When selected, "
"customized colors will be available in all color settings. Back on the "
"'Tasks (III)' tab, flip the switch next to the color button to activate/"
"deactivate the frame color.\n"
"Toggle inactive task frames at the 'Tasks (II)' tab.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:726 prefs.js:744
msgid "Blacklist Apps"
msgstr ""
#: prefs.js:727 prefs.js:745
msgid ""
"Blacklist Apps\n"
"Find app names by navigating to the 'Preview' tab and setting 'Tasks Label' "
"to 'App Name'. Then hover the task you would like to blacklist. App names "
"are case-sensitive. If you intend to blacklist more than one app, separate "
"app names by comma and space:\n"
"Terminal, gedit, Tweak Tool, GNU Image Manipulation Program, Files\n"
"Flip the switch next to the entry field to activate/deactivate the "
"blacklist.\n"
"Toggle tasks at the 'Overview' tab."
msgstr ""
#: prefs.js:752 prefs.js:770
msgid "Reset Tasks (III) Tab"
msgstr ""
#: prefs.js:755 prefs.js:773
msgid "Reset All Settings on this Tab"
msgstr ""
#: prefs.js:777 prefs.js:872 prefs.js:795 prefs.js:890
msgid "Buttons"
msgstr ""
#: prefs.js:780 prefs.js:798
msgid ""
"Desktop Button Right Click\n"
"opens Preferences (this)"
msgstr ""
#: prefs.js:786 prefs.js:804
msgid "Desktop Button Icon"
msgstr ""
#: prefs.js:797 prefs.js:815
msgid "Workspace Button Index"
msgstr ""
#: prefs.js:800 prefs.js:895 prefs.js:818 prefs.js:913
msgid "Index"
msgstr ""
#: prefs.js:801 prefs.js:819
msgid "Index/Total"
msgstr ""
#: prefs.js:806 prefs.js:824
msgid "Scroll Workspaces"
msgstr ""
#: prefs.js:816 prefs.js:834
msgid "Workspace Button Color"
msgstr ""
#: prefs.js:832 prefs.js:850
msgid "Adjust Workspace Button Width"
msgstr ""
#: prefs.js:840 prefs.js:858
msgid ""
"Appview Button\n"
"Left & Right Click Toggle"
msgstr ""
#: prefs.js:843 prefs.js:861
msgid ""
"L Appview\n"
"R Overview"
msgstr ""
#: prefs.js:844 prefs.js:862
msgid ""
"L Overview\n"
"R Appview"
msgstr ""
#: prefs.js:849 prefs.js:867
msgid "Appview Button Icon"
msgstr ""
#: prefs.js:860 prefs.js:878
msgid "Reset Buttons Tab"
msgstr ""
#: prefs.js:863 prefs.js:881
msgid ""
"Reset the Buttons Tab except the Icons to the Original Buttons Settings.\n"
"The Icons can be Reset within their own Settings."
msgstr ""
#: prefs.js:885 prefs.js:939 prefs.js:903 prefs.js:957
msgid "Tray Button"
msgstr ""
#: prefs.js:890 prefs.js:908
msgid "Bottom Panel Tray Button"
msgstr ""
#: prefs.js:894 prefs.js:912
msgid "Icon"
msgstr ""
#: prefs.js:900 prefs.js:918
msgid "When Tray is Empty"
msgstr ""
#: prefs.js:903 prefs.js:921
msgid "Show Icon"
msgstr ""
#: prefs.js:904 prefs.js:922
msgid "Show 0"
msgstr ""
#: prefs.js:905 prefs.js:923
msgid "Hide"
msgstr ""
#: prefs.js:910 prefs.js:928
msgid "Tray Button Icon"
msgstr ""
#: prefs.js:921 prefs.js:939
msgid "Activate Tray on Hover"
msgstr ""
#: prefs.js:927 prefs.js:945
msgid "Reset Tray Button Tab"
msgstr ""
#: prefs.js:930 prefs.js:948
msgid ""
"Reset the Tray Button Tab except the Icon to the Original Tray Button "
"Settings.\n"
"The Icon can be Reset within its own Settings."
msgstr ""
#: prefs.js:952 prefs.js:1054 prefs.js:970 prefs.js:1072
msgid "Separators"
msgstr ""
#: prefs.js:955 prefs.js:973
msgid "Left (px)"
msgstr ""
#: prefs.js:957 prefs.js:975
msgid "Right (px)"
msgstr ""
#: prefs.js:973 prefs.js:991
msgid "Tasks Container"
msgstr ""
#: prefs.js:1038 prefs.js:1056
msgid "Reset Separators Tab"
msgstr ""
#: prefs.js:1041 prefs.js:1059
msgid "Reset the Separators Tab to the Original Separators Settings"
msgstr ""
#: prefs.js:1067 prefs.js:1158 prefs.js:1085 prefs.js:1184
msgid "Preview"
msgstr ""
#: prefs.js:1070 prefs.js:1088
msgid "Tasks Label Preview"
msgstr ""
#: prefs.js:1076 prefs.js:1094
msgid ""
"App Name &\n"
"Window Title"
msgstr ""
#: prefs.js:1081 prefs.js:1099
msgid "Tasks Thumbnail Preview"
msgstr ""
#: prefs.js:1087 prefs.js:1105
msgid "Favorites Label Preview"
msgstr ""
#: prefs.js:1092 prefs.js:1110
msgid "Description"
msgstr ""
#: prefs.js:1093 prefs.js:1111
msgid ""
"App Name &\n"
"Description"
msgstr ""
#: prefs.js:1098 prefs.js:1116
msgid "Thumbnail Preview Size"
msgstr ""
#: prefs.js:1106 prefs.js:1124
msgid "Preview Delay"
msgstr ""
#: prefs.js:1114 prefs.js:1132
msgid "Preview Background Color"
msgstr ""
#: prefs.js:1130 prefs.js:1148
msgid "Preview Label Color"
msgstr ""
#: prefs.js:1146 prefs.js:1172
msgid "Reset Preview Tab"
msgstr ""
#: prefs.js:1149 prefs.js:1175
msgid "Reset the Preview Tab to the Original Preview Settings"
msgstr ""
#: prefs.js:1171 prefs.js:1287 prefs.js:1286 prefs.js:1402
msgid "Misc"
msgstr ""
#: prefs.js:1174 prefs.js:1289
msgid "Color & Opacity"
msgstr ""
#: prefs.js:1177 prefs.js:1292
msgid "Activities Button"
msgstr ""
#: prefs.js:1192 prefs.js:1211 prefs.js:1230 prefs.js:1249 prefs.js:1307
#: prefs.js:1326 prefs.js:1345 prefs.js:1364
msgid "Reset"
msgstr ""
#: prefs.js:1196 prefs.js:1311
msgid "Application Menu"
msgstr ""
#: prefs.js:1215 prefs.js:1330
msgid "Date Menu"
msgstr ""
#: prefs.js:1234 prefs.js:1349
msgid "System Menu"
msgstr ""
#: prefs.js:1253 prefs.js:1368
msgid "Hot Corner"
msgstr ""
#: prefs.js:1259 prefs.js:1374
msgid "Dash (Activities Overview)"
msgstr ""
#: prefs.js:1265 prefs.js:1380
msgid "Workspace Selector (Activities Overview)"
msgstr ""
#: prefs.js:1271 prefs.js:1386
msgid "TaskBar (Activities Overview)"
msgstr ""
#: prefs.js:1277 prefs.js:1392
msgid "Reset Misc Tab"
msgstr ""
#: prefs.js:1280 prefs.js:1395
msgid "Reset the Misc Tab to the Original Misc Settings"
msgstr ""
#: prefs.js:1302 prefs.js:1417
msgid "GNU GPL"
msgstr ""
#: prefs.js:1322 prefs.js:1437
msgid "GNU General Public License"
msgstr ""
#: prefs.js:1728 prefs.js:1843
msgid "TaskBar - Set Desktop Button Icon"
msgstr ""
#: prefs.js:1741 prefs.js:1858 prefs.js:1948 prefs.js:1856 prefs.js:1973
#: prefs.js:2063
msgid "Images"
msgstr ""
#: prefs.js:1845 prefs.js:1960
msgid "TaskBar - Set Appview Button Icon"
msgstr ""
#: prefs.js:1935 prefs.js:2050
msgid "TaskBar - Set Tray Button Icon"
msgstr ""
#: prefs.js:172
msgid "Export Settings"
msgstr ""
#: prefs.js:174
msgid ""
"Export All TaskBar Settings. This will create a taskbar.dconf file in your "
"home folder."
msgstr ""
#: prefs.js:177
msgid "Import Settings"
msgstr ""
#: prefs.js:179
msgid ""
"Import All TaskBar Settings. This will import the taskbar.dconf file located "
"in your home folder."
msgstr ""
#: prefs.js:451
msgid "Sort or Group Tasks by Application"
msgstr ""
#: prefs.js:457
msgid "Group"
msgstr ""
#: prefs.js:458
msgid "Group Workspace"
msgstr ""
#: prefs.js:1164
msgid "Preview Font Size"
msgstr ""
#: prefs.js:1197 prefs.js:1275
msgid "Keybindings"
msgstr ""
#: prefs.js:1270
msgid "Backspace to disable Keybindings"
msgstr ""
#: prefs.js:57
msgid "Focus previous Task (Scroll left)"
msgstr ""
#: prefs.js:58
msgid "Focus next Task (Scroll right)"
msgstr ""
#: prefs.js:59
msgid "Toggle Desktop View"
msgstr ""
gnome-shell-extension-taskbar-57.0/extension.js 0000664 0000000 0000000 00000320420 13262614637 0021703 0 ustar 00root root 0000000 0000000 // GNOME Shell Extension TaskBar
// Copyright (C) 2013-2018 zpydr
//
// Version 57
//
// 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 .
//
// zpydr@openmailbox.org
const Clutter = imports.gi.Clutter;
const Gdk = imports.gi.Gdk;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Mainloop = imports.mainloop;
const Meta = imports.gi.Meta;
const Shell = imports.gi.Shell;
const St = imports.gi.St;
const AppFavorites = imports.ui.appFavorites;
const Layout = imports.ui.layout;
const Main = imports.ui.main;
const MessageTray = imports.ui.messageTray;
const Panel = imports.ui.main.panel;
const PanelMenu = imports.ui.panelMenu;
const PopupMenu = imports.ui.popupMenu;
const RemoteMenu = imports.ui.remoteMenu;
const ThumbnailsSlider = imports.ui.overviewControls.ThumbnailsSlider.prototype;
const Tweener = imports.ui.tweener;
const Extension = imports.misc.extensionUtils.getCurrentExtension();
const Lib = Extension.imports.lib;
const Prefs = Extension.imports.prefs;
const ShellVersion = imports.misc.config.PACKAGE_VERSION.split(".").map(function(x) {
return +x;
});
const Windows = Extension.imports.windows;
const schema = "org.gnome.shell.extensions.TaskBar";
const RESETBOTTOMPANELCOLOR = 'rgba(0,0,0,1)';
const LEFTBUTTON = 1;
const MIDDLEBUTTON = 2;
const RIGHTBUTTON = 3;
const NOHOTCORNER = 54321;
const DESKTOPICON = Extension.path + '/images/desktop-button-default.png';
const APPVIEWICON = Extension.path + '/images/appview-button-default.svg';
const BPTRAYICON = Extension.path + '/images/bottom-panel-tray-button.svg';
const PREVIOUSKEY = 'key-previous-task';
const NEXTKEY = 'key-next-task';
const DESKTOPKEY = 'key-toggle-desktop';
function init(extensionMeta) {
return new TaskBar(extensionMeta, schema);
}
function TaskBar(extensionMeta, schema) {
this.init(extensionMeta, schema);
}
TaskBar.prototype = {
active: null,
activeTask: null,
activeWorkspaceIndex: null,
activeWorkspace: null,
activitiesStyle: null,
activitiesContainer: null,
alwaysZoomOut: null,
app: null,
appearance: null,
appearances: [],
appMenuColor: null,
appMenuContainer: null,
appMenuStyle: null,
appname: null,
attentionStyle: null,
attentionStyleChanged: null,
attentionStyleChangeTimeout: null,
backgroundColor: null,
backgroundStyleColor: null,
barriers: null,
blacklist: [],
blacklistapp: null,
bottomPanelActor: null,
bottomPanelBackgroundColor: null,
bottomPanelBackgroundStyle: null,
bottomPanelEndIndicator: null,
bottomPanelHeight: null,
bottomPanelVertical: null,
boxBottomPanelTrayButton: null,
boxDesktop: null,
boxMainDesktopButton: null,
boxMainFavorites: null,
boxMain: null,
boxMainShowAppsButton: null,
boxMainTasksId: null,
boxMainTasks: null,
boxMainWorkspaceButton: null,
boxShowApps: null,
boxTray: null,
boxWorkspace: null,
buttonDesktop: null,
buttonfavorite: null,
button: null,
buttonShowApps: null,
buttonTask: null,
buttonTaskLayout: null,
buttonTaskWidth: null,
buttonTray: null,
buttonWorkspace: null,
changedId: null,
countTasks: null,
dash: null,
dashHeight: null,
dashWidth: null,
dateMenuColor: null,
dateMenuContainer: null,
dateMenuStyle: null,
desktopButtonIcon: null,
desktopView: null,
favoriteappName: null,
favoriteapp: null,
favorites: null,
favoritesPreview: null,
focusWindow: null,
globalThemeChangedId: null,
height: null,
hidingId2: null,
hidingId: null,
hoverComponent: null,
hoverStyle: null,
iconDesktop: null,
iconPath: null,
iconShowApps: null,
panelSize: null,
iconTask: null,
iconThemeChangedId: null,
iconTray: null,
inactiveBackgroundStyleColor: null,
inactiveTask: null,
index: null,
indicatorCount: null,
installedChangedId: null,
i: null,
itemHeight: null,
itemWidth: null,
j: null,
k: null,
key: null,
labelHeight: null,
labelNamePreview: null,
labelTask: null,
labelTitlePreview: null,
labelTotalWorkspace: null,
labelTray: null,
labelWidth: null,
labelWorkspaceIndex: null,
labelWorkspace: null,
lastFocusedWindow: null,
lastFocusedWindowUserTime: null,
leftbutton: null,
mainBox: null,
maxWindows: null,
menuQuit: null,
messageTrayCountAddedId: null,
messageTrayCountRemovedId: null,
messageTrayHidingId: null,
messageTrayShowingId: null,
monitorChangedId: null,
mutterWindow: null,
newActiveWorkspace: null,
newBox: null,
newShowTray: null,
newTasksContainerWidth: null,
newWidth: null,
nextTask: null,
node: null,
nonExpandedWidth: null,
numButton: null,
nWorkspacesId: null,
originalLeftPanelCornerStyle: null,
originalRightPanelCornerStyle: null,
originalTopPanelStyle: null,
overviewHidingId: null,
overviewShowingId: null,
panelBox: null,
panelIconSize: null,
panelPosition: null,
panelSet: null,
fontSize: null,
panelStyleChangedId: null,
pbchildren: null,
positionAppearance: null,
positionBoxBottomEnd: null,
positionBoxBottomMiddle: null,
positionBoxBottomSettings: null,
positionBoxBottomStart: null,
positionMaxRight: null,
posparent: null,
posparentWidth: null,
preview: null,
previewTimer2: null,
previewTimer: null,
previousTask: null,
primary: null,
resetHover: null,
rightbutton: null,
scale: null,
screenShieldLockId: null,
scrollDirection: null,
separatorAppview: null,
separatorBoxMain: null,
separatorDesktop: null,
separatorFavorites: null,
separatorLeftAppview: null,
separatorLeftBoxMain: null,
separatorLeftDesktop: null,
separatorLeftFavorites: null,
separatorLeftTasks: null,
separatorLeftWorkspaces: null,
separatorRightAppview: null,
separatorRightBoxMain: null,
separatorRightDesktop: null,
separatorRightFavorites: null,
separatorRightTasks: null,
separatorRightWorkspaces: null,
separatorTasks: null,
separatorWorkspaces: null,
setAnchorPoint: null,
setTaskBar: null,
settingSignals: [],
settings: null,
showAppsIcon: null,
showTray: null,
signalDesktop: null,
signalShowApps: null,
signalsTask: [],
signalTray: null,
spaces: null,
stageX: null,
stageY: null,
systemMenuColor: null,
systemMenuContainer: null,
systemMenuStyle: null,
taskMenu: null,
taskMenuIsOpen: null,
taskMenuManager: null,
taskMenuUp: null,
tasksContainerWidth: null,
tasksLabelColor: null,
tasksLabelStyle: null,
tasksList: [],
tasksWidth: null,
tbp: null,
threshold: null,
thumbnail: null,
title: null,
toggleOverview: null,
topPanelBackgroundColor: null,
topPanelBackgroundStyle: null,
topPanelOriginalBackgroundColor: null,
totalWidth: null,
totalWorkspace: null,
tpobc: null,
trayIcon: null,
type: null,
userTime: null,
variant: null,
width: null,
windowDemandsAttentionId: null,
windows: null,
windowsList: [],
windowTask: null,
windowTexture: null,
windowWorkspace: null,
workspace: null,
workspaceButtonColor: null,
workspaceButtonStyle: null,
workspaceSwitchedId: null,
workspaceTask: null,
x: null,
xsettings: null,
y: null,
yOffset: null,
init: function(extensionMeta, schema) {
this.extensionMeta = extensionMeta;
this.schema = schema;
},
onParamChanged: function() {
if (!this.settings.get_boolean("reset-flag")) {
this.disable();
this.enable();
}
},
enable: function() {
let settings = new Lib.Settings(this.schema);
this.settings = settings.getSettings();
//Top Panel Background Color
this.changeTopPanelBackgroundColor();
//First Start
this.firstStart();
//Verify other Extensions
this.otherExtensions();
//Add TaskBar
this.addTaskBar();
//Add Separators
this.addSeparators();
//Set TaskBar Position
this.onPositionChanged();
//Add Favorites
this.addFavorites();
//Add Appview Button
this.addShowAppsButton();
//Add Workspace Button
this.addWorkspaceButton();
//Add Desktop Button
this.addDesktopButton();
//Add Tray Button
this.addTrayButton();
//Activities Button
this.initDisplayActivitiesButton();
//Hot Corner
this.initEnableHotCorner();
//Application Menu
this.initDisplayApplicationMenu();
//Date Menu
this.initDisplayDateMenu();
//System Menu
this.initDisplaySystemMenu();
//Dash
this.initDisplayDash();
//Workspace Selector
this.initDisplayWorkspaceSelector();
//Init Windows Manage Callbacks
this.initWindows();
//Order of Appearance
this.appearanceOrder();
//Preferences Hover Event
this.hoverEvent();
//Top Panel
this.initDisplayTopPanel();
//Reinit Extension on Param Change
this.setSignals();
this.setSystemSignals();
//Keybindings
this.keybindings();
},
disable: function() {
//Disconnect Overview Signals
if (this.overviewHidingId !== null) {
Main.overview.disconnect(this.overviewHidingId);
this.overviewHidingId = null;
}
if (this.overviewShowingId !== null) {
Main.overview.disconnect(this.overviewShowingId);
this.overviewShowingId = null;
}
//Show Activities if hidden
if (!this.settings.get_boolean("activities-button"))
this.activitiesContainer.show();
//Reset Activities Button Color if changed
if (this.settings.get_string("activities-button-color") !== "unset")
Main.panel.statusArea.activities.actor.set_style("None");
//Enable Hot Corner if disabled
if ((!this.settings.get_boolean("hot-corner")) && (ShellVersion[1] < 26))
Main.layoutManager._updateHotCorners();
//Show and disconnect Application Menu if hidden
if (!this.settings.get_boolean("application-menu")) {
this.appMenuContainer.show();
Shell.WindowTracker.get_default().disconnect(this.hidingId2);
Main.overview.disconnect(this.hidingId);
}
//Reset Application Menu Color if changed
if (this.settings.get_string("application-menu-color") !== "unset")
Main.panel.statusArea.appMenu.actor.set_style("None");
//Show Date Menu if hidden
if (!this.settings.get_boolean("date-menu"))
this.dateMenuContainer.show();
//Reset Date Menu Color if changed
if (this.settings.get_string("date-menu-color") !== "unset")
Main.panel.statusArea.dateMenu.actor.set_style("None");
//Show System Menu if hidden
if (!this.settings.get_boolean("system-menu"))
this.systemMenuContainer.show();
//Reset System Menu Color if changed
if (this.settings.get_string("system-menu-color") !== "unset")
Main.panel.statusArea.aggregateMenu.actor.set_style("None");
//Show Dash if hidden
if (!this.settings.get_boolean("dash")) {
this.dash.set_height(this.dashHeight);
this.dash.set_width(this.dashWidth);
}
//Show Workspace Selector if hidden
if (!this.settings.get_boolean("workspace-selector")) {
ThumbnailsSlider._getAlwaysZoomOut = this.alwaysZoomOut;
ThumbnailsSlider.getNonExpandedWidth = this.nonExpandedWidth;
}
//Disconnect Workspace Signals
if (this.workspaceSwitchedId !== null) {
global.screen.disconnect(this.workspaceSwitchedId);
this.workspaceSwitchedId = null;
}
if (this.nWorkspacesId !== null) {
global.screen.disconnect(this.nWorkspacesId);
this.nWorkspacesId = null;
}
//Disconnect Favorites Signals
if (this.installedChangedId !== null) {
Shell.AppSystem.get_default().disconnect(this.installedChangedId);
this.installedChangedId = null;
}
if (this.changedId !== null) {
AppFavorites.getAppFavorites().disconnect(this.changedId);
this.changedId = null;
}
//Disconnect Message Tray Sources Added Signal
if (this.messageTrayCountAddedId !== null) {
if (ShellVersion[1] <= 14)
Main.messageTray.disconnect(this.messageTrayCountAddedId);
this.messageTrayCountAddedId = null;
}
//Disconnect Message Tray Sources Removed Signal
if (this.messageTrayCountRemovedId !== null) {
if (ShellVersion[1] <= 14)
Main.messageTray.disconnect(this.messageTrayCountRemovedId);
this.messageTrayCountRemovedId = null;
}
//Disconnect Message Tray Showing Signal
if (this.messageTrayShowingId !== null) {
if (ShellVersion[1] <= 14)
Main.messageTray.disconnect(this.messageTrayShowingId);
this.messageTrayShowingId = null;
}
//Disconnect Message Tray Hiding Signal
if (this.messageTrayHidingId !== null) {
if (ShellVersion[1] <= 14)
Main.messageTray.disconnect(this.messageTrayHidingId);
this.messageTrayHidingId = null;
}
//Reset Message Tray
if (this.showTray !== null) {
if (ShellVersion[1] <= 14)
MessageTray.MessageTray.prototype._showTray = this.showTray;
this.showTray = null;
}
//Disconnect Setting Signals
if (this.settingSignals !== null) {
this.settingSignals.forEach(
function(signal) {
this.settings.disconnect(signal);
},
this
);
this.settingSignals = null;
}
//Disconnect Monitor Change Signals
if (this.monitorChangedId !== null) {
Main.layoutManager.disconnect(this.monitorChangedId);
this.monitorChangedId = null;
}
//Disconnect Texture Cache Signals
if (this.iconThemeChangedId !== null) {
St.TextureCache.get_default().disconnect(this.iconThemeChangedId);
this.iconThemeChangedId = null;
}
//Disconnect Global Theme Signals
if (this.globalThemeChangedId !== null) {
St.ThemeContext.get_for_stage(global.stage).disconnect(this.globalThemeChangedId);
this.globalThemeChangedId = null;
}
//Disconnect Window Demands Attention Signals
if (this.windowDemandsAttentionId !== null) {
global.display.disconnect(this.windowDemandsAttentionId);
this.windowDemandsAttentionId = null;
}
//Disconnect Lock Screen Signals
if (this.screenShieldLockId !== null) {
Main.screenShield.disconnect(this.screenShieldLockId);
this.screenShieldLockId = null;
}
//Hide current preview if necessary
this.hidePreview();
//Disconnect Tasks Container Scroll Signals
if (this.boxMainTasksId !== null) {
this.boxMainTasks.disconnect(this.boxMainTasksId);
this.boxMainTasksId = null;
}
//Remove Keybindings
if (Main.wm.removeKeybinding) {
Main.wm.removeKeybinding(PREVIOUSKEY);
Main.wm.removeKeybinding(NEXTKEY);
Main.wm.removeKeybinding(DESKTOPKEY);
} else {
global.display.remove_keybinding(PREVIOUSKEY);
global.display.remove_keybinding(NEXTKEY);
global.display.remove_keybinding(DESKTOPKEY);
}
//Remove TaskBar
if (this.windows !== null) {
this.windows.destruct();
this.windows = null;
}
if (this.bottomPanelActor !== null) {
this.bottomPanelActor.destroy();
this.bottomPanelActor = null;
}
if ((this.setAnchorPoint) && (ShellVersion[1] <= 14)) {
Main.messageTray.actor.set_anchor_point(0, 0);
Main.messageTray._notificationWidget.set_anchor_point(0, 0);
this.setAnchorPoint = false;
}
if (this.newBox !== null) {
this.newBox.remove_child(this.boxMain);
this.newBox = null;
}
if (this.boxMain !== null)
this.boxMain = null;
if (this.mainBox !== null)
this.mainBox = null;
this.cleanTasksList();
if (this.topPanelBackgroundColor !== 'unset') {
if (ShellVersion[1] <= 16) {
Main.panel._leftCorner.actor.show();
Main.panel._rightCorner.actor.show();
}
Main.panel._leftCorner.actor.set_style(this.originalLeftPanelCornerStyle);
Main.panel._rightCorner.actor.set_style(this.originalRightPanelCornerStyle);
}
if ((this.topPanelBackgroundColor !== 'unset') || (this.panelSet))
Main.panel.actor.set_style(this.originalTopPanelStyle);
if (!this.settings.get_boolean("top-panel")) {
Main.layoutManager.removeChrome(Main.layoutManager.panelBox);
Main.layoutManager.addChrome(Main.layoutManager.panelBox, {
affectsStruts: true
});
Main.panel._leftCorner.actor.show();
Main.panel._rightCorner.actor.show();
Main.panel.actor.show();
}
},
setSignals: function() {
//Reinit Extension on Param Change
this.settingSignals = [
this.settings.connect("changed::panel-size", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::panel-size-bottom", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tb-icon-size", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tb-icon-size-bottom", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tb-label-size", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tb-label-size-bottom", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::content-size", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::font-size-bottom", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::panel-box", Lang.bind(this, this.onBoxChanged)),
this.settings.connect("changed::panel-position", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-favorites", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-showapps-button", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-workspace-button", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::workspace-button-index", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::workspace-button-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-workspace-button-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::workspace-button-width", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-desktop-button", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::overview", Lang.bind(this, this.setOverview)),
this.settings.connect("changed::tray-button", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tray-button-empty", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::desktop-button-icon", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::appview-button-icon", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tray-button-icon", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::sort-tasks", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::active-task-frame", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::inactive-task-frame", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::active-task-background-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::active-task-background-color-set", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::inactive-task-background-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::inactive-task-background-color-set", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-label", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-label-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-tasks-label-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::inactive-tasks-label-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-inactive-tasks-label-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-frame-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-tasks-frame-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::inactive-tasks-frame-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-inactive-tasks-frame-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-width", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-spaces", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::blink-tasks", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::blacklist-set", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::top-panel-background-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::top-panel-background-alpha", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::bottom-panel-background-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-tasks", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-box-main", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-box-main", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-tasks", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-tasks", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-desktop", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-desktop", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-workspaces", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-workspaces", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-appview", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-appview", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-left-favorites", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::separator-right-favorites", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::top-panel", Lang.bind(this, this.displayTopPanel)),
this.settings.connect("changed::activities-button", Lang.bind(this, this.displayActivities)),
this.settings.connect("changed::activities-button-color", Lang.bind(this, this.colorActivities)),
this.settings.connect("changed::hot-corner", Lang.bind(this, this.enableHotCorner)),
this.settings.connect("changed::application-menu", Lang.bind(this, this.displayApplicationMenu)),
this.settings.connect("changed::application-menu-color", Lang.bind(this, this.colorApplicationMenu)),
this.settings.connect("changed::date-menu", Lang.bind(this, this.displayDateMenu)),
this.settings.connect("changed::date-menu-color", Lang.bind(this, this.colorDateMenu)),
this.settings.connect("changed::system-menu", Lang.bind(this, this.displaySystemMenu)),
this.settings.connect("changed::system-menu-color", Lang.bind(this, this.colorSystemMenu)),
this.settings.connect("changed::dash", Lang.bind(this, this.displayDash)),
this.settings.connect("changed::workspace-selector", Lang.bind(this, this.displayWorkspaceSelector)),
this.settings.connect("changed::position-changed", Lang.bind(this, this.appearancePositionChange)),
this.settings.connect("changed::bottom-panel", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::bottom-panel-vertical", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::position-bottom-box", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-all-workspaces", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::tasks-container-width-new", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::hover-event", Lang.bind(this, this.hoverEvent)),
this.settings.connect("changed::blacklist", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::find-apps", Lang.bind(this, this.findApps)),
this.settings.connect("changed::display-preview-background-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::display-preview-label-color", Lang.bind(this, this.onParamChanged)),
this.settings.connect("changed::export-settings", Lang.bind(this, this.exportSettings)),
this.settings.connect("changed::import-settings", Lang.bind(this, this.importSettings)),
this.settings.connect("changed::reset-all", Lang.bind(this, this.resetAll)),
this.settings.connect("changed::reset-flag", Lang.bind(this, this.onParamChanged))
];
},
//Monitor Change, Icon and Global Theme Change
setSystemSignals: function() {
this.monitorChangedId = null;
this.iconThemeChangedId = null;
this.globalThemeChangedId = null;
this.windowDemandsAttentionId = null;
this.screenShieldLockId = null;
this.panelStyleChangedId = null;
this.mainBox = null;
this.overviewHidingId = null;
this.overviewShowingId = null;
this.monitorChangedId = Main.layoutManager.connect('monitors-changed', Lang.bind(this, this.onParamChanged));
this.iconThemeChangedId = St.TextureCache.get_default().connect('icon-theme-changed', Lang.bind(this, this.onParamChanged));
this.globalThemeChangedId = St.ThemeContext.get_for_stage(global.stage).connect('changed', Lang.bind(this, this.onParamChanged));
if ((this.settings.get_boolean("display-tasks")) && (this.settings.get_boolean("blink-tasks")))
this.windowDemandsAttentionId = global.display.connect('window-demands-attention', Lang.bind(this, this.onWindowDemandsAttention));
// if (Main.screenShield !== null)
// this.screenShieldLockId = Main.screenShield.connect('lock-status-changed', Lang.bind(this, this.onParamChanged));
this.setOverview();
},
//TaskBar in Overview Mode
setOverview: function() {
if (!this.settings.get_boolean("overview")) {
this.mainBox = this.boxMain;
this.overviewHidingId = Main.overview.connect('hiding', Lang.bind(this, this.showMainBox));
this.overviewShowingId = Main.overview.connect('showing', Lang.bind(this, this.hideMainBox));
} else {
//Disconnect Overview Signals
if (this.overviewHidingId !== null) {
Main.overview.disconnect(this.overviewHidingId);
this.overviewHidingId = null;
}
if (this.overviewShowingId !== null) {
Main.overview.disconnect(this.overviewShowingId);
this.overviewShowingId = null;
}
}
},
//First Start
firstStart: function() {
if ((this.settings.get_string("extension-path") === 'unset') || (this.settings.get_string("extension-path") !== Extension.path)) {
this.settings.set_string("extension-path", Extension.path);
this.settings.set_string("desktop-button-icon", DESKTOPICON);
this.settings.set_string("appview-button-icon", APPVIEWICON);
this.settings.set_string("tray-button-icon", BPTRAYICON);
}
if ((this.settings.get_boolean("first-start")) && (Main.sessionMode.currentMode === 'user')) {
//Comment out the next line to disable the preferences window from opening at the first start
Main.Util.trySpawnCommandLine('gnome-shell-extension-prefs ' + Extension.metadata.uuid);
this.settings.set_boolean("first-start", false);
}
},
//Verify other Extensions
otherExtensions: function() {
//Find out if the bottom panel extension is enabled
this.tbp = false;
let schemaSettings = new Gio.Settings({
schema: 'org.gnome.shell'
});
let enabled_extensions = schemaSettings.get_strv('enabled-extensions');
if (enabled_extensions.indexOf("bottompanel@tmoer93") !== -1)
this.tbp = true;
},
//Add TaskBar
addTaskBar: function() {
this.setTaskBar = false;
if ((this.settings.get_boolean("display-tasks")) ||
(this.settings.get_boolean("display-desktop-button")) ||
(this.settings.get_boolean("display-workspace-button")) ||
(this.settings.get_boolean("display-showapps-button")) ||
(this.settings.get_boolean("display-favorites"))) {
this.setTaskBar = true;
this.boxMain = new St.BoxLayout({
style_class: "tkb-box"
});
if (this.settings.get_boolean("display-favorites"))
this.boxMainFavorites = new St.BoxLayout({
style_class: "tkb-box"
});
if (this.settings.get_boolean("display-showapps-button"))
this.boxMainShowAppsButton = new St.BoxLayout({
style_class: "tkb-box"
});
if (this.settings.get_boolean("display-workspace-button"))
this.boxMainWorkspaceButton = new St.BoxLayout({
style_class: "tkb-box"
});
if (this.settings.get_boolean("display-desktop-button"))
this.boxMainDesktopButton = new St.BoxLayout({
style_class: "tkb-box"
});
if (this.settings.get_boolean("display-tasks")) {
this.boxMainTasks = new St.BoxLayout({
style_class: "tkb-box",
reactive: true
});
this.tasksContainerWidth = this.settings.get_int("tasks-container-width-new");
this.boxMainTasksId = this.boxMainTasks.connect("scroll-event", Lang.bind(this, this.onScrollTaskButton));
}
if ((this.settings.get_enum("tray-button") !== 0) && (this.settings.get_boolean("bottom-panel")) && (ShellVersion[1] <= 14))
this.boxBottomPanelTrayButton = new St.BoxLayout({
style_class: "tkb-box"
});
}
},
//Add Separators
addSeparators: function() {
if (this.setTaskBar) {
let separatorLeftBoxMain = this.settings.get_int('separator-left-box-main');
let separatorRightBoxMain = this.settings.get_int('separator-right-box-main');
this.separatorBoxMain = 'padding-left: ' + separatorLeftBoxMain + 'px; padding-right: ' + separatorRightBoxMain + 'px; ';
this.boxMain.set_style(this.separatorBoxMain);
if (this.settings.get_boolean("display-favorites")) {
let separatorLeftFavorites = this.settings.get_int('separator-left-favorites');
let separatorRightFavorites = this.settings.get_int('separator-right-favorites');
this.separatorFavorites = 'padding-left: ' + separatorLeftFavorites + 'px; padding-right: ' + separatorRightFavorites + 'px; ';
this.boxMainFavorites.set_style(this.separatorFavorites);
}
if (this.settings.get_boolean("display-showapps-button")) {
let separatorLeftAppview = this.settings.get_int('separator-left-appview');
let separatorRightAppview = this.settings.get_int('separator-right-appview');
this.separatorAppview = 'padding-left: ' + separatorLeftAppview + 'px; padding-right: ' + separatorRightAppview + 'px; ';
this.boxMainShowAppsButton.set_style(this.separatorAppview);
}
if (this.settings.get_boolean("display-workspace-button")) {
let separatorLeftWorkspaces = this.settings.get_int('separator-left-workspaces');
let separatorRightWorkspaces = this.settings.get_int('separator-right-workspaces');
this.separatorWorkspaces = 'padding-left: ' + separatorLeftWorkspaces + 'px; padding-right: ' + separatorRightWorkspaces + 'px; ';
this.boxMainWorkspaceButton.set_style(this.separatorWorkspaces);
}
if (this.settings.get_boolean("display-desktop-button")) {
let separatorLeftDesktop = this.settings.get_int('separator-left-desktop');
let separatorRightDesktop = this.settings.get_int('separator-right-desktop');
this.separatorDesktop = 'padding-left: ' + separatorLeftDesktop + 'px; padding-right: ' + separatorRightDesktop + 'px; ';
this.boxMainDesktopButton.set_style(this.separatorDesktop);
}
if (this.settings.get_boolean("display-tasks")) {
let separatorLeftTasks = this.settings.get_int('separator-left-tasks');
let separatorRightTasks = this.settings.get_int('separator-right-tasks');
this.separatorTasks = 'padding-left: ' + separatorLeftTasks + 'px; padding-right: ' + separatorRightTasks + 'px; ';
this.boxMainTasks.set_style(this.separatorTasks);
}
}
},
//Export Settings
exportSettings: function() {
if (this.settings.get_boolean("export-settings")) {
Main.Util.trySpawnCommandLine('sh ' + Extension.path + '/scripts/export.sh');
this.settings.set_boolean("export-settings", false);
}
},
//Import Settings
importSettings: function() {
if (this.settings.get_boolean("import-settings")) {
Main.Util.trySpawnCommandLine('sh ' + Extension.path + '/scripts/import.sh');
this.settings.set_boolean("import-settings", false);
}
},
//Reset All !
resetAll: function() {
if (this.settings.get_boolean("reset-all")) {
Main.Util.trySpawnCommandLine('dconf reset -f /org/gnome/shell/extensions/TaskBar/');
}
},
//Find Apps
findApps: function() {
if (this.settings.get_boolean("find-apps")) {
Main.overview.show();
Main.overview.viewSelector._showAppsButton.checked = true;
this.settings.set_boolean("find-apps", false);
}
},
//Keybindings
keybindings: function() {
if (Main.wm.addKeybinding && Shell.ActionMode) //3.16
Main.wm.addKeybinding(PREVIOUSKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.ActionMode.NORMAL,
Lang.bind(this, this.keyPreviousTask));
else if (Main.wm.addKeybinding && Shell.KeyBindingMode) //3.8
Main.wm.addKeybinding(PREVIOUSKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.KeyBindingMode.NORMAL | Shell.KeyBindingMode.MESSAGE_TRAY,
Lang.bind(this, this.keyPreviousTask));
else
global.display.add_keybinding(PREVIOUSKEY, this.settings, Meta.KeyBindingFlags.NONE,
Lang.bind(this, this.keyPreviousTask));
if (Main.wm.addKeybinding && Shell.ActionMode) //3.16
Main.wm.addKeybinding(NEXTKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.ActionMode.NORMAL,
Lang.bind(this, this.keyNextTask));
else if (Main.wm.addKeybinding && Shell.KeyBindingMode) //3.8
Main.wm.addKeybinding(NEXTKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.KeyBindingMode.NORMAL | Shell.KeyBindingMode.MESSAGE_TRAY,
Lang.bind(this, this.keyNextTask));
else
global.display.add_keybinding(NEXTKEY, this.settings, Meta.KeyBindingFlags.NONE,
Lang.bind(this, this.keyNextTask));
if (Main.wm.addKeybinding && Shell.ActionMode) //3.16
Main.wm.addKeybinding(DESKTOPKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.ActionMode.NORMAL,
Lang.bind(this, this.keyToggleDesktop));
else if (Main.wm.addKeybinding && Shell.KeyBindingMode) //3.8
Main.wm.addKeybinding(DESKTOPKEY, this.settings, Meta.KeyBindingFlags.NONE,
Shell.KeyBindingMode.NORMAL | Shell.KeyBindingMode.MESSAGE_TRAY,
Lang.bind(this, this.keyToggleDesktop));
else
global.display.add_keybinding(DESKTOPKEY, this.settings, Meta.KeyBindingFlags.NONE,
Lang.bind(this, this.keyToggleDesktop));
},
//Keybinding Activate Previous Task
keyPreviousTask: function() {
this.previousTask = null;
let focusWindow = global.display.focus_window;
let activeWorkspace = global.screen.get_active_workspace();
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
if ((windowTask === focusWindow) && (this.previousTask !== null)) {
let [windowTask, buttonTask, signalsTask] = this.previousTask;
let windowWorkspace = windowTask.get_workspace();
if (windowWorkspace !== activeWorkspace)
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
}
this.previousTask = task;
},
this
);
if (Main.overview.visible)
Main.overview.hide();
},
//Keybinding Activate Next Task
keyNextTask: function() {
this.nextTask = false;
let focusWindow = global.display.focus_window;
let activeWorkspace = global.screen.get_active_workspace();
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let windowWorkspace = windowTask.get_workspace();
if (this.nextTask) {
if (windowWorkspace !== activeWorkspace)
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
this.nextTask = false;
}
if (windowTask === focusWindow)
this.nextTask = true;
},
this
);
if (Main.overview.visible)
Main.overview.hide();
},
//Keybinding Toggle Desktop
keyToggleDesktop: function() {
let maxWindows = false;
let userTime = null;
let activeWorkspace = global.screen.get_active_workspace();
let windows = activeWorkspace.list_windows().filter(function(w) {
return w.get_window_type() !== Meta.WindowType.DESKTOP;
});
for (let i = 0; i < windows.length; ++i) {
if ((this.desktopView) && (!Main.overview.visible)) {
userTime = windows[i].user_time;
if (userTime > this.lastFocusedWindowUserTime) {
this.lastFocusedWindowUserTime = userTime;
this.lastFocusedWindow = windows[i];
}
windows[i].unminimize();
maxWindows = true;
} else {
windows[i].minimize();
}
}
if (maxWindows) {
this.lastFocusedWindow.activate(global.get_current_time());
}
this.desktopView = !this.desktopView;
if (Main.overview.visible)
Main.overview.hide();
},
//Align Position
onPositionChanged: function() {
this.showTray = null;
this.messageTrayShowingId = null;
this.messageTrayHidingId = null;
this.setAnchorPoint = false;
this.bottomPanelEndIndicator = false;
if (this.setTaskBar) {
if (this.settings.get_boolean("bottom-panel"))
this.bottomPanel();
else {
this.defineBoxChanged();
this.panelPosition = this.settings.get_int('panel-position');
if (this.panelPosition > this.pbchildren)
this.settings.set_int("panel-position", this.pbchildren);
this.newBox.insert_child_at_index(this.boxMain, this.panelPosition);
}
}
},
defineBoxChanged: function() {
this.panelBox = this.settings.get_int('panel-box');
if (this.panelBox === 1)
this.newBox = Main.panel._leftBox;
else if (this.panelBox === 2)
this.newBox = Main.panel._centerBox;
else if (this.panelBox === 3)
this.newBox = Main.panel._rightBox;
this.pbchildren = this.newBox.get_children().length;
let positionMaxRight = this.settings.get_int("position-max-right");
if (positionMaxRight !== this.pbchildren)
this.settings.set_int("position-max-right", this.pbchildren);
},
onBoxChanged: function() {
this.newBox.remove_child(this.boxMain);
this.defineBoxChanged();
},
appearanceOrder: function() {
if (this.setTaskBar) {
this.appearances = [
("position-tasks"),
("position-desktop-button"),
("position-workspace-button"),
("position-appview-button"),
("position-favorites")
];
for (let i = 0; i <= 4; i++) {
this.appearances.forEach(
function(appearance) {
let positionAppearance = this.settings.get_int(appearance);
if (positionAppearance === i) {
if ((appearance === "position-tasks") && (this.settings.get_boolean("display-tasks")))
this.boxMain.add_actor(this.boxMainTasks);
else if ((appearance === "position-desktop-button") && (this.settings.get_boolean("display-desktop-button")))
this.boxMain.add_actor(this.boxMainDesktopButton);
else if ((appearance === "position-workspace-button") && (this.settings.get_boolean("display-workspace-button")))
this.boxMain.add_actor(this.boxMainWorkspaceButton);
else if ((appearance === "position-appview-button") && (this.settings.get_boolean("display-showapps-button")))
this.boxMain.add_actor(this.boxMainShowAppsButton);
else if ((appearance === "position-favorites") && (this.settings.get_boolean("display-favorites")))
this.boxMain.add_actor(this.boxMainFavorites);
}
},
this
);
}
if ((this.settings.get_enum("tray-button") !== 0) && (this.bottomPanelEndIndicator) && (ShellVersion[1] <= 14))
this.boxMain.add_actor(this.boxBottomPanelTrayButton);
}
},
//Appearance Position changed
appearancePositionChange: function() {
if (this.settings.get_boolean("position-changed")) {
this.settings.set_boolean("position-changed", false);
this.onParamChanged();
}
},
//Hide TaskBar in Overview
showMainBox: function() {
this.mainBox.show();
if ((this.settings.get_enum("tray-button") !== 0) && (!this.bottomPanelEndIndicator) && (this.settings.get_boolean("bottom-panel")) && (ShellVersion[1] <= 14))
this.boxBottomPanelTrayButton.show();
},
hideMainBox: function() {
this.mainBox.hide();
if ((this.settings.get_enum("tray-button") !== 0) && (!this.bottomPanelEndIndicator) && (this.settings.get_boolean("bottom-panel")) && (ShellVersion[1] <= 14))
this.boxBottomPanelTrayButton.hide();
},
//Add Favorites
addFavorites: function(buttonfavorite, favoriteapp) {
this.installedChangedId = null;
this.changedId = null;
if (this.settings.get_boolean("display-favorites")) {
//Connect Favorites Changes
this.installedChangedId = Shell.AppSystem.get_default().connect('installed-changed', Lang.bind(this, this.onParamChanged));
this.changedId = AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this.onParamChanged));
let favorites = global.settings.get_strv(AppFavorites.getAppFavorites().FAVORITE_APPS_KEY);
for (let i = 0; i < favorites.length; ++i) {
let favoriteapp = Shell.AppSystem.get_default().lookup_app(favorites[i]);
if (favoriteapp === null) {
continue;
}
let buttonfavorite = new St.Button({
style_class: "tkb-task-button",
child: favoriteapp.create_icon_texture(this.panelSize)
});
buttonfavorite.connect('clicked', Lang.bind(this, function() {
favoriteapp.open_new_window(-1);
}, favoriteapp));
buttonfavorite.connect("enter-event", Lang.bind(this, function() {
//Hide current preview if necessary
this.hidePreview();
if (this.settings.get_enum("display-favorites-label") !== 0) {
if (this.settings.get_int("preview-delay") === 0)
this.showFavoritesPreview(buttonfavorite, favoriteapp);
else
this.previewTimer = Mainloop.timeout_add(this.settings.get_int("preview-delay"),
Lang.bind(this, this.showFavoritesPreview, buttonfavorite, favoriteapp));
}
}, buttonfavorite, favoriteapp));
buttonfavorite.connect("leave-event", Lang.bind(this, this.hidePreview));
this.boxMainFavorites.add_actor(buttonfavorite);
}
}
},
//Add Appview Button
addShowAppsButton: function() {
if (this.settings.get_boolean("display-showapps-button")) {
let iconPath = this.settings.get_string("appview-button-icon");
if (iconPath === 'unset')
iconPath = APPVIEWICON;
this.showAppsIcon = Gio.icon_new_for_string(iconPath);
this.iconShowApps = new St.Icon({
gicon: this.showAppsIcon,
icon_size: (this.panelSize),
style_class: "tkb-desktop-icon"
});
this.buttonShowApps = new St.Button({
style_class: "tkb-task-button"
});
this.signalShowApps = this.buttonShowApps.connect("button-press-event", Lang.bind(this, this.onClickShowAppsButton));
this.buttonShowApps.set_child(this.iconShowApps);
this.boxShowApps = new St.BoxLayout({
style_class: "tkb-desktop-box"
});
this.boxShowApps.add_actor(this.buttonShowApps);
this.boxMainShowAppsButton.add_actor(this.boxShowApps);
}
},
//Add Workspace Button
addWorkspaceButton: function() {
this.workspaceSwitchedId = null;
this.nWorkspacesId = null;
if (this.settings.get_boolean("display-workspace-button")) {
//Connect Workspace Changes
this.workspaceSwitchedId = global.screen.connect('workspace-switched', Lang.bind(this, this.updateWorkspaces));
this.nWorkspacesId = global.screen.connect('notify::n-workspaces', Lang.bind(this, this.updateWorkspaces));
this.buttonWorkspace = new St.Button({
style_class: "tkb-task-button"
});
this.buttonWorkspace.connect("button-press-event", Lang.bind(this, this.onClickWorkspaceButton));
this.buttonWorkspace.connect("scroll-event", Lang.bind(this, this.onScrollWorkspaceButton));
this.workspaceButtonColor = this.settings.get_string("workspace-button-color");
this.displayWorkspaceButtonColor = this.settings.get_boolean("display-workspace-button-color");
if ((this.workspaceButtonColor !== "unset") && (this.displayWorkspaceButtonColor)) {
this.workspaceButtonStyle = "color: " + this.workspaceButtonColor + ";";
this.buttonWorkspace.set_style(this.workspaceButtonStyle);
}
this.updateWorkspaces();
this.boxWorkspace = new St.BoxLayout({
style_class: "tkb-desktop-box"
});
this.boxWorkspace.add_actor(this.buttonWorkspace);
this.boxMainWorkspaceButton.add_actor(this.boxWorkspace);
}
},
updateWorkspaces: function() {
this.activeWorkspaceIndex = global.screen.get_active_workspace().index();
let workspaceButtonWidth = this.settings.get_int("workspace-button-width");
this.totalWorkspace = global.screen.n_workspaces - 1;
let labelWorkspaceIndex = this.activeWorkspaceIndex + 1;
let labelTotalWorkspace = this.totalWorkspace + 1;
if (this.settings.get_enum("workspace-button-index") === 1) {
this.labelWorkspace = new St.Label({
text: (labelWorkspaceIndex + "/" + labelTotalWorkspace)
});
this.labelWorkspace.set_width((this.panelSize * 2) + 2 + this.adjustTBLabelSize - this.adjustTBIconSize + workspaceButtonWidth);
} else if (this.settings.get_enum("workspace-button-index") === 0) {
this.labelWorkspace = new St.Label({
text: (labelWorkspaceIndex + "")
});
this.labelWorkspace.set_width(this.panelSize - 2 + this.adjustTBLabelSize - this.adjustTBIconSize + workspaceButtonWidth);
}
this.labelWorkspace.style = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px' + '; text-align: center;';
this.buttonWorkspace.set_child(this.labelWorkspace);
},
//Add Desktop Button
addDesktopButton: function() {
if (this.settings.get_boolean("display-desktop-button")) {
let iconPath = this.settings.get_string("desktop-button-icon");
if (iconPath === 'unset')
iconPath = DESKTOPICON;
this.desktopButtonIcon = Gio.icon_new_for_string(iconPath);
let iconDesktop = new St.Icon({
gicon: this.desktopButtonIcon,
icon_size: (this.panelSize),
style_class: "tkb-desktop-icon"
});
let buttonDesktop = new St.Button({
style_class: "tkb-task-button"
});
let signalDesktop = buttonDesktop.connect("button-press-event", Lang.bind(this, this.onClickDesktopButton));
buttonDesktop.set_child(iconDesktop);
let boxDesktop = new St.BoxLayout({
style_class: "tkb-desktop-box"
});
boxDesktop.add_actor(buttonDesktop);
this.boxMainDesktopButton.add_actor(boxDesktop);
}
},
//Add Tray Button
addTrayButton: function() {
this.messageTrayCountAddedId = null;
this.messageTrayCountRemovedId = null;
if ((this.settings.get_boolean("bottom-panel")) && (this.settings.get_enum("tray-button") !== 0) && (ShellVersion[1] <= 14)) {
this.buttonTray = new St.Button({
style_class: "tkb-task-button"
});
this.signalTray = [
this.buttonTray.connect("button-press-event", Lang.bind(this, this.onClickTrayButton)),
this.buttonTray.connect("enter-event", Lang.bind(this, this.onHoverTrayButton))
];
if ((this.settings.get_enum("tray-button") === 1) && (this.settings.get_enum("tray-button-empty") === 0))
this.messageTrayIcon();
else {
this.messageTrayCountAddedId = Main.messageTray.connect('source-added', Lang.bind(this, this.messageTrayCount));
this.messageTrayCountRemovedId = Main.messageTray.connect('source-removed', Lang.bind(this, this.messageTrayCount));
this.messageTrayCount();
}
}
},
messageTrayCount: function() {
let indicatorCount = 0;
indicatorCount = Main.messageTray.getSources().length;
if (((indicatorCount === 0) && (this.settings.get_enum("tray-button-empty") === 0)) ||
((indicatorCount !== 0) && (this.settings.get_enum("tray-button-empty") === 1) && (this.settings.get_enum("tray-button") !== 2)) ||
((indicatorCount !== 0) && (this.settings.get_enum("tray-button") === 1)))
this.messageTrayIcon();
else {
if ((indicatorCount === 0) && (this.settings.get_enum("tray-button-empty") === 2))
this.labelTray = new St.Label();
else
this.labelTray = new St.Label({
text: (indicatorCount + '')
});
this.buttonTray.set_child(this.labelTray);
this.boxTray = new St.BoxLayout({
style_class: "tkb-desktop-box"
});
this.boxTray.add_actor(this.buttonTray);
this.boxBottomPanelTrayButton.add_actor(this.boxTray);
}
},
messageTrayIcon: function() {
let iconPath = this.settings.get_string("tray-button-icon");
if (iconPath === 'unset')
iconPath = BPTRAYICON;
this.trayIcon = Gio.icon_new_for_string(iconPath);
this.iconTray = new St.Icon({
gicon: this.trayIcon,
icon_size: (this.panelSize),
style_class: "tkb-desktop-icon"
});
this.buttonTray.set_child(this.iconTray);
this.boxTray = new St.BoxLayout({
style_class: "tkb-desktop-box"
});
this.boxTray.add_actor(this.buttonTray);
this.boxBottomPanelTrayButton.add_actor(this.boxTray);
},
//Activities Button
displayActivities: function() {
this.initDisplayActivitiesButton();
if (this.settings.get_boolean("activities-button"))
this.activitiesContainer.show();
},
initDisplayActivitiesButton: function() {
if (!this.settings.get_boolean("activities-button")) {
this.activitiesContainer = Main.panel.statusArea.activities.container;
this.activitiesContainer.hide();
}
this.activitiesColor = this.settings.get_string("activities-button-color");
if (this.activitiesColor !== "unset")
this.colorActivities();
},
colorActivities: function() {
this.activitiesColor = this.settings.get_string("activities-button-color");
if (this.activitiesColor !== "unset") {
this.activitiesStyle = "color: " + this.activitiesColor + ";";
Main.panel.statusArea.activities.actor.set_style(this.activitiesStyle);
} else
Main.panel.statusArea.activities.actor.set_style("None");
},
//Top Panel
displayTopPanel: function() {
this.initDisplayTopPanel();
if (this.settings.get_boolean("top-panel")) {
Main.layoutManager.removeChrome(Main.layoutManager.panelBox);
Main.layoutManager.addChrome(Main.layoutManager.panelBox, {
affectsStruts: true
});
Main.panel.actor.show();
Main.panel._leftCorner.actor.show();
Main.panel._rightCorner.actor.show();
this.onParamChanged();
}
},
initDisplayTopPanel: function() {
if (!this.settings.get_boolean("top-panel")) {
Main.layoutManager.removeChrome(Main.layoutManager.panelBox);
Main.layoutManager.addChrome(Main.layoutManager.panelBox, {
affectsStruts: false
});
Main.panel.actor.hide();
Main.panel._leftCorner.actor.hide();
Main.panel._rightCorner.actor.hide();
}
},
//Hot Corner
enableHotCorner: function() {
if (ShellVersion[1] < 26) {
this.initEnableHotCorner();
if (this.settings.get_boolean("hot-corner")) {
Main.layoutManager._updateHotCorners();
}
}
},
initEnableHotCorner: function() {
if ((!this.settings.get_boolean("hot-corner")) && (ShellVersion[1] < 26)) {
Main.layoutManager.hotCorners[Main.layoutManager.primaryIndex]._toggleOverview = function() {};
Main.layoutManager.hotCorners[Main.layoutManager.primaryIndex]._pressureBarrier._trigger = function() {};
}
},
//Application Menu
displayApplicationMenu: function() {
this.initDisplayApplicationMenu();
if (this.settings.get_boolean("application-menu")) {
let variant = GLib.Variant.new('a{sv}', {
'Gtk/ShellShowsAppMenu': GLib.Variant.new('i', 1)
});
let xsettings = new Gio.Settings({
schema: 'org.gnome.settings-daemon.plugins.xsettings'
});
xsettings.set_value('overrides', variant);
this.appMenuContainer.show();
Shell.WindowTracker.get_default().disconnect(this.hidingId2);
Main.overview.disconnect(this.hidingId);
}
},
initDisplayApplicationMenu: function() {
this.appMenuContainer = Main.panel.statusArea.appMenu.container;
if (!this.settings.get_boolean("application-menu")) {
this.appMenuContainer.hide();
this.hidingId = Main.overview.connect('hiding', function() {
Main.panel.statusArea.appMenu.container.hide();
});
this.hidingId2 = Shell.WindowTracker.get_default().connect('notify::focus-app', function() {
Main.panel.statusArea.appMenu.container.hide();
});
}
this.appMenuColor = this.settings.get_string("application-menu-color");
if (this.appMenuColor !== "unset")
this.colorApplicationMenu();
},
colorApplicationMenu: function() {
this.appMenuColor = this.settings.get_string("application-menu-color");
if (this.appMenuColor !== "unset") {
this.appMenuStyle = "color: " + this.appMenuColor + ";";
Main.panel.statusArea.appMenu.actor.set_style(this.appMenuStyle);
} else
Main.panel.statusArea.appMenu.actor.set_style("None");
},
//Date Menu
displayDateMenu: function() {
this.initDisplayDateMenu();
if (this.settings.get_boolean("date-menu"))
this.dateMenuContainer.show();
},
initDisplayDateMenu: function() {
if (!this.settings.get_boolean("date-menu")) {
this.dateMenuContainer = Main.panel.statusArea.dateMenu.container;
this.dateMenuContainer.hide();
}
this.dateMenuColor = this.settings.get_string("date-menu-color");
if (this.dateMenuColor !== "unset")
this.colorDateMenu();
},
colorDateMenu: function() {
this.dateMenuColor = this.settings.get_string("date-menu-color");
if (this.dateMenuColor !== "unset") {
this.dateMenuStyle = "color: " + this.dateMenuColor + ";";
Main.panel.statusArea.dateMenu.actor.set_style(this.dateMenuStyle);
} else
Main.panel.statusArea.dateMenu.actor.set_style("None");
},
//System Menu
displaySystemMenu: function() {
this.initDisplaySystemMenu();
if (this.settings.get_boolean("system-menu"))
this.systemMenuContainer.show();
},
initDisplaySystemMenu: function() {
if (!this.settings.get_boolean("system-menu")) {
this.systemMenuContainer = Main.panel.statusArea.aggregateMenu.container;
this.systemMenuContainer.hide();
}
this.systemMenuColor = this.settings.get_string("system-menu-color");
if (this.systemMenuColor !== "unset")
this.colorSystemMenu();
},
colorSystemMenu: function() {
this.systemMenuColor = this.settings.get_string("system-menu-color");
if (this.systemMenuColor !== "unset") {
this.systemMenuStyle = "color: " + this.systemMenuColor + ";";
Main.panel.statusArea.aggregateMenu.actor.set_style(this.systemMenuStyle);
} else
Main.panel.statusArea.aggregateMenu.actor.set_style("None");
},
//Dash
displayDash: function() {
this.initDisplayDash();
if (this.settings.get_boolean("dash")) {
this.dash.set_height(this.dashHeight);
this.dash.set_width(this.dashWidth);
}
},
initDisplayDash: function() {
if (!this.settings.get_boolean("dash")) {
this.dash = Main.overview._dash.actor;
this.dashHeight = this.dash.get_height();
this.dashWidth = this.dash.get_width();
this.dash.set_height(0);
this.dash.set_width(0);
}
},
//Workspace Selector
displayWorkspaceSelector: function() {
this.initDisplayWorkspaceSelector();
if (this.settings.get_boolean("workspace-selector")) {
ThumbnailsSlider._getAlwaysZoomOut = this.alwaysZoomOut;
ThumbnailsSlider.getNonExpandedWidth = this.nonExpandedWidth;
}
},
initDisplayWorkspaceSelector: function() {
if (!this.settings.get_boolean("workspace-selector")) {
this.alwaysZoomOut = ThumbnailsSlider._getAlwaysZoomOut;
this.nonExpandedWidth = ThumbnailsSlider.getNonExpandedWidth;
ThumbnailsSlider._getAlwaysZoomOut = function() {
return false;
}
ThumbnailsSlider.getNonExpandedWidth = function() {
return 0;
}
}
},
//Preferences Hover Component Event
hoverEvent: function() {
this.hoverComponent = this.settings.get_int("hover-event");
this.hoverStyle = "background-color: red; border-radius: 5px";
if ((this.hoverComponent === 1) && (this.settings.get_boolean("display-tasks")))
this.boxMainTasks.set_style(this.separatorTasks + this.hoverStyle);
else if ((this.hoverComponent === 2) && (this.settings.get_boolean("display-desktop-button")))
this.boxMainDesktopButton.set_style(this.separatorDesktop + this.hoverStyle);
else if ((this.hoverComponent === 3) && (this.settings.get_boolean("display-workspace-button")))
this.boxMainWorkspaceButton.set_style(this.separatorWorkspaces + this.hoverStyle);
else if ((this.hoverComponent === 4) && (this.settings.get_boolean("display-showapps-button")))
this.boxMainShowAppsButton.set_style(this.separatorAppview + this.hoverStyle);
else if ((this.hoverComponent === 5) && (this.settings.get_boolean("display-favorites")))
this.boxMainFavorites.set_style(this.separatorFavorites + this.hoverStyle);
else if (this.hoverComponent === 0) {
if (this.settings.get_boolean("display-tasks"))
this.boxMainTasks.set_style(this.separatorTasks);
if (this.settings.get_boolean("display-desktop-button"))
this.boxMainDesktopButton.set_style(this.separatorDesktop);
if (this.settings.get_boolean("display-workspace-button"))
this.boxMainWorkspaceButton.set_style(this.separatorWorkspaces);
if (this.settings.get_boolean("display-showapps-button"))
this.boxMainShowAppsButton.set_style(this.separatorAppview);
if (this.settings.get_boolean("display-favorites"))
this.boxMainFavorites.set_style(this.separatorFavorites);
}
},
//Active Task Frame / Background Color
activeTaskFrame: function() {
this.backgroundColor = this.settings.get_string("active-task-background-color");
this.activeTasksFrameColor = this.settings.get_string("tasks-frame-color");
this.margin = this.settings.get_int("tasks-spaces");
this.backgroundStyleColor = "border-radius: 5px;";
if (this.settings.get_boolean("active-task-background-color-set"))
this.backgroundStyleColor += "background-color: " + this.backgroundColor + "; ";
if ((this.settings.get_boolean("active-task-frame")) && (this.settings.get_boolean("display-tasks-frame-color")))
this.backgroundStyleColor += "border: 1px " + this.activeTasksFrameColor + "; background-image: url('" + Extension.path + "/images/active-task-background.svg'); ";
else if ((this.settings.get_boolean("active-task-frame")) && (!this.settings.get_boolean("display-tasks-frame-color")))
this.backgroundStyleColor += "border: 1px solid gray; background-image: url('" + Extension.path + "/images/active-task-background.svg'); ";
if (this.settings.get_int("tasks-spaces") !== 0)
this.backgroundStyleColor += "margin-right: " + this.margin + "px;";
},
//Inactive Task Frame / Background Color
inactiveTaskFrame: function() {
this.inactiveBackgroundColor = this.settings.get_string("inactive-task-background-color");
this.inactiveTasksFrameColor = this.settings.get_string("inactive-tasks-frame-color");
this.inactiveMargin = this.settings.get_int("tasks-spaces");
this.inactiveBackgroundStyleColor = "border-radius: 5px; ";
if (this.settings.get_boolean("inactive-task-background-color-set"))
this.inactiveBackgroundStyleColor += "background-color: " + this.inactiveBackgroundColor + "; ";
if ((this.settings.get_boolean("inactive-task-frame")) && (this.settings.get_boolean("display-inactive-tasks-frame-color")))
this.inactiveBackgroundStyleColor += "border: 1px " + this.inactiveTasksFrameColor + "; background-image: url('" + Extension.path + "/images/active-task-background.svg'); ";
else if ((this.settings.get_boolean("inactive-task-frame")) && (!this.settings.get_boolean("display-inactive-tasks-frame-color")))
this.inactiveBackgroundStyleColor += "border: 1px solid gray; background-image: url('" + Extension.path + "/images/active-task-background.svg'); ";
if (this.settings.get_int("tasks-spaces") !== 0)
this.inactiveBackgroundStyleColor += "margin-right: " + this.inactiveMargin + "px;";
},
//Top Panel Background Color and (Font) Size
changeTopPanelBackgroundColor: function() {
this.panelSize = this.settings.get_int('panel-size');
this.adjustTBIconSize = this.settings.get_int('tb-icon-size');
this.adjustTBLabelSize = this.settings.get_int('tb-label-size');
this.adjustContentSize = this.settings.get_int('content-size');
this.panelSet = false;
this.originalTopPanelStyle = Main.panel.actor.get_style();
this.originalLeftPanelCornerStyle = Main.panel._leftCorner.actor.get_style();
this.originalRightPanelCornerStyle = Main.panel._rightCorner.actor.get_style();
//Get Native Panel Background Color
let tpobc = Main.panel.actor.get_theme_node().get_background_color();
let topPanelOriginalBackgroundColor = 'rgba(%d, %d, %d, %d)'.format(tpobc.red, tpobc.green, tpobc.blue, tpobc.alpha);
this.settings.set_string("top-panel-original-background-color", topPanelOriginalBackgroundColor);
this.bottomPanelBackgroundColor = this.settings.get_string("bottom-panel-background-color");
if (this.bottomPanelBackgroundColor === 'unset') {
this.settings.set_string("bottom-panel-original-background-color", topPanelOriginalBackgroundColor);
}
if ((this.panelSize !== 27) || (this.adjustContentSize !== 0)) {
//Set Font Size
this.panelLabelSize = (this.panelSize - 12 + this.adjustContentSize);
this.fontSize = 'font-size: ' + this.panelLabelSize + 'px; height: ' + this.panelSize + 'px;';
Main.panel.actor.set_style(this.fontSize);
this.panelSet = true;
}
this.topPanelBackgroundColor = this.settings.get_string("top-panel-background-color");
if (this.topPanelBackgroundColor !== 'unset') {
this.topPanelBackgroundStyle = "background-color: " + this.topPanelBackgroundColor + ";";
this.panelLabelSize = (this.panelSize - 12 + this.adjustContentSize);
this.fontSize = 'font-size: ' + this.panelLabelSize + 'px; height: ' + this.panelSize + 'px;';
Main.panel.actor.set_style(this.fontSize + ' ' + this.topPanelBackgroundStyle);
if ((this.settings.get_boolean("top-panel-background-alpha")) && (ShellVersion[1] <= 16)) {
Main.panel._leftCorner.actor.hide();
Main.panel._rightCorner.actor.hide();
} else {
if (ShellVersion[1] <= 16) {
Main.panel._leftCorner.actor.show();
Main.panel._rightCorner.actor.show();
}
Main.panel._leftCorner.actor.set_style('-panel-corner-background-color: ' + this.topPanelBackgroundColor + ';');
Main.panel._rightCorner.actor.set_style('-panel-corner-background-color: ' + this.topPanelBackgroundColor + ';');
}
this.panelSet = true;
}
this.panelSize = ((this.settings.get_int('panel-size')) - 6 + (this.settings.get_int('tb-icon-size')));
},
//Bottom Panel
bottomPanel: function() {
this.adjustTBIconSize = this.settings.get_int('tb-icon-size-bottom');
this.adjustTBLabelSize = this.settings.get_int('tb-label-size-bottom');
this.adjustContentSize = 0;
let bottomPanelHeight = null;
let newShowTray = null;
this.panelSize = this.settings.get_int('panel-size-bottom');
this.panelLabelSize = (this.panelSize - 12 + this.adjustTBLabelSize);
this.fontSize = 'font-size: ' + this.panelLabelSize + 'px; height: ' + this.panelSize + 'px;';
this.bottomPanelVertical = this.settings.get_int('bottom-panel-vertical');
this.bottomPanelBackgroundColor = this.settings.get_string("bottom-panel-background-color");
if (this.bottomPanelBackgroundColor === "unset")
this.bottomPanelBackgroundColor = this.settings.get_string("bottom-panel-original-background-color");
this.bottomPanelBackgroundStyle = "background-color: " + this.bottomPanelBackgroundColor + ";";
this.bottomPanelActor = new St.BoxLayout({
name: 'bottomPanel'
});
this.bottomPanelActor.set_style(this.fontSize + ' ' + this.bottomPanelBackgroundStyle);
this.bottomPanelActor.set_reactive(false);
this.positionBoxBottomStart = new St.Bin({
x_fill: false,
x_expand: true,
x_align: St.Align.START
});
this.positionBoxBottomMiddle = new St.Bin({
x_fill: false,
x_expand: true,
x_align: St.Align.MIDDLE
});
this.positionBoxBottomEnd = new St.Bin({
x_fill: false,
x_expand: true,
x_align: St.Align.END
});
this.positionBoxBottomSettings = this.settings.get_int("position-bottom-box");
if (this.positionBoxBottomSettings === 0)
this.positionBoxBottomStart.add_actor(this.boxMain);
else if (this.positionBoxBottomSettings === 1)
this.positionBoxBottomMiddle.add_actor(this.boxMain);
else if (this.positionBoxBottomSettings === 2) {
this.positionBoxBottomEnd.add_actor(this.boxMain);
this.bottomPanelEndIndicator = true;
}
if ((this.settings.get_enum("tray-button") !== 0) && (!this.bottomPanelEndIndicator) && (ShellVersion[1] <= 14))
this.positionBoxBottomEnd.add_actor(this.boxBottomPanelTrayButton);
Main.layoutManager.addChrome(this.bottomPanelActor, {
affectsStruts: true,
trackFullscreen: true
});
this.bottomPanelActor.add_actor(this.positionBoxBottomStart);
this.bottomPanelActor.add_actor(this.positionBoxBottomMiddle);
this.bottomPanelActor.add_actor(this.positionBoxBottomEnd);
let primary = Main.layoutManager.primaryMonitor;
this.height = (this.panelSize + this.bottomPanelVertical);
this.bottomPanelActor.set_position(primary.x, primary.y + primary.height - this.height);
this.bottomPanelActor.set_size(primary.width, -1);
if (ShellVersion[1] <= 14) {
Main.messageTray._notificationWidget.set_anchor_point(0, this.height);
this.setAnchorPoint = true;
this.messageTrayShowingId = Main.messageTray.connect('showing', Lang.bind(this, function() {
Main.messageTray.actor.set_anchor_point(0, this.height);
this.setAnchorPoint = true;
}));
this.messageTrayHidingId = Main.messageTray.connect('hiding', Lang.bind(this, function() {
Main.messageTray.actor.set_anchor_point(0, 0);
this.setAnchorPoint = true;
}));
}
this.panelSize = ((this.settings.get_int('panel-size-bottom')) - 6 + (this.settings.get_int('tb-icon-size-bottom')));
},
//Click Events
onClickShowAppsButton: function(button, pspec) {
let numButton = pspec.get_button();
this.leftbutton = LEFTBUTTON;
this.rightbutton = RIGHTBUTTON;
if (this.settings.get_enum("showapps-button-toggle") === 1) {
this.leftbutton = RIGHTBUTTON;
this.rightbutton = LEFTBUTTON;
}
if (numButton === this.leftbutton) //Left Button
{
if (!Main.overview.visible)
Main.overview.show();
if (!Main.overview.viewSelector._showAppsButton.checked)
Main.overview.viewSelector._showAppsButton.checked = true;
else
Main.overview.hide();
} else if (numButton === this.rightbutton) //Right Button
{
if (!Main.overview.visible)
Main.overview.show();
else if (Main.overview.viewSelector._showAppsButton.checked)
Main.overview.viewSelector._showAppsButton.checked = false;
else
Main.overview.hide();
}
},
onClickWorkspaceButton: function(button, pspec) {
let numButton = pspec.get_button();
if (numButton === LEFTBUTTON) //Left Button
{
if (this.activeWorkspaceIndex === this.totalWorkspace)
this.activeWorkspaceIndex = -1;
let newActiveWorkspace = global.screen.get_workspace_by_index(this.activeWorkspaceIndex + 1);
newActiveWorkspace.activate(global.get_current_time());
} else if (numButton === RIGHTBUTTON) //Right Button
{
if (this.activeWorkspaceIndex === 0)
this.activeWorkspaceIndex = this.totalWorkspace + 1;
let newActiveWorkspace = global.screen.get_workspace_by_index(this.activeWorkspaceIndex - 1);
newActiveWorkspace.activate(global.get_current_time());
}
},
onClickDesktopButton: function(button, pspec) {
let maxWindows = false;
let userTime = null;
let activeWorkspace = global.screen.get_active_workspace();
let windows = activeWorkspace.list_windows().filter(function(w) {
return w.get_window_type() !== Meta.WindowType.DESKTOP;
});
let numButton = pspec.get_button();
if (numButton === LEFTBUTTON) //Left Button
{
for (let i = 0; i < windows.length; ++i) {
if ((this.desktopView) && (!Main.overview.visible)) {
userTime = windows[i].user_time;
if (userTime > this.lastFocusedWindowUserTime) {
this.lastFocusedWindowUserTime = userTime;
this.lastFocusedWindow = windows[i];
}
windows[i].unminimize();
maxWindows = true;
} else {
windows[i].minimize();
}
}
if (maxWindows) {
this.lastFocusedWindow.activate(global.get_current_time());
}
this.desktopView = !this.desktopView;
if (Main.overview.visible)
Main.overview.hide();
} else if ((numButton === RIGHTBUTTON) && (this.settings.get_boolean("desktop-button-right-click"))) //Right Button
Main.Util.trySpawnCommandLine('gnome-shell-extension-prefs ' + Extension.metadata.uuid);
},
onClickTaskButton: function(button, pspec, window) {
if (this.taskMenuUp && this.taskMenu.isOpen) {
this.taskMenu.close();
return;
}
let numButton = pspec.get_button();
let buttonAction = 0;
if (numButton === LEFTBUTTON)
buttonAction = this.settings.get_enum("tasks-left-click");
else if (numButton === MIDDLEBUTTON)
buttonAction = this.settings.get_enum("tasks-middle-click");
else if (numButton === RIGHTBUTTON)
buttonAction = this.settings.get_enum("tasks-right-click");
let app = Shell.WindowTracker.get_default().get_window_app(window);
let appname = app.get_name();
let index = this.searchTaskInList(window);
switch (buttonAction)
{
case 0: //Action === 'none'
return;
case 1: //Action === 'minmax'
this.clickActionMinMax(window, appname, index);
break;
case 2: //Action === 'openmenu'
this.clickActionOpenMenu(window, appname, button);
break;
case 3: //Action === 'close'
window.delete(global.get_current_time());
break;
case 4: //Action === 'new_instance'
app.open_new_window(-1);
break;
default: //Same as 'none'
return;
}
},
onClickTrayButton: function(button, pspec) {
let numButton = pspec.get_button();
if (numButton === LEFTBUTTON) //Left Button
{
Main.messageTray.toggle();
}
},
//Actions executed depending on button click on Task
clickActionMinMax: function(window, appname, index) {
let activeWorkspace = global.screen.get_active_workspace();
let focusWindow = global.display.focus_window;
let nextApp = false;
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let windowWorkspace = windowTask.get_workspace();
if (windowTask === window) {
if (windowWorkspace !== activeWorkspace) {
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
}
else if (!windowTask.has_focus()) {
windowTask.activate(global.get_current_time());
}
else if ((!Main.overview.visible) && ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4))) {
for (let i = index - 1; i >= 0; i--) {
let sameWorkspace = true;
let [_windowTask, _buttonTask, _signalsTask] = this.tasksList[i];
let _appname = Shell.WindowTracker.get_default().get_window_app(_windowTask).get_name();
let _windowWorkspace = _windowTask.get_workspace();
if ((appname === _appname) && (_windowTask !== focusWindow)) {
if (_windowWorkspace !== activeWorkspace) {
if (this.settings.get_enum("sort-tasks") === 4) continue;
else _windowWorkspace.activate(global.get_current_time());
}
_windowTask.activate(global.get_current_time());
nextApp = true;
break;
}
}
if (!nextApp) {
for (let k = this.tasksList.length - 1; k >= index; k--) {
let [_windowTask2, _buttonTask2, _signalsTask2] = this.tasksList[k];
let _appname2 = Shell.WindowTracker.get_default().get_window_app(_windowTask2).get_name();
let _windowWorkspace2 = _windowTask2.get_workspace();
if ((appname === _appname2) && (_windowTask2 !== focusWindow)) {
if (_windowWorkspace2 !== activeWorkspace) {
if (this.settings.get_enum("sort-tasks") === 4)
continue;
else
_windowWorkspace2.activate(global.get_current_time());
}
_windowTask2.activate(global.get_current_time());
nextApp = true;
break;
}
}
windowTask.minimize();
}
}
else if (!Main.overview.visible)
windowTask.minimize();
}
},
this
);
if (Main.overview.visible)
Main.overview.hide();
},
clickActionOpenMenu: function(window, appname, button) {
this.taskMenu = null;
let app = Shell.WindowTracker.get_default().get_window_app(window);
let taskMenuManager = new PopupMenu.PopupMenuManager({
actor: button
});
if (app.action_group && app.menu) {
this.taskMenu = new RemoteMenu.RemoteMenu(button, app.menu, app.action_group);
}
else {
this.taskMenu = new PopupMenu.PopupMenu(button, 0.0, St.Side.TOP);
let menuQuit = new PopupMenu.PopupMenuItem("Quit");
menuQuit.connect('activate', Lang.bind(this, function() {
window.delete(global.get_current_time());
}));
this.taskMenu.addMenuItem(menuQuit);
}
if ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4)) {
let counter = 1;
let windowsList = null;
let title = null;
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let _appname = Shell.WindowTracker.get_default().get_window_app(windowTask).get_name();
let windowWorkspace = windowTask.get_workspace();
if ((appname === _appname) && (windowTask !== window)) {
if ((windowWorkspace !== window.get_workspace()) && (this.settings.get_enum("sort-tasks") === 4))
return;
windowsList = null;
title = windowTask.get_title();
if (title.length > 50)
title = title.substr(0, 47) + "...";
windowsList = new PopupMenu.PopupMenuItem(title);
windowsList.connect('activate', Lang.bind(this, function() {
if (windowWorkspace !== global.screen.get_active_workspace())
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
}));
this.taskMenu.addMenuItem(windowsList, 0);
counter++;
}
},
this
);
if (counter > 1) {
windowsList = null;
title = null;
title = window.get_title();
if (title.length > 50)
title = title.substr(0, 47) + "...";
windowsList = new PopupMenu.PopupMenuItem(title);
let _windowWorkspace = window.get_workspace();
windowsList.connect('activate', Lang.bind(this, function() {
window.activate(global.get_current_time());
}));
this.taskMenu.addMenuItem(windowsList, 0);
}
else {
counter--;
}
if (counter > 1) {
let mini = new PopupMenu.PopupMenuItem("Minimize Window");
mini.connect('activate', Lang.bind(this, function() {
window.minimize();
}));
this.taskMenu.addMenuItem(mini, counter);
let separator = new PopupMenu.PopupSeparatorMenuItem();
this.taskMenu.addMenuItem(separator, counter);
}
}
this.taskMenu.actor.hide();
taskMenuManager.addMenu(this.taskMenu);
Main.uiGroup.add_actor(this.taskMenu.actor);
this.taskMenuUp = true;
this.hidePreview();
this.taskMenu.open();
},
//Scroll Events
onScrollWorkspaceButton: function(button, event) {
if ((this.settings.get_enum("scroll-workspaces") === 1) || (this.settings.get_enum("scroll-workspaces") === 2)) {
let scrollDirection = event.get_scroll_direction();
if (((scrollDirection === Clutter.ScrollDirection.UP) && (this.settings.get_enum("scroll-workspaces") === 1)) ||
((scrollDirection === Clutter.ScrollDirection.DOWN) && (this.settings.get_enum("scroll-workspaces") === 2))) {
if (this.activeWorkspaceIndex === this.totalWorkspace)
this.activeWorkspaceIndex = -1;
let newActiveWorkspace = global.screen.get_workspace_by_index(this.activeWorkspaceIndex + 1);
newActiveWorkspace.activate(global.get_current_time());
} else if (((scrollDirection === Clutter.ScrollDirection.DOWN) && (this.settings.get_enum("scroll-workspaces") === 1)) ||
((scrollDirection === Clutter.ScrollDirection.UP) && (this.settings.get_enum("scroll-workspaces") === 2))) {
if (this.activeWorkspaceIndex === 0)
this.activeWorkspaceIndex = this.totalWorkspace + 1;
let newActiveWorkspace = global.screen.get_workspace_by_index(this.activeWorkspaceIndex - 1);
newActiveWorkspace.activate(global.get_current_time());
}
}
},
onScrollTaskButton: function(button, event) {
if ((this.settings.get_enum("scroll-tasks") === 1) || (this.settings.get_enum("scroll-tasks") === 2)) {
this.nextTask = false;
this.previousTask = null;
let focusWindow = global.display.focus_window;
let activeWorkspace = global.screen.get_active_workspace();
let scrollDirection = event.get_scroll_direction();
if (((scrollDirection === Clutter.ScrollDirection.UP) && (this.settings.get_enum("scroll-tasks") === 1)) ||
((scrollDirection === Clutter.ScrollDirection.DOWN) && (this.settings.get_enum("scroll-tasks") === 2))) {
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let windowWorkspace = windowTask.get_workspace();
if (this.nextTask) {
if (windowWorkspace !== activeWorkspace)
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
this.nextTask = false;
}
if (windowTask === focusWindow)
this.nextTask = true;
},
this
);
if (Main.overview.visible)
Main.overview.hide();
} else if (((scrollDirection === Clutter.ScrollDirection.DOWN) && (this.settings.get_enum("scroll-tasks") === 1)) ||
((scrollDirection === Clutter.ScrollDirection.UP) && (this.settings.get_enum("scroll-tasks") === 2))) {
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
if ((windowTask === focusWindow) && (this.previousTask !== null)) {
let [windowTask, buttonTask, signalsTask] = this.previousTask;
let windowWorkspace = windowTask.get_workspace();
if (windowWorkspace !== activeWorkspace)
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
}
this.previousTask = task;
},
this
);
if (Main.overview.visible)
Main.overview.hide();
}
}
},
//Open Tray on Tray Button Hover
onHoverTrayButton: function() {
if (this.settings.get_boolean("hover-tray-button"))
Main.messageTray.toggle();
},
//Switch Task on Hover
onHoverSwitchTask: function(button, window) {
if (!this.resetHover) {
let focusWindow = global.display.focus_window;
let appname = Shell.WindowTracker.get_default().get_window_app(focusWindow).get_name();
let activeWorkspace = global.screen.get_active_workspace();
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let windowWorkspace = windowTask.get_workspace();
let _app_name = Shell.WindowTracker.get_default().get_window_app(windowTask).get_name();
if ((windowTask === window) && (((appname !== _app_name) && ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4))) || ((this.settings.get_enum("sort-tasks") !== 3) && (this.settings.get_enum("sort-tasks") !== 4)))) {
if (windowWorkspace !== activeWorkspace) {
windowWorkspace.activate(global.get_current_time());
windowTask.activate(global.get_current_time());
} else if (!windowTask.has_focus())
windowTask.activate(global.get_current_time());
}
},
this
);
if (Main.overview.visible)
Main.overview.hide();
}
if (this.previewTimer2 !== null) {
Mainloop.source_remove(this.previewTimer2);
this.previewTimer2 = null;
}
},
//Window Demands Attention
onWindowDemandsAttention: function(display, window) {
if ((this.settings.get_boolean("display-tasks")) && (this.settings.get_boolean("blink-tasks"))) {
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
if ((windowTask === window) && (!windowTask.has_focus())) {
this.attentionStyleChanged = false;
this.attentionStyle = "background-color: " + this.settings.get_string("blink-color") + "; margin-right: " + this.inactiveMargin + "px;";
this.attentionStyleChangeTimeout = Mainloop.timeout_add(this.settings.get_int("blink-rate"), Lang.bind(this, this.changeAttentionStyle, windowTask, buttonTask));
}
},
this
);
}
},
changeAttentionStyle: function(windowTask, buttonTask) {
if ((!this.attentionStyleChanged) && (!windowTask.has_focus())) {
buttonTask.set_style(this.attentionStyle);
this.attentionStyleChanged = true;
return true;
} else if ((this.attentionStyleChanged) && (!windowTask.has_focus())) {
buttonTask.set_style(this.inactiveBackgroundStyleColor);
this.attentionStyleChanged = false;
return true;
} else
return false;
},
//Init Windows Manage Callbacks
initWindows: function(windowsList, type, window) {
if (this.settings.get_boolean("display-tasks")) {
//Active Task Frame / Background Color
this.activeTaskFrame();
//Inactive Task Frame / Background Color
this.inactiveTaskFrame();
//Task Menu
this.taskMenu = null;
this.taskMenuUp = false;
this.tasksContainerSize();
this.windows = new Windows.Windows(this, this.onWindowsListChanged, this.onWindowChanged);
}
},
//Taskslist
onWindowsListChanged: function(windowsList, type, window) {
this.cleanTasksList();
windowsList.forEach(
function(window) {
this.addTaskInList(window);
},
this
);
this.hidePreview();
this.tasksContainer();
this.iconGeometry();
this.updateIcon();
},
//Tasks Container
tasksContainer: function(window) {
if ((this.tasksContainerWidth > 0) && (this.countTasks > 0) && (this.countTasks > this.tasksContainerWidth)) {
let buttonTaskWidth;
if (this.settings.get_enum("tasks-label") !== 0)
buttonTaskWidth = this.settings.get_int("tasks-width");
else
buttonTaskWidth = (this.panelSize + 8);
let totalWidth = this.boxMainTasks.get_width();
let spaces = this.settings.get_int("tasks-spaces");
let counter = 0;
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
if (buttonTask.visible)
counter++;
},
this
);
let newWidth = ((totalWidth - (spaces * counter)) / counter);
if (newWidth > buttonTaskWidth) {
newWidth = buttonTaskWidth;
}
this.tasksList.forEach(
function(_task) {
let [_windowTask, _buttonTask, _signalsTask] = _task;
_buttonTask.set_width(newWidth);
},
this
);
}
},
//Tasks Container Size
tasksContainerSize: function() {
if (this.tasksContainerWidth > 0) {
let spaces = this.settings.get_int("tasks-spaces");
let buttonTaskWidth = 0;
this.tasksWidth = this.settings.get_int("tasks-width");
if (this.settings.get_enum("tasks-label") !== 0)
buttonTaskWidth = this.tasksWidth;
else
buttonTaskWidth = (this.panelSize + 8);
this.newTasksContainerWidth = (this.tasksContainerWidth * (buttonTaskWidth + spaces));
this.boxMainTasks.set_width(this.newTasksContainerWidth);
}
},
//Icon Geometry
iconGeometry: function() {
for (let i = this.tasksList.length - 1; i >= 0; i--) {
let [windowTask, buttonTask, signalsTask, labelTask, iconTask] = this.tasksList[i];
let rect = new Meta.Rectangle();
[rect.x, rect.y] = buttonTask.get_transformed_position();
[rect.width, rect.height] = buttonTask.get_transformed_size();
windowTask.set_icon_geometry(rect);
}
},
//Icons
updateIcon: function() {
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask, labelTask, iconTask] = task;
let app = Shell.WindowTracker.get_default().get_window_app(windowTask);
iconTask.child = app.create_icon_texture(this.panelSize);
},
this
);
},
updateTasks: function() {
this.iconGeometry();
this.updateIcon();
},
//Active Tasks
activeTasks: function(window) {
let active = false;
let activeWorkspace = global.screen.get_active_workspace();
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask] = task;
let workspaceTask = windowTask.get_workspace();
if ((!windowTask.minimized) && (workspaceTask === activeWorkspace))
active = true;
},
this
);
if (active === true)
this.desktopView = false;
else
this.desktopView = true;
},
//Task Style
onWindowChanged: function(window, type) {
if (type === 0) //Focus
{
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask, labelTask] = task;
if (windowTask === window) {
buttonTask.set_style(this.backgroundStyleColor);
buttonTask.show();
if ((this.settings.get_enum("tasks-label") !== 0) && (this.settings.get_boolean("display-tasks-label-color"))) {
this.tasksLabelColor = this.settings.get_string("tasks-label-color");
if (this.tasksLabelColor !== "unset") {
this.tasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px; color: ' + this.tasksLabelColor + ';';
labelTask.set_style(this.tasksLabelStyle);
} else
labelTask.set_style("None");
} else if (this.settings.get_enum("tasks-label") !== 0) {
this.tasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px;';
labelTask.set_style(this.tasksLabelStyle);
}
} else {
buttonTask.set_style(this.inactiveBackgroundStyleColor);
if ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4)) {
let _app_name = Shell.WindowTracker.get_default().get_window_app(window).get_name();
let appname = Shell.WindowTracker.get_default().get_window_app(windowTask).get_name();
let workspaceTask = windowTask.get_workspace();
let activeWorkspace = global.screen.get_active_workspace();
if ((_app_name === appname) && ((workspaceTask === activeWorkspace) || (this.settings.get_enum("sort-tasks") === 3)))
buttonTask.hide();
}
if ((this.settings.get_enum("tasks-label") !== 0) && (this.settings.get_boolean("display-inactive-tasks-label-color"))) {
this.inactiveTasksLabelColor = this.settings.get_string("inactive-tasks-label-color");
if (this.inactiveTasksLabelColor !== "unset") {
this.inactiveTasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; color: ' + this.inactiveTasksLabelColor + ';';
labelTask.set_style(this.inactiveTasksLabelStyle);
} else
labelTask.set_style("None");
} else if (this.settings.get_enum("tasks-label") !== 0) {
this.tasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px;';
labelTask.set_style(this.tasksLabelStyle);
}
}
},
this
);
} else if ((type === 1) && (this.settings.get_enum("tasks-label") === 1)) //Title Change
{
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask, labelTask] = task;
if (windowTask === window) {
labelTask.text = " " + window.get_title() + " ";
}
},
this
);
} else if (type === 2) //Minimized
{
this.tasksList.forEach(
function(task) {
let [windowTask, buttonTask, signalsTask, labelTask] = task;
if (windowTask === window) {
buttonTask.set_style(this.inactiveBackgroundStyleColor);
if ((this.settings.get_enum("tasks-label") !== 0) && (this.settings.get_boolean("display-inactive-tasks-label-color"))) {
this.inactiveTasksLabelColor = this.settings.get_string("inactive-tasks-label-color");
if (this.inactiveTasksLabelColor !== "unset") {
this.inactiveTasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; color: ' + this.inactiveTasksLabelColor + ';';
labelTask.set_style(this.inactiveTasksLabelStyle);
} else
labelTask.set_style("None");
} else if (this.settings.get_enum("tasks-label") !== 0) {
this.tasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px;';
labelTask.set_style(this.tasksLabelStyle);
}
}
},
this
);
} else if ((type === 3) || (type === 4)) {
this.updateIcon();
}
},
//Task Index
searchTaskInList: function(window) {
let index = null;
for (let indexTask in this.tasksList) {
let [windowTask, buttonTask, signalsTask] = this.tasksList[indexTask];
if (windowTask === window) {
index = indexTask;
break;
}
}
return index;
},
//Add Tasks
addTaskInList: function(window) {
let app = Shell.WindowTracker.get_default().get_window_app(window);
let buttonTask = null;
let iconTask = new St.Bin();
let labelTask = null;
if (app !== null) {
let appname = app.get_name();
//Check Blacklisted Apps
if (this.settings.get_boolean("blacklist-set")) {
let blacklist = this.settings.get_strv("blacklist");
if (blacklist.length > 0) {
for (let j = 0; j < blacklist.length; j++) {
let blacklistapp = blacklist[j];
if (appname === blacklistapp) {
return;
}
}
}
}
//Tasks Label
if (this.settings.get_enum("tasks-label") !== 0) {
let buttonTaskLayout = null;
if (this.settings.get_boolean("bottom-panel")) {
buttonTaskLayout = new St.BoxLayout({
style_class: "tkb-task-button-bottom-label"
});
} else {
buttonTaskLayout = new St.BoxLayout({
style_class: "tkb-task-button"
});
}
buttonTaskLayout.add_actor(iconTask);
if (this.settings.get_enum("tasks-label") === 1) {
labelTask = new St.Label({
text: (" " + window.get_title() + " ")
});
} else {
labelTask = new St.Label({
text: (" " + appname + " ")
});
}
labelTask.set_style('font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px;');
buttonTaskLayout.add_actor(labelTask);
buttonTask = new St.Button({
style_class: "tkb-task-button",
child: buttonTaskLayout,
x_align: St.Align.START
});
this.tasksWidth = this.settings.get_int("tasks-width");
buttonTask.set_width(this.tasksWidth);
} else {
if (this.settings.get_boolean("bottom-panel")) {
buttonTask = new St.Button({
style_class: "tkb-task-button-bottom"
});
} else {
buttonTask = new St.Button({
style_class: "tkb-task-button"
});
}
buttonTask.add_actor(iconTask);
}
//Signals
let signalsTask = [
buttonTask.connect("button-press-event", Lang.bind(this, this.onClickTaskButton, window)),
buttonTask.connect("enter-event", Lang.bind(this, this.showPreview, window)),
buttonTask.connect("leave-event", Lang.bind(this, this.resetPreview, window)),
buttonTask.connect("allocation-changed", Lang.bind(this, this.updateTasks))
];
//Display Tasks of All Workspaces
if (!this.settings.get_boolean("tasks-all-workspaces")) {
let workspace = global.screen.get_active_workspace();
if (!this.settings.get_boolean("tasks-all-workspaces")) {
buttonTask.visible = window.located_on_workspace(workspace);
}
}
if (window.has_focus()) {
buttonTask.set_style(this.backgroundStyleColor);
if ((this.settings.get_enum("tasks-label") !== 0) && (this.settings.get_boolean("display-tasks-label-color"))) {
this.tasksLabelColor = this.settings.get_string("tasks-label-color");
if (this.tasksLabelColor !== "unset") {
this.tasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; padding-top: ' + ((this.panelSize - 5 - (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize)) / 2) + 'px; color: ' + this.tasksLabelColor + ';';
labelTask.set_style(this.tasksLabelStyle);
} else
labelTask.set_style("None");
}
} else {
buttonTask.set_style(this.inactiveBackgroundStyleColor);
if ((this.settings.get_enum("tasks-label") !== 0) && (this.settings.get_boolean("display-inactive-tasks-label-color"))) {
this.inactiveTasksLabelColor = this.settings.get_string("inactive-tasks-label-color");
if (this.inactiveTasksLabelColor !== "unset") {
this.inactiveTasksLabelStyle = 'font-size: ' + (this.panelSize - 5 + this.adjustTBLabelSize - this.adjustTBIconSize) + 'px; color: ' + this.inactiveTasksLabelColor + ';';
labelTask.set_style(this.inactiveTasksLabelStyle);
} else {
labelTask.set_style("None");
}
}
}
//Sort Tasks
let inserted = false;
if (this.settings.get_enum("sort-tasks") !== 0) {
for (let i = this.tasksList.length - 1; i >= 0; i--) {
let [_windowTask, _buttonTask, _signalsTask] = this.tasksList[i];
let _app_name = Shell.WindowTracker.get_default().get_window_app(_windowTask).get_name();
if (appname === _app_name) {
if ((this.settings.get_enum("sort-tasks") === 2) || (this.settings.get_enum("sort-tasks") === 4)) {
let _workspaceTask = _windowTask.get_workspace();
let workspaceTask = window.get_workspace();
if (workspaceTask !== _workspaceTask) {
break;
}
}
this.boxMainTasks.insert_child_above(buttonTask, _buttonTask);
if ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4)) {
buttonTask.hide();
}
this.tasksList.splice(i + 1, 0, [window, buttonTask, signalsTask, labelTask, iconTask]);
inserted = true;
break;
}
}
}
if (!inserted) {
this.boxMainTasks.add_child(buttonTask);
this.tasksList.push([window, buttonTask, signalsTask, labelTask, iconTask]);
}
this.countTasks++;
}
},
//Remove Tasks
removeTaskInList: function(window) {
let index = this.searchTaskInList(window);
if (index !== null) {
let [windowTask, buttonTask, signalsTask] = this.tasksList[index];
signalsTask.forEach(
function(signal) {
buttonTask.disconnect(signal);
},
this
);
buttonTask.destroy();
this.tasksList.splice(index, 1);
this.countTasks--;
if (this.countTasks < 0)
this.countTasks = 0;
if (this.countTasks === 0)
this.cleanTasksList();
return true;
} else
return false;
},
//Reset Taskslist
cleanTasksList: function() {
for (let i = this.tasksList.length - 1; i >= 0; i--) {
let [windowTask, buttonTask, signalsTask] = this.tasksList[i];
signalsTask.forEach(
function(signal) {
buttonTask.disconnect(signal);
},
this
);
buttonTask.destroy();
this.tasksList.splice(i, 1);
}
this.tasksList = [];
this.countTasks = 0;
},
//Preview
getThumbnail: function(window, size) {
let thumbnail = null;
let mutterWindow = window.get_compositor_private();
if (mutterWindow) {
let windowTexture = mutterWindow.get_texture();
let [width, height] = windowTexture.get_size();
let scale = Math.min(1.0, size / width, size / height);
thumbnail = new Clutter.Clone({
source: windowTexture,
reactive: true,
width: width * scale,
height: height * scale
});
}
return thumbnail;
},
showPreview: function(button, pspec, window) {
//Switch Task on Hover
this.resetHover = false;
if (this.settings.get_boolean("hover-switch-task")) {
if (this.settings.get_int("hover-delay") === 0)
this.onHoverSwitchTask(button, window);
else
this.previewTimer2 = Mainloop.timeout_add(this.settings.get_int("hover-delay"),
Lang.bind(this, this.onHoverSwitchTask, button, window));
}
//Hide current preview if necessary
this.hidePreview();
this.grouped = false;
if ((this.settings.get_enum("display-label") !== 0) || (this.settings.get_boolean("display-thumbnail"))) {
if ((this.settings.get_enum("sort-tasks") === 3) || (this.settings.get_enum("sort-tasks") === 4)) {
let appname = Shell.WindowTracker.get_default().get_window_app(window).get_name();
let focuswindow = global.display.focus_window;
let focusappname = Shell.WindowTracker.get_default().get_window_app(focuswindow).get_name();
for (let i = this.tasksList.length - 1; i >= 0; i--) {
let [_windowTask, _buttonTask, _signalsTask] = this.tasksList[i];
let _app_name = Shell.WindowTracker.get_default().get_window_app(_windowTask).get_name();
if ((appname === _app_name) && (_windowTask !== window)) {
this.grouped = true;
if (appname === focusappname) {
window = global.display.focus_window;
break;
}
}
}
}
if (this.settings.get_int("preview-delay") === 0)
this.showPreview2(button, window);
else
this.previewTimer = Mainloop.timeout_add(this.settings.get_int("preview-delay"),
Lang.bind(this, this.showPreview2, button, window));
}
},
showPreview2: function(button, window) {
//Hide current preview if necessary
this.hidePreview();
let app = Shell.WindowTracker.get_default().get_window_app(window);
this.previewFontSize = this.settings.get_int("preview-font-size");
this.preview = new St.BoxLayout({
vertical: true
});
if (this.settings.get_enum("display-label") !== 0) {
if (this.settings.get_enum("display-label") !== 2) {
let labelNamePreview;
if (this.grouped) {
labelNamePreview = new St.Label({
text: ' ' + app.get_name() + ' (Group) '
});
} else {
labelNamePreview = new St.Label({
text: ' ' + app.get_name() + ' '
});
}
if ((this.settings.get_string("preview-label-color") !== 'unset') && (this.settings.get_boolean("display-preview-label-color"))) {
this.previewLabelColor = this.settings.get_string("preview-label-color");
this.labelNamePreviewStyle = "color: " + this.previewLabelColor + "; font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelNamePreview.set_style(this.labelNamePreviewStyle);
} else {
this.labelNamePreviewStyle = "color: rgba(255,255,255,1); font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelNamePreview.set_style(this.labelNamePreviewStyle);
}
this.preview.add_actor(labelNamePreview);
}
if (this.settings.get_enum("display-label") !== 1) {
let title = window.get_title();
if ((title.length > 50) && (this.settings.get_boolean("display-thumbnail")))
title = title.substr(0, 47) + "...";
let labelTitlePreview = new St.Label({
text: ' ' + title + ' '
});
if ((this.settings.get_string("preview-label-color") !== 'unset') && (this.settings.get_boolean("display-preview-label-color"))) {
this.previewLabelColor = this.settings.get_string("preview-label-color");
this.labelTitlePreviewStyle = "color: " + this.previewLabelColor + "; font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelTitlePreview.set_style(this.labelTitlePreviewStyle);
} else {
this.labelTitlePreviewStyle = "color: rgba(255,255,255,1.0); font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelTitlePreview.set_style(this.labelTitlePreviewStyle);
}
this.preview.add_actor(labelTitlePreview);
}
}
if (this.settings.get_boolean("display-thumbnail")) {
let thumbnail = this.getThumbnail(window, this.settings.get_int("preview-size"));
this.preview.add_actor(thumbnail);
}
if ((this.settings.get_string("preview-background-color") !== 'unset') && (this.settings.get_boolean("display-preview-background-color"))) {
this.previewBackgroundColor = this.settings.get_string("preview-background-color");
this.previewStyle = "background-color: " + this.previewBackgroundColor + "; padding: 5px; border-radius: 8px; -y-offset: 6px;";
this.preview.set_style(this.previewStyle);
} else {
this.previewStyle = "background-color: rgba(0,0,0,0.9); padding: 5px; border-radius: 8px; -y-offset: 6px;";
this.preview.set_style(this.previewStyle);
}
global.stage.add_actor(this.preview);
this.button = button;
this.setPreviewPosition();
},
showFavoritesPreview: function(buttonfavorite, favoriteapp) {
//Hide current preview if necessary
this.hidePreview();
this.previewFontSize = this.settings.get_int("preview-font-size");
this.favoritesPreview = new St.BoxLayout({
vertical: true
});
let favoriteappName = favoriteapp.get_name();
if (favoriteapp.get_description()) {
if (this.settings.get_enum("display-favorites-label") === 2)
favoriteappName = favoriteapp.get_description();
if (this.settings.get_enum("display-favorites-label") === 3)
favoriteappName += '\n' + favoriteapp.get_description();
}
let labelNamePreview = new St.Label({
text: favoriteappName
});
if ((this.settings.get_string("preview-label-color") !== 'unset') && (this.settings.get_boolean("display-preview-label-color"))) {
this.previewLabelColor = this.settings.get_string("preview-label-color");
this.labelNamePreviewStyle = "color: " + this.previewLabelColor + "; font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelNamePreview.set_style(this.labelNamePreviewStyle);
} else {
this.labelNamePreviewStyle = "color: rgba(255,255,255,1.0); font-weight: bold; font-size: " + this.previewFontSize + "pt; text-align: center;";
labelNamePreview.set_style(this.labelNamePreviewStyle);
}
this.favoritesPreview.add_actor(labelNamePreview);
if ((this.settings.get_string("preview-background-color") !== 'unset') && (this.settings.get_boolean("display-preview-background-color"))) {
this.previewBackgroundColor = this.settings.get_string("preview-background-color");
this.favoritesPreviewStyle = "background-color: " + this.previewBackgroundColor + "; padding: 5px; border-radius: 8px; -y-offset: 6px;";
this.favoritesPreview.set_style(this.favoritesPreviewStyle);
} else {
this.favoritesPreviewStyle = "background-color: rgba(0,0,0,0.9); padding: 5px; border-radius: 8px; -y-offset: 6px;";
this.favoritesPreview.set_style(this.favoritesPreviewStyle);
}
global.stage.add_actor(this.favoritesPreview);
this.button = buttonfavorite;
this.preview = this.favoritesPreview;
this.setPreviewPosition();
},
setPreviewPosition: function() {
let [stageX, stageY] = this.button.get_transformed_position();
let itemHeight = this.button.allocation.y2 - this.button.allocation.y1;
let itemWidth = this.button.allocation.x2 - this.button.allocation.x1;
let labelWidth = this.preview.get_width();
let labelHeight = this.preview.get_height();
let node = this.preview.get_theme_node();
let yOffset = node.get_length('-y-offset');
let y = null;
if ((this.settings.get_boolean("bottom-panel")) || (this.tbp))
y = stageY - labelHeight - yOffset;
else
y = stageY + itemHeight + yOffset;
let x = Math.floor(stageX + itemWidth / 2 - labelWidth / 2);
let posparent = this.preview.get_parent();
let posparentWidth = posparent.allocation.x2 - posparent.allocation.x1;
if (Clutter.get_default_text_direction() === Clutter.TextDirection.LTR) {
x = Math.min(x, posparentWidth - labelWidth - 6);
x = Math.max(x, 6);
} else {
x = Math.max(x, 6);
x = Math.min(x, posparentWidth - labelWidth - 6);
}
this.preview.set_position(x, y);
},
resetPreview: function(button, window) {
//Reset Hover
this.resetHover = true;
if (this.previewTimer2 !== null) {
Mainloop.source_remove(this.previewTimer2);
this.previewTimer2 = null;
}
this.hidePreview();
},
hidePreview: function() {
//Remove preview programmed if necessary
if (this.previewTimer !== null) {
Mainloop.source_remove(this.previewTimer);
this.previewTimer = null;
}
//Destroy Preview if displaying
if (this.preview !== null) {
this.preview.destroy();
this.preview = null;
}
//Destroy Favorites Preview if displaying
if (this.favoritesPreview !== null) {
this.favoritesPreview.destroy();
this.favoritesPreview = null;
}
}
};
gnome-shell-extension-taskbar-57.0/images/ 0000775 0000000 0000000 00000000000 13262614637 0020575 5 ustar 00root root 0000000 0000000 gnome-shell-extension-taskbar-57.0/images/README 0000664 0000000 0000000 00000003064 13262614637 0021460 0 ustar 00root root 0000000 0000000 GNOME Shell Extension TaskBar
Copyright (C) 2013-2018 zpydr
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/.
zpydr@openmailbox.org
Icons:
active-task-background.svg - Copyright (C) 2013-2018 zpydr - GPLv3+
appview-button-default.svg - Copyright (C) 2013-2018 GNOME Project - GPLv2+
bottom-panel-tray-button.svg - Copyright (C) 2013-2018 GNOME Project - GPLv2+
desktop-button-dark.png - Copyright (C) 2013-2018 GNOME Project - GPLv2+
desktop-button-default.png - Copyright (C) 2013-2018 zpydr - GPLv3+
desktop-button-gnome.png - Copyright (C) 2013-2018 GNOME Project - GPLv2+
settings-1px.png - Copyright (C) 2013-2018 zpydr - GPLv3+
settings-fsf.png - Copyright (C) 2013-2018 GNU Project - GPLv3+
settings-gnome.png - Copyright (C) 2013-2018 GNOME Project - GPLv2+
settings-gpl.png - Copyright (C) 2013-2018 GNU Project - GPLv3+
settings-home.png - Copyright (C) 2013-2018 GNOME Project - GPLv2+
settings-mail.png - Copyright (C) 2013-2018 GNOME Project - GPLv2+
transparent-icon.svg - Copyright (C) 2013-2018 zpydr - GPLv3+
gnome-shell-extension-taskbar-57.0/images/active-task-background.svg 0000664 0000000 0000000 00000014346 13262614637 0025656 0 ustar 00root root 0000000 0000000
gnome-shell-extension-taskbar-57.0/images/appview-button-default.svg 0000664 0000000 0000000 00000016165 13262614637 0025735 0 ustar 00root root 0000000 0000000
gnome-shell-extension-taskbar-57.0/images/bottom-panel-tray-button.svg 0000664 0000000 0000000 00000011742 13262614637 0026212 0 ustar 00root root 0000000 0000000
gnome-shell-extension-taskbar-57.0/images/desktop-button-dark.png 0000664 0000000 0000000 00000000335 13262614637 0025205 0 ustar 00root root 0000000 0000000 PNG
IHDR 0 0 W pHYs
B(x IDATh혱
Aǧo~(f( KB !f*عTpͲ_S%\+I:6OU!룏K^`8.
(
(
(
Z8} G`k~}fy Vư`l IENDB` gnome-shell-extension-taskbar-57.0/images/desktop-button-default.png 0000664 0000000 0000000 00000002140 13262614637 0025704 0 ustar 00root root 0000000 0000000 PNG
IHDR w= 'IDATHՕ;U;_}'YI|4")LF XDD"`%Vba#) !Iu|s,[A0w=<=*O>w{F*eFJTb`jASFR j\em>A
px*TVV_^ʑ&
y4Qـe@tS(9J&56)(]ɡޜt_8iYiy1"9bj Rd$*r|`m.]S1qTzCwyQOQE
*VQ9z[rcYxXI
/7*^^; w.q%J쐘И%S ^!wPt
h&[MZ^:\(B,GR4ɠA1B2tS:P#².p~>zۭ'/⻄nAbCn&*Aɐbs!-:ΰ݁_k+"2iź a46 V e RN!5x+F-ј]7b
+s(@)Sp@ܠ'W4cJX@ѵx.
v#8Ǭ{}?BQeS@g*seWHۻЌ 5=%3`h g%Ɍ@c4`=LfYlX?]T!kJ
z303|eMa_ ibBsZzrS8kN!EN}p u\p81ŪYԕJ1CLHL=VPgXz\o~qg:換Вibh*sbN^DH+]?# -{?2[R -
H1-ЀLR&jg?AIMWt2 IENDB` gnome-shell-extension-taskbar-57.0/images/desktop-button-gnome.png 0000664 0000000 0000000 00000002104 13262614637 0025365 0 ustar 00root root 0000000 0000000 PNG
IHDR w= sBIT|d pHYs
B(x tEXtSoftware www.inkscape.org< tEXtTitle Folders!T`A tEXtAuthor Lapo Calamandreiߑ* )tEXtDescription Based of Jakub Steiner designs OIDATHKh\e߽wt&/hDTRV4Tu!.,]hA\UAZ\.TTEI5tHdd&3s'{i&f`