1
0
Fork 0

Adding upstream version 20230205.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 23:08:39 +01:00
parent 86433991d2
commit 17f856de92
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
131 changed files with 11978 additions and 2 deletions

30
CHANGELOG.txt Normal file
View file

@ -0,0 +1,30 @@
2023-02-05 Daniel Baumann <daniel.baumann@progress-linux.org>
* Releasing version 20230205.
[ Daniel Baumann ]
* Adding changelog.
* Adding license.
* Adding makefile.
* Adding manpage.
* Adding version.
* Moving extensions to subdirectory.
* Adding extension makefiles.
* Adding middleclickclose version 1.8.1 [f35350e].
* Adding middleclickclose makefile.
* Adding middleclickclose entry in manpage.
* Adding no-overview version 12 [665d0e1].
* Adding no-overview makefile.
* Adding no-overview entry in manpage.
* Adding vertical-workspaces version 23.5 [ba7d77f].
* Adding vertical-workspaces makefile.
* Adding vertical-workspaces in manpage.
2023-02-04 Daniel Baumann <daniel.baumann@progress-linux.org>
* Releasing version 20230204.
[ Daniel Baumann ]
* Adding disable-workspace-switcher version 2 (8d94260).
* Adding hibernate-status version 20230113 (bfca991).
* Adding multi-monitors-add-on version 25 (515dfd0).

111
Makefile Normal file
View file

@ -0,0 +1,111 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
SHELL := sh -e
SOFTWARE = gnome-shell-extensions-extra
VERSION := $(shell cat VERSION.txt)
extensions-%:
@cd extensions; \
for EXTENSION in *.mk; \
do \
echo "################################################################################"; \
echo "$${EXTENSION}: $$(echo ${@} | cut -d- -f2-)"; \
echo "################################################################################"; \
$(MAKE) -f $${EXTENSION} $$(echo ${@} | cut -d- -f2-); \
done
package-test:
package-build: share/man/*.rst
$(MAKE) -C share/man
sed -n '/^===/,$$p' share/man/$(SOFTWARE).7.rst > README.txt
package-install: package-build
mkdir -p $(DESTDIR)/usr/share/doc/$(SOFTWARE)
cp -r CHANGELOG.txt LICENSE.txt README.txt $(DESTDIR)/usr/share/doc/$(SOFTWARE)
for SECTION in $$(seq 1 8); \
do \
if ls share/man/*.$${SECTION} > /dev/null 2>&1; \
then \
mkdir -p $(DESTDIR)/usr/share/man/man$${SECTION}; \
cp share/man/*.$${SECTION} $(DESTDIR)/usr/share/man/man$${SECTION}; \
fi; \
done
package-uninstall:
for SECTION in $$(seq 1 8); \
do \
for FILE in share/man/*.$${SECTION}; \
do \
rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${FILE}); \
done; \
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/man/man$${SECTION} || true; \
done
rm -rf $(DESTDIR)/usr/share/doc/$(SOFTWARE)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR)/usr/share/doc || true
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
package-clean:
$(MAKE) -C share/man clean
rm -f README.txt
all: build
test: extensions-test package-test
build: extensions-build package-build
install: extensions-install package-install
uninstall: extensions-uninstall package-uninstall
clean: extensions-clean package-clean
distclean: clean
rm -rf $(SOFTWARE)-$(VERSION)
reinstall: uninstall install
release: distclean
git commit -a -s -S -m 'Releasing version $(VERSION).' || true
git tag -s -m 'Tagging version $(VERSION).' v$(VERSION) || true
mkdir -p $(SOFTWARE)-$(VERSION)
find . -mindepth 1 -maxdepth 1 -and -not -name ".git*" -and -not -name debian -and -not -name $(SOFTWARE)-$(VERSION) -exec cp \-a {} $(SOFTWARE)-$(VERSION) \;
for FORMAT in xz lzip; \
do \
EXTENSION=$$(echo $${FORMAT} | cut -b-2); \
tar --$${FORMAT} -cf ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} $(SOFTWARE)-$(VERSION); \
sha512sum ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION} > ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sha512; \
gpg --default-key 0x3E6CA28DAAF8DD14 --armor -b ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}; \
mv ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.asc ../$(SOFTWARE)-$(VERSION).tar.$${EXTENSION}.sig; \
done
rm -rf $(SOFTWARE)-$(VERSION)
upload:
scp ../$(SOFTWARE)-$(VERSION).* get.progress-linux.org:/srv/get.progress-linux.org/packages/$(SOFTWARE)/upstream

1
VERSION.txt Normal file
View file

@ -0,0 +1 @@
20230205

View file

@ -0,0 +1,51 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# none
SHELL := sh -e
EXTENSION := disable-workspace-switcher
UUID := $(shell awk -F\" '/"uuid": / { print $$4 }' $(EXTENSION)/*@*/metadata.json)
all:
test:
build:
install:
mkdir -p $(DESTDIR)/usr/share/gnome-shell/extensions
cp -a $(EXTENSION)/$(UUID) $(DESTDIR)/usr/share/gnome-shell/extensions
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/jbradaric/$(EXTENSION)
rm -rf $(EXTENSION)/.git

View file

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

View file

@ -0,0 +1,55 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# libglib2.0-bin
SHELL := sh -e
EXTENSION := hibernate-status
UUID := $(shell awk -F\" '/"uuid": / { print $$4 }' $(EXTENSION)/metadata.json)
all:
test:
build:
install:
$(MAKE) -C $(EXTENSION) DESTDIR=$(DESTDIR) install
# removing unused files
rm -f $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)/LICENSE
rm -f $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)/README.md
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
$(MAKE) -C $(EXTENSION) clean
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/arelange/gnome-shell-extension-$(EXTENSION) $(EXTENSION)
rm -rf $(EXTENSION)/.git

View file

@ -0,0 +1,57 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# gettext libglib2.0-bin
SHELL := sh -e
EXTENSION := middleclickclose
UUID := $(shell awk -F\" '/"uuid": / { print $$4 }' $(EXTENSION)/*@*/metadata.json)
all:
test:
build:
for TRANSLATION in $(EXTENSION)/$(UUID)/locale/*/*/*.mo; \
do \
msgfmt -cv -o $${TRANSLATION} $$(dirname $${TRANSLATION})/$$(basename $${TRANSLATION} .mo).po; \
done
glib-compile-schemas --strict --targetdir=$(EXTENSION)/$(UUID)/schemas/ $(EXTENSION)/$(UUID)/schemas
install: build
mkdir -p $(DESTDIR)/usr/share/gnome-shell/extensions
cp -a $(EXTENSION)/$(UUID) $(DESTDIR)/usr/share/gnome-shell/extensions
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/p91paul/$(EXTENSION)
rm -rf $(EXTENSION)/.git

View file

@ -0,0 +1,2 @@
middleclickclose@paolo.tranquilli.gmail.com.zip
gschemas.compiled

View file

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) 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
this service 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 make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. 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.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the 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 a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE 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.
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
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision 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, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This 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.

View file

@ -0,0 +1,23 @@
Middleclickclose
================
Gnome shell extension for closing apps in overview with a middle click
All credit goes to Paolo Tranquilli (http://cs.unibo.it/~tranquil/en/hacking.html), I've merely copied its code here to provide Gnome Shell 3.10+ compatibility
This extension is installable from https://extensions.gnome.org/extension/352/middle-click-to-close-in-overview/.
Otherwise you may
* download a [zip](https://github.com/p91paul/middleclickclose/archive/master.zip) of this extension
* extract it
* copy folder middleclickclose@paolo.tranquilli.gmail.com in $HOME/.local/share/gnome-shell/extensions
* run the following command
```
glib-compile-schemas $HOME/.local/share/gnome-shell/extensions/middleclickclose@paolo.tranquilli.gmail.com/schemas
```
* reload gnome-shell (Alt-F2, r, Enter)
* activate it through Gnome Tweak Tool.
![](tweak-tool-screenshot.png)

View file

@ -0,0 +1,5 @@
#!/bin/bash
rm -rf middleclickclose@paolo.tranquilli.gmail.com.zip
cd middleclickclose@paolo.tranquilli.gmail.com/
glib-compile-schemas schemas
zip -r ../middleclickclose@paolo.tranquilli.gmail.com.zip * -x '*.po'

View file

@ -0,0 +1,117 @@
/* This extension is a derived work of the Gnome Shell.
*
* Copyright (c) 2013 Paolo Tranquilli
*
* This extension is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This extension 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 extension; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
const CLOSE_BUTTON = 'close-button';
const REARRANGE_DELAY = 'rearrange-delay';
const St = imports.gi.St;
const Main = imports.ui.main;
const Workspace = imports.ui.workspace
const WindowPreview = imports.ui.windowPreview.WindowPreview
const Mainloop = imports.mainloop;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
var Init = class Init {
_connectSettings() {
this._settingsSignals = [];
this._settingsSignals.push(this._settings.connect('changed::'+CLOSE_BUTTON, this._setCloseButton.bind(this)));
this._settingsSignals.push(this._settings.connect('changed::'+REARRANGE_DELAY, this._setRearrangeDelay.bind(this)));
}
_disconnectSettings() {
while(this._settingsSignals.length > 0) {
this._settings.disconnect(this._settingsSignals.pop());
}
}
_setCloseButton() {
this._closeButton = this._settings.get_enum(CLOSE_BUTTON) + 1;
}
_setRearrangeDelay() {
this._rearrangeDelay = this._settings.get_int(REARRANGE_DELAY);
}
enable() {
this._oldActivate = WindowPreview.prototype._activate;
this._oldDoRemoveWindow = Workspace.Workspace.prototype._doRemoveWindow;
this._oldAddWindowClone = Workspace.Workspace.prototype._addWindowClone;
this._settings = ExtensionUtils.getSettings();
this._oldDelay = Workspace.WINDOW_REPOSITIONING_DELAY;
this._setCloseButton();
this._setRearrangeDelay();
// I'll go with a closure, not sure how to do it otherwise
let init = this;
// my handling logic
const onClicked = function(action, actor) {
this._selected = true;
if (action.get_button() == init._closeButton) {
this._deleteAll();
} else {
init._oldActivate.apply(this);
}
};
// override _addWindowClone to add my event handler
Workspace.Workspace.prototype._addWindowClone = function(metaWindow) {
let clone = init._oldAddWindowClone.apply(this, [metaWindow]);
clone.get_actions()[0].connect('clicked', onClicked.bind(clone));
return clone;
}
// override WindowClone's _activate
WindowPreview.prototype._activate = () => {};
// override Workspace's _doRemoveWindow in order to put into it the
// parameteriseable rearrangement delay. Rather than copy the code from
// workspace.js, we reuse it but remove the scheduled rearrangement task
// (as its 750ms delay is hard-coded...)
Workspace.WINDOW_REPOSITIONING_DELAY = Math.max(init._rearrangeDelay,1);
this._connectSettings();
}
disable() {
WindowPreview.prototype._activate = this._oldActivate;
Workspace.Workspace.prototype._doRemoveWindow = this._oldDoRemoveWindow;
Workspace.WINDOW_REPOSITIONING_DELAY = this._oldDelay;
Workspace.Workspace.prototype._addWindowClone = this._oldAddWindowClone;
this._disconnectSettings();
}
}
function init() {
ExtensionUtils.initTranslations();
}
let _init;
function enable() {
_init = new Init();
_init.enable();
}
function disable() {
_init?.disable();
_init = null;
}

View file

@ -0,0 +1,75 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# Onno Giesmann <nutzer3105@gmail.com>, 2019.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell-extensions-middleclickclose\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-30 07:06+0100\n"
"PO-Revision-Date: 2019-06-17 20:44+0200\n"
"Language-Team: German <--->\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Gtranslator 3.32.1\n"
"Last-Translator: Onno Giesmann <nutzer3105@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"Language: de\n"
#: ../../../prefs.js:33
msgid "Mouse button to close"
msgstr "Maustaste zum Schließen"
#: ../../../prefs.js:34
msgid "Which mouse button triggers closing in overview."
msgstr "Gibt an, welche Maustaste das Schließen in der Übersicht auslöst."
#: ../../../prefs.js:36
msgid "Left"
msgstr "Linke"
#: ../../../prefs.js:37
msgid "Middle"
msgstr "Mittlere"
#: ../../../prefs.js:38
msgid "Right"
msgstr "Rechte"
#: ../../../prefs.js:39
msgid "Button 4"
msgstr "Taste 4"
#: ../../../prefs.js:40
msgid "Button 5"
msgstr "Taste 5"
#: ../../../prefs.js:41
msgid "Button 6"
msgstr "Taste 6"
#: ../../../prefs.js:42
msgid "Button 7"
msgstr "Taste 7"
#: ../../../prefs.js:43
msgid "Button 8"
msgstr "Taste 8"
#: ../../../prefs.js:44
msgid "Button 9"
msgstr "Taste 9"
#: ../../../prefs.js:50
msgid "Rearrange delay"
msgstr "Verzögerung bis zur Neuanordnung"
#: ../../../prefs.js:51
msgid ""
"How much time must pass with the pointer not moving for windows in overview "
"to rearrange after one was closed."
msgstr ""
"Gibt die Zeit an, die bei stillstehender Maus vergehen muss, bevor sich die "
"Fenster in der Übersicht neu anordnen, nachdem ein Fenster geschlossen wurde."

View file

@ -0,0 +1,75 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell-extensions-middleclickclose\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-30 07:06+0100\n"
"PO-Revision-Date: 2015-12-30 07:08+0100\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.5\n"
"Last-Translator: DAEM Q.\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Language: fr\n"
#: ../../../prefs.js:33
msgid "Mouse button to close"
msgstr "Bouton de souris pour fermer la fenêtre"
#: ../../../prefs.js:34
msgid "Which mouse button triggers closing in overview."
msgstr "Le bouton de la souris qui déclenche la fermeture d'une fenêtre dans la Vue d'ensemble."
#: ../../../prefs.js:36
msgid "Left"
msgstr "Gauche"
#: ../../../prefs.js:37
msgid "Middle"
msgstr "Milieu"
#: ../../../prefs.js:38
msgid "Right"
msgstr "Droit"
#: ../../../prefs.js:39
msgid "Button 4"
msgstr "Bouton 4"
#: ../../../prefs.js:40
msgid "Button 5"
msgstr "Bouton 5"
#: ../../../prefs.js:41
msgid "Button 6"
msgstr "Bouton 6"
#: ../../../prefs.js:42
msgid "Button 7"
msgstr "Bouton 7"
#: ../../../prefs.js:43
msgid "Button 8"
msgstr "Bouton 8"
#: ../../../prefs.js:44
msgid "Button 9"
msgstr "Bouton 9"
#: ../../../prefs.js:50
msgid "Rearrange delay"
msgstr "Délai avant réarrangement"
#: ../../../prefs.js:51
msgid ""
"How much time must pass with the pointer not moving for windows in overview "
"to rearrange after one was closed."
msgstr ""
"Temps qu'il doit se passer sans que le pointeur de la souris ne bouge dans la Vue d'ensemble "
"avant réarrangement des fenêtres."

View file

@ -0,0 +1,75 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell-extensions-middleclickclose\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-30 07:06+0100\n"
"PO-Revision-Date: 2017-04-21 10:06+0200\n"
"Language-Team: Jimmy Scionti <jimmy.scionti@gmail.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.7.1\n"
"Last-Translator: Jimmy Scionti <jimmy.scionti@gmail.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: it\n"
#: ../../../prefs.js:33
msgid "Mouse button to close"
msgstr "Pulsante del mouse per chiudere la finestra"
#: ../../../prefs.js:34
msgid "Which mouse button triggers closing in overview."
msgstr "Seleziona quale pulsante del mouse premere per chiudere una finestra."
#: ../../../prefs.js:36
msgid "Left"
msgstr "Sinistro"
#: ../../../prefs.js:37
msgid "Middle"
msgstr "Centrale"
#: ../../../prefs.js:38
msgid "Right"
msgstr "Destro"
#: ../../../prefs.js:39
msgid "Button 4"
msgstr "Pulsante 4"
#: ../../../prefs.js:40
msgid "Button 5"
msgstr "Pulsante 5"
#: ../../../prefs.js:41
msgid "Button 6"
msgstr "Pulsante 6"
#: ../../../prefs.js:42
msgid "Button 7"
msgstr "Pulsante 7"
#: ../../../prefs.js:43
msgid "Button 8"
msgstr "Pulsante 8"
#: ../../../prefs.js:44
msgid "Button 9"
msgstr "Pulsante 9"
#: ../../../prefs.js:50
msgid "Rearrange delay"
msgstr "Ritardo del riordinamento"
#: ../../../prefs.js:51
msgid ""
"How much time must pass with the pointer not moving for windows in overview to rearrange "
"after one was closed."
msgstr ""
"Seleziona il tempo di attesa tra la chiusura di una finestra e il riordinamento delle altre "
"finestre nell'anteprima."

View file

@ -0,0 +1,74 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
#
# Heimen Stoffels <vistausss@outlook.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell-extensions-middleclickclose\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-30 07:06+0100\n"
"PO-Revision-Date: 2019-09-15 20:17+0200\n"
"Language-Team: Dutch <kde-i18n-doc@kde.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: it\n"
#: ../../../prefs.js:33
msgid "Mouse button to close"
msgstr "Muisknop om vensters mee te sluiten"
#: ../../../prefs.js:34
msgid "Which mouse button triggers closing in overview."
msgstr "Met welke muisknop je vensters kunt sluiten op het overzicht."
#: ../../../prefs.js:36
msgid "Left"
msgstr "Links"
#: ../../../prefs.js:37
msgid "Middle"
msgstr "Scrollwiel"
#: ../../../prefs.js:38
msgid "Right"
msgstr "Rechts"
#: ../../../prefs.js:39
msgid "Button 4"
msgstr "Knop 4"
#: ../../../prefs.js:40
msgid "Button 5"
msgstr "Knop 5"
#: ../../../prefs.js:41
msgid "Button 6"
msgstr "Knop 6"
#: ../../../prefs.js:42
msgid "Button 7"
msgstr "Knop 7"
#: ../../../prefs.js:43
msgid "Button 8"
msgstr "Knop 8"
#: ../../../prefs.js:44
msgid "Button 9"
msgstr "Knop 9"
#: ../../../prefs.js:50
msgid "Rearrange delay"
msgstr "Vertraging bij herschikken"
#: ../../../prefs.js:51
msgid ""
"How much time must pass with the pointer not moving for windows in "
"overview to rearrange after one was closed."
msgstr ""
"Hoeveel tijd er moet verstrijken na het sluiten van een venster voordat "
"vensters worden herschikt."

View file

@ -0,0 +1,75 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: gnome-shell-extensions-middleclickclose\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-30 07:06+0100\n"
"PO-Revision-Date: 2015-10-30 07:08+0100\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.8.5\n"
"Last-Translator: Juraj Fiala <doctorjellyface@riseup.net>\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
"Language: sk\n"
#: ../../../prefs.js:33
msgid "Mouse button to close"
msgstr "Tlačidlo myši na zavretie"
#: ../../../prefs.js:34
msgid "Which mouse button triggers closing in overview."
msgstr "Ktoré tlačidlo myši spustí zavretie v prehľade aktivít."
#: ../../../prefs.js:36
msgid "Left"
msgstr "Ľavé"
#: ../../../prefs.js:37
msgid "Middle"
msgstr "Stredné"
#: ../../../prefs.js:38
msgid "Right"
msgstr "Pravé"
#: ../../../prefs.js:39
msgid "Button 4"
msgstr "Tlačidlo 4"
#: ../../../prefs.js:40
msgid "Button 5"
msgstr "Tlačidlo 5"
#: ../../../prefs.js:41
msgid "Button 6"
msgstr "Tlačidlo 6"
#: ../../../prefs.js:42
msgid "Button 7"
msgstr "Tlačidlo 7"
#: ../../../prefs.js:43
msgid "Button 8"
msgstr "Tlačidlo 8"
#: ../../../prefs.js:44
msgid "Button 9"
msgstr "Tlačidlo 9"
#: ../../../prefs.js:50
msgid "Rearrange delay"
msgstr "Oneskorenie preskúpenia"
#: ../../../prefs.js:51
msgid ""
"How much time must pass with the pointer not moving for windows in overview "
"to rearrange after one was closed."
msgstr ""
"Koľko času musí prejsť od posledného pohnutia kurzora myši aby sa okná v "
"prehľade znovu usporiadali po tom ako bolo jedno zavreté."

View file

@ -0,0 +1,14 @@
{
"shell-version": [
"42",
"43"
],
"settings-schema": "org.gnome.shell.extensions.middleclickclose",
"gettext-domain": "org.gnome.shell.extensions.middleclickclose",
"uuid": "middleclickclose@paolo.tranquilli.gmail.com",
"name": "Quick Close in Overview",
"description": "Close windows with a button click (the middle one by default) when in overview mode",
"url": "https://github.com/p91paul/middleclickclose",
"original-authors": [ "Paolo Tranquilli" ],
"locale": "/usr/local/share/locale"
}

View file

@ -0,0 +1,258 @@
/* -*- mode: js2; js2-basic-offset: 4; indent-tabs-mode: nil -*- */
/**
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
**/
const Gtk = imports.gi.Gtk;
const GObject = imports.gi.GObject;
const Gettext = imports.gettext.domain('gnome-shell-extensions-middleclickclose');
const _ = Gettext.gettext;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const ExtensionUtils = imports.misc.extensionUtils;
let gsettings;
let settings;
function init() {
ExtensionUtils.initTranslations();
gsettings = ExtensionUtils.getSettings();
settings = {
close_button: {
type: "e",
label: _("Mouse button to close"),
help: _("Which mouse button triggers closing in overview."),
list: [
{ nick: "left", name: _("Left"), id: 0 },
{ nick: "middle", name: _("Middle"), id: 1 },
{ nick: "right", name: _("Right"), id: 2 },
{ nick: "button 4", name: _("Button 4"), id: 3 },
{ nick: "button 5", name: _("Button 5"), id: 4 },
{ nick: "button 6", name: _("Button 6"), id: 5 },
{ nick: "button 7", name: _("Button 7"), id: 6 },
{ nick: "button 8", name: _("Button 8"), id: 7 },
{ nick: "button 9", name: _("Button 9"), id: 8 }
],
default: 'middle'
},
rearrange_delay: {
type: "i",
label: _("Rearrange delay"),
help: _("How much time must pass with the pointer not moving for windows in overview to rearrange after one was closed."),
step: 50,
default: 750
}
};
}
function buildPrefsWidget() {
let frame = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL,
'margin-top': 10,
'margin-end': 10,
'margin-bottom': 10,
'margin-start': 10});
let vbox = new Gtk.Box({orientation: Gtk.Orientation.VERTICAL,
'margin-top': 10,
'margin-end': 20,
'margin-bottom': 20,
'margin-start': 20});
for (setting in settings) {
hbox = buildHbox(settings, setting);
vbox.append(hbox);
}
frame.append(vbox);
return frame;
}
function buildHbox(settings, setting) {
let hbox;
if (settings[setting].type == 's')
hbox = createStringSetting(settings, setting);
if (settings[setting].type == "i")
hbox = createIntSetting(settings, setting);
if (settings[setting].type == "b")
hbox = createBoolSetting(settings, setting);
if (settings[setting].type == "r")
hbox = createRangeSetting(settings, setting);
if (settings[setting].type == "e")
hbox = createEnumSetting(settings, setting);
return hbox;
}
function createEnumSetting(settings, setting) {
let hbox = new Gtk.Box({orientation: Gtk.Orientation.HORIZONTAL,
'margin-top': 5,
spacing: 10});
let setting_label = new Gtk.Label({label: settings[setting].label,
xalign: 0 });
let model = new Gtk.ListStore();
model.set_column_types([GObject.TYPE_INT, GObject.TYPE_STRING]);
let setting_enum = new Gtk.ComboBox({model: model});
setting_enum.get_style_context().add_class('raised');
let renderer = new Gtk.CellRendererText();
setting_enum.pack_start(renderer, true);
setting_enum.add_attribute(renderer, 'text', 1);
for (let i=0; i<settings[setting].list.length; i++) {
let item = settings[setting].list[i];
let iter = model.append();
model.set(iter, [0, 1], [item.id, item.name]);
if (item.id == gsettings.get_enum(setting.replace('_', '-'))) {
setting_enum.set_active(item.id);
}
}
setting_enum.connect('changed', function(entry) {
let [success, iter] = setting_enum.get_active_iter();
if (!success)
return;
let id = model.get_value(iter, 0)
gsettings.set_enum(setting.replace('_', '-'), id);
});
if (settings[setting].help) {
setting_label.set_tooltip_text(settings[setting].help)
setting_enum.set_tooltip_text(settings[setting].help)
}
hbox.append(setting_label);
hbox.append(setting_enum);
return hbox;
}
function createStringSetting(settings, setting) {
let hbox = new Gtk.Box({orientation: Gtk.Orientation.HORIZONTAL,
'margin-top': 5,
spacing: 10});
let setting_label = new Gtk.Label({label: settings[setting].label,
xalign: 0 });
let setting_string = new Gtk.Entry({text: gsettings.get_string(setting.replace('_', '-'))});
setting_string.set_width_chars(30);
setting_string.connect('notify::text', function(entry) {
gsettings.set_string(setting.replace('_', '-'), entry.text);
});
if (settings[setting].mode == "passwd") {
setting_string.set_visibility(false);
}
if (settings[setting].help) {
setting_label.set_tooltip_text(settings[setting].help)
setting_string.set_tooltip_text(settings[setting].help)
}
hbox.append(setting_label);
hbox.append(setting_string);
return hbox;
}
function createIntSetting(settings, setting) {
let hbox = new Gtk.Box({orientation: Gtk.Orientation.HORIZONTAL,
'margin-top': 5,
spacing: 10});
let setting_label = new Gtk.Label({label: settings[setting].label,
xalign: 0 });
let adjustment = new Gtk.Adjustment({ lower: settings[setting].min || 0,
upper: settings[setting].max || 65535,
step_increment: settings[setting].step || 1});
let setting_int = new Gtk.SpinButton({adjustment: adjustment});
setting_int.set_value(gsettings.get_int(setting.replace('_', '-')));
setting_int.connect('value-changed', function(entry) {
gsettings.set_int(setting.replace('_', '-'), entry.value);
});
if (settings[setting].help) {
setting_label.set_tooltip_text(settings[setting].help)
setting_int.set_tooltip_text(settings[setting].help)
}
hbox.append(setting_label);
hbox.append(setting_int);
return hbox;
}
function createBoolSetting(settings, setting) {
let hbox = new Gtk.Box({orientation: Gtk.Orientation.HORIZONTAL,
'margin-top': 5,
spacing: 10});
let setting_label = new Gtk.Label({label: settings[setting].label,
xalign: 0 });
let setting_switch = new Gtk.Switch({active: gsettings.get_boolean(setting.replace('_', '-'))});
setting_switch.connect('notify::active', function(button) {
gsettings.set_boolean(setting.replace('_', '-'), button.active);
});
if (settings[setting].help) {
setting_label.set_tooltip_text(settings[setting].help)
setting_switch.set_tooltip_text(settings[setting].help)
}
hbox.append(setting_label);
hbox.append(setting_switch);
return hbox;
}
function createRangeSetting(settings, setting) {
let hbox = new Gtk.Box({ orientation: Gtk.Orientation.HORIZONTAL,
spacing: 10 });
let setting_label = new Gtk.Label({ label: settings[setting].label,
xalign: 0 });
let setting_range = Gtk.HScale.new_with_range(settings[setting].min,
settings[setting].max,
settings[setting].step);
setting_range.set_value(gsettings.get_int(setting));
setting_range.set_draw_value(false);
setting_range.add_mark(settings[setting].default,
Gtk.PositionType.BOTTOM, null);
setting_range.set_size_request(200, -1);
setting_range.connect('value-changed', function(slider) {
gsettings.set_int(setting, slider.get_value());
});
if (settings[setting].help) {
setting_label.set_tooltip_text(settings[setting].help)
setting_range.set_tooltip_text(settings[setting].help)
}
hbox.append(setting_label);
hbox.append(setting_range);
return hbox;
}

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist gettext-domain="middleclickclose">
<enum id='org.gnome.shell.extensions.middleclickclose.buttons'>
<value value='0' nick='left'/>
<value value='1' nick='middle'/>
<value value='2' nick='right'/>
<value value='3' nick='button 4'/>
<value value='4' nick='button 5'/>
<value value='5' nick='button 6'/>
<value value='6' nick='button 7'/>
<value value='7' nick='button 8'/>
<value value='8' nick='button 9'/>
</enum>
<schema path="/org/gnome/shell/extensions/middleclickclose/" id="org.gnome.shell.extensions.middleclickclose">
<key name="close-button" enum="org.gnome.shell.extensions.middleclickclose.buttons">
<default>'middle'</default>
<summary>Which mouse button is used to quick-close</summary>
</key>
<key type="i" name="rearrange-delay">
<default>750</default>
<summary>Rearrangement delay after close</summary>
<description>Time in milliseconds it take for the scaled windows to rearrange themselves after any type of close action.</description>
</key>
</schema>
</schemalist>

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

View file

@ -0,0 +1,57 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# gettext libglib2.0-bin
SHELL := sh -e
EXTENSION := multi-monitors-add-on
UUID := $(shell awk -F\" '/"uuid": / { print $$4 }' $(EXTENSION)/*@*/metadata.json)
all:
test:
build:
for TRANSLATION in $(EXTENSION)/$(UUID)/locale/*; \
do \
msgfmt -cv -o $${TRANSLATION}/LC_MESSAGES/$(EXTENSION).mo $${TRANSLATION}/LC_MESSAGES/$(EXTENSION).po; \
done
glib-compile-schemas --strict --targetdir=$(EXTENSION)/$(UUID)/schemas/ $(EXTENSION)/$(UUID)/schemas
install: build
mkdir -p $(DESTDIR)/usr/share/gnome-shell/extensions
cp -a $(EXTENSION)/$(UUID) $(DESTDIR)/usr/share/gnome-shell/extensions
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/realh/$(EXTENSION)
rm -rf $(EXTENSION)/.git

58
extensions/no-overview.mk Normal file
View file

@ -0,0 +1,58 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# none
SHELL := sh -e
EXTENSION := no-overview
UUID := no-overview@fthx
all:
test:
build:
install:
mkdir -p $(DESTDIR)/usr/share/gnome-shell/extensions
cp -a $(EXTENSION) $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
# removing unused files
rm -f $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)/LICENSE
rm -f $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)/README.md
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/fthx/$(EXTENSION)
rm -rf $(EXTENSION)/.git
# dfsg
rm -f $(EXTENSION)/metadata.json

View file

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

View file

@ -0,0 +1,3 @@
GNOME Shell 40+ extension
https://extensions.gnome.org/extension/4099/no-overview/

View file

@ -0,0 +1,38 @@
/*
No overview at start-up
Contributors: @fthx, @fmuellner
License: GPL v3
*/
const Main = imports.ui.main;
class Extension {
constructor() {
this._realHasOverview = Main.sessionMode.hasOverview;
}
enable() {
if (!Main.layoutManager._startingUp) {
return;
}
Main.sessionMode.hasOverview = false;
Main.layoutManager.connect('startup-complete', () => {
Main.sessionMode.hasOverview = this._realHasOverview
});
// handle Ubuntu's method
if (Main.layoutManager.startInOverview) {
Main.layoutManager.startInOverview = false;
}
}
disable() {
Main.sessionMode.hasOverview = this._realHasOverview;
}
}
function init() {
return new Extension();
}

View file

@ -0,0 +1,56 @@
# Progress Linux: gnome-shell-extensions-extra
# Copyright (C) 2010-2023 Daniel Baumann <daniel.baumann@progress-linux.org>
#
# SPDX-License-Identifier: GPL-3.0+
#
# 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/>.
# Build-Depends:
# gettext libglib2.0-bin unzip zip
SHELL := sh -e
EXTENSION := vertical-workspaces
UUID := $(shell awk -F\" '/"uuid": / { print $$4 }' $(EXTENSION)/metadata.json)
all:
test:
build:
$(MAKE) -C $(EXTENSION) zip
install: build
mkdir -p $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
unzip -d $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID) $(EXTENSION)/*.zip
# removing unused files
rm -f $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)/LICENSE
uninstall:
rm -rf $(DESTDIR)/usr/share/gnome-shell/extensions/$(UUID)
rmdir --ignore-fail-on-non-empty --parents $(DESTDIR) || true
clean:
$(MAKE) -C $(EXTENSION) clean
distclean:
reinstall: uninstall install
upstream:
rm -rf $(EXTENSION)
git clone https://github.com/G-dH/$(EXTENSION) $(EXTENSION)
rm -rf $(EXTENSION)/.git

View file

@ -0,0 +1,147 @@
## Changelog:
### v24 (not released yet)
**Added:**
- Support for horizontally stacked workspaces, available through `Workspaces Thumbnails Position` option.
- Options `Workspaces Scale` and `Workspaces Spacing` adjustments for workspace preview.
- Options `App Search Icon Size` with reduced spacing between icons and `Search Results Width`.
- Option `Workspace Switcher Animation` / `Static Backgroud` for static background while switching workspaces outside of the overview.
- Open preferences by middle click on *Show Applications button* in the dash (default dash only).
- Text shadow in labels of app grid view icons for better visibility on lighter backgrounds, in case you use `Show Static Background` option for the overview.
**Fixed:**
- Improved blur effect transitions performance
- Smaller single windows not properly scaling with workspace preview in `Expose Windows on Hover` mode.
- (upstream bug) Closing windows in the overview fills log with "access to destroyed" object errors.
**Other changes:**
### v23 (v19, v20, v21, v22) (2022-12-22)
**Added:**
- Overview modes `Expose Windows on Hover` and `Static Workspace`
- Option `Always Show Window Titles`
- Option `Dash Background Radius`
- Option `Animation Speed`
**Fixed:**
- Startup animation can still freeze Shell in certain configuration. Injection replaced by complete override of the *startupAnimation()* function.
- Workaround for upstream bug - stuttering first animation of App Grid with many icons.
**Other changes:**
- Preferences split into more sections for better readability.
### v17, v18 (2022-12-07)
**Added:**
- Separate scales for blur amount in overview window picker and app grid/search results.
- Option `Smooth Blur Transitions` allows to disable smooth blur transitions on slower hw.
**Fixed:**
- Startup animation can freeze Shell if `Show Workspace Preview Background` option disabled.
- Secondary workspace thumbnails not visible in overview after starting GS.
- Dash, WS thumbnails and Search entry animations exceptions.
- App grid animates over the Dash instead below it.
**Other changes:**
- Default Dash background opacity set to 40.
- Workspace thumbnail caption style.
### v16 (2022-12-05)
**Fixed:**
- Dash to Dock compatibility.
- Improved static background transitions.
### v15 (2022-12-01)
**Fixed:**
- Dash / ws thumbnails shifted after disable, if ws preview background is disabled.
- Delayed dash / ws thumbnails animation after screen unlocks.
### v14 (2022-11-29 e.g.o only)
**Added:**
- Option `Show Static Background` allows keep background wallpaper in the Activities overview.
- Slider `Blur Static Background` allows add blur to the static background image.
- Search result style - added bit of transparency to look better with static background.
- Link to changelog on About page.
**Fixed:**
- Option `Override Page Up/Down Shortcuts` doesn't work reliably.
**Other changes:**
- Next/Prev page indicators in GS43 are hard to switch from horizontal orientation to vertical, so for now I added style that makes them look more like vertical arrows indicating direction to the prev/next page.
### v13 (2022-10-20)
**Added:**
- Horizontal 3 finger gesture automatically changes its direction depending on the workspace thumbnails position to match direction of the transition animation.
- Vertically oriented Dash items can be selected and activated even with the pointer at the edge of the screen.
- Option `Startup State` allows to change GNOME Shell's startup state from Overview to Desktop.
- Option `Always Show Search Entry` now allows showing the search entry even if the search is not active.
**Fixed**
- 3 finger gestures not having proper orientation when used for the first time after enabling the extension.
- Dash overlapping workspace during transition between normal view and overview when using a 3 finger gesture.
- Dash icons can get out of border when dash size reach its maximum.
- Smaller workspace preview size if DtD set to auto-hide.
- Dash startup animation doesn't respect Dash position, workspace thumbnails don't animate at all.
### v12 2022-09-04
**Fixed:**
- Dash to Dock compatibility issue when original Dash set to vertical position
### v11 2022-09-04
**Added**
- Window preview app icon size
- About page
- Reset button that allows to set all options to their default values
- GNOME Shell 43 support
- Automatic `Fix for Dash to Dock` option activation when DtD detected during enabling
**Fixed**
- App Grid page indicator not vertical
- Workspace thumbnail caption can show window title from different workspace (typically VBox Machine)
### v10 2022-08-03
**Added:**
- Option `Show Workspace Preview Background` allows to hide background wallpaper in the overview.
**Fixed:**
- Broken overview after *Dash to Dock* disabled.
**Other changes:**
- Preferences reorganized
### v9 2022-07-31
**Added:**
- Option `Show Workspace Labels` allows to show label on each workspace thumbnail. Options: `Index`, `Index + Workspace Name`, `Index + App Name`
- Option `Show Workspace Label on Hover` hides the labels until mouse hovers over a thumbnail.
- Option to hide Workspace Thumbnails on primary and secondary monitors individually in their position option list.
- Independent position adjustment for secondary monitors workspace thumbnails.
- Vertical workspace switcher popup.
- Settings page `Content` has been removed and `Disable` options were added to the position option list of the `Dash` and `Workspace Thumbnails`.
### v8 22-07-27
**Added:**
- **Vertical Dash** which can be placed at the left and right side of the screen, in addition to top and bottom positions.
- `Fine Tune Position` sliders for Dash and window switcher.
- `Dash Height Max Scale` option has been replaced by `Dash Max Icon Size` option which allows more precise setting.
### v7 22-07-23
**Fixed:**
- Fix of `Fix for Dash to Dock`
### v6 22-07-23
**Added:**
- Option `Auto` to App Grid Animation menu, changes animation direction according to workspace switcher position and visibility.
- Option `Fix for Dash to Dock` helps to keep VW consistent when DtD updates its position and while updating monitors configuration.
**Fixed:**
- Dash position can be off a little bit with `Center Dash to WS` option.
- Secondary monitor overview transitions
### v5 2022-07-20
**Added:**
- `Content` page in Preferences window with options to hide Dash, workspace switcher and wallpaper in workspace thumbnails.
- New transition animations between Window Picker, App Grid and Desktop views.
- Workspace and App Grid animation options.
- Option to automatically switch `(Shift +) Super + Page Up/Down` keyboard shortcuts for the current workspace orientation.
- Option to expand workspace thumbnails to entire height of the work area at the expense of Dash width.

View file

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

View file

@ -0,0 +1,90 @@
SHELL := /bin/bash
# Replace these with the name and domain of your extension!
NAME := vertical-workspaces
DOMAIN := G-dH.github.com
ZIP_NAME := $(NAME)@$(DOMAIN).zip
# Some of the recipes below depend on some of these files.
JS_FILES = $(shell find -type f -and \( -name "*.js" \))
UI_FILES = $(shell find -type f -and \( -name "*.ui" \))
#RESOURCE_FILES = $(shell find resources -mindepth 2 -type f)
LOCALES_PO = $(wildcard po/*.po)
LOCALES_MO = $(patsubst po/%.po,locale/%/LC_MESSAGES/$(NAME).mo,$(LOCALES_PO))
# These files will be included in the extension zip file.
ZIP_CONTENT = $(JS_FILES) $(LOCALES_MO) \
schemas/* schemas/gschemas.compiled metadata.json LICENSE stylesheet.css
# These six recipes can be invoked by the user.
.PHONY: all zip install uninstall pot clean
all: $(ZIP_CONTENT)
# The zip recipes only bundles the extension without installing it.
zip: $(ZIP_NAME)
# The install recipes creates the extension zip and installs it.
install: $(ZIP_NAME)
gnome-extensions install "$(ZIP_NAME)" --force
@echo "Extension installed successfully! Now restart the Shell ('Alt'+'F2', then 'r' or log out/log in on Wayland)."
# This uninstalls the previously installed extension.
uninstall:
gnome-extensions uninstall "$(NAME)@$(DOMAIN)"
# Use gettext to generate a translation template file.
pot: $(JS_FILES) $(UI_FILES)
@echo "Generating '$(NAME).pot'..."
@xgettext --from-code=UTF-8 \
--add-comments=Translators \
--copyright-holder="GdH" \
--package-name="$(NAME)" \
--output=po/$(NAME).pot \
$(JS_FILES) $(UI_FILES)
# This removes all temporary files created with the other recipes.
clean:
rm -rf $(ZIP_NAME) \
schemas/gschemas.compiled \
locale
# This bundles the extension and checks whether it is small enough to be uploaded to
# extensions.gnome.org. We do not use "gnome-extensions pack" for this, as this is not
# readily available on the GitHub runners.
$(ZIP_NAME): $(ZIP_CONTENT)
@echo "Packing zip file..."
@rm --force $(ZIP_NAME)
@zip $(ZIP_NAME) -- $(ZIP_CONTENT)
@#Check if the zip size is too big to be uploaded
@SIZE=$$(unzip -Zt $(ZIP_NAME) | awk '{print $$3}') ; \
if [[ $$SIZE -gt 5242880 ]]; then \
echo "ERROR! The extension is too big to be uploaded to" \
"the extensions website, keep it smaller than 5 MB!"; \
exit 1; \
fi
# Compiles the gschemas.compiled file from the gschema.xml file.
schemas/gschemas.compiled: schemas/org.gnome.shell.extensions.$(NAME).gschema.xml
@echo "Compiling schemas..."
@glib-compile-schemas schemas
# Compiles the gresource file from the gresources.xml.
#resources/$(NAME).gresource: resources/$(NAME).gresource.xml
# @echo "Compiling resources..."
# @glib-compile-resources --sourcedir="resources" --generate resources/$(NAME).gresource.xml
# Generates the gresources.xml based on all files in the resources subdirectory.
#resources/$(NAME).gresource.xml: $(RESOURCE_FILES)
# @echo "Creating resources xml..."
# @FILES=$$(find "resources" -mindepth 2 -type f -printf "%P\n" | xargs -i echo "<file>{}</file>") ; \
echo "<?xml version='1.0' encoding='UTF-8'?><gresources><gresource> $$FILES </gresource></gresources>" \
> resources/$(NAME).gresource.xml
# Compiles all *.po files to *.mo files.
locale/%/LC_MESSAGES/$(NAME).mo: po/%.po
@echo "Compiling $@"
@mkdir -p locale/$*/LC_MESSAGES
@msgfmt -c -o $@ $<

View file

@ -0,0 +1,72 @@
# V-Shell (former Vertical Workspaces)
A GNOME Shell extension that lets you customize your desktop interface to suit your workflow and style. You can change the horizontal stacking of workspaces to vertical, but also change layout, content, appearance and behavior of the Shell. Forget Dash to Dock and similar dock extensions, with V-Shell you don't need it, just use Static Workspace option.
Supported GNOME versions: 42, 43 (dropped support for 40, 41 - not tested).
## Features
- Vertically or horizontally stacked workspaces.
- Position, orientation, scale and visibility of the overview content.
- Support for secondary monitors, workspaces thumbnails can be placed on the opposite side relative to primary monitor. Removes unnecessary transitions.
- Static background with blur adjustments.
- 2 overview modes with static windows/workspace that expose windows on hover/click on workspace thumbnail. The *Static Workspace* option allows you to use dash like a dock with auto-hide but with all advantages of the activities overview.
- Custom dash icons size and behavior when clicked.
- Dash background transparency and corner radius adjustments.
- App grid icon size, number of columns and rows.
- Custom search view width, app results icons size and number of result lists rows.
- Workspace thumbnails can show background wallpaper and labels (always or on mouse hover) with combination of workspace index, workspace name, name of the current application and current window title.
- Title captions of window previews moves into the preview (originally beneath the preview) and can be set as always visible.
- Static background in workspace switcher (outside overview). Keeps Conky below, DING desktop icons stay visible (if not covered by windows).
- More efficient and visually appealing transition animations (compared to the original Shell) that can be customized or disabled.
- Animation/transition speed adjustment.
- Window search provider with *Space* hotkey allows quick window navigation.
- Recent files search provider with *Ctrl + Space* hotkey.
- Reorder workspaces in overview using *Shift + Scroll* or *Shift + Page Up/Down*
- Adds *Force Quit*, *Close Windows on Current Workspace* and *Move Windows to Current Workspace* items to app icon menu. The latter action can be activated using *Shift + click* on app icon.
[<img alt="" height="100" src="https://raw.githubusercontent.com/andyholmes/gnome-shell-extensions-badge/master/get-it-on-ego.svg?sanitize=true">](https://extensions.gnome.org/extension/5177/vertical-workspaces/)
![Various Overview Layouts](screenshots/screenshot.jpg)
## Installation
### Installation from extensions.gnome.org
The easiest way to install the latest stable release of V-Shell: go to [extensions.gnome.org](https://extensions.gnome.org/extension/5177/vertical-workspaces/) and toggle the switch.
### Installation from the latest Github release
Download the latest release archive using following command:
wget https://github.com/G-dH/vertical-workspaces/releases/latest/download/vertical-workspaces@G-dH.github.com.zip
Install the extension (`--force` switch needs to be used only if some version of the extension is already installed):
gnome-extensions install --force vertical-workspaces@G-dH.github.com.zip
### Installation from GitHub repository
The most recent version in the repository is the one I'm currently using and developing on my own systems, problems may occur, but usually nothing serious. The repository version may change often and doesn't updates automatically on your system, but once the stable release shows up on extensions.gnome.org, it should be updated automatically from there. If you want to help me, use this latest version and report bugs.
You may need to install `git`, `gettext` and `glib2.0` for successful installation.
Navigate to the directory you want to download the source code and execute following commands in the terminal:
git clone https://github.com/G-dH/vertical-workspaces.git
cd vertical-workspaces
make install
### Enabling the extension
After installation you need to enable the extension and access its settings.
- First restart GNOME Shell (`ALt` + `F2`, `r`, `Enter`, or Log Out/Log In if you use Wayland)
- Now you should see *Vertical Workspaces* extension in *Extensions* application (re-open the app if needed to load new data), where you can enable it and access its Preferences window by pressing `Settings` button.
## Credits
This extension uses customized utils and dash modules of the [Vertical Overview extension](https://github.com/RensAlthuis/vertical-overview).
## Buy me a coffee
If you like my extensions and want to keep me motivated, you can also buy me a coffee:
[buymeacoffee.com/georgdh](https://buymeacoffee.com/georgdh)
![Settings window](screenshots/screenshot1.png)
![Settings window](screenshots/screenshot2.png)
![Settings window](screenshots/screenshot3.png)
![Settings window](screenshots/screenshot4.png)
![Settings window](screenshots/screenshot5.png)

View file

@ -0,0 +1,944 @@
/**
* Vertical Workspaces
* appDisplay.js
*
* @author GdH <G-dH@github.com>
* @copyright 2022 - 2023
* @license GPL-3.0
*
*/
'use strict';
const { Clutter, GLib, GObject, Graphene, Meta, Shell, St } = imports.gi;
const DND = imports.ui.dnd;
const Main = imports.ui.main;
const AppDisplay = imports.ui.appDisplay;
const IconGrid = imports.ui.iconGrid;
const { AppMenu } = imports.ui.appMenu;
const PopupMenu = imports.ui.popupMenu;
const BoxPointer = imports.ui.boxpointer;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const IconGridOverride = Me.imports.iconGrid;
const _Util = Me.imports.util;
let _overrides;
let _appGridLayoutSettings;
let _appDisplayScrollConId;
let _appSystemStateConId;
let _appGridLayoutConId;
let _updateAppGridTimeoutId;
let _origAppDisplayAcceptDrop;
let _origAppViewItemAcceptDrop;
let _origAppViewItemHandleDragOver;
let opt;
let shellVersion = _Util.shellVersion;
function update(reset = false) {
if (_overrides) {
_overrides.removeAll();
}
if (reset) {
_setAppDisplayOrientation(false);
_updateAppGridProperties(reset);
_updateAppGridDND(reset);
_restoreOverviewGroup();
_overrides = null;
opt = null;
return;
}
opt = Me.imports.settings.opt;
_overrides = new _Util.Overrides();
if (opt.ORIENTATION === Clutter.Orientation.VERTICAL) {
_overrides.addOverride('AppDisplayVertical', AppDisplay.AppDisplay.prototype, AppDisplayVertical);
_overrides.addOverride('BaseAppViewVertical', AppDisplay.BaseAppView.prototype, BaseAppViewVertical);
}
_overrides.addOverride('AppSearchProvider', AppDisplay.AppSearchProvider.prototype, AppSearchProvider);
// Custom App Grid
_overrides.addOverride('AppFolderDialog', AppDisplay.AppFolderDialog.prototype, AppFolderDialog);
if (shellVersion >= 43) {
// const defined class needs to be touched before real access
AppDisplay.BaseAppViewGridLayout;
_overrides.addOverride('BaseAppViewGridLayout', AppDisplay.BaseAppViewGridLayout.prototype, BaseAppViewGridLayout);
_overrides.addOverride('IconGrid', IconGrid.IconGrid.prototype, IconGridOverride.IconGrid);
}
_overrides.addOverride('FolderView', AppDisplay.FolderView.prototype, FolderView);
_overrides.addInjection('AppFolderDialog', AppDisplay.AppFolderDialog.prototype, AppFolderDialogInjections);
_overrides.addOverride('AppIcon', AppDisplay.AppIcon.prototype, AppIcon);
_overrides.addOverride('BaseAppView', AppDisplay.BaseAppView.prototype, BaseAppView);
_overrides.addOverride('AppDisplay', AppDisplay.AppDisplay.prototype, AppDisplayCommon);
_setAppDisplayOrientation(opt.ORIENTATION === Clutter.Orientation.VERTICAL);
_updateAppGridProperties();
_updateAppGridDND();
}
//---------------------------------------------------------------------------------------------------------
function _setAppDisplayOrientation(vertical = false) {
const CLUTTER_ORIENTATION = vertical ? Clutter.Orientation.VERTICAL : Clutter.Orientation.HORIZONTAL;
const scroll = vertical ? 'vscroll' : 'hscroll';
// app display to vertical has issues - page indicator not working
// global appDisplay orientation switch is not built-in
let appDisplay = Main.overview._overview._controls._appDisplay;
// following line itself only changes in which axis will operate overshoot detection which switches appDisplay pages while dragging app icon to vertical
appDisplay._orientation = CLUTTER_ORIENTATION;
appDisplay._grid.layoutManager._orientation = CLUTTER_ORIENTATION;
appDisplay._swipeTracker.orientation = CLUTTER_ORIENTATION;
appDisplay._swipeTracker._reset();
if (vertical) {
appDisplay._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.EXTERNAL);
// move and change orientation of page indicators
// needs corrections in appgrid page calculations, e.g. appDisplay.adaptToSize() fnc,
// which complicates use of super call inside the function
const pageIndicators = appDisplay._pageIndicators;
pageIndicators.vertical = true;
appDisplay._box.vertical = false;
pageIndicators.x_expand = false;
pageIndicators.y_align = Clutter.ActorAlign.CENTER;
pageIndicators.x_align = Clutter.ActorAlign.START;
const scrollContainer = appDisplay._scrollView.get_parent();
if (shellVersion < 43) {
// remove touch friendly side navigation bars / arrows
appDisplay._hintContainer && scrollContainer.remove_child(appDisplay._hintContainer);
} else {
// moving these bars needs more patching of the appDisplay's code
// for now we just change bars style to be more like vertically oriented arrows indicating direction to prev/next page
appDisplay._nextPageIndicator.add_style_class_name('nextPageIndicator');
appDisplay._prevPageIndicator.add_style_class_name('prevPageIndicator');
}
// setting their x_scale to 0 removes the arrows and avoid allocation issues compared to .hide() them
appDisplay._nextPageArrow.scale_x = 0;
appDisplay._prevPageArrow.scale_x = 0;
} else {
appDisplay._scrollView.set_policy(St.PolicyType.EXTERNAL, St.PolicyType.NEVER);
if (_appDisplayScrollConId) {
appDisplay._adjustment.disconnect(_appDisplayScrollConId);
_appDisplayScrollConId = 0;
}
// restore original page indicators
const pageIndicators = appDisplay._pageIndicators;
pageIndicators.vertical = false;
appDisplay._box.vertical = true;
pageIndicators.x_expand = true;
pageIndicators.y_align = Clutter.ActorAlign.END;
pageIndicators.x_align = Clutter.ActorAlign.CENTER;
// put back touch friendly navigation bars/buttons
const scrollContainer = appDisplay._scrollView.get_parent();
appDisplay._hintContainer && appDisplay._hintContainer.get_parent() == null && scrollContainer.add_child(appDisplay._hintContainer);
appDisplay._nextPageArrow.scale_x = 1;
appDisplay._prevPageArrow.scale_x = 1;
appDisplay._nextPageIndicator.remove_style_class_name('nextPageIndicator');
appDisplay._prevPageIndicator.remove_style_class_name('prevPageIndicator');
}
// value for page indicator is calculated from scroll adjustment, horizontal needs to be replaced by vertical
appDisplay._adjustment = appDisplay._scrollView[scroll].adjustment;
// no need to connect already connected signal (wasn't removed the original one before)
if (!vertical) {
// reset used appdisplay properties
Main.overview._overview._controls._appDisplay.scale_y = 1;
Main.overview._overview._controls._appDisplay.scale_x = 1;
Main.overview._overview._controls._appDisplay.opacity = 255;
return;
}
// update appGrid dot pages indicators
_appDisplayScrollConId = appDisplay._adjustment.connect('notify::value', adj => {
const value = adj.value / adj.page_size;
appDisplay._pageIndicators.setCurrentPosition(value);
});
}
// Set App Grid columns, rows, icon size, incomplete pages
function _updateAppGridProperties(reset = false) {
// columns, rows, icon size
const appDisplay = Main.overview._overview._controls._appDisplay;
appDisplay.visible = true;
// replace isFavorite function to always return false to allow dnd with favorite apps
if (!reset && opt.APP_GRID_INCLUDE_DASH) {
if (!appDisplay._appFavorites._backupIsFavorite) {
appDisplay._appFavorites._backupIsFavorite = appDisplay._appFavorites.isFavorite;
}
appDisplay._appFavorites.isFavorite = () => false;
} else {
if (appDisplay._appFavorites._backupIsFavorite) {
appDisplay._appFavorites.isFavorite = appDisplay._appFavorites._backupIsFavorite;
appDisplay._appFavorites._backupIsFavorite = undefined;
}
}
if (reset) {
appDisplay._grid.layout_manager.fixedIconSize = -1;
appDisplay._grid.layoutManager.allow_incomplete_pages = true;
appDisplay._grid.setGridModes();
if (_appGridLayoutSettings) {
_appGridLayoutSettings.disconnect(_appGridLayoutConId);
_appGridLayoutConId = 0;
_appGridLayoutSettings = null;
}
appDisplay._redisplay();
// secondary call is necessary to properly update app grid
appDisplay._redisplay();
} else {
// update grid on layout reset
if (!_appGridLayoutSettings) {
_appGridLayoutSettings = ExtensionUtils.getSettings('org.gnome.shell');
_appGridLayoutConId = _appGridLayoutSettings.connect('changed::app-picker-layout', _resetAppGrid);
}
// remove icons from App Grid
_resetAppGrid();
const updateGrid = function(rows, columns) {
if (rows === -1 || columns === -1) {
appDisplay._grid.setGridModes();
} else {
appDisplay._grid.setGridModes(
[{ rows, columns }]
);
}
appDisplay._grid._setGridMode(0);
}
appDisplay._grid._currentMode = -1;
if (opt.APP_GRID_ALLOW_CUSTOM) {
updateGrid(opt.APP_GRID_ROWS, opt.APP_GRID_COLUMNS);
} else {
appDisplay._grid.setGridModes();
updateGrid(-1, -1);
}
appDisplay._grid.layoutManager.fixedIconSize = opt.APP_GRID_ICON_SIZE;
appDisplay._grid.layoutManager.allow_incomplete_pages = opt.APP_GRID_ALLOW_INCOMPLETE_PAGES;
// force rebuild icons. size shouldn't be the same as the current one, otherwise can be arbitrary
appDisplay._grid.layoutManager.adaptToSize(200, 200);
appDisplay._redisplay();
_realizeAppDisplay();
}
}
//------ App Grid - DND ----------------------------------------------------------
function _updateAppGridDND(reset) {
if (opt.APP_GRID_ORDER && !reset) {
if (!_appSystemStateConId)
_appSystemStateConId = Shell.AppSystem.get_default().connect('app-state-changed', () => Main.overview._overview._controls._appDisplay._redisplay());
// deny dnd from dash to app grid
if (!_origAppDisplayAcceptDrop)
_origAppDisplayAcceptDrop = AppDisplay.AppDisplay.prototype.acceptDrop;
AppDisplay.AppDisplay.prototype.acceptDrop = function() { return false; };
// deny creating folders by dnd on other icon
if (!_origAppViewItemHandleDragOver)
_origAppViewItemHandleDragOver = AppDisplay.AppViewItem.prototype.handleDragOver;
AppDisplay.AppViewItem.prototype.handleDragOver = () => DND.DragMotionResult.NO_DROP;
if (!_origAppViewItemAcceptDrop)
_origAppViewItemAcceptDrop = AppDisplay.AppViewItem.prototype.acceptDrop;
AppDisplay.AppViewItem.prototype.acceptDrop = () => false;
} else {
if (_appSystemStateConId) {
Shell.AppSystem.get_default().disconnect(_appSystemStateConId);
_appSystemStateConId = 0;
}
if (_origAppDisplayAcceptDrop)
AppDisplay.AppDisplay.prototype.acceptDrop = _origAppDisplayAcceptDrop;
if (_origAppViewItemHandleDragOver)
AppDisplay.AppViewItem.prototype.handleDragOver = _origAppViewItemHandleDragOver;
if (_origAppViewItemAcceptDrop)
AppDisplay.AppViewItem.prototype.acceptDrop = _origAppViewItemAcceptDrop;
}
}
function _realizeAppDisplay() {
// force app grid to build all icons before the first visible animation to remove possible stuttering
// let the main loop realize previous changes before continuing
// don't do this during shell startup
if (Main.layoutManager._startingUp)
return;
if (_updateAppGridTimeoutId) {
GLib.source_remove(_updateAppGridTimeoutId);
}
_updateAppGridTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
1000,
() => {
Main.layoutManager.overviewGroup.opacity = 1;
Main.layoutManager.overviewGroup.scale_x = 0.1;
Main.layoutManager.overviewGroup.show();
Main.overview.dash.showAppsButton.checked = true;
GLib.source_remove(_updateAppGridTimeoutId);
_updateAppGridTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
500,
() => {
_restoreOverviewGroup();
_updateAppGridTimeoutId = 0;
return GLib.SOURCE_REMOVE;
});
}
);
}
function _restoreOverviewGroup() {
Main.overview.dash.showAppsButton.checked = false;
Main.layoutManager.overviewGroup.opacity = 255;
Main.layoutManager.overviewGroup.scale_x = 1;
Main.layoutManager.overviewGroup.hide();
}
//------ appDisplay - Vertical --------------------------------------------------------------------------------
var AppDisplayVertical = {
// correction of the appGrid size when page indicators were moved from the bottom to the right
adaptToSize: function(width, height) {
const [, indicatorWidth] = this._pageIndicators.get_preferred_width(-1);
width -= indicatorWidth;
this._grid.findBestModeForSize(width, height);
const adaptToSize = AppDisplay.BaseAppView.prototype.adaptToSize.bind(this);
adaptToSize(width, height);
},
}
//------ AppDisplay.AppSearchProvider ----------------------------------------------------------------------------------
// App search result size
var AppSearchProvider = {
createResultObject: function(resultMeta) {
if (resultMeta.id.endsWith('.desktop')) {
const icon = new AppDisplay.AppIcon(this._appSys.lookup_app(resultMeta['id']), {
expandTitleOnHover: false,
});
icon.icon.setIconSize(opt.SEARCH_ICON_SIZE);
return icon;
} else {
const icon = new AppDisplay.SystemActionIcon(this, resultMeta);
icon.icon._setSizeManually = true;
icon.icon.setIconSize(opt.SEARCH_ICON_SIZE);
return icon;
}
}
}
var BaseAppViewVertical = {
// this fixes dnd from appDisplay to the workspace thumbnail on the left if appDisplay is on page 1 because of appgrid left overshoot
_pageForCoords: function(x, y) {
return AppDisplay.SidePages.NONE;
},
}
// ------ AppDisplay - Custom App Grid ------------------------------------------------------------------------
var AppDisplayCommon = {
_ensureDefaultFolders: function() {
// disable creation of default folders if user deleted them
},
// apps load adapted for custom sorting and including dash items
_loadApps: function() {
let appIcons = [];
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
try {
appInfo.get_id(); // catch invalid file encodings
} catch (e) {
return false;
}
return (opt.APP_GRID_INCLUDE_DASH || !this._appFavorites.isFavorite(appInfo.get_id())) &&
this._parentalControlsManager.shouldShowApp(appInfo);
});
let apps = this._appInfoList.map(app => app.get_id());
let appSys = Shell.AppSystem.get_default();
const appsInsideFolders = new Set();
this._folderIcons = [];
if (!opt.APP_GRID_ORDER) {
let folders = this._folderSettings.get_strv('folder-children');
folders.forEach(id => {
let path = `${this._folderSettings.path}folders/${id}/`;
let icon = this._items.get(id);
if (!icon) {
icon = new AppDisplay.FolderIcon(id, path, this);
icon.connect('apps-changed', () => {
this._redisplay();
this._savePages();
});
icon.connect('notify::pressed', () => {
if (icon.pressed)
this.updateDragFocus(icon);
});
}
// Don't try to display empty folders
if (!icon.visible) {
icon.destroy();
return;
}
appIcons.push(icon);
this._folderIcons.push(icon);
icon.getAppIds().forEach(appId => appsInsideFolders.add(appId));
});
}
// Allow dragging of the icon only if the Dash would accept a drop to
// change favorite-apps. There are no other possible drop targets from
// the app picker, so there's no other need for a drag to start,
// at least on single-monitor setups.
// This also disables drag-to-launch on multi-monitor setups,
// but we hope that is not used much.
const isDraggable =
global.settings.is_writable('favorite-apps') ||
global.settings.is_writable('app-picker-layout');
apps.forEach(appId => {
if (!opt.APP_GRID_ORDER && appsInsideFolders.has(appId))
return;
let icon = this._items.get(appId);
if (!icon) {
let app = appSys.lookup_app(appId);
icon = new AppDisplay.AppIcon(app, { isDraggable });
icon.connect('notify::pressed', () => {
if (icon.pressed)
this.updateDragFocus(icon);
});
}
appIcons.push(icon);
});
// At last, if there's a placeholder available, add it
if (this._placeholder)
appIcons.push(this._placeholder);
//const runningIDs = Shell.AppSystem.get_default().get_running().map(app => app.get_id());
// remove running apps
/*if (!APP_GRID_INCLUDE_DASH) { // !icon.app means folder
appIcons = appIcons.filter((icon) => this._folderIcons.includes(icon) || !(runningIDs.includes(icon.app.id) || this._appFavorites.isFavorite(icon.id)));
}*/
return appIcons;
},
}
var BaseAppView = {
// adds sorting options and option to add favorites and running apps
_redisplay: function() {
let oldApps = this._orderedItems.slice();
let oldAppIds = oldApps.map(icon => icon.id);
let newApps = this._loadApps().sort(this._compareItems.bind(this));
let newAppIds = newApps.map(icon => icon.id);
let addedApps = newApps.filter(icon => !oldAppIds.includes(icon.id));
let removedApps = oldApps.filter(icon => !newAppIds.includes(icon.id));
// Remove old app icons
removedApps.forEach(icon => {
this._removeItem(icon);
icon.destroy();
});
// Add new app icons, or move existing ones
newApps.forEach(icon => {
const [page, position] = this._getItemPosition(icon);
if (addedApps.includes(icon))
this._addItem(icon, page, position);
else if (page !== -1 && position !== -1) {
this._moveItem(icon, page, position);
}
});
// Reorder App Grid by usage
// sort all alphabetically
if(opt.APP_GRID_ORDER > 0) {
const { itemsPerPage } = this._grid;
let appIcons = this._orderedItems;
appIcons.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase()));
// then sort used apps by usage
if (opt.APP_GRID_ORDER === 2) {
appIcons.sort((a, b) => Shell.AppUsage.get_default().compare(a.app.id, b.app.id));
}
// sort favorites first
if (opt.APP_GRID_INCLUDE_DASH === 2) {
const fav = Object.keys(this._appFavorites._favorites);
appIcons.sort((a, b) => {
let aFav = fav.indexOf(a.id);
if (aFav < 0) aFav = 999;
let bFav = fav.indexOf(b.id);
if (bFav < 0) bFav = 999;
return bFav < aFav;
});
}
// sort running first
if (opt.APP_GRID_INCLUDE_DASH === 2) {
appIcons.sort((a, b) => a.app.get_state() !== Shell.AppState.RUNNING && b.app.get_state() === Shell.AppState.RUNNING);
}
appIcons.forEach((icon, i) => {
const page = Math.floor(i / itemsPerPage);
const position = i % itemsPerPage;
this._moveItem(icon, page, position);
});
this._orderedItems = appIcons;
}
this.emit('view-loaded');
},
_canAccept: function(source) {
return (opt.APP_GRID_ORDER ? false : source instanceof AppDisplay.AppViewItem);
},
// GS <= 42 only, Adapt app grid so it can use all available space
adaptToSize(width, height) {
let box = new Clutter.ActorBox({
x2: width,
y2: height,
});
box = this.get_theme_node().get_content_box(box);
box = this._scrollView.get_theme_node().get_content_box(box);
box = this._grid.get_theme_node().get_content_box(box);
const availWidth = box.get_width();
const availHeight = box.get_height();
const gridRatio = this._grid.layout_manager.columnsPerPage /
this._grid.layout_manager.rowsPerPage;
const spaceRatio = availWidth / availHeight;
let pageWidth, pageHeight;
if (spaceRatio > gridRatio * 1.1) {
// Enough room for some preview
pageHeight = availHeight;
pageWidth = Math.ceil(availHeight * gridRatio);
if (spaceRatio > gridRatio * 1.5) {
// Ultra-wide layout, give some extra space for
// the page area, but up to an extent.
const extraPageSpace = Math.min(
Math.floor((availWidth - pageWidth) / 2), 200); // AppDisplay.MAX_PAGE_PADDING == 200
pageWidth += extraPageSpace;
this._grid.layout_manager.pagePadding.left =
Math.floor(extraPageSpace / 2);
this._grid.layout_manager.pagePadding.right =
Math.ceil(extraPageSpace / 2);
}
} else {
// Not enough room, needs to shrink horizontally
pageWidth = Math.ceil(availWidth * 0.95); // width limiter, original is 0.8
pageHeight = availHeight;
this._grid.layout_manager.pagePadding.left =
Math.floor(availWidth * 0.02);
this._grid.layout_manager.pagePadding.right =
Math.ceil(availWidth * 0.02);
}
this._grid.adaptToSize(pageWidth, pageHeight);
const leftPadding = Math.floor(
(availWidth - this._grid.layout_manager.pageWidth) / 2);
const rightPadding = Math.ceil(
(availWidth - this._grid.layout_manager.pageWidth) / 2);
const topPadding = Math.floor(
(availHeight - this._grid.layout_manager.pageHeight) / 2);
const bottomPadding = Math.ceil(
(availHeight - this._grid.layout_manager.pageHeight) / 2);
this._scrollView.content_padding = new Clutter.Margin({
left: leftPadding,
right: rightPadding,
top: topPadding,
bottom: bottomPadding,
});
this._availWidth = availWidth;
this._availHeight = availHeight;
this._pageIndicatorOffset = leftPadding;
this._pageArrowOffset = Math.max(
leftPadding - 80, 0); // 80 is AppDisplay.PAGE_PREVIEW_MAX_ARROW_OFFSET
}
}
var BaseAppViewGridLayout = {
_getIndicatorsWidth(box) {
const [width, height] = box.get_size();
const arrows = [
this._nextPageArrow,
this._previousPageArrow,
];
const minArrowsWidth = arrows.reduce(
(previousWidth, accessory) => {
const [min] = accessory.get_preferred_width(height);
return Math.max(previousWidth, min);
}, 0);
const idealIndicatorWidth = (width * 0.1/*PAGE_PREVIEW_RATIO*/) / 2;
return Math.max(idealIndicatorWidth, minArrowsWidth);
}
}
// ------------------ AppDisplay.AppFolderDialog - injection --------------------------------------------------------------
var AppFolderDialogInjections = {
_init: function() {
const iconSize = opt.APP_GRID_FOLDER_ICON_SIZE < 0 ? 96 : opt.APP_GRID_FOLDER_ICON_SIZE;
let width = opt.APP_GRID_FOLDER_COLUMNS * (iconSize + 64);
width = Math.max(640, Math.round(width + width / 10));
let height = opt.APP_GRID_FOLDER_ROWS * (iconSize + 64) + 150;
opt.APP_GRID_ALLOW_CUSTOM && this.child.set_style(`
width: ${width}px;
height: ${height}px;
padding: 30px;
`);
}
}
// ------------------ AppDisplay.FolderGrid -----------------------------------------------------------------------
var FolderView = {
_createGrid: function() {
let grid;
if (shellVersion < 43) {
grid = new FolderGrid();
} else {
grid = new FolderGrid43();
}
return grid;
}
}
// folder columns and rows
var FolderGrid = GObject.registerClass(
class FolderGrid extends IconGrid.IconGrid {
_init() {
super._init({
allow_incomplete_pages: false,
columns_per_page: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_COLUMNS : 3,
rows_per_page: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_ROWS : 3,
page_halign: Clutter.ActorAlign.CENTER,
page_valign: Clutter.ActorAlign.CENTER,
});
opt.APP_GRID_ALLOW_CUSTOM && this.set_style('column-spacing: 10px; row-spacing: 10px;');
this.layout_manager.fixedIconSize = opt.APP_GRID_FOLDER_ICON_SIZE;
}
adaptToSize(width, height) {
this.layout_manager.adaptToSize(width, height);
}
});
// only the first access to the const AppDisplay.AppGrid throws an error, so touch it before it's really needed
let FolderGrid43;
AppDisplay.AppGrid;
if (AppDisplay.AppGrid) {
FolderGrid43 = GObject.registerClass(
class FolderGrid43 extends AppDisplay.AppGrid {
_init() {
super._init({
allow_incomplete_pages: false,
columns_per_page: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_COLUMNS : 3,
rows_per_page: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_ROWS : 3,
page_halign: Clutter.ActorAlign.CENTER,
page_valign: Clutter.ActorAlign.CENTER,
});
opt.APP_GRID_ALLOW_CUSTOM && this.set_style('column-spacing: 10px; row-spacing: 10px;');
this.layout_manager.fixedIconSize = opt.APP_GRID_FOLDER_ICON_SIZE;
this.setGridModes([
{
rows: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_ROWS : 3,
columns: opt.APP_GRID_ALLOW_CUSTOM ? opt.APP_GRID_FOLDER_COLUMNS : 3,
},
]);
}
adaptToSize(width, height) {
this.layout_manager.adaptToSize(width, height);
}
});
}
var FOLDER_DIALOG_ANIMATION_TIME = 200; // AppDisplay.FOLDER_DIALOG_ANIMATION_TIME
var AppFolderDialog = {
_zoomAndFadeIn: function() {
let [sourceX, sourceY] =
this._source.get_transformed_position();
let [dialogX, dialogY] =
this.child.get_transformed_position();
this.child.set({
translation_x: sourceX - dialogX,
translation_y: sourceY - dialogY,
scale_x: this._source.width / this.child.width,
scale_y: this._source.height / this.child.height,
opacity: 0,
});
this.ease({
background_color: Clutter.Color.from_pixel(0x00000033), // DIALOG_SHADE_NORMAL
duration: FOLDER_DIALOG_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this.child.ease({
translation_x: 0,
translation_y: 0,
scale_x: 1,
scale_y: 1,
opacity: 255,
duration: FOLDER_DIALOG_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this._needsZoomAndFade = false;
if (this._sourceMappedId === 0) {
this._sourceMappedId = this._source.connect(
'notify::mapped', this._zoomAndFadeOut.bind(this));
}
},
}
function _resetAppGrid(settings = null, key = null) {
if (settings) {
const currentValue = JSON.stringify(settings.get_value('app-picker-layout').deep_unpack());
const emptyValue = JSON.stringify([]);
if (key === 'app-picker-layout' && currentValue != emptyValue)
return;
}
const appDisplay = Main.overview._overview._controls._appDisplay;
const items = appDisplay._orderedItems;
for (let i = items.length - 1; i > -1; i--) {
Main.overview._overview._controls._appDisplay._removeItem(items[i]);
}
// redisplay only from callback
if (settings)
appDisplay._redisplay();
}
// ------------------ AppDisplay.AppIcon - override ---------------------------------------------------------------
function _getWindowApp(metaWin) {
const tracker = Shell.WindowTracker.get_default();
return tracker.get_window_app(metaWin);
}
function _getAppLastUsedWindow(app) {
let recentWin;
global.display.get_tab_list(Meta.TabList.NORMAL_ALL, null).forEach(metaWin => {
const winApp = _getWindowApp(metaWin);
if (!recentWin && winApp == app) {
recentWin = metaWin;
}
});
return recentWin;
}
function _getAppRecentWorkspace(app) {
const recentWin = _getAppLastUsedWindow(app)
if (recentWin)
return recentWin.get_workspace();
return null;
}
var AppIcon = {
activate: function(button) {
const event = Clutter.get_current_event();
const modifiers = event ? event.get_state() : 0;
const isMiddleButton = button && button == Clutter.BUTTON_MIDDLE;
const isCtrlPressed = (modifiers & Clutter.ModifierType.CONTROL_MASK) != 0;
const isShiftPressed = (modifiers & Clutter.ModifierType.SHIFT_MASK) != 0;
const openNewWindow = this.app.can_open_new_window() &&
this.app.state == Shell.AppState.RUNNING &&
(isCtrlPressed || isMiddleButton);
const currentWS = global.workspace_manager.get_active_workspace();
const appRecentWorkspace = _getAppRecentWorkspace(this.app);
let targetWindowOnCurrentWs = false;
if (opt.DASH_FOLLOW_RECENT_WIN) {
targetWindowOnCurrentWs = appRecentWorkspace === currentWS;
} else {
this.app.get_windows().forEach(
w => targetWindowOnCurrentWs = targetWindowOnCurrentWs || (w.get_workspace() === currentWS)
);
}
if ((this.app.state == Shell.AppState.STOPPED || openNewWindow) && !isShiftPressed)
this.animateLaunch();
if (openNewWindow) {
this.app.open_new_window(-1);
// if the app has more than one window (option: and has no window on the current workspace),
// don't activate the app, only move the overview to the workspace with the app's recent window
} else if (opt.DASH_SHOW_WINS_BEFORE && !isShiftPressed && this.app.get_n_windows() > 1 && !targetWindowOnCurrentWs) {
this._scroll = true;
this._scrollTime = Date.now();
//const appWS = this.app.get_windows()[0].get_workspace();
Main.wm.actionMoveWorkspace(appRecentWorkspace);
Main.overview.dash.showAppsButton.checked = false;
return;
} else if (opt.DASH_SHIFT_CLICK_MV && isShiftPressed && this.app.get_windows().length) {
this._moveAppToCurrentWorkspace();
return;
} else if (isShiftPressed) {
return;
} else {
this.app.activate();
}
Main.overview.hide();
},
_moveAppToCurrentWorkspace: function() {
this.app.get_windows().forEach(w => w.change_workspace(global.workspace_manager.get_active_workspace()));
},
popupMenu: function(side = St.Side.LEFT) {
if (shellVersion >= 42)
this.setForcedHighlight(true);
this._removeMenuTimeout();
this.fake_release();
if (!this._getWindowsOnCurrentWs) {
this._getWindowsOnCurrentWs = function() {
const winList = [];
this.app.get_windows().forEach(w => {
if(w.get_workspace() === global.workspace_manager.get_active_workspace()) winList.push(w)
});
return winList;
};
this._windowsOnOtherWs = function() {
return (this.app.get_windows().length - this._getWindowsOnCurrentWs().length) > 0;
};
}
if (!this._menu) {
this._menu = new AppMenu(this, side, {
favoritesSection: true,
showSingleWindows: true,
});
this._menu.setApp(this.app);
this._openSigId = this._menu.connect('open-state-changed', (menu, isPoppedUp) => {
if (!isPoppedUp)
this._onMenuPoppedDown();
});
//Main.overview.connectObject('hiding',
this._hidingSigId = Main.overview.connect('hiding',
() => this._menu.close(), this);
Main.uiGroup.add_actor(this._menu.actor);
this._menuManager.addMenu(this._menu);
}
// once the menu is created, it stays unchanged and we need to modify our items based on current situation
if (this._addedMenuItems && this._addedMenuItems.length) {
this._addedMenuItems.forEach(i => i.destroy());
}
const popupItems =[];
const separator = new PopupMenu.PopupSeparatorMenuItem();
this._menu.addMenuItem(separator);
if (this.app.get_n_windows()) {
if (/*opt.APP_MENU_FORCE_QUIT*/true) {
popupItems.push([_('Force Quit'), () => {
this.app.get_windows()[0].kill();
}]);
}
if (/*opt.APP_MENU_CLOSE_WS*/true) {
const nWin = this._getWindowsOnCurrentWs().length;
if (nWin) {
popupItems.push([_(`Close ${nWin} Windows on Current Workspace`), () => {
const windows = this._getWindowsOnCurrentWs();
let time = global.get_current_time();
for (let win of windows) {
// increase time by 1 ms for each window to avoid errors from GS
win.delete(time++);
}
}]);
}
}
if (/*opt.APP_MENU_MV_TO_WS && */this._windowsOnOtherWs()) {
popupItems.push([_('Move App to Current Workspace'), this._moveAppToCurrentWorkspace]);
}
}
this._addedMenuItems = [];
this._addedMenuItems.push(separator);
popupItems.forEach(i => {
let item = new PopupMenu.PopupMenuItem(i[0]);
this._menu.addMenuItem(item);
item.connect('activate', i[1].bind(this));
this._addedMenuItems.push(item);
});
this.emit('menu-state-changed', true);
this._menu.open(BoxPointer.PopupAnimation.FULL);
this._menuManager.ignoreRelease();
this.emit('sync-tooltip');
return false;
}
}

View file

@ -0,0 +1,829 @@
/**
* Vertical Workspaces
* dash.js
*
* @author GdH <G-dH@github.com>
* @copyright 2022-2023
* @license GPL-3.0
* modified dash module of https://github.com/RensAlthuis/vertical-overview extension
*/
const { Clutter, GLib, GObject, Graphene, Meta, Shell, St } = imports.gi;
const AppDisplay = imports.ui.appDisplay;
const AppFavorites = imports.ui.appFavorites;
const DND = imports.ui.dnd;
const IconGrid = imports.ui.iconGrid;
const Main = imports.ui.main;
const Overview = imports.ui.overview;
const Dash = imports.ui.dash;
const { DashIcon, DashItemContainer, getAppFromSource, DragPlaceholderItem } = imports.ui.dash;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const Util = Me.imports.util;
const _ = Me.imports.settings._;
let verticalOverrides = {};
let _origWorkId;
let _newWorkId;
let _showAppsIconBtnPressId;
// added values to achieve better ability to scale down according the available space
var BaseIconSizes = [16, 24, 32, 40, 44, 48, 56, 64, 72, 80, 96, 112, 128];
const RecentFilesSearchProviderPrefix = Me.imports.recentFilesSearchProvider.prefix;
const WindowSearchProviderPrefix = Me.imports.windowSearchProvider.prefix;
let _overrides;
const DASH_ITEM_LABEL_SHOW_TIME = 150;
let opt;
function update(reset = false) {
if (_overrides) {
_overrides.removeAll();
}
opt = Me.imports.settings.opt;
const dash = Main.overview._overview._controls.layoutManager._dash;
setToHorizontal();
dash.remove_style_class_name("vertical-overview");
dash.remove_style_class_name("vertical-overview-left");
dash.remove_style_class_name("vertical-overview-right");
if (reset) {
_moveDashAppGridIcon(reset);
_connectShowAppsIcon(reset);
_updateSearchWindowsIcon(false);
_updateRecentFilesIcon(false);
dash.visible = true;
dash._background.opacity = 255;
_overrides = null;
opt = null;
return;
}
_overrides = new Util.Overrides();
_overrides.addOverride('DashItemContainer', Dash.DashItemContainer.prototype, DashItemContainerOverride);
_overrides.addOverride('DashCommon', Dash.Dash.prototype, DashCommonOverride);
if (opt.DASH_VERTICAL) {
_overrides.addOverride('Dash', Dash.Dash.prototype, DashOverride);
setToVertical();
dash.add_style_class_name("vertical-overview");
if (!_newWorkId) {
_origWorkId = dash._workId;
dash._workId = Main.initializeDeferredWork(dash._box, dash._redisplay.bind(dash));
_newWorkId = dash._workId;
} else {
dash._workId = _newWorkId;
}
} else {
setToHorizontal();
if (_origWorkId)
dash._workId = _origWorkId;
}
_updateSearchWindowsIcon();
_updateRecentFilesIcon();
_moveDashAppGridIcon();
_connectShowAppsIcon();
if (dash._showWindowsIcon && !dash._showWindowsIconClickedId) {
dash._showWindowsIconClickedId = dash._showWindowsIcon.toggleButton.connect('clicked', (a, c) => c && Util.activateSearchProvider(WindowSearchProviderPrefix));
}
if (dash._recentFilesIcon && !dash._recentFilesIconClickedId) {
dash._recentFilesIconClickedId = dash._recentFilesIcon.toggleButton.connect('clicked', (a, c) => c && Util.activateSearchProvider(RecentFilesSearchProviderPrefix));
}
Main.overview.dash._redisplay();
Main.overview._overview._controls.layoutManager._dash.visible = opt.DASH_VISIBLE;
}
function setToVertical() {
let dash = Main.overview._overview._controls.layoutManager._dash;
dash._box.layout_manager.orientation = Clutter.Orientation.VERTICAL;
dash._dashContainer.layout_manager.orientation = Clutter.Orientation.VERTICAL;
dash._dashContainer.y_expand = false;
dash._dashContainer.x_expand = true;
dash.x_align = Clutter.ActorAlign.START;
dash.y_align = Clutter.ActorAlign.CENTER;
let sizerBox = dash._background.get_children()[0];
sizerBox.clear_constraints();
sizerBox.add_constraint(new Clutter.BindConstraint({
source: dash._showAppsIcon.icon,
coordinate: Clutter.BindCoordinate.WIDTH,
}));
sizerBox.add_constraint(new Clutter.BindConstraint({
source: dash._dashContainer,
coordinate: Clutter.BindCoordinate.HEIGHT,
}));
dash._box.remove_all_children();
dash._separator = null;
dash._queueRedisplay();
dash._adjustIconSize();
dash.add_style_class_name(opt.DASH_LEFT ? 'vertical-overview-left' : 'vertical-overview-right');
}
function setToHorizontal() {
let dash = Main.overview._overview._controls.layoutManager._dash;
if (_origWorkId)
dash._workId = _origWorkId; //pretty sure this is a leak, but there no provided way to disconnect these...
dash._box.layout_manager.orientation = Clutter.Orientation.HORIZONTAL;
dash._dashContainer.layout_manager.orientation = Clutter.Orientation.HORIZONTAL;
dash._dashContainer.y_expand = true;
dash._dashContainer.x_expand = false;
dash.x_align = Clutter.ActorAlign.CENTER;
dash.y_align = 0;
let sizerBox = dash._background.get_children()[0];
sizerBox.clear_constraints();
sizerBox.add_constraint(new Clutter.BindConstraint({
source: dash._showAppsIcon.icon,
coordinate: Clutter.BindCoordinate.HEIGHT,
}));
sizerBox.add_constraint(new Clutter.BindConstraint({
source: dash._dashContainer,
coordinate: Clutter.BindCoordinate.WIDTH,
}));
dash._box.remove_all_children();
dash._separator = null;
dash._queueRedisplay();
dash._adjustIconSize();
}
function _moveDashAppGridIcon(reset = false) {
// move dash app grid icon to the front
const dash = Main.overview._overview._controls.layoutManager._dash;
const appIconPosition = opt.get('showAppsIconPosition', true);
dash._showAppsIcon.remove_style_class_name('show-apps-icon-vertical-hide');
dash._showAppsIcon.remove_style_class_name('show-apps-icon-horizontal-hide');
dash._showAppsIcon.opacity = 255;
if (!reset && appIconPosition === 0) // 0 - start
dash._dashContainer.set_child_at_index(dash._showAppsIcon, 0);
if (reset || appIconPosition === 1) { // 1 - end
const index = dash._dashContainer.get_children().length - 1;
dash._dashContainer.set_child_at_index(dash._showAppsIcon, index);
}
if (!reset && appIconPosition === 2) {// 2 - hide
const style = opt.DASH_VERTICAL ? 'show-apps-icon-vertical-hide' : 'show-apps-icon-horizontal-hide';
dash._showAppsIcon.add_style_class_name(style);
// for some reason even if the icon height in vertical mode should be set to 0 by the style, it stays visible in full size returning height 1px
dash._showAppsIcon.opacity = 0;
}
}
function _connectShowAppsIcon(reset = false) {
if (!reset) {
if (_showAppsIconBtnPressId || Util.dashIsDashToDock()) {
// button is already connected || dash is Dash to Dock
return;
}
Main.overview.dash._showAppsIcon.reactive = true;
_showAppsIconBtnPressId = Main.overview.dash._showAppsIcon.connect('button-press-event', (actor, event) => {
const button = event.get_button();
if (button === Clutter.BUTTON_MIDDLE) {
Util.openPreferences();
} else if (button === Clutter.BUTTON_SECONDARY) {
Util.activateSearchProvider(WindowSearchProviderPrefix);
} else {
return Clutter.EVENT_PROPAGATE;
}
});
} else {
if (_showAppsIconBtnPressId) {
Main.overview.dash._showAppsIcon.disconnect(_showAppsIconBtnPressId);
_showAppsIconBtnPressId = 0;
Main.overview.dash._showAppsIcon.reactive = false;
}
}
}
var DashOverride = {
handleDragOver: function (source, actor, _x, y, _time) {
let app = getAppFromSource(source);
// Don't allow favoriting of transient apps
if (app == null || app.is_window_backed())
return DND.DragMotionResult.NO_DROP;
if (!global.settings.is_writable('favorite-apps'))
return DND.DragMotionResult.NO_DROP;
let favorites = AppFavorites.getAppFavorites().getFavorites();
let numFavorites = favorites.length;
let favPos = favorites.indexOf(app);
let children = this._box.get_children();
let numChildren = children.length;
let boxHeight = this._box.height;
// Keep the placeholder out of the index calculation; assuming that
// the remove target has the same size as "normal" items, we don't
// need to do the same adjustment there.
if (this._dragPlaceholder) {
boxHeight -= this._dragPlaceholder.height;
numChildren--;
}
// Same with the separator
if (this._separator) {
boxHeight -= this._separator.height;
numChildren--;
}
let pos;
if (!this._emptyDropTarget)
pos = Math.floor(y * numChildren / boxHeight);
else
pos = 0; // always insert at the top when dash is empty
// Put the placeholder after the last favorite if we are not
// in the favorites zone
if (pos > numFavorites)
pos = numFavorites;
if (pos !== this._dragPlaceholderPos && this._animatingPlaceholdersCount === 0) {
this._dragPlaceholderPos = pos;
// Don't allow positioning before or after self
if (favPos != -1 && (pos == favPos || pos == favPos + 1)) {
this._clearDragPlaceholder();
return DND.DragMotionResult.CONTINUE;
}
// If the placeholder already exists, we just move
// it, but if we are adding it, expand its size in
// an animation
let fadeIn;
if (this._dragPlaceholder) {
this._dragPlaceholder.destroy();
fadeIn = false;
} else {
fadeIn = true;
}
this._dragPlaceholder = new DragPlaceholderItem();
this._dragPlaceholder.child.set_width(this.iconSize / 2);
this._dragPlaceholder.child.set_height(this.iconSize);
this._box.insert_child_at_index(this._dragPlaceholder,
this._dragPlaceholderPos);
this._dragPlaceholder.show(fadeIn);
}
if (!this._dragPlaceholder)
return DND.DragMotionResult.NO_DROP;
let srcIsFavorite = favPos != -1;
if (srcIsFavorite)
return DND.DragMotionResult.MOVE_DROP;
return DND.DragMotionResult.COPY_DROP;
},
_redisplay: function () {
let favorites = AppFavorites.getAppFavorites().getFavoriteMap();
let running = this._appSystem.get_running();
let children = this._box.get_children().filter(actor => {
return actor.child &&
actor.child._delegate &&
actor.child._delegate.app;
});
// Apps currently in the dash
let oldApps = children.map(actor => actor.child._delegate.app);
// Apps supposed to be in the dash
let newApps = [];
for (let id in favorites)
newApps.push(favorites[id]);
for (let i = 0; i < running.length; i++) {
let app = running[i];
if (app.get_id() in favorites)
continue;
newApps.push(app);
}
// Figure out the actual changes to the list of items; we iterate
// over both the list of items currently in the dash and the list
// of items expected there, and collect additions and removals.
// Moves are both an addition and a removal, where the order of
// the operations depends on whether we encounter the position
// where the item has been added first or the one from where it
// was removed.
// There is an assumption that only one item is moved at a given
// time; when moving several items at once, everything will still
// end up at the right position, but there might be additional
// additions/removals (e.g. it might remove all the launchers
// and add them back in the new order even if a smaller set of
// additions and removals is possible).
// If above assumptions turns out to be a problem, we might need
// to use a more sophisticated algorithm, e.g. Longest Common
// Subsequence as used by diff.
let addedItems = [];
let removedActors = [];
let newIndex = 0;
let oldIndex = 0;
while (newIndex < newApps.length || oldIndex < oldApps.length) {
let oldApp = oldApps.length > oldIndex ? oldApps[oldIndex] : null;
let newApp = newApps.length > newIndex ? newApps[newIndex] : null;
// No change at oldIndex/newIndex
if (oldApp == newApp) {
oldIndex++;
newIndex++;
continue;
}
// App removed at oldIndex
if (oldApp && !newApps.includes(oldApp)) {
removedActors.push(children[oldIndex]);
oldIndex++;
continue;
}
// App added at newIndex
if (newApp && !oldApps.includes(newApp)) {
addedItems.push({
app: newApp,
item: this._createAppItem(newApp),
pos: newIndex
});
newIndex++;
continue;
}
// App moved
let nextApp = newApps.length > newIndex + 1
? newApps[newIndex + 1] : null;
let insertHere = nextApp && nextApp == oldApp;
let alreadyRemoved = removedActors.reduce((result, actor) => {
let removedApp = actor.child._delegate.app;
return result || removedApp == newApp;
}, false);
if (insertHere || alreadyRemoved) {
let newItem = this._createAppItem(newApp);
addedItems.push({
app: newApp,
item: newItem,
pos: newIndex + removedActors.length
});
newIndex++;
} else {
removedActors.push(children[oldIndex]);
oldIndex++;
}
}
for (let i = 0; i < addedItems.length; i++) {
this._box.insert_child_at_index(addedItems[i].item,
addedItems[i].pos);
}
for (let i = 0; i < removedActors.length; i++) {
let item = removedActors[i];
// Don't animate item removal when the overview is transitioning
// or hidden
if (Main.overview.visible && !Main.overview.animationInProgress)
item.animateOutAndDestroy();
else
item.destroy();
}
this._adjustIconSize();
// Skip animations on first run when adding the initial set
// of items, to avoid all items zooming in at once
let animate = this._shownInitially && Main.overview.visible &&
!Main.overview.animationInProgress;
if (!this._shownInitially)
this._shownInitially = true;
for (let i = 0; i < addedItems.length; i++)
addedItems[i].item.show(animate);
// Update separator
const nFavorites = Object.keys(favorites).length;
const nIcons = children.length + addedItems.length - removedActors.length;
if (nFavorites > 0 && nFavorites < nIcons) {
// destroy the horizontal separator if it exists.
// this is incredibly janky, but I can't think of a better way atm.
if (this._separator && this._separator.height !== 1) {
this._separator.destroy();
this._separator = null;
}
if (!this._separator) {
this._separator = new St.Widget({
style_class: 'dash-separator',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
width: this.iconSize,
height: 1,
});
this._box.add_child(this._separator)
}
//FIXME: separator placement is broken (also in original dash)
let pos = nFavorites;
if (this._dragPlaceholder)
pos++;
this._box.set_child_at_index(this._separator, pos);
} else if (this._separator) {
this._separator.destroy();
this._separator = null;
}
// Workaround for https://bugzilla.gnome.org/show_bug.cgi?id=692744
// Without it, StBoxLayout may use a stale size cache
this._box.queue_relayout();
},
_createAppItem: function (app) {
let appIcon = new DashIcon(app);
let indicator = appIcon._dot;
indicator.x_align = opt.DASH_LEFT ? Clutter.ActorAlign.START : Clutter.ActorAlign.END;
indicator.y_align = Clutter.ActorAlign.CENTER;
appIcon.connect('menu-state-changed',
(o, opened) => {
this._itemMenuStateChanged(item, opened);
});
let item = new DashItemContainer();
item.setChild(appIcon);
// Override default AppIcon label_actor, now the
// accessible_name is set at DashItemContainer.setLabelText
appIcon.label_actor = null;
item.setLabelText(app.get_name());
appIcon.icon.setIconSize(this.iconSize);
this._hookUpLabel(item, appIcon);
return item;
}
}
var DashItemContainerOverride = {
// move labels according dash position
showLabel: function() {
if (!this._labelText)
return;
this.label.set_text(this._labelText);
this.label.opacity = 0;
this.label.show();
let [stageX, stageY] = this.get_transformed_position();
const itemWidth = this.allocation.get_width();
const itemHeight = this.allocation.get_height();
const labelWidth = this.label.get_width();
const labelHeight = this.label.get_height();
const xOffset = Math.floor((itemWidth - labelWidth) / 2);
let x = Math.clamp(stageX + xOffset, 0, global.stage.width - labelWidth);
let node = this.label.get_theme_node();
let y;
if (opt.DASH_TOP) {
const yOffset = itemHeight - labelHeight + 3 * node.get_length('-y-offset');
y = stageY + yOffset;
} else if (opt.DASH_BOTTOM) {
const yOffset = node.get_length('-y-offset');
y = stageY - this.label.height - yOffset;
} else if (opt.DASH_RIGHT) {
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
const xOffset = 4;
x = stageX - xOffset - this.label.width;
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
} if (opt.DASH_LEFT) {
const yOffset = Math.floor((itemHeight - labelHeight) / 2);
const xOffset = 4;
x = stageX + this.width + xOffset;
y = Math.clamp(stageY + yOffset, 0, global.stage.height - labelHeight);
}
this.label.set_position(x, y);
this.label.ease({
opacity: 255,
duration: DASH_ITEM_LABEL_SHOW_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
this.label.set_position(x, y);
this.label.ease({
opacity: 255,
duration: DASH_ITEM_LABEL_SHOW_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
}
var DashCommonOverride = {
_adjustIconSize: function () {
// For the icon size, we only consider children which are "proper"
// icons (i.e. ignoring drag placeholders) and which are not
// animating out (which means they will be destroyed at the end of
// the animation)
let iconChildren = this._box.get_children().filter(actor => {
return actor.child &&
actor.child._delegate &&
actor.child._delegate.icon &&
!actor.animatingOut;
});
// add new custom icons into the calculation
if (this._showAppsIcon.visible) {
iconChildren.push(this._showAppsIcon);
}
if (this._showWindowsIcon) {
iconChildren.push(this._showWindowsIcon);
}
if (this._recentFilesIcon) {
iconChildren.push(this._recentFilesIcon);
}
if (!iconChildren.length) return;
if (this._maxWidth === -1 || this._maxHeight === -1)
return;
const dashHorizontal = !opt.DASH_VERTICAL;
const themeNode = this.get_theme_node();
const maxAllocation = new Clutter.ActorBox({
x1: 0,
y1: 0,
x2: dashHorizontal ? this._maxWidth : 42, // not whatever
y2: dashHorizontal ? 42 : this._maxHeight,
});
let maxContent = themeNode.get_content_box(maxAllocation);
let spacing = themeNode.get_length('spacing');
let firstButton = iconChildren[0].child;
let firstIcon = firstButton._delegate.icon;
if (!firstIcon.icon) return;
// Enforce valid spacings during the size request
firstIcon.icon.ensure_style();
const [, , iconWidth, iconHeight] = firstIcon.icon.get_preferred_size();
const [, , buttonWidth, buttonHeight] = firstButton.get_preferred_size();
let availWidth, availHeight, maxIconSize;
if (dashHorizontal) {
availWidth = maxContent.x2 - maxContent.x1;
// Subtract icon padding and box spacing from the available width
availWidth -= iconChildren.length * (buttonWidth - iconWidth) +
(iconChildren.length - 1) * spacing +
2 * this._background.get_theme_node().get_horizontal_padding();
availHeight = this._maxHeight;
availHeight -= this.margin_top + this.margin_bottom;
availHeight -= this._background.get_theme_node().get_vertical_padding();
availHeight -= themeNode.get_vertical_padding();
availHeight -= buttonHeight - iconHeight;
maxIconSize = Math.min(availWidth / iconChildren.length, availHeight, opt.MAX_ICON_SIZE);
} else {
availWidth = this._maxWidth;
availWidth -= this._background.get_theme_node().get_horizontal_padding();
availWidth -= themeNode.get_horizontal_padding();
availWidth -= buttonWidth - iconWidth;
availHeight = maxContent.y2 - maxContent.y1;
availHeight -= iconChildren.length * (buttonHeight - iconHeight) +
(iconChildren.length - 1) * spacing +
2 * this._background.get_theme_node().get_vertical_padding();
maxIconSize = Math.min(availWidth, availHeight / iconChildren.length, opt.MAX_ICON_SIZE);
}
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let iconSizes = BaseIconSizes.map(s => s * scaleFactor);
let newIconSize = BaseIconSizes[0];
for (let i = 0; i < iconSizes.length; i++) {
if (iconSizes[i] <= maxIconSize)
newIconSize = BaseIconSizes[i];
}
/*if (newIconSize == this.iconSize)
return;*/
let oldIconSize = this.iconSize;
this.iconSize = newIconSize;
this.emit('icon-size-changed');
let scale = oldIconSize / newIconSize;
for (let i = 0; i < iconChildren.length; i++) {
let icon = iconChildren[i].child._delegate.icon;
// Set the new size immediately, to keep the icons' sizes
// in sync with this.iconSize
icon.setIconSize(this.iconSize);
// Don't animate the icon size change when the overview
// is transitioning, not visible or when initially filling
// the dash
if (!Main.overview.visible || Main.overview.animationInProgress ||
!this._shownInitially)
continue;
let [targetWidth, targetHeight] = icon.icon.get_size();
// Scale the icon's texture to the previous size and
// tween to the new size
icon.icon.set_size(icon.icon.width * scale,
icon.icon.height * scale);
icon.icon.ease({
width: targetWidth,
height: targetHeight,
duration: Dash.DASH_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
if (this._separator) {
this._separator.ease({
width: dashHorizontal ? 1 : this.iconSize,
height: dashHorizontal ? this.iconSize : 1,
duration: Dash.DASH_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
});
}
},
}
function _updateSearchWindowsIcon(show = opt.SHOW_WINDOWS_ICON) {
const dash = Main.overview._overview._controls.layoutManager._dash;
const dashContainer = dash._dashContainer;
if (dash._showWindowsIcon) {
dashContainer.remove_child(dash._showWindowsIcon);
dash._showWindowsIconClickedId && dash._showWindowsIcon.toggleButton.disconnect(dash._showWindowsIconClickedId);
dash._showWindowsIconClickedId = undefined;
dash._showWindowsIcon && dash._showWindowsIcon.destroy();
dash._showWindowsIcon = undefined;
}
if (!show || !opt.WINDOW_SEARCH_PROVIDER_ENABLED) return;
if (!dash._showWindowsIcon) {
dash._showWindowsIcon = new ShowWindowsIcon();
dash._showWindowsIcon.show(false);
dashContainer.add_child(dash._showWindowsIcon);
dash._hookUpLabel(dash._showWindowsIcon);
}
dash._showWindowsIcon.icon.setIconSize(opt.MAX_ICON_SIZE);
if (opt.SHOW_WINDOWS_ICON === 1) {
dashContainer.set_child_at_index(dash._showWindowsIcon, 0);
} else if (opt.SHOW_WINDOWS_ICON === 2) {
index = dashContainer.get_children().length - 1;
dashContainer.set_child_at_index(dash._showWindowsIcon, index);
}
Main.overview._overview._controls.layoutManager._dash._adjustIconSize();
}
var ShowWindowsIcon = GObject.registerClass(
class ShowWindowsIcon extends Dash.DashItemContainer {
_init() {
super._init();
this._labelText = _('Search Open Windows (Hotkey: Space)');
this.toggleButton = new St.Button({
style_class: 'show-apps',
track_hover: true,
can_focus: true,
toggle_mode: false,
});
this._iconActor = null;
this.icon = new IconGrid.BaseIcon(this.labelText, {
setSizeManually: true,
showLabel: false,
createIcon: this._createIcon.bind(this),
});
this.icon.y_align = Clutter.ActorAlign.CENTER;
this.toggleButton.add_actor(this.icon);
this.toggleButton._delegate = this;
this.setChild(this.toggleButton);
}
_createIcon(size) {
this._iconActor = new St.Icon({
icon_name: 'focus-windows-symbolic',
icon_size: size,
style_class: 'show-apps-icon',
track_hover: true,
});
return this._iconActor;
}
});
function _updateRecentFilesIcon(show = opt.SHOW_RECENT_FILES_ICON) {
const dash = Main.overview._overview._controls.layoutManager._dash;
const dashContainer = dash._dashContainer;
if (dash._recentFilesIcon) {
dashContainer.remove_child(dash._recentFilesIcon);
dash._recentFilesIconClickedId && dash._recentFilesIcon.toggleButton.disconnect(dash._recentFilesIconClickedId);
dash._recentFilesIconClickedId = undefined;
dash._recentFilesIcon && dash._recentFilesIcon.destroy();
dash._recentFilesIcon = undefined;
}
if (!show || !opt.RECENT_FILES_SEARCH_PROVIDER_ENABLED) return;
if (!dash._recentFilesIcon) {
dash._recentFilesIcon = new ShowRecentFilesIcon();
dash._recentFilesIcon.show(false);
dashContainer.add_child(dash._recentFilesIcon);
dash._hookUpLabel(dash._recentFilesIcon);
}
dash._recentFilesIcon.icon.setIconSize(opt.MAX_ICON_SIZE);
if (opt.SHOW_RECENT_FILES_ICON === 1) {
dashContainer.set_child_at_index(dash._recentFilesIcon, 0);
} else if (opt.SHOW_RECENT_FILES_ICON === 2) {
index = dashContainer.get_children().length - 1;
dashContainer.set_child_at_index(dash._recentFilesIcon, index);
}
Main.overview._overview._controls.layoutManager._dash._adjustIconSize();
}
var ShowRecentFilesIcon = GObject.registerClass(
class ShowRecentFilesIcon extends Dash.DashItemContainer {
_init() {
super._init();
this._labelText = _('Search Recent Files (Hotkey: Ctrl + Space)');
this.toggleButton = new St.Button({
style_class: 'show-apps',
track_hover: true,
can_focus: true,
toggle_mode: false,
});
this._iconActor = null;
this.icon = new IconGrid.BaseIcon(this.labelText, {
setSizeManually: true,
showLabel: false,
createIcon: this._createIcon.bind(this),
});
this.icon.y_align = Clutter.ActorAlign.CENTER;
this.toggleButton.add_actor(this.icon);
this.toggleButton._delegate = this;
this.setChild(this.toggleButton);
}
_createIcon(size) {
this._iconActor = new St.Icon({
icon_name: 'document-open-recent-symbolic',
icon_size: size,
style_class: 'show-apps-icon',
track_hover: true,
});
return this._iconActor;
}
});

View file

@ -0,0 +1,564 @@
/**
* Vertical Workspaces
* extension.js
*
* @author GdH <G-dH@github.com>
* @copyright 2022 - 2023
* @license GPL-3.0
*
*/
'use strict';
const { GLib, GObject, Meta, Shell, St } = imports.gi;
const Main = imports.ui.main;
const Util = imports.misc.util;
const Background = imports.ui.background;
const ExtensionUtils = imports.misc.extensionUtils;
const Me = ExtensionUtils.getCurrentExtension();
const Settings = Me.imports.settings;
const _Util = Me.imports.util;
const WindowSearchProvider = Me.imports.windowSearchProvider;
const RecentFilesSearchProvider = Me.imports.recentFilesSearchProvider;
const LayoutOverride = Me.imports.layout;
const AppDisplayOverride = Me.imports.appDisplay;
const WorkspaceThumbnailOverride = Me.imports.workspaceThumbnail;
const WorkspaceOverride = Me.imports.workspace;
const WorkspacesViewOverride = Me.imports.workspacesView;
const WindowPreviewOverride = Me.imports.windowPreview;
const IconGridOverride = Me.imports.iconGrid;
const WorkspaceAnimationOverride = Me.imports.workspaceAnimation;
const WindowManagerOverride = Me.imports.windowManager;
const OverviewOverride = Me.imports.overview;
const OverviewControlsOverride = Me.imports.overviewControls;
const SwipeTrackerOverride = Me.imports.swipeTracker;
const WorkspaceSwitcherPopupOverride = Me.imports.workspaceSwitcherPopup;
const SearchOverride = Me.imports.search;
const PanelOverride = Me.imports.panel;
const DashOverride = Me.imports.dash;
let opt = null;
let _bgManagers;
let _shellSettings;
let _enabled;
let _resetExtensionIfEnabled;
let _prevDash;
let _showingOverviewConId;
let _monitorsChangedSigId;
let _watchDockSigId;
let _resetTimeoutId;
// drop control for app grid sorting modes
let _appSystemStateSigId;
let _origAppViewItemAcceptDrop;
let _origAppViewItemHandleDragOver;
let _origAppDisplayAcceptDrop;
let _enableTimeoutId = 0;
function init() {
ExtensionUtils.initTranslations();
}
function enable() {
// globally readable flag for other extensions
global.verticalWorkspacesEnabled = true;
_enableTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
200,
() => {
activate();
log(`${Me.metadata.name}: enabled`);
_enableTimeoutId = 0;
return GLib.SOURCE_REMOVE;
}
);
}
function disable() {
if (_enableTimeoutId) {
GLib.source_remove(_enableTimeoutId);
_enableTimeoutId = 0;
} else {
reset();
}
global.verticalWorkspacesEnabled = undefined;
log(`${Me.metadata.name}: disabled`);
}
//------------------------------------------------------------------------------------------
function activate() {
_enabled = true;
_bgManagers = [];
Settings.opt = new Settings.Options();
opt = Settings.opt;
_updateSettings();
opt.connect('changed', _updateSettings);
_updateOverrides();
_prevDash = {};
const dash = Main.overview.dash;
_prevDash.dash = dash;
_prevDash.position = dash.position;
_monitorsChangedSigId = Main.layoutManager.connect('monitors-changed', () => _resetExtension(3000));
// static bg animations conflict with startup animation
// enable it on first hiding from the overview and disconnect the signal
_showingOverviewConId = Main.overview.connect('showing', _onShowingOverview);
// if Dash to Dock detected force enable "Fix for DtD" option
if (_Util.dashIsDashToDock()) {
opt.set('fixUbuntuDock', true);
_fixUbuntuDock(true);
} else {
_fixUbuntuDock(opt.get('fixUbuntuDock'));
}
// switch PageUp/PageDown workspace switcher shortcuts
_switchPageShortcuts();
_setStaticBackground(!opt.SHOW_BG_IN_OVERVIEW);
}
function reset() {
_enabled = 0;
_fixUbuntuDock(false);
const reset = true;
_updateOverrides(reset);
if (_monitorsChangedSigId) {
Main.layoutManager.disconnect(_monitorsChangedSigId);
_monitorsChangedSigId = 0;
}
_prevDash = null;
// switch PageUp/PageDown workspace switcher shortcuts
_switchPageShortcuts();
_setStaticBackground(reset);
// remove any position offsets from dash and ws thumbnails
if (!_Util.dashNotDefault()) {
Main.overview.dash.translation_x = 0;
Main.overview.dash.translation_y = 0;
}
Main.overview._overview._controls._thumbnailsBox.translation_x = 0;
Main.overview._overview._controls._thumbnailsBox.translation_y = 0;
Main.overview._overview._controls._searchEntryBin.translation_y = 0;
Main.overview._overview._controls.set_child_above_sibling(Main.overview._overview._controls._workspacesDisplay, null);
if (_showingOverviewConId) {
Main.overview.disconnect(_showingOverviewConId);
_showingOverviewConId = 0;
}
St.Settings.get().slow_down_factor = 1;
Main.overview.dash._background.set_style('');
opt.destroy();
opt = null;
}
function _updateOverrides(reset = false) {
WorkspacesViewOverride.update(reset);
WorkspaceThumbnailOverride.update(reset);
OverviewControlsOverride.update(reset);
OverviewOverride.update(reset);
WorkspaceOverride.update(reset);
WindowPreviewOverride.update(reset);
WindowManagerOverride.update(reset);
AppDisplayOverride.update(reset);
LayoutOverride.update(reset);
DashOverride.update(reset);
PanelOverride.update(reset);
WorkspaceAnimationOverride.update(reset);
WorkspaceSwitcherPopupOverride.update(reset);
SwipeTrackerOverride.update(reset);
SearchOverride.update(reset);
WindowSearchProvider.update(reset);
RecentFilesSearchProvider.update(reset);
}
function _onShowingOverview() {
// store pointer X coordinate for OVERVIEW_MODE 1 window spread - if mouse pointer is steady, don't spread
opt.showingPointerX = global.get_pointer()[0];
if (opt.FIX_UBUNTU_DOCK) {
// workaround for Ubuntu Dock breaking overview allocations after changing position
const dash = Main.overview.dash;
if (_prevDash.dash !== dash || _prevDash.position !== dash._position) {
_resetExtensionIfEnabled(0);
}
}
}
function _resetExtension(timeout = 200) {
if (_resetTimeoutId)
GLib.source_remove(_resetTimeoutId);
_resetTimeoutId = GLib.timeout_add(
GLib.PRIORITY_DEFAULT,
timeout,
() => {
if (!_enabled)
return;
const dash = Main.overview.dash;
if (!timeout && _prevDash.dash && dash !== _prevDash.dash) { // !timeout means DtD workaround callback
_prevDash.dash = dash;
log(`[${Me.metadata.name}]: Dash has been replaced, resetting extension...`);
reset();
activate();
} else if (timeout) {
log(`[${Me.metadata.name}]: resetting extension...`);
reset();
activate();
}
_resetTimeoutId = 0;
return GLib.SOURCE_REMOVE;
}
);
}
//-----------------------------------------------------
function _fixUbuntuDock(activate = true) {
// Workaround for Ubuntu Dock breaking overview allocations after changing monitor configuration and deactivating dock
if (_shellSettings && _watchDockSigId) {
_shellSettings.disconnect(_watchDockSigId);
_watchDockSigId = 0;
}
_shellSettings = null;
if (_resetTimeoutId) {
GLib.source_remove(_resetTimeoutId);
_resetTimeoutId = 0;
}
_resetExtensionIfEnabled = () => {};
if (!activate) {
return;
}
_shellSettings = ExtensionUtils.getSettings( 'org.gnome.shell');
_watchDockSigId = _shellSettings.connect('changed::enabled-extensions', () => _resetExtension());
_resetExtensionIfEnabled = _resetExtension;
}
function _updateSettings(settings, key) {
opt._updateSettings();
opt.WORKSPACE_MIN_SPACING = Main.overview._overview._controls._thumbnailsBox.get_theme_node().get_length('spacing');
// update variables that cannot be processed within settings
const dash = Main.overview.dash;
if (_Util.dashIsDashToDock()) {
opt.DASH_POSITION = dash._position;
opt.DASH_TOP = DASH_POSITION === 0;
opt.DASH_RIGHT = DASH_POSITION === 1;
opt.DASH_BOTTOM = DASH_POSITION === 2;
opt.DASH_LEFT = DASH_POSITION === 3;
opt.DASH_VERTICAL = DASH_LEFT || DASH_RIGHT;
}
opt.MAX_ICON_SIZE = opt.get('dashMaxIconSize', true);
if (opt.MAX_ICON_SIZE < 16) {
opt.MAX_ICON_SIZE = 64;
opt.set('dashMaxIconSize', 64);
}
imports.ui.workspace.WINDOW_PREVIEW_MAXIMUM_SCALE = 0.95;
if (!_Util.dashIsDashToDock()) {// DtD has its own opacity control
Main.overview.dash._background.opacity = Math.round(opt.get('dashBgOpacity', true) * 2.5); // conversion % to 0-255
const radius = opt.get('dashBgRadius', true);
if (radius) {
let style;
switch (opt.DASH_POSITION) {
case 1:
style = `border-radius: ${radius}px 0 0 ${radius}px;`
break;
case 3:
style = `border-radius: 0 ${radius}px ${radius}px 0;`
break;
default:
style = `border-radius: ${radius}px;`
}
Main.overview.dash._background.set_style(style);
} else {
Main.overview.dash._background.set_style('');
}
}
Main.overview.searchEntry.visible = opt.SHOW_SEARCH_ENTRY;
St.Settings.get().slow_down_factor = opt.ANIMATION_TIME_FACTOR;
imports.ui.search.MAX_LIST_SEARCH_RESULTS_ROWS = opt.SEARCH_MAX_ROWS;
opt.START_Y_OFFSET = (opt.PANEL_MODE === 1 && opt.PANEL_POSITION_TOP) ? Main.panel.height : 0;
if (settings)
_applySettings(key);
}
function _applySettings(key) {
_setStaticBackground(!opt.SHOW_BG_IN_OVERVIEW);
_updateOverviewTranslations();
_switchPageShortcuts();
if (key === 'fix-ubuntu-dock')
_fixUbuntuDock(opt.get('fixUbuntuDock', true));
if (key === 'ws-thumbnails-position') {
OverviewControlsOverride.update();
WorkspaceThumbnailOverride.update();
WorkspacesViewOverride.update();
}
if (key?.includes('app-grid')) {
AppDisplayOverride.update();
}
if (key?.includes('panel')) {
PanelOverride.update();
}
if (key?.includes('dash') || key?.includes('app')) {
DashOverride.update();
}
if (key === 'workspace-animation') {
WorkspaceAnimationOverride.update();
}
}
function _switchPageShortcuts() {
if (!opt.get('enablePageShortcuts', true))
return;
const vertical = global.workspaceManager.layout_rows === -1;
const schema = 'org.gnome.desktop.wm.keybindings';
const settings = ExtensionUtils.getSettings(schema);
const keyLeft = 'switch-to-workspace-left';
const keyRight = 'switch-to-workspace-right';
const keyUp = 'switch-to-workspace-up';
const keyDown = 'switch-to-workspace-down';
const keyMoveLeft = 'move-to-workspace-left';
const keyMoveRight = 'move-to-workspace-right';
const keyMoveUp = 'move-to-workspace-up';
const keyMoveDown = 'move-to-workspace-down';
const switchPrevSc = '<Super>Page_Up';
const switchNextSc = '<Super>Page_Down';
const movePrevSc = '<Super><Shift>Page_Up';
const moveNextSc = '<Super><Shift>Page_Down';
let switchLeft = settings.get_strv(keyLeft);
let switchRight = settings.get_strv(keyRight);
let switchUp = settings.get_strv(keyUp);
let switchDown = settings.get_strv(keyDown);
let moveLeft = settings.get_strv(keyMoveLeft);
let moveRight = settings.get_strv(keyMoveRight);
let moveUp = settings.get_strv(keyMoveUp);
let moveDown = settings.get_strv(keyMoveDown);
if (vertical) {
switchLeft.includes(switchPrevSc) && switchLeft.splice(switchLeft.indexOf(switchPrevSc), 1);
switchRight.includes(switchNextSc) && switchRight.splice(switchRight.indexOf(switchNextSc), 1);
moveLeft.includes(movePrevSc) && moveLeft.splice(moveLeft.indexOf(movePrevSc), 1);
moveRight.includes(moveNextSc) && moveRight.splice(moveRight.indexOf(moveNextSc), 1);
switchUp.includes(switchPrevSc) || switchUp.push(switchPrevSc);
switchDown.includes(switchNextSc) || switchDown.push(switchNextSc);
moveUp.includes(movePrevSc) || moveUp.push(movePrevSc);
moveDown.includes(moveNextSc) || moveDown.push(moveNextSc);
} else {
switchLeft.includes(switchPrevSc) || switchLeft.push(switchPrevSc);
switchRight.includes(switchNextSc) || switchRight.push(switchNextSc);
moveLeft.includes(movePrevSc) || moveLeft.push(movePrevSc);
moveRight.includes(moveNextSc) || moveRight.push(moveNextSc);
switchUp.includes(switchPrevSc) && switchUp.splice(switchUp.indexOf(switchPrevSc), 1);
switchDown.includes(switchNextSc) && switchDown.splice(switchDown.indexOf(switchNextSc), 1);
moveUp.includes(movePrevSc) && moveUp.splice(moveUp.indexOf(movePrevSc), 1);
moveDown.includes(moveNextSc) && moveDown.splice(moveDown.indexOf(moveNextSc), 1);
}
settings.set_strv(keyLeft, switchLeft);
settings.set_strv(keyRight, switchRight);
settings.set_strv(keyUp, switchUp);
settings.set_strv(keyDown, switchDown);
settings.set_strv(keyMoveLeft, moveLeft);
settings.set_strv(keyMoveRight, moveRight);
settings.set_strv(keyMoveUp, moveUp);
settings.set_strv(keyMoveDown, moveDown);
}
function _shouldAnimateOverview() {
return !opt.SHOW_WS_PREVIEW_BG || opt.OVERVIEW_MODE2;
}
function _updateOverviewTranslations(dash = null, tmbBox = null, searchEntryBin = null) {
dash = dash ?? Main.overview.dash;
tmbBox = tmbBox ?? Main.overview._overview._controls._thumbnailsBox;
searchEntryBin = searchEntryBin ?? Main.overview._overview._controls._searchEntryBin;
if (!_shouldAnimateOverview()) {
tmbBox.translation_x = 0;
tmbBox.translation_y = 0;
dash.translation_x = 0;
dash.translation_y = 0;
searchEntryBin.translation_x = 0;
searchEntryBin.translation_y = 0;
return;
}
const [tmbTranslation_x, tmbTranslation_y, dashTranslation_x, dashTranslation_y, searchTranslation_y] = _Util.getOverviewTranslations(opt, dash, tmbBox, searchEntryBin);
tmbBox.translation_x = tmbTranslation_x;
tmbBox.translation_y = tmbTranslation_y;
if (!_Util.dashNotDefault()) { // only if dash is not dash to dock
dash.translation_x = dashTranslation_x;
dash.translation_y = dashTranslation_y;
}
searchEntryBin.translation_y = searchTranslation_y;
}
function _setStaticBackground(reset = false) {
_bgManagers.forEach((bg)=> {
Main.overview._overview._controls._stateAdjustment.disconnect(bg._fadeSignal);
bg.destroy();
});
_bgManagers = [];
// if (!SHOW_BG_IN_OVERVIEW && SHOW_WS_PREVIEW_BG) the background is used for static transition from wallpaper to empty bg in the overview
if (reset || (!opt.SHOW_BG_IN_OVERVIEW && opt.SHOW_WS_PREVIEW_BG))
return;
for (const monitor of Main.layoutManager.monitors) {
const bgManager = new Background.BackgroundManager({
monitorIndex: monitor.index,
container: Main.layoutManager.overviewGroup,
vignette: true,
});
bgManager.backgroundActor.content.vignette_sharpness = 0;
bgManager.backgroundActor.content.brightness = 1;
bgManager._fadeSignal = Main.overview._overview._controls._stateAdjustment.connect('notify::value', (v) => {
_updateStaticBackground(bgManager, v.value, v);
});
if (monitor.index === global.display.get_primary_monitor()) {
bgManager._primary = true;
_bgManagers.unshift(bgManager); // primary monitor first
} else {
bgManager._primary = false;
_bgManagers.push(bgManager);
}
}
}
function _updateStaticBackground(bgManager, stateValue, stateAdjustment = null) {
if (!opt.SHOW_BG_IN_OVERVIEW && !opt.SHOW_WS_PREVIEW_BG) {
// if no bg shown in the overview, fade out the wallpaper
if (!(opt.OVERVIEW_MODE2 && opt.WORKSPACE_MODE && stateAdjustment?.getStateTransitionParams().finalState === 1))
bgManager.backgroundActor.opacity = Util.lerp(255, 0, Math.min(stateValue, 1));
} else {
let VIGNETTE, BRIGHTNESS, bgValue;
if (opt.OVERVIEW_MODE2 && stateValue <= 1 && !opt.WORKSPACE_MODE) {
VIGNETTE = 0;
BRIGHTNESS = 1;
bgValue = stateValue;
} else {
VIGNETTE = 0.2;
BRIGHTNESS = 0.95;
if (opt.OVERVIEW_MODE2 && stateValue > 1 && !opt.WORKSPACE_MODE) {
bgValue = stateValue - 1;
} else {
bgValue = stateValue;
}
}
let blurEffect = bgManager.backgroundActor.get_effect('blur');
if (!blurEffect) {
blurEffect = new Shell.BlurEffect({
brightness: 1,
sigma: 0,
mode: Shell.BlurMode.ACTOR,
})
bgManager.backgroundActor.add_effect_with_name('blur', blurEffect);
}
bgManager.backgroundActor.content.vignette_sharpness = VIGNETTE;
bgManager.backgroundActor.content.brightness = BRIGHTNESS;
let vignetteInit, brightnessInit, sigmaInit;
if (opt.SHOW_BG_IN_OVERVIEW && opt.SHOW_WS_PREVIEW_BG) {
vignetteInit = VIGNETTE;
brightnessInit = BRIGHTNESS;
sigmaInit = opt.OVERVIEW_BG_BLUR_SIGMA;
} else {
vignetteInit = 0;
brightnessInit = 1;
sigmaInit = 0
}
if (opt.OVERVIEW_MODE2) {
bgManager.backgroundActor.content.vignette_sharpness = Util.lerp(vignetteInit, VIGNETTE, bgValue);
bgManager.backgroundActor.content.brightness = Util.lerp(brightnessInit, BRIGHTNESS, bgValue);
} else {
bgManager.backgroundActor.content.vignette_sharpness = Util.lerp(vignetteInit, VIGNETTE, Math.min(stateValue, 1));
bgManager.backgroundActor.content.brightness = Util.lerp(brightnessInit, BRIGHTNESS, Math.min(stateValue, 1));
}
if (opt.OVERVIEW_BG_BLUR_SIGMA || opt.APP_GRID_BG_BLUR_SIGMA) {
// reduce number of steps of blur transition to improve performance
const step = opt.SMOOTH_BLUR_TRANSITIONS ? 0.05 : 0.2;
const progress = stateValue - (stateValue % step);
if (opt.SHOW_WS_PREVIEW_BG && stateValue < 1) { // no need to animate transition, unless appGrid state is involved, static bg is covered by the ws preview bg
if (blurEffect.sigma !== opt.OVERVIEW_BG_BLUR_SIGMA)
blurEffect.sigma = opt.OVERVIEW_BG_BLUR_SIGMA;
} else if (stateValue < 1) {
const sigma = Math.round(Util.lerp(0, opt.OVERVIEW_BG_BLUR_SIGMA, progress));
if (sigma !== blurEffect.sigma) {
blurEffect.sigma = sigma;
}
} else if (stateValue > 1 && bgManager._primary) {
const sigma = Math.round(Util.lerp(opt.OVERVIEW_BG_BLUR_SIGMA, opt.APP_GRID_BG_BLUR_SIGMA, progress - 1));
if (sigma !== blurEffect.sigma) {
blurEffect.sigma = sigma;
}
} else if (stateValue === 1) {
blurEffect.sigma = opt.OVERVIEW_BG_BLUR_SIGMA;
} else if (stateValue === 0) {
blurEffect.sigma = 0;
}
}
}
}

View file

@ -0,0 +1,26 @@
/**
* Vertical Workspaces
* iconGrid.js
*
* @author GdH <G-dH@github.com>
* @copyright 2022 - 2023
* @license GPL-3.0
*
*/
'use strict';
// ------------------ IconGrid - override -------------------------------------------------------------------------
// workaround - silence page -2 error on gnome 43 during cleaning appgrid
var IconGrid = {
getItemsAtPage: function(page) {
if (page < 0 || page > this.nPages)
return [];
//throw new Error(`Page ${page} does not exist at IconGrid`);
const layoutManager = this.layout_manager;
return layoutManager.getItemsAtPage(page);
}
}

View file

@ -0,0 +1,71 @@
/**
* Vertical Workspaces
* layout.js
*
* panel barrier should follow panel position
* or disable it to not collide with Custom Hot Corners barriers
*
* @author GdH <G-dH@github.com>
* @copyright 2022 - 2023
* @license GPL-3.0
*
*/
'use strict';
const { Meta } = imports.gi;
const Main = imports.ui.main;
const Layout = imports.ui.layout;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const _Util = Me.imports.util;
let _overrides;
let opt;
function update(reset = false) {
if (_overrides) {
_overrides.removeAll();
}
if (reset) {
_overrides = null;
opt = null;
return;
}
opt = Me.imports.settings.opt;
_overrides = new _Util.Overrides();
_overrides.addOverride('LayoutManager', Layout.LayoutManager.prototype, LayoutManager);
Main.layoutManager._updatePanelBarrier();
}
var LayoutManager = {
_updatePanelBarrier: function() {
if (this._rightPanelBarrier) {
this._rightPanelBarrier.destroy();
this._rightPanelBarrier = null;
}
// disable the barrier
return;
if (!this.primaryMonitor)
return;
if (this.panelBox.height) {
let primary = this.primaryMonitor;
this._rightPanelBarrier = new Meta.Barrier({
display: global.display,
x1: primary.x + primary.width, y1: opt.PANEL_POSITION_TOP ? primary.y : primary.y + primary.height - this.panelBox.height,
x2: primary.x + primary.width, y2: opt.PANEL_POSITION_TOP ? primary.y + this.panelBox.height : primary.y + primary.height,
directions: Meta.BarrierDirection.NEGATIVE_X,
});
}
}
}

View file

@ -0,0 +1,13 @@
{
"name": "Vertical Workspaces",
"uuid": "vertical-workspaces@G-dH.github.com",
"description": "A extension that allows you to customize your desktop interface to suit your workflow and eyes. You can change the horizontal stacking of workspaces to vertical, but also change layout, content, appearance and behavior of Activities overview and workspace switcher.",
"shell-version": [
"42",
"43"
],
"url": "https://github.com/G-dH/vertical-workspaces",
"gettext-domain": "vertical-workspaces",
"settings-schema": "org.gnome.shell.extensions.vertical-workspaces",
"version": 23.5
}

Some files were not shown because too many files have changed in this diff Show more