initial commit
All checks were successful
PikaOS Package Build & Release (amd64-v3) / build (push) Successful in 32s

This commit is contained in:
Ward from fusion-voyager-3 2024-09-27 18:27:15 +03:00
parent 70a74f454f
commit beb3c30800
109 changed files with 18201 additions and 9255 deletions

View File

@ -1 +1 @@
4
1

View File

@ -1,4 +1,4 @@
gnome-shell-extension-just-perfection (46.0-101pika1) pika; urgency=medium
gnome-shell-extension-dash-to-panel (63-101pika1) pika; urgency=medium
* Initial Creation

View File

@ -0,0 +1,26 @@
Source: gnome-shell-extension-dash-to-panel
Section: gnome
Priority: optional
Maintainer: Marco Trevisan <marco@ubuntu.com>
Build-Depends: debhelper (>= 10),
eslint <!nocheck>,
libglib2.0-bin,
node-chalk <!nocheck>,
node-js-yaml <!nocheck>,
node-strip-ansi <!nocheck>,
libgettextpo-dev,
gettext,
sassc
Standards-Version: 4.1.1
Package: gnome-shell-extension-dash-to-panel
Architecture: all
Depends: ${misc:Depends}, gnome-shell (>= 46~), gnome-shell (<< 48~), gnome-shell-extension-prefs
Description: combines the dash and the GNOME main panel into a single panel
Moves the dash into the GNOME main panel so that the application launchers
and system tray are combined into a single panel, similar to that found
in KDE Plasma and Windows 7+.
.
A separate dock is no longer needed for easy access to running and
favorited applications.

View File

@ -0,0 +1,78 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dash-to-panel
Source: https://github.com/jderose9/dash-to-panel
Files: *
Copyright: 2016-2021, Jason DeRose (https://github.com/jderose9)
2016-2017, Artyom Zorin (https://github.com/ArtyomZorin)
License: GPL-2+
Files: po/cs.po
Copyright: 2017-2018 Milan Zink <zeten30@gmail.com>
License: GPL-2+
Files: po/es.po
Copyright: 2017 Fran Glais <franglais125@gmail.com>
License: GPL-2+
Files: po/gl.po
Copyright: 2020 Fran Dieguez <frandieguez@gnome.org>
License: GPL-2+
Files: po/pt_BR.po
Copyright: 2017 Fábio Nogueira <fnogueira@gnome.org>
License: GPL-2+
Files: po/ru.po
Copyright: 2017 Alex Gluck <alexgluck@bk.ru>
License: GPL-2+
Files: po/hu.po
Copyright: 2017 Balázs Úr <urbalazs@gmail.com>
License: GPL-2+
Files: po/it.po
Copyright: 2018 Enrico Bella <enricobe@hotmail.com>
License: GPL-2+
Files: po/ja.po
Copyright: 2017-2018 Shinichirou Yamada <yamada_strong_yamada_nice_64bit@yahoo.co.jp>
2018 sicklylife.jp <translation@sicklylife.jp>
License: GPL-2+
Files: po/kk.po
Copyright: 2017 Baurzhan Muftakhidinov <baurthefirst@gmail.com>
License: GPL-2+
Files: po/zh_CN.po
po/zh_TW.po
Copyright: 2017 Boyuan Yang <073plan@gmail.com>
License: GPL-2+
Files: po/tr.po
Copyright: 2018 Serdar Sağlam <teknomobil@yandex.com>
License: GPL-2+
Files: po/sk.po
Copyright: 2021 Jose Riha <jose1711@gmail.com>
License: GPL-2+
Files: debian/*
Copyright: 2017-2021 Jonathan Carter <jcc@debian.org>
License: GPL-2+
License: GPL-2+
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.
.
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/>.
.
On Debian systems, the complete text of the GNU General
Public License can be found in `/usr/share/common-licenses/GPL-2'.

View File

@ -0,0 +1,341 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library 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.
<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 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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 Library General
Public License instead of this License.

View File

@ -0,0 +1,194 @@
<p align="left">
<img src="/media/design/svg/D2P_logo.svg" width="620"/>
</p>
<p align="left">
<img src="/media/design/svg/GitHub_logo.svg" width="120"/>&nbsp;
<a href="https://extensions.gnome.org/extension/1160/dash-to-panel/" style="margin-left: 20px">
<img src="/media/design/svg/Gnome_logo.svg" width="120px"/>
</a>&nbsp;
<a href="https://www.paypal.com/donate/?hosted_button_id=5DCVELP7BSAVQ">
<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" />
</a>
</p>
![](media/design/png/dtp-main-p2.png)
### Introduction
Dash to Panel is an icon taskbar for Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.
Beyond that, just about every aspect of the panel is fully customizable. From positioning and scaling panel elements to running indicators to multi-monitor display, to window previews and even intellihide, Dash to Panel has everything you need to make your workspace feel like home.
### Features
|Customizable appearance|
|:-----:|
|![screenshot](media/design/gif/customizable.gif)|
|Hide & show panel elements and set their positions, sizes & colors|
##
<table>
<thead>
<tr>
<th colspan=2>Customizable running indicators</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center">Metro</td>
<td align="center">Ciliora/Dashes</td>
</tr>
<tr>
<td align="center"><img src="media/design/png/metro.png"/></td>
<td align="center"><img src="media/design/png/ciliora-dashes.png"/></td>
</tr>
<tr>
<td align="center">Ciliora</td>
<td align="center">Squares/Segmented</td>
</tr>
<tr>
<td align="center"><img src="media/design/png/ciliora.png"/></td>
<td align="center"><img src="media/design/png/squares-segments.png"/></td>
</tr>
<tr>
<td align="center">Dashes</td>
<td align="center">Dots/Solid</td>
</tr>
<tr>
<td align="center"><img src="media/design/png/dashes.png"/></td>
<td align="center"><img src="media/design/png/dots-solid.png"/></td>
</tr>
<tr>
<td colspan=2 align="center">Set position, style, weight & color of running indicators to easily and quickly identify focused and unfocused applications</td>
</tr>
</tbody>
</table>
##
|Live Previews on Hover|
|:-----:|
|![screenshot](media/design/gif/previews.gif)|
|Hover over the launcher icon for an open application to get a live window preview|
##
|Launch by Number|
|:-----:|
|![](media/design/png/indicators-num.png.png)|
|Optionally launch your favorite applications via keyboard|
##
|Panel Intellihide|
|:-----:|
|![Intellihide](media/design/gif/Intellihide.gif)|
|Hide and reveal the panel according to your set preferences|
##
|Additional Features|Feature Implemented|
|:-----|:-----:|
|Add "Show Desktop" button to panel|![](media/design/png/done.png)|
|Isolate running apps by workspaces and/or monitors|![](media/design/png/done.png)|
|Custom click behaviors (launch new window, cycle open windows, minimize, etc)|![](media/design/png/done.png)|
|Integrate native Gnome appMenu into right-click secondary menu|![](media/design/png/done.png)|
|Multi-monitor support|![](media/design/png/done.png)|
|Dynamic transparency|![](media/design/png/done.png)|
|Ungroup application windows|![](media/design/png/done.png)|
|Export and import settings|![](media/design/png/done.png)|
##
### Installation
**To install the most recent official release:
[Visit Dash-to-Panel at GNOME Extensions](https://extensions.gnome.org/extension/1160/dash-to-panel/)**
To install a development version from source, please see the [Installation wiki page](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Installation).
##
### FAQ
How do I customize the panel? [See the Wiki](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Enable-and-Customize#customize-it)
How do I embed my bottom left notification drawer into the panel like a system tray? [Top Icons Plus](https://extensions.gnome.org/extension/2311/topicons-plus) or [(K)StatusNotifierItem/AppIndicator Support](https://extensions.gnome.org/extension/615/appindicator-support)
How do I add a traditional start menu? [Arc Menu](https://extensions.gnome.org/extension/3628/arcmenu/)
How do I disable the hot corner? [No Topleft Hot Corner](https://extensions.gnome.org/extension/118/no-topleft-hot-corner)
How do I move the notifications to somewhere other than the top center? [Notification Banner Reloaded](https://extensions.gnome.org/extension/4651/notification-banner-reloaded/)
How do I display Minimize & Maximize buttons? In the Tweak Tool application, turn on `Windows > Titlebar Buttons > Minimize & Maximize`.
How do I reset the extension to its default settings? `dconf reset -f /org/gnome/shell/extensions/dash-to-panel/`.
##
### Themes
While this extension works well with most popular Gnome Shell themes, the following themes are known to have explicitly added custom styles for this extension:
- [Ciliora Tertia](https://github.com/zagortenay333/ciliora-tertia-shell) / [Ciliora Secunda](https://github.com/zagortenay333/ciliora-secunda-shell)
- [Plano](https://github.com/lassekongo83/plano-theme)
##
### Compatibility
This extension has been tested with Gnome 3.18+.
This extension manipulates the Gnome Main Panel, aka Top Bar. So, most other extensions which operate on the top bar should be compatible.
##
### Volunteers needed!
This extension could be even better with your help! Any items in the issue tracker labelled `help wanted` or `good first issue` are up for grabs. For more info, see the [Contributing wiki page](https://github.com/home-sweet-gnome/dash-to-panel/wiki/Contributing).
##
### Credits
This extension is developed and maintained by [@jderose9](https://github.com/jderose9) and [@charlesg99](https://github.com/charlesg99).
Significant portions of code in this extension were derived from [Dash-to-Dock](https://micheleg.github.io/dash-to-dock/index.html).
Additional credits: This extension leverages the work for [ZorinOS Taskbar](https://github.com/ZorinOS/zorin-taskbar) (used in [ZorinOS](https://zorinos.com/)) to show window previews and allow the dash from [Dash-to-Dock](https://micheleg.github.io/dash-to-dock/index.html) to be embedded in the Gnome main panel.
Code to set anchor position taken from [Thoma5/gnome-shell-extension-bottompanel](https://github.com/Thoma5/gnome-shell-extension-bottompanel).
Pattern for moving panel contents based on [Frippery Move Clock](http://frippery.org/extensions/) by R M Yorston.
Ideas for recursing child actors and assigning inline styles are based on code from the extension [StatusAreaHorizontalSpacing](https://bitbucket.org/mathematicalcoffee/status-area-horizontal-spacing-gnome-shell-extension).
##
#### Thanks to the following people for contributing via pull requests:
- @franglais125 for launching apps by number (w/ overlay), bug fixes, and issue support
- @LinxGem33 and @sbarrett322 for artwork, logos, screenshots and design effort
- @dziku1337 for peek mode in window previews
- @robrobinbin for configuring appMenu on/off in the panel
- @MartinPL for toggling favorites on/off in panel
- @jackwickham for thumbnail middle and right click actions
- @abakkk for centering the taskbar icons in the panel, and animated taskbar hovering
- @quasoft for changing of font weight of ungrouped application titles
- @jordanribera for using icon's dominant color as running indicator color
- @tper0700 for dynamically building context menu based on system capabilities
- @levacic for configurable minimized application title font color
- @l3nn4rt for toggling workspace switch popup
- @hlechner for adjustable show desktop line color and window preview icon size
- @ArtyomZorin for animated urgent icons
- @jvpessoa10 for additional click window cycle options
- @marksvc for assigning percent of display for panel length
- @philippun1 for GNOME 40 support :rocket:
- @HaselLoyance for toggle for notification counter badge
- @rastersoft for Desktop Icons NG integration
#### Bug Fixes:
@imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu, @l3nn4rt, @Melix19, @Aikatsui, @melix99, @kyrillzorin, @oneshadab, @CorvetteCole, @vantu5z, @spectreseven1138
#### Documentation Improvements:
@BoQsc, @zakkak, @dandv
#### Translations:
@frnogueira / @victorwpbastos / @vagkaefer (pt_BR), @zeten30 (cs), @franglais125 / @calotam / @oeramirez (es), @LaurentTreguier / @SolarLiner (fr), @elsieholmes (uk), @hosiet (zh\_CN), @jonnius / @linuxr01 / @daPhipz (de), @urbalazs / @pappfer (hu), @crayxt (kk), @pkomur / @MartinPL / @alex4401 (pl), @AlexGluck / @GoodNike / @rjapolov / @vantu5z (ru), @sicklylife-jp / @ryonakano / @nexryai (ja), @oltulu / @TeknoMobil / @daenney (tr), @sbadux / @kowalski7cc / @l3nn4rt (it), @OriginCode / @pan93412 (zh\_TW), @ojn (sv), @frandieguez (gl), @kuroehanako / @MarongHappy (ko)
##
### License & Terms ![](media/design/png/copyleft-16.png)
Dash to Panel is available under the terms of the GPL-v2 or later license See [`COPYING`](https://github.com/home-sweet-gnome/dash-to-panel/blob/master/COPYING) for details.
![](https://img.shields.io/badge/Language-JavaScript-yellow.svg) ![](https://img.shields.io/badge/Licence-GPL--2.0-blue.svg)

View File

@ -0,0 +1,165 @@
/*
* The code in this file is distributed under a "1-clause BSD license",
* which makes it compatible with GPLv2 and GPLv3 too, and others.
*
* License text:
*
* Copyright (C) 2021 Sergio Costas (rastersoft@gmail.com)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
/*******************************************************************************
* Integration class
*
* This class must be added to other extensions in order to integrate
* them with Desktop Icons NG. It allows an extension to notify how much margin
* it uses in each side of each monitor.
*
* DON'T SEND PATCHES TO THIS FILE TO THE EXTENSION MAINTAINER. SEND THEM TO
* DESKTOP ICONS NG MAINTAINER: https://gitlab.com/rastersoft/desktop-icons-ng
*
* In the *enable()* function, create a *DesktopIconsUsableAreaClass()*
* object with
*
* new DesktopIconsIntegration.DesktopIconsUsableAreaClass(object);
*
* Now, in the *disable()* function just call to the *destroy()* method before
* nullifying the pointer. You must create a new object in enable() the next
* time the extension is enabled.
*
* In your code, every time you change the margins, you should call first to
* *resetMargins()* method to clear the current margins, and then call to
* *setMargins(...)* method as many times as you need to set the margins in each
* monitor. You don't need to call it for all the monitors, only for those where
* you are painting something. If you don't set values for a monitor, they will
* be considered zero.
*
* The margins values are relative to the monitor border.
*
*******************************************************************************/
import GLib from 'gi://GLib';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as ExtensionUtils from 'resource:///org/gnome/shell/misc/extensionUtils.js';
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
const IDENTIFIER_UUID = "130cbc66-235c-4bd6-8571-98d2d8bba5e2";
export class DesktopIconsUsableAreaClass {
_checkIfExtensionIsEnabled(extension) {
return (extension?.state === ExtensionUtils.ExtensionState.ENABLED) ||
(extension?.state === ExtensionUtils.ExtensionState.ACTIVE);
}
constructor() {
const Me = Extension.lookupByURL(import.meta.url);
this._UUID = Me.uuid;
this._extensionManager = Main.extensionManager;
this._timedMarginsID = 0;
this._margins = {};
this._emID = this._extensionManager.connect('extension-state-changed', (_obj, extension) => {
if (!extension)
return;
// If an extension is being enabled and lacks the DesktopIconsUsableArea object, we can avoid launching a refresh
if (this._checkIfExtensionIsEnabled(extension)) {
this._sendMarginsToExtension(extension);
return;
}
// if the extension is being disabled, we must do a full refresh, because if there were other extensions originally
// loaded after that extension, those extensions will be disabled and enabled again without notification
this._changedMargins();
});
}
/**
* Sets or updates the top, bottom, left and right margins for a
* monitor. Values are measured from the monitor border (and NOT from
* the workspace border).
*
* @param {int} monitor Monitor number to which set the margins.
* A negative value means "the primary monitor".
* @param {int} top Top margin in pixels
* @param {int} bottom Bottom margin in pixels
* @param {int} left Left margin in pixels
* @param {int} right Right margin in pixels
*/
setMargins(monitor, top, bottom, left, right) {
this._margins[monitor] = {
'top': top,
'bottom': bottom,
'left': left,
'right': right
};
this._changedMargins();
}
/**
* Clears the current margins. Must be called before configuring the monitors
* margins with setMargins().
*/
resetMargins() {
this._margins = {};
this._changedMargins();
}
/**
* Disconnects all the signals and removes the margins.
*/
destroy() {
if (this._emID) {
this._extensionManager.disconnect(this._emID);
this._emID = 0;
}
if (this._timedMarginsID) {
GLib.source_remove(this._timedMarginsID);
this._timedMarginsID = 0;
}
this._margins = null;
this._changedMargins();
}
_changedMargins() {
if (this._timedMarginsID) {
GLib.source_remove(this._timedMarginsID);
}
this._timedMarginsID = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 100, ()=> {
this._sendMarginsToAll();
this._timedMarginsID = 0;
return GLib.SOURCE_REMOVE;
});
}
_sendMarginsToAll() {
this._extensionManager.getUuids().forEach(uuid =>
this._sendMarginsToExtension(this._extensionManager.lookup(uuid)));
}
_sendMarginsToExtension(extension) {
// check that the extension is an extension that has the logic to accept
// working margins
if (!this._checkIfExtensionIsEnabled(extension))
return;
const usableArea = extension?.stateObj?.DesktopIconsUsableArea;
if (usableArea?.uuid === IDENTIFIER_UUID)
usableArea.setMarginsForExtension(this._UUID, this._margins);
}
}

View File

@ -0,0 +1,144 @@
/*
* Dash-To-Panel extension for Gnome 3
* Copyright 2016 Jason DeRose (jderose9) and Charles Gagnon (charlesg99)
*
* 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/>.
*
*/
import Gio from 'gi://Gio';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js';
import {Extension, gettext as _} from 'resource:///org/gnome/shell/extensions/extension.js';
import * as PanelManager from './panelManager.js';
import * as Utils from './utils.js';
import * as AppIcons from './appIcons.js';
const UBUNTU_DOCK_UUID = 'ubuntu-dock@ubuntu.com';
let panelManager;
let extensionChangedHandler;
let startupCompleteHandler;
let disabledUbuntuDock;
let extensionSystem = Main.extensionManager;
export let DTP_EXTENSION = null;
export let SETTINGS = null;
export let DESKTOPSETTINGS = null;
export let TERMINALSETTINGS = null;
export let PERSISTENTSTORAGE = null;
export let EXTENSION_UUID = null;
export let EXTENSION_PATH = null;
export default class DashToPanelExtension extends Extension {
constructor(metadata) {
super(metadata);
this._realHasOverview = Main.sessionMode.hasOverview;
//create an object that persists until gnome-shell is restarted, even if the extension is disabled
PERSISTENTSTORAGE = {};
}
enable() {
DTP_EXTENSION = this;
// The Ubuntu Dock extension might get enabled after this extension
extensionChangedHandler = extensionSystem.connect('extension-state-changed', (data, extension) => {
if (extension.uuid === UBUNTU_DOCK_UUID && extension.state === 1) {
_enable(this);
}
});
//create a global object that can emit signals and conveniently expose functionalities to other extensions
global.dashToPanel = new EventEmitter();
_enable(this);
}
disable(reset = false) {
panelManager.disable();
DTP_EXTENSION = null;
SETTINGS = null;
DESKTOPSETTINGS = null;
TERMINALSETTINGS = null;
panelManager = null;
if (!reset) {
extensionSystem.disconnect(extensionChangedHandler);
delete global.dashToPanel;
// Re-enable Ubuntu Dock if it was disabled by dash to panel
if (disabledUbuntuDock) {
(extensionSystem._callExtensionEnable || extensionSystem.enableExtension).call(extensionSystem, UBUNTU_DOCK_UUID);
}
AppIcons.resetRecentlyClickedApp();
}
if (startupCompleteHandler) {
Main.layoutManager.disconnect(startupCompleteHandler);
startupCompleteHandler = null;
}
Main.sessionMode.hasOverview = this._realHasOverview;
}
}
function _enable(extension) {
let ubuntuDock = extensionSystem.lookup(UBUNTU_DOCK_UUID);
if (ubuntuDock && ubuntuDock.stateObj && ubuntuDock.state == 1) { //ExtensionState.ACTIVE
// Disable Ubuntu Dock
let extensionOrder = extensionSystem._extensionOrder;
ubuntuDock.stateObj.disable();
extensionSystem._unloadExtensionStylesheet(ubuntuDock);
ubuntuDock.state = 2; //ExtensionState.INACTIVE
extensionOrder.splice(extensionOrder.indexOf(UBUNTU_DOCK_UUID), 1);
disabledUbuntuDock = true;
//reset to prevent conflicts with the ubuntu-dock
if (panelManager) {
extension.disable(true);
}
}
if (panelManager) return; //already initialized
SETTINGS = extension.getSettings('org.gnome.shell.extensions.dash-to-panel');
DESKTOPSETTINGS = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
TERMINALSETTINGS = new Gio.Settings({schema_id: 'org.gnome.desktop.default-applications.terminal'})
EXTENSION_UUID = extension.uuid
EXTENSION_PATH = extension.path
Main.layoutManager.startInOverview = !SETTINGS.get_boolean('hide-overview-on-startup');
if (SETTINGS.get_boolean('hide-overview-on-startup') && Main.layoutManager._startingUp) {
Main.sessionMode.hasOverview = false;
startupCompleteHandler = Main.layoutManager.connect('startup-complete', () => {
Main.sessionMode.hasOverview = extension._realHasOverview
});
}
panelManager = new PanelManager.PanelManager();
panelManager.enable();
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 1">
<g fill="#000000">
<rect x="45" width="1" height="1" opacity="0.5"/>
<rect x="46" width="2" height="1" opacity="0.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 48">
<g fill="#000000">
<rect y="45" width="1" height="1" opacity="0.5"/>
<rect y="46" width="1" height="2" opacity="0.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1 56">
<g fill="#000000">
<rect y="45" width="1" height="1" opacity="0.5"/>
<rect y="46" width="1" height="2" opacity="0.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 237 B

View File

@ -0,0 +1,427 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*/
import Clutter from 'gi://Clutter';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as GrabHelper from 'resource:///org/gnome/shell/ui/grabHelper.js';
import * as Layout from 'resource:///org/gnome/shell/ui/layout.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js';
import * as PointerWatcher from 'resource:///org/gnome/shell/ui/pointerWatcher.js';
import * as Proximity from './proximity.js';
import * as Utils from './utils.js';
import {SETTINGS} from './extension.js';
//timeout intervals
const CHECK_POINTER_MS = 200;
const CHECK_GRAB_MS = 400;
const POST_ANIMATE_MS = 50;
const MIN_UPDATE_MS = 250;
//timeout names
const T1 = 'checkGrabTimeout';
const T2 = 'limitUpdateTimeout';
const T3 = 'postAnimateTimeout';
const SIDE_CONTROLS_ANIMATION_TIME = OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / (OverviewControls.SIDE_CONTROLS_ANIMATION_TIME > 1 ? 1000 : 1);
export const Hold = {
NONE: 0,
TEMPORARY: 1,
PERMANENT: 2
};
export const Intellihide = class {
constructor(dtpPanel) {
this._dtpPanel = dtpPanel;
this._panelBox = dtpPanel.panelBox;
this._panelManager = dtpPanel.panelManager;
this._proximityManager = this._panelManager.proximityManager;
this._holdStatus = Hold.NONE;
this._signalsHandler = new Utils.GlobalSignalsHandler();
this._timeoutsHandler = new Utils.TimeoutsHandler();
this._intellihideChangedId = SETTINGS.connect('changed::intellihide', () => this._changeEnabledStatus());
this._intellihideOnlySecondaryChangedId = SETTINGS.connect('changed::intellihide-only-secondary', () => this._changeEnabledStatus());
this.enabled = false;
this._changeEnabledStatus();
}
enable() {
this.enabled = true;
this._monitor = this._dtpPanel.monitor;
this._animationDestination = -1;
this._pendingUpdate = false;
this._hoveredOut = false;
this._windowOverlap = false;
this._translationProp = 'translation_' + (this._dtpPanel.checkIfVertical() ? 'x' : 'y');
this._panelBox.translation_y = 0;
this._panelBox.translation_x = 0;
this._setTrackPanel(true);
this._bindGeneralSignals();
if (SETTINGS.get_boolean('intellihide-hide-from-windows')) {
this._proximityWatchId = this._proximityManager.createWatch(
this._panelBox.get_parent(),
this._dtpPanel.monitor.index,
Proximity.Mode[SETTINGS.get_string('intellihide-behaviour')],
0, 0,
overlap => {
this._windowOverlap = overlap;
this._queueUpdatePanelPosition();
}
);
}
this._setRevealMechanism();
this._queueUpdatePanelPosition();
}
disable(reset) {
if (this._proximityWatchId) {
this._proximityManager.removeWatch(this._proximityWatchId);
}
this._setTrackPanel(false);
this._signalsHandler.destroy();
this._timeoutsHandler.destroy();
this._removeRevealMechanism();
this._revealPanel(!reset);
this.enabled = false;
}
destroy() {
SETTINGS.disconnect(this._intellihideChangedId);
SETTINGS.disconnect(this._intellihideOnlySecondaryChangedId);
if (this.enabled) {
this.disable();
}
}
toggle() {
this[this._holdStatus & Hold.PERMANENT ? 'release' : 'revealAndHold'](Hold.PERMANENT);
}
revealAndHold(holdStatus) {
if (this.enabled && !this._holdStatus) {
this._revealPanel();
}
this._holdStatus |= holdStatus;
}
release(holdStatus) {
this._holdStatus -= holdStatus;
if (this.enabled && !this._holdStatus) {
this._queueUpdatePanelPosition();
}
}
reset() {
this.disable(true);
this.enable();
}
_changeEnabledStatus() {
let intellihide = SETTINGS.get_boolean('intellihide');
let onlySecondary = SETTINGS.get_boolean('intellihide-only-secondary');
let enabled = intellihide && !(this._dtpPanel.isPrimary && onlySecondary);
if (this.enabled !== enabled) {
this[enabled ? 'enable' : 'disable']();
}
}
_bindGeneralSignals() {
this._signalsHandler.add(
[
this._dtpPanel.taskbar,
['menu-closed', 'end-drag'],
() => {
this._panelBox.sync_hover();
this._onHoverChanged();
}
],
[
SETTINGS,
[
'changed::intellihide-use-pressure',
'changed::intellihide-hide-from-windows',
'changed::intellihide-behaviour',
'changed::intellihide-pressure-threshold',
'changed::intellihide-pressure-time'
],
() => this.reset()
],
[
this._panelBox,
'notify::hover',
() => this._onHoverChanged()
],
[
this._dtpPanel.taskbar.previewMenu,
'open-state-changed',
() => this._queueUpdatePanelPosition()
],
[
Main.overview,
[
'showing',
'hiding'
],
() => this._queueUpdatePanelPosition()
]
);
if (Meta.is_wayland_compositor()) {
this._signalsHandler.add([
this._panelBox,
'notify::visible',
() => Utils.setDisplayUnredirect(!this._panelBox.visible)
]);
}
}
_onHoverChanged() {
this._hoveredOut = !this._panelBox.hover;
this._queueUpdatePanelPosition();
}
_setTrackPanel(enable) {
let actorData = Utils.getTrackedActorData(this._panelBox)
actorData.affectsStruts = !enable;
actorData.trackFullscreen = !enable;
this._panelBox.track_hover = enable;
this._panelBox.reactive = enable;
this._panelBox.visible = enable ? enable : this._panelBox.visible;
Main.layoutManager._queueUpdateRegions();
}
_setRevealMechanism() {
let barriers = Meta.BackendCapabilities.BARRIERS
if ((global.backend.capabilities & barriers) === barriers && SETTINGS.get_boolean('intellihide-use-pressure')) {
this._edgeBarrier = this._createBarrier();
this._pressureBarrier = new Layout.PressureBarrier(
SETTINGS.get_int('intellihide-pressure-threshold'),
SETTINGS.get_int('intellihide-pressure-time'),
Shell.ActionMode.NORMAL
);
this._pressureBarrier.addBarrier(this._edgeBarrier);
this._signalsHandler.add([this._pressureBarrier, 'trigger', () => this._queueUpdatePanelPosition(true)]);
} else {
this._pointerWatch = PointerWatcher.getPointerWatcher()
.addWatch(CHECK_POINTER_MS, (x, y) => this._checkMousePointer(x, y));
}
}
_removeRevealMechanism() {
if (this._pointerWatch) {
PointerWatcher.getPointerWatcher()._removeWatch(this._pointerWatch);
}
if (this._pressureBarrier) {
this._pressureBarrier.destroy();
this._edgeBarrier.destroy();
this._pressureBarrier = 0;
}
}
_createBarrier() {
let position = this._dtpPanel.geom.position;
let opts = { backend: global.backend };
if (this._dtpPanel.checkIfVertical()) {
opts.y1 = this._monitor.y;
opts.y2 = this._monitor.y + this._monitor.height;
opts.x1 = opts.x2 = this._monitor.x;
} else {
opts.x1 = this._monitor.x;
opts.x2 = this._monitor.x + this._monitor.width;
opts.y1 = opts.y2 = this._monitor.y;
}
if (position == St.Side.TOP) {
opts.directions = Meta.BarrierDirection.POSITIVE_Y;
} else if (position == St.Side.BOTTOM) {
opts.y1 = opts.y2 = opts.y1 + this._monitor.height;
opts.directions = Meta.BarrierDirection.NEGATIVE_Y;
} else if (position == St.Side.LEFT) {
opts.directions = Meta.BarrierDirection.POSITIVE_X;
} else {
opts.x1 = opts.x2 = opts.x1 + this._monitor.width;
opts.directions = Meta.BarrierDirection.NEGATIVE_X;
}
return new Meta.Barrier(opts);
}
_checkMousePointer(x, y) {
let position = this._dtpPanel.geom.position;
if (!this._panelBox.hover && !Main.overview.visible &&
((position == St.Side.TOP && y <= this._monitor.y + 1) ||
(position == St.Side.BOTTOM && y >= this._monitor.y + this._monitor.height - 1) ||
(position == St.Side.LEFT && x <= this._monitor.x + 1) ||
(position == St.Side.RIGHT && x >= this._monitor.x + this._monitor.width - 1)) &&
((x >= this._monitor.x && x < this._monitor.x + this._monitor.width) &&
(y >= this._monitor.y && y < this._monitor.y + this._monitor.height))) {
this._queueUpdatePanelPosition(true);
}
}
_queueUpdatePanelPosition(fromRevealMechanism) {
if (!fromRevealMechanism && this._timeoutsHandler.getId(T2) && !Main.overview.visible) {
//unless this is a mouse interaction or entering/leaving the overview, limit the number
//of updates, but remember to update again when the limit timeout is reached
this._pendingUpdate = true;
} else if (!this._holdStatus) {
this._checkIfShouldBeVisible(fromRevealMechanism) ? this._revealPanel() : this._hidePanel();
this._timeoutsHandler.add([T2, MIN_UPDATE_MS, () => this._endLimitUpdate()]);
}
}
_endLimitUpdate() {
if (this._pendingUpdate) {
this._pendingUpdate = false;
this._queueUpdatePanelPosition();
}
}
_checkIfShouldBeVisible(fromRevealMechanism) {
if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.opened ||
this._dtpPanel.taskbar._dragMonitor || this._panelBox.get_hover() || this._checkIfGrab()) {
return true;
}
if (fromRevealMechanism) {
let mouseBtnIsPressed = global.get_pointer()[2] & Clutter.ModifierType.BUTTON1_MASK;
//the user is trying to reveal the panel
if (this._monitor.inFullscreen && !mouseBtnIsPressed) {
return SETTINGS.get_boolean('intellihide-show-in-fullscreen');
}
return !mouseBtnIsPressed;
}
if (!SETTINGS.get_boolean('intellihide-hide-from-windows')) {
return this._panelBox.hover;
}
return !this._windowOverlap;
}
_checkIfGrab() {
let isGrab
if (GrabHelper._grabHelperStack)
// gnome-shell < 42
isGrab = GrabHelper._grabHelperStack.some(gh => gh._owner == this._dtpPanel.panel)
else if (global.stage.get_grab_actor) {
// gnome-shell >= 42
let grabActor = global.stage.get_grab_actor()
let sourceActor = grabActor?._sourceActor || grabActor
isGrab = sourceActor &&
(sourceActor == Main.layoutManager.dummyCursor ||
this._dtpPanel.statusArea.quickSettings?.menu.actor.contains(sourceActor) ||
this._dtpPanel.panel.contains(sourceActor))
}
if (isGrab)
//there currently is a grab on a child of the panel, check again soon to catch its release
this._timeoutsHandler.add([T1, CHECK_GRAB_MS, () => this._queueUpdatePanelPosition()]);
return isGrab;
}
_revealPanel(immediate) {
if (!this._panelBox.visible) {
this._panelBox.visible = true;
this._dtpPanel.taskbar._shownInitially = false;
}
this._animatePanel(0, immediate);
}
_hidePanel(immediate) {
let position = this._dtpPanel.geom.position;
let size = this._panelBox[position == St.Side.LEFT || position == St.Side.RIGHT ? 'width' : 'height'];
let coefficient = position == St.Side.TOP || position == St.Side.LEFT ? -1 : 1;
this._animatePanel(size * coefficient, immediate);
}
_animatePanel(destination, immediate) {
let animating = Utils.isAnimating(this._panelBox, this._translationProp);
if (!((animating && destination === this._animationDestination) ||
(!animating && destination === this._panelBox[this._translationProp]))) {
//the panel isn't already at, or animating to the asked destination
if (animating) {
Utils.stopAnimations(this._panelBox);
}
this._animationDestination = destination;
if (immediate) {
this._panelBox[this._translationProp] = destination;
this._panelBox.visible = !destination;
} else {
let tweenOpts = {
//when entering/leaving the overview, use its animation time instead of the one from the settings
time: Main.overview.visible ?
SIDE_CONTROLS_ANIMATION_TIME :
SETTINGS.get_int('intellihide-animation-time') * 0.001,
//only delay the animation when hiding the panel after the user hovered out
delay: destination != 0 && this._hoveredOut ? SETTINGS.get_int('intellihide-close-delay') * 0.001 : 0,
transition: 'easeOutQuad',
onComplete: () => {
this._panelBox.visible = !destination;
Main.layoutManager._queueUpdateRegions();
this._timeoutsHandler.add([T3, POST_ANIMATE_MS, () => this._queueUpdatePanelPosition()]);
}
};
tweenOpts[this._translationProp] = destination;
Utils.animate(this._panelBox, tweenOpts);
}
}
this._hoveredOut = false;
}
}

View File

@ -0,0 +1,17 @@
{
"_generated": "Generated by SweetTooth, do not edit",
"description": "An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.\n\nFor a more traditional experience, you may also want to use Tweak Tool to enable Windows > Titlebar Buttons > Minimize & Maximize.\n\nFor the best support, please report any issues on Github. Dash-to-panel is developed and maintained by @jderose9 and @charlesg99.",
"donations": {
"paypal": "charlesg99"
},
"extension-id": "dash-to-panel",
"gettext-domain": "dash-to-panel",
"name": "Dash to Panel",
"shell-version": [
"46",
"47"
],
"url": "https://github.com/home-sweet-gnome/dash-to-panel",
"uuid": "dash-to-panel@jderose9.github.com",
"version": 63
}

View File

@ -0,0 +1,518 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
* Credits:
* This file is based on code from the Dash to Dock extension by micheleg
*
* Some code was also adapted from the upstream Gnome Shell source code.
*/
import * as Intellihide from './intellihide.js';
import * as Utils from './utils.js';
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as WindowManager from 'resource:///org/gnome/shell/ui/windowManager.js';
import {WindowPreview} from 'resource:///org/gnome/shell/ui/windowPreview.js';
import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js';
import {SETTINGS} from './extension.js';
const GS_HOTKEYS_KEY = 'switch-to-application-';
// When the dash is shown, workspace window preview bottom labels go over it (default
// gnome-shell behavior), but when the extension hides the dash, leave some space
// so those labels don't go over a bottom panel
const LABEL_MARGIN = 60;
//timeout names
const T1 = 'swipeEndTimeout';
const T2 = 'numberOverlayTimeout';
export const Overview = class {
constructor() {
this._injectionManager = new InjectionManager();
this._numHotkeys = 10;
}
enable (primaryPanel) {
this._panel = primaryPanel;
this.taskbar = primaryPanel.taskbar;
this._injectionsHandler = new Utils.InjectionsHandler();
this._signalsHandler = new Utils.GlobalSignalsHandler();
this._timeoutsHandler = new Utils.TimeoutsHandler();
this._optionalWorkspaceIsolation();
this._optionalHotKeys();
this._optionalNumberOverlay();
this._optionalClickToExit();
this._toggleDash();
this._adaptAlloc();
this._signalsHandler.add([
SETTINGS,
[
'changed::stockgs-keep-dash',
'changed::panel-sizes'
],
() => this._toggleDash()
]);
}
disable() {
this._signalsHandler.destroy();
this._injectionsHandler.destroy();
this._timeoutsHandler.destroy();
this._injectionManager.clear();
this._toggleDash(true);
// Remove key bindings
this._disableHotKeys();
this._disableExtraShortcut();
this._disableClickToExit();
}
_toggleDash(visible) {
if (visible === undefined) {
visible = SETTINGS.get_boolean('stockgs-keep-dash');
}
let visibilityFunc = visible ? 'show' : 'hide';
let height = visible ? -1 : LABEL_MARGIN * Utils.getScaleFactor();
let overviewControls = Main.overview._overview._controls;
overviewControls.dash[visibilityFunc]();
overviewControls.dash.set_height(height);
}
_adaptAlloc() {
let overviewControls = Main.overview._overview._controls
this._injectionManager.overrideMethod(Object.getPrototypeOf(overviewControls), 'vfunc_allocate',
(originalAllocate) =>
(box) => {
let focusedPanel = this._panel.panelManager.focusedMonitorPanel
if (focusedPanel) {
let position = focusedPanel.geom.position
let isBottom = position == St.Side.BOTTOM
if (focusedPanel.intellihide?.enabled) {
// Panel intellihide is enabled (struts aren't taken into account on overview allocation),
// dynamically modify the overview box to follow the reveal/hide animation
let { transitioning, finalState, progress } = overviewControls._stateAdjustment.getStateTransitionParams()
let size = focusedPanel.geom[focusedPanel.checkIfVertical() ? 'w' : 'h'] *
(transitioning ? Math.abs((finalState != 0 ? 0 : 1) - progress) : 1)
if (isBottom || position == St.Side.RIGHT)
box[focusedPanel.fixedCoord.c2] -= size
else
box[focusedPanel.fixedCoord.c1] += size
} else if (isBottom)
// The default overview allocation is very good and takes into account external
// struts, everywhere but the bottom where the dash is usually fixed anyway.
// If there is a bottom panel under the dash location, give it some space here
box.y2 -= focusedPanel.geom.h
}
originalAllocate.call(overviewControls, box)
}
);
}
/**
* Isolate overview to open new windows for inactive apps
*/
_optionalWorkspaceIsolation() {
let label = 'optionalWorkspaceIsolation';
let enable = () => {
this._injectionsHandler.removeWithLabel(label);
this._injectionsHandler.addWithLabel(label, [
Shell.App.prototype,
'activate',
IsolatedOverview
]);
this._signalsHandler.removeWithLabel(label);
this._signalsHandler.addWithLabel(label, [
global.window_manager,
'switch-workspace',
() => this._panel.panelManager.allPanels.forEach(p => p.taskbar.handleIsolatedWorkspaceSwitch())
]);
}
let disable = () => {
this._signalsHandler.removeWithLabel(label);
this._injectionsHandler.removeWithLabel(label);
}
function IsolatedOverview() {
// These lines take care of Nautilus for icons on Desktop
let activeWorkspace = Utils.DisplayWrapper.getWorkspaceManager().get_active_workspace();
let windows = this.get_windows().filter(w => w.get_workspace().index() == activeWorkspace.index());
if (windows.length > 0 &&
(!(windows.length == 1 && windows[0].skip_taskbar) ||
this.is_on_workspace(activeWorkspace)))
return Main.activateWindow(windows[0]);
return this.open_new_window(-1);
}
this._signalsHandler.add([
SETTINGS,
'changed::isolate-workspaces',
() => {
this._panel.panelManager.allPanels.forEach(p => p.taskbar.resetAppIcons());
if (SETTINGS.get_boolean('isolate-workspaces'))
enable();
else
disable();
}
]);
if (SETTINGS.get_boolean('isolate-workspaces'))
enable();
}
// Hotkeys
_activateApp(appIndex, modifiers) {
let seenApps = {};
let apps = [];
this.taskbar._getAppIcons().forEach(appIcon => {
if (!seenApps[appIcon.app] || this.taskbar.allowSplitApps) {
apps.push(appIcon);
}
seenApps[appIcon.app] = (seenApps[appIcon.app] || 0) + 1;
});
this._showOverlay();
if (appIndex < apps.length) {
let appIcon = apps[appIndex];
let seenAppCount = seenApps[appIcon.app];
let windowCount = appIcon.window || appIcon._hotkeysCycle ? seenAppCount : appIcon._nWindows;
if (SETTINGS.get_boolean('shortcut-previews') && windowCount > 1 &&
!(modifiers & ~(Clutter.ModifierType.MOD1_MASK | Clutter.ModifierType.SUPER_MASK))) { //ignore the alt (MOD1_MASK) and super key (SUPER_MASK)
if (this._hotkeyPreviewCycleInfo && this._hotkeyPreviewCycleInfo.appIcon != appIcon) {
this._endHotkeyPreviewCycle();
}
if (!this._hotkeyPreviewCycleInfo) {
this._hotkeyPreviewCycleInfo = {
appIcon: appIcon,
currentWindow: appIcon.window,
keyFocusOutId: appIcon.connect('key-focus-out', () => appIcon.grab_key_focus()),
capturedEventId: global.stage.connect('captured-event', (actor, e) => {
if (e.type() == Clutter.EventType.KEY_RELEASE && e.get_key_symbol() == (Clutter.KEY_Super_L || Clutter.Super_L)) {
this._endHotkeyPreviewCycle(true);
}
return Clutter.EVENT_PROPAGATE;
})
};
appIcon._hotkeysCycle = appIcon.window;
appIcon.window = null;
appIcon._previewMenu.open(appIcon, true);
appIcon.grab_key_focus();
}
appIcon._previewMenu.focusNext();
} else {
// Activate with button = 1, i.e. same as left click
let button = 1;
this._endHotkeyPreviewCycle();
appIcon.activate(button, modifiers, !this.taskbar.allowSplitApps);
}
}
}
_endHotkeyPreviewCycle(focusWindow) {
if (this._hotkeyPreviewCycleInfo) {
global.stage.disconnect(this._hotkeyPreviewCycleInfo.capturedEventId);
this._hotkeyPreviewCycleInfo.appIcon.disconnect(this._hotkeyPreviewCycleInfo.keyFocusOutId);
if (focusWindow) {
this._hotkeyPreviewCycleInfo.appIcon._previewMenu.activateFocused();
} else
this._hotkeyPreviewCycleInfo.appIcon._previewMenu.close()
this._hotkeyPreviewCycleInfo.appIcon.window = this._hotkeyPreviewCycleInfo.currentWindow;
delete this._hotkeyPreviewCycleInfo.appIcon._hotkeysCycle;
this._hotkeyPreviewCycleInfo = 0;
}
}
_optionalHotKeys() {
this._hotKeysEnabled = false;
if (SETTINGS.get_boolean('hot-keys'))
this._enableHotKeys();
this._signalsHandler.add([
SETTINGS,
'changed::hot-keys',
() => {
if (SETTINGS.get_boolean('hot-keys'))
this._enableHotKeys();
else
this._disableHotKeys();
}
]);
}
_resetHotkeys() {
this._disableHotKeys();
this._enableHotKeys();
}
_enableHotKeys() {
if (this._hotKeysEnabled)
return;
//3.32 introduced app hotkeys, disable them to prevent conflicts
if (Main.wm._switchToApplication) {
for (let i = 1; i < 10; ++i) {
Utils.removeKeybinding(GS_HOTKEYS_KEY + i);
}
}
// Setup keyboard bindings for taskbar elements
let shortcutNumKeys = SETTINGS.get_string('shortcut-num-keys');
let bothNumKeys = shortcutNumKeys == 'BOTH';
let keys = [];
let prefixModifiers = Clutter.ModifierType.SUPER_MASK
if (SETTINGS.get_string('hotkey-prefix-text') == 'SuperAlt')
prefixModifiers |= Clutter.ModifierType.MOD1_MASK
if (bothNumKeys || shortcutNumKeys == 'NUM_ROW') {
keys.push('app-hotkey-', 'app-shift-hotkey-', 'app-ctrl-hotkey-'); // Regular numbers
}
if (bothNumKeys || shortcutNumKeys == 'NUM_KEYPAD') {
keys.push('app-hotkey-kp-', 'app-shift-hotkey-kp-', 'app-ctrl-hotkey-kp-'); // Key-pad numbers
}
keys.forEach( function(key) {
let modifiers = prefixModifiers
// for some reason, in gnome-shell >= 40 Clutter.get_current_event() is now empty
// for keyboard events. Create here the modifiers that are needed in appicon.activate
modifiers |= (key.indexOf('-shift-') >= 0 ? Clutter.ModifierType.SHIFT_MASK : 0)
modifiers |= (key.indexOf('-ctrl-') >= 0 ? Clutter.ModifierType.CONTROL_MASK : 0)
for (let i = 0; i < this._numHotkeys; i++) {
let appNum = i;
Utils.addKeybinding(key + (i + 1), SETTINGS, () => this._activateApp(appNum, modifiers));
}
}, this);
this._hotKeysEnabled = true;
if (SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS')
this.taskbar.toggleNumberOverlay(true);
}
_disableHotKeys() {
if (!this._hotKeysEnabled)
return;
let keys = ['app-hotkey-', 'app-shift-hotkey-', 'app-ctrl-hotkey-', // Regular numbers
'app-hotkey-kp-', 'app-shift-hotkey-kp-', 'app-ctrl-hotkey-kp-']; // Key-pad numbers
keys.forEach( function(key) {
for (let i = 0; i < this._numHotkeys; i++) {
Utils.removeKeybinding(key + (i + 1));
}
}, this);
if (Main.wm._switchToApplication) {
let gsSettings = new Gio.Settings({ schema_id: WindowManager.SHELL_KEYBINDINGS_SCHEMA });
for (let i = 1; i < 10; ++i) {
Utils.addKeybinding(GS_HOTKEYS_KEY + i, gsSettings, Main.wm._switchToApplication.bind(Main.wm));
}
}
this._hotKeysEnabled = false;
this.taskbar.toggleNumberOverlay(false);
}
_optionalNumberOverlay() {
// Enable extra shortcut
if (SETTINGS.get_boolean('hot-keys'))
this._enableExtraShortcut();
this._signalsHandler.add([
SETTINGS,
'changed::hot-keys',
this._checkHotkeysOptions.bind(this)
], [
SETTINGS,
'changed::hotkeys-overlay-combo',
() => {
if (SETTINGS.get_boolean('hot-keys') && SETTINGS.get_string('hotkeys-overlay-combo') === 'ALWAYS')
this.taskbar.toggleNumberOverlay(true);
else
this.taskbar.toggleNumberOverlay(false);
}
], [
SETTINGS,
'changed::shortcut-num-keys',
() => this._resetHotkeys()
]);
}
_checkHotkeysOptions() {
if (SETTINGS.get_boolean('hot-keys'))
this._enableExtraShortcut();
else
this._disableExtraShortcut();
}
_enableExtraShortcut() {
Utils.addKeybinding('shortcut', SETTINGS, () => this._showOverlay(true));
}
_disableExtraShortcut() {
Utils.removeKeybinding('shortcut');
}
_showOverlay(overlayFromShortcut) {
//wait for intellihide timeout initialization
if (!this._panel.intellihide) {
return;
}
// Restart the counting if the shortcut is pressed again
let hotkey_option = SETTINGS.get_string('hotkeys-overlay-combo');
if (hotkey_option === 'NEVER')
return;
if (hotkey_option === 'TEMPORARILY' || overlayFromShortcut)
this.taskbar.toggleNumberOverlay(true);
this._panel.intellihide.revealAndHold(Intellihide.Hold.TEMPORARY);
let timeout = SETTINGS.get_int('overlay-timeout');
if (overlayFromShortcut) {
timeout = SETTINGS.get_int('shortcut-timeout');
}
// Hide the overlay/dock after the timeout
this._timeoutsHandler.add([T2, timeout, () => {
if (hotkey_option != 'ALWAYS') {
this.taskbar.toggleNumberOverlay(false);
}
this._panel.intellihide.release(Intellihide.Hold.TEMPORARY);
}]);
}
_optionalClickToExit() {
this._clickToExitEnabled = false;
if (SETTINGS.get_boolean('overview-click-to-exit'))
this._enableClickToExit();
this._signalsHandler.add([
SETTINGS,
'changed::overview-click-to-exit',
() => {
if (SETTINGS.get_boolean('overview-click-to-exit'))
this._enableClickToExit();
else
this._disableClickToExit();
}
]);
}
_enableClickToExit() {
if (this._clickToExitEnabled)
return;
this._signalsHandler.addWithLabel('click-to-exit', [
Main.layoutManager.overviewGroup,
'button-release-event',
() => {
let [x, y] = global.get_pointer();
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, x, y);
if (pickedActor) {
let parent = pickedActor.get_parent();
if (
(
pickedActor.has_style_class_name &&
pickedActor.has_style_class_name('apps-scroll-view') &&
!pickedActor.has_style_pseudo_class('first-child')
) || (
parent?.has_style_class_name &&
parent.has_style_class_name('window-picker')
) ||
Main.overview._overview._controls._searchEntryBin.contains(pickedActor) ||
pickedActor instanceof WindowPreview
)
return Clutter.EVENT_PROPAGATE
}
Main.overview.toggle()
}
]);
this._clickToExitEnabled = true;
}
_disableClickToExit() {
if (!this._clickToExitEnabled)
return;
this._signalsHandler.removeWithLabel('click-to-exit')
this._clickToExitEnabled = false;
}
_onSwipeBegin() {
this._swiping = true;
return true;
}
_onSwipeEnd() {
this._timeoutsHandler.add([
T1,
0,
() => this._swiping = false
]);
return true;
}
}

View File

@ -0,0 +1,773 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
* Credits:
* This file is based on code from the Dash to Dock extension by micheleg
* and code from the Taskbar extension by Zorin OS
*
* Code to re-anchor the panel was taken from Thoma5 BottomPanel:
* https://github.com/Thoma5/gnome-shell-extension-bottompanel
*
* Pattern for moving clock based on Frippery Move Clock by R M Yorston
* http://frippery.org/extensions/
*
* Some code was also adapted from the upstream Gnome Shell source code.
*/
import * as Overview from './overview.js';
import * as Panel from './panel.js';
import * as PanelSettings from './panelSettings.js';
import * as Proximity from './proximity.js';
import * as Utils from './utils.js';
import * as DesktopIconsIntegration from './desktopIconsIntegration.js';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Clutter from 'gi://Clutter';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as BoxPointer from 'resource:///org/gnome/shell/ui/boxpointer.js';
import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
import * as Layout from 'resource:///org/gnome/shell/ui/layout.js';
import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js';
import {SETTINGS} from './extension.js';
import {SecondaryMonitorDisplay, WorkspacesView} from 'resource:///org/gnome/shell/ui/workspacesView.js';
export const PanelManager = class {
constructor() {
this.overview = new Overview.Overview();
this.panelsElementPositions = {};
this._injectionManager = new InjectionManager();
this._saveMonitors();
}
enable(reset) {
let dtpPrimaryIndex = SETTINGS.get_int('primary-monitor');
this.allPanels = [];
this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex] || Main.layoutManager.primaryMonitor;
this.proximityManager = new Proximity.ProximityManager();
if (this.dtpPrimaryMonitor) {
this.primaryPanel = this._createPanel(this.dtpPrimaryMonitor, SETTINGS.get_boolean('stockgs-keep-top-panel'));
this.allPanels.push(this.primaryPanel);
this.overview.enable(this.primaryPanel);
this.setFocusedMonitor(this.dtpPrimaryMonitor);
}
if (SETTINGS.get_boolean('multi-monitors')) {
Main.layoutManager.monitors.filter(m => m != this.dtpPrimaryMonitor).forEach(m => {
this.allPanels.push(this._createPanel(m, true));
});
}
global.dashToPanel.panels = this.allPanels;
global.dashToPanel.emit('panels-created');
this.allPanels.forEach(p => {
let panelPosition = p.getPosition();
let leftOrRight = (panelPosition == St.Side.LEFT || panelPosition == St.Side.RIGHT);
p.panelBox.set_size(
leftOrRight ? -1 : p.geom.w + p.geom.lrPadding,
leftOrRight ? p.geom.h + p.geom.tbPadding : -1
);
this._findPanelMenuButtons(p.panelBox).forEach(pmb => this._adjustPanelMenuButton(pmb, p.monitor, panelPosition));
p.taskbar.iconAnimator.start();
});
this._setDesktopIconsMargins();
//in 3.32, BoxPointer now inherits St.Widget
if (BoxPointer.BoxPointer.prototype.vfunc_get_preferred_height) {
let panelManager = this;
this._injectionManager.overrideMethod(BoxPointer.BoxPointer.prototype, 'vfunc_get_preferred_height', () => function(forWidth) {
let alloc = { min_size: 0, natural_size: 0 };
[alloc.min_size, alloc.natural_size] = this.vfunc_get_preferred_height(forWidth);
return panelManager._getBoxPointerPreferredHeight(this, alloc);
});
}
this._updatePanelElementPositions();
if (reset) return;
this._desktopIconsUsableArea = new DesktopIconsIntegration.DesktopIconsUsableAreaClass();
this._oldUpdatePanelBarrier = Main.layoutManager._updatePanelBarrier;
Main.layoutManager._updatePanelBarrier = (panel) => {
let panelUpdates = panel ? [panel] : this.allPanels;
panelUpdates.forEach(p => newUpdatePanelBarrier.call(Main.layoutManager, p));
};
Main.layoutManager._updatePanelBarrier();
this._oldUpdateHotCorners = Main.layoutManager._updateHotCorners;
Main.layoutManager._updateHotCorners = newUpdateHotCorners.bind(Main.layoutManager);
Main.layoutManager._updateHotCorners();
this._forceHotCornerId = SETTINGS.connect('changed::stockgs-force-hotcorner', () => Main.layoutManager._updateHotCorners());
if (Main.layoutManager._interfaceSettings) {
this._enableHotCornersId = Main.layoutManager._interfaceSettings.connect('changed::enable-hot-corners', () => Main.layoutManager._updateHotCorners());
}
this._oldUpdateWorkspacesViews = Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews;
Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews = this._newUpdateWorkspacesViews.bind(Main.overview._overview._controls._workspacesDisplay);
this._oldSetPrimaryWorkspaceVisible = Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible
Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible = this._newSetPrimaryWorkspaceVisible.bind(Main.overview._overview._controls._workspacesDisplay);
LookingGlass.LookingGlass.prototype._oldResize = LookingGlass.LookingGlass.prototype._resize;
LookingGlass.LookingGlass.prototype._resize = _newLookingGlassResize;
LookingGlass.LookingGlass.prototype._oldOpen = LookingGlass.LookingGlass.prototype.open;
LookingGlass.LookingGlass.prototype.open = _newLookingGlassOpen;
this._signalsHandler = new Utils.GlobalSignalsHandler();
//listen settings
this._signalsHandler.add(
[
SETTINGS,
[
'changed::primary-monitor',
'changed::multi-monitors',
'changed::isolate-monitors',
'changed::panel-positions',
'changed::panel-lengths',
'changed::panel-anchors',
'changed::stockgs-keep-top-panel'
],
() => this._reset()
],
[
SETTINGS,
'changed::panel-element-positions',
() => this._updatePanelElementPositions()
],
[
SETTINGS,
'changed::intellihide-key-toggle-text',
() => this._setKeyBindings(true)
],
[
SETTINGS,
'changed::panel-sizes',
() => {
GLib.idle_add(GLib.PRIORITY_LOW, () => {
this._setDesktopIconsMargins();
return GLib.SOURCE_REMOVE;
});
}
],
[
Utils.DisplayWrapper.getMonitorManager(),
'monitors-changed',
() => {
if (Main.layoutManager.primaryMonitor) {
this._saveMonitors();
this._reset();
}
}
]
);
Panel.panelBoxes.forEach(c => this._signalsHandler.add(
[
Main.panel[c],
'child-added',
(parent, child) => {
this.primaryPanel &&
child instanceof St.Bin &&
this._adjustPanelMenuButton(this._getPanelMenuButton(child.get_first_child()), this.primaryPanel.monitor, this.primaryPanel.getPosition())
}
]
));
this._setKeyBindings(true);
// keep GS overview.js from blowing away custom panel styles
if(!SETTINGS.get_boolean('stockgs-keep-top-panel'))
Object.defineProperty(Main.panel, "style", {configurable: true, set(v) {}});
}
disable(reset) {
this.primaryPanel && this.overview.disable();
this.proximityManager.destroy();
this.allPanels.forEach(p => {
p.taskbar.iconAnimator.pause();
this._findPanelMenuButtons(p.panelBox).forEach(pmb => {
if (pmb.menu._boxPointer._dtpGetPreferredHeightId) {
pmb.menu._boxPointer._container.disconnect(pmb.menu._boxPointer._dtpGetPreferredHeightId);
}
pmb.menu._boxPointer.sourceActor = pmb.menu._boxPointer._dtpSourceActor;
delete pmb.menu._boxPointer._dtpSourceActor;
pmb.menu._boxPointer._userArrowSide = St.Side.TOP;
})
this._removePanelBarriers(p);
p.disable();
let clipContainer = p.panelBox.get_parent();
Main.layoutManager._untrackActor(p.panelBox);
Main.layoutManager.removeChrome(clipContainer);
if (p.isStandalone) {
p.panelBox.destroy();
} else {
p.panelBox.remove_child(p);
p.remove_child(p.panel);
p.panelBox.add_child(p.panel);
p.panelBox.set_position(clipContainer.x, clipContainer.y);
clipContainer.remove_child(p.panelBox);
Main.layoutManager.addChrome(p.panelBox, { affectsStruts: true, trackFullscreen: true });
}
});
this._injectionManager.clear();
if (Main.layoutManager.primaryMonitor) {
Main.layoutManager.panelBox.set_position(Main.layoutManager.primaryMonitor.x, Main.layoutManager.primaryMonitor.y);
Main.layoutManager.panelBox.set_size(Main.layoutManager.primaryMonitor.width, -1);
}
if (reset) return;
this._setKeyBindings(false);
this._signalsHandler.destroy();
Main.layoutManager._updateHotCorners = this._oldUpdateHotCorners;
Main.layoutManager._updateHotCorners();
SETTINGS.disconnect(this._forceHotCornerId);
if (this._enableHotCornersId) {
Main.layoutManager._interfaceSettings.disconnect(this._enableHotCornersId);
}
Main.layoutManager._updatePanelBarrier = this._oldUpdatePanelBarrier;
Main.layoutManager._updatePanelBarrier();
Main.overview._overview._controls._workspacesDisplay._updateWorkspacesViews = this._oldUpdateWorkspacesViews;
Main.overview._overview._controls._workspacesDisplay.setPrimaryWorkspaceVisible = this._oldSetPrimaryWorkspaceVisible;
LookingGlass.LookingGlass.prototype._resize = LookingGlass.LookingGlass.prototype._oldResize;
delete LookingGlass.LookingGlass.prototype._oldResize;
LookingGlass.LookingGlass.prototype.open = LookingGlass.LookingGlass.prototype._oldOpen;
delete LookingGlass.LookingGlass.prototype._oldOpen
delete Main.panel.style;
this._desktopIconsUsableArea.destroy();
this._desktopIconsUsableArea = null;
}
_setDesktopIconsMargins() {
this._desktopIconsUsableArea?.resetMargins();
this.allPanels.forEach(p => {
switch(p.geom.position) {
case St.Side.TOP:
this._desktopIconsUsableArea?.setMargins(p.monitor.index, p.geom.h, 0, 0, 0);
break;
case St.Side.BOTTOM:
this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, p.geom.h, 0, 0);
break;
case St.Side.LEFT:
this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, 0, p.geom.w, 0);
break;
case St.Side.RIGHT:
this._desktopIconsUsableArea?.setMargins(p.monitor.index, 0, 0, 0, p.geom.w);
break;
}
});
}
setFocusedMonitor(monitor) {
this.focusedMonitorPanel = this.allPanels.find(p => p.monitor == monitor)
if (!this.checkIfFocusedMonitor(monitor)) {
Main.overview._overview.clear_constraints();
Main.overview._overview.add_constraint(new Layout.MonitorConstraint({ index: monitor.index }));
Main.overview._overview._controls._workspacesDisplay._primaryIndex = monitor.index;
}
}
_newSetPrimaryWorkspaceVisible(visible) {
if (this._primaryVisible === visible)
return;
this._primaryVisible = visible;
const primaryIndex = Main.overview._overview._controls._workspacesDisplay._primaryIndex;
const primaryWorkspace = this._workspacesViews[primaryIndex];
if (primaryWorkspace)
primaryWorkspace.visible = visible;
}
_newUpdateWorkspacesViews() {
for (let i = 0; i < this._workspacesViews.length; i++)
this._workspacesViews[i].destroy();
this._workspacesViews = [];
let monitors = Main.layoutManager.monitors;
for (let i = 0; i < monitors.length; i++) {
let view;
if (i === this._primaryIndex) {
view = new WorkspacesView(i,
this._controls,
this._scrollAdjustment,
this._fitModeAdjustment,
this._overviewAdjustment);
view.visible = this._primaryVisible;
this.bind_property('opacity', view, 'opacity', GObject.BindingFlags.SYNC_CREATE);
this.add_child(view);
} else {
// No idea why atm, but we need the import at the top of this file and to use the
// full imports ns here, otherwise SecondaryMonitorDisplay can't be used ¯\_(ツ)_/¯
view = new SecondaryMonitorDisplay(i,
this._controls,
this._scrollAdjustment,
this._fitModeAdjustment,
this._overviewAdjustment);
Main.layoutManager.overviewGroup.add_child(view);
}
this._workspacesViews.push(view);
}
}
_saveMonitors() {
//Mutter meta_monitor_manager_get_primary_monitor (global.display.get_primary_monitor()) doesn't return the same
//monitor as GDK gdk_screen_get_primary_monitor (imports.gi.Gdk.Screen.get_default().get_primary_monitor()).
//Since the Mutter function is what's used in gnome-shell and we can't access it from the settings dialog, store
//the monitors information in a setting so we can use the same monitor indexes as the ones in gnome-shell
let keyMonitors = 'available-monitors';
let keyPrimary = 'primary-monitor';
let primaryIndex = Main.layoutManager.primaryIndex;
let newMonitors = [primaryIndex];
let savedMonitors = SETTINGS.get_value(keyMonitors).deep_unpack();
let dtpPrimaryIndex = SETTINGS.get_int(keyPrimary);
let newDtpPrimaryIndex = primaryIndex;
Main.layoutManager.monitors.filter(m => m.index != primaryIndex).forEach(m => newMonitors.push(m.index));
if (savedMonitors[0] != dtpPrimaryIndex) {
// dash to panel primary wasn't the gnome-shell primary (first index of available-monitors)
let savedIndex = savedMonitors.indexOf(dtpPrimaryIndex)
// default to primary if it was set to a monitor that is no longer available
newDtpPrimaryIndex = newMonitors[savedIndex];
newDtpPrimaryIndex = newDtpPrimaryIndex == null ? primaryIndex : newDtpPrimaryIndex;
}
SETTINGS.set_int(keyPrimary, newDtpPrimaryIndex);
SETTINGS.set_value(keyMonitors, new GLib.Variant('ai', newMonitors));
}
checkIfFocusedMonitor(monitor) {
return Main.overview._overview._controls._workspacesDisplay._primaryIndex == monitor.index;
}
_createPanel(monitor, isStandalone) {
let panelBox;
let panel;
let clipContainer = new Clutter.Actor();
if (isStandalone) {
panelBox = new St.BoxLayout({ name: 'panelBox' });
} else {
panelBox = Main.layoutManager.panelBox;
Main.layoutManager._untrackActor(panelBox);
panelBox.remove_child(Main.panel);
Main.layoutManager.removeChrome(panelBox);
}
Main.layoutManager.addChrome(clipContainer, { affectsInputRegion: false });
clipContainer.add_child(panelBox);
Main.layoutManager.trackChrome(panelBox, { trackFullscreen: true, affectsStruts: true, affectsInputRegion: true });
panel = new Panel.Panel(this, monitor, panelBox, isStandalone);
panelBox.add_child(panel);
panel.enable();
panelBox.visible = true;
if (monitor.inFullscreen) {
panelBox.hide();
}
panelBox.set_position(0, 0);
return panel;
}
_reset() {
this.disable(true);
this.allPanels = [];
this.enable(true);
}
_updatePanelElementPositions() {
this.panelsElementPositions = PanelSettings.getSettingsJson(SETTINGS, 'panel-element-positions');
this.allPanels.forEach(p => p.updateElementPositions());
}
_adjustPanelMenuButton(button, monitor, arrowSide) {
if (button) {
button.menu._boxPointer._dtpSourceActor = button.menu._boxPointer.sourceActor;
button.menu._boxPointer.sourceActor = button;
button.menu._boxPointer._userArrowSide = arrowSide;
button.menu._boxPointer._dtpInPanel = 1;
if (!button.menu._boxPointer.vfunc_get_preferred_height) {
button.menu._boxPointer._dtpGetPreferredHeightId = button.menu._boxPointer._container.connect('get-preferred-height', (actor, forWidth, alloc) => {
this._getBoxPointerPreferredHeight(button.menu._boxPointer, alloc, monitor);
});
}
}
}
_getBoxPointerPreferredHeight(boxPointer, alloc, monitor) {
if (boxPointer._dtpInPanel && boxPointer.sourceActor && SETTINGS.get_boolean('intellihide')) {
monitor = monitor || Main.layoutManager.findMonitorForActor(boxPointer.sourceActor);
let panel = Utils.find(global.dashToPanel.panels, p => p.monitor == monitor);
let excess = alloc.natural_size + panel.dtpSize + 10 - monitor.height; // 10 is arbitrary
if (excess > 0) {
alloc.natural_size -= excess;
}
}
return [alloc.min_size, alloc.natural_size];
}
_findPanelMenuButtons(container) {
let panelMenuButtons = [];
let panelMenuButton;
let find = parent => parent.get_children().forEach(c => {
if ((panelMenuButton = this._getPanelMenuButton(c))) {
panelMenuButtons.push(panelMenuButton);
}
find(c);
});
find(container);
return panelMenuButtons;
}
_removePanelBarriers(panel) {
if (panel.isStandalone && panel._rightPanelBarrier) {
panel._rightPanelBarrier.destroy();
}
if (panel._leftPanelBarrier) {
panel._leftPanelBarrier.destroy();
delete panel._leftPanelBarrier;
}
}
_getPanelMenuButton(obj) {
return obj instanceof PanelMenu.Button && obj.menu?._boxPointer ? obj : 0;
}
_setKeyBindings(enable) {
let keys = {
'intellihide-key-toggle': () => this.allPanels.forEach(p => p.intellihide.toggle())
};
Object.keys(keys).forEach(k => {
Utils.removeKeybinding(k);
if (enable) {
Utils.addKeybinding(k, SETTINGS, keys[k], Shell.ActionMode.NORMAL);
}
});
}
};
// This class drives long-running icon animations, to keep them running in sync
// with each other.
export const IconAnimator = class {
constructor(actor) {
this._count = 0;
this._started = false;
this._animations = {
dance: [],
};
this._timeline = new Clutter.Timeline({
duration: 3000,
repeat_count: -1,
});
/* Just use the construction property when no need to support 3.36 */
if (this._timeline.set_actor)
this._timeline.set_actor(actor);
this._timeline.connect('new-frame', () => {
const progress = this._timeline.get_progress();
const danceRotation = progress < 1/6 ? 15*Math.sin(progress*24*Math.PI) : 0;
const dancers = this._animations.dance;
for (let i = 0, iMax = dancers.length; i < iMax; i++) {
dancers[i].target.rotation_angle_z = danceRotation;
}
});
}
destroy() {
this._timeline.stop();
this._timeline = null;
for (let name in this._animations) {
const pairs = this._animations[name];
for (let i = 0, iMax = pairs.length; i < iMax; i++) {
const pair = pairs[i];
pair.target.disconnect(pair.targetDestroyId);
}
}
this._animations = null;
}
pause() {
if (this._started && this._count > 0) {
this._timeline.stop();
}
this._started = false;
}
start() {
if (!this._started && this._count > 0) {
this._timeline.start();
}
this._started = true;
}
addAnimation(target, name) {
const targetDestroyId = target.connect('destroy', () => this.removeAnimation(target, name));
this._animations[name].push({ target: target, targetDestroyId: targetDestroyId });
if (this._started && this._count === 0) {
this._timeline.start();
}
this._count++;
}
removeAnimation(target, name) {
const pairs = this._animations[name];
for (let i = 0, iMax = pairs.length; i < iMax; i++) {
const pair = pairs[i];
if (pair.target === target) {
target.disconnect(pair.targetDestroyId);
pairs.splice(i, 1);
this._count--;
if (this._started && this._count === 0) {
this._timeline.stop();
}
return;
}
}
}
};
function newUpdateHotCorners() {
// destroy old hot corners
this.hotCorners.forEach(function(corner) {
if (corner)
corner.destroy();
});
this.hotCorners = [];
//global.settings is ubuntu specific setting to disable the hot corner (Tweak tool > Top Bar > Activities Overview Hot Corner)
//this._interfaceSettings is for the setting to disable the hot corner introduced in gnome-shell 3.34
if ((global.settings.list_keys().indexOf('enable-hot-corners') >= 0 && !global.settings.get_boolean('enable-hot-corners')) ||
(this._interfaceSettings && !this._interfaceSettings.get_boolean('enable-hot-corners'))) {
this.emit('hot-corners-changed');
return;
}
// build new hot corners
for (let i = 0; i < this.monitors.length; i++) {
let panel = Utils.find(global.dashToPanel.panels, p => p.monitor.index == i);
let panelPosition = panel ? panel.getPosition() : St.Side.BOTTOM;
let panelTopLeft = panelPosition == St.Side.TOP || panelPosition == St.Side.LEFT;
let monitor = this.monitors[i];
let cornerX = this._rtl ? monitor.x + monitor.width : monitor.x;
let cornerY = monitor.y;
let haveTopLeftCorner = true;
// If the panel is on the bottom, unless this is explicitly forced, don't add a topleft
// hot corner unless it is actually a top left panel. Otherwise, it stops the mouse
// as you are dragging across. In the future, maybe we will automatically move the
// hotcorner to the bottom when the panel is positioned at the bottom
if (i != this.primaryIndex || (!panelTopLeft && !SETTINGS.get_boolean('stockgs-force-hotcorner'))) {
// Check if we have a top left (right for RTL) corner.
// I.e. if there is no monitor directly above or to the left(right)
let besideX = this._rtl ? monitor.x + 1 : cornerX - 1;
let besideY = cornerY;
let aboveX = cornerX;
let aboveY = cornerY - 1;
for (let j = 0; j < this.monitors.length; j++) {
if (i == j)
continue;
let otherMonitor = this.monitors[j];
if (besideX >= otherMonitor.x &&
besideX < otherMonitor.x + otherMonitor.width &&
besideY >= otherMonitor.y &&
besideY < otherMonitor.y + otherMonitor.height) {
haveTopLeftCorner = false;
break;
}
if (aboveX >= otherMonitor.x &&
aboveX < otherMonitor.x + otherMonitor.width &&
aboveY >= otherMonitor.y &&
aboveY < otherMonitor.y + otherMonitor.height) {
haveTopLeftCorner = false;
break;
}
}
}
if (haveTopLeftCorner) {
let corner = new Layout.HotCorner(this, monitor, cornerX, cornerY);
corner.setBarrierSize = size => Object.getPrototypeOf(corner).setBarrierSize.call(corner, Math.min(size, 32));
corner.setBarrierSize(panel ? panel.dtpSize : 32);
this.hotCorners.push(corner);
} else {
this.hotCorners.push(null);
}
}
this.emit('hot-corners-changed');
}
function newUpdatePanelBarrier(panel) {
let barriers = {
_rightPanelBarrier: [(panel.isStandalone ? panel : this)],
_leftPanelBarrier: [panel]
};
Object.keys(barriers).forEach(k => {
let obj = barriers[k][0];
if (obj[k]) {
obj[k].destroy();
obj[k] = null;
}
});
if (!this.primaryMonitor || !panel.panelBox.height) {
return;
}
let barrierSize = Math.min(10, panel.panelBox.height);
let fixed1 = panel.monitor.y;
let fixed2 = panel.monitor.y + barrierSize;
if (panel.checkIfVertical()) {
barriers._rightPanelBarrier.push(panel.monitor.y + panel.monitor.height, Meta.BarrierDirection.NEGATIVE_Y);
barriers._leftPanelBarrier.push(panel.monitor.y, Meta.BarrierDirection.POSITIVE_Y);
} else {
barriers._rightPanelBarrier.push(panel.monitor.x + panel.monitor.width, Meta.BarrierDirection.NEGATIVE_X);
barriers._leftPanelBarrier.push(panel.monitor.x, Meta.BarrierDirection.POSITIVE_X);
}
switch (panel.getPosition()) {
//values are initialized as St.Side.TOP
case St.Side.BOTTOM:
fixed1 = panel.monitor.y + panel.monitor.height - barrierSize;
fixed2 = panel.monitor.y + panel.monitor.height;
break;
case St.Side.LEFT:
fixed1 = panel.monitor.x + barrierSize;
fixed2 = panel.monitor.x;
break;
case St.Side.RIGHT:
fixed1 = panel.monitor.x + panel.monitor.width - barrierSize;
fixed2 = panel.monitor.x + panel.monitor.width;
break;
}
//remove left barrier if it overlaps one of the hotcorners
for (let k in this.hotCorners) {
let hc = this.hotCorners[k];
if (hc && hc._monitor == panel.monitor &&
((fixed1 == hc._x || fixed2 == hc._x) || fixed1 == hc._y || fixed2 == hc._y)) {
delete barriers._leftPanelBarrier;
break;
}
}
Object.keys(barriers).forEach(k => {
let barrierOptions = {
backend: global.backend,
directions: barriers[k][2]
};
barrierOptions[panel.varCoord.c1] = barrierOptions[panel.varCoord.c2] = barriers[k][1];
barrierOptions[panel.fixedCoord.c1] = fixed1;
barrierOptions[panel.fixedCoord.c2] = fixed2;
barriers[k][0][k] = new Meta.Barrier(barrierOptions);
});
}
function _newLookingGlassResize() {
let primaryMonitorPanel = Utils.find(global.dashToPanel.panels, p => p.monitor == Main.layoutManager.primaryMonitor);
let topOffset = primaryMonitorPanel.getPosition() == St.Side.TOP ? primaryMonitorPanel.dtpSize + 8 : 32;
this._oldResize();
this._hiddenY = Main.layoutManager.primaryMonitor.y + topOffset - this.height;
this._targetY = this._hiddenY + this.height;
this.y = this._hiddenY;
this._objInspector.set_position(this.x + Math.floor(this.width * 0.1), this._targetY + Math.floor(this.height * 0.1));
}
function _newLookingGlassOpen() {
if (this._open)
return;
this._resize();
this._oldOpen();
}

View File

@ -0,0 +1,61 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*/
export const SHOW_APPS_BTN = 'showAppsButton';
export const ACTIVITIES_BTN = 'activitiesButton';
export const TASKBAR = 'taskbar';
export const DATE_MENU = 'dateMenu';
export const SYSTEM_MENU = 'systemMenu';
export const LEFT_BOX = 'leftBox';
export const CENTER_BOX = 'centerBox';
export const RIGHT_BOX = 'rightBox';
export const DESKTOP_BTN = 'desktopButton';
export const STACKED_TL = 'stackedTL';
export const STACKED_BR = 'stackedBR';
export const CENTERED = 'centered';
export const CENTERED_MONITOR = 'centerMonitor';
export const TOP = 'TOP';
export const BOTTOM = 'BOTTOM';
export const LEFT = 'LEFT';
export const RIGHT = 'RIGHT';
export const START = 'START';
export const MIDDLE = 'MIDDLE';
export const END = 'END';
export const defaults = [
{ element: SHOW_APPS_BTN, visible: true, position: STACKED_TL },
{ element: ACTIVITIES_BTN, visible: false, position: STACKED_TL },
{ element: LEFT_BOX, visible: true, position: STACKED_TL },
{ element: TASKBAR, visible: true, position: STACKED_TL },
{ element: CENTER_BOX, visible: true, position: STACKED_BR },
{ element: RIGHT_BOX, visible: true, position: STACKED_BR },
{ element: DATE_MENU, visible: true, position: STACKED_BR },
{ element: SYSTEM_MENU, visible: true, position: STACKED_BR },
{ element: DESKTOP_BTN, visible: true, position: STACKED_BR },
];
export const optionDialogFunctions = {};
optionDialogFunctions[SHOW_APPS_BTN] = '_showShowAppsButtonOptions';
optionDialogFunctions[DESKTOP_BTN] = '_showDesktopButtonOptions';
export function checkIfCentered(position) {
return position == CENTERED || position == CENTERED_MONITOR;
}

View File

@ -0,0 +1,111 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*/
import * as Pos from './panelPositions.js';
/** Return object representing a settings value that is stored as JSON. */
export function getSettingsJson(settings, setting) {
try {
return JSON.parse(settings.get_string(setting));
} catch(e) {
log('Error parsing positions: ' + e.message);
}
}
/** Write value object as JSON to setting in settings. */
export function setSettingsJson(settings, setting, value) {
try {
const json = JSON.stringify(value);
settings.set_string(setting, json);
} catch(e) {
log('Error serializing setting: ' + e.message);
}
}
/** Returns size of panel on a specific monitor, in pixels. */
export function getPanelSize(settings, monitorIndex) {
const sizes = getSettingsJson(settings, 'panel-sizes');
// Pull in deprecated setting if panel-sizes does not have setting for monitor.
const fallbackSize = settings.get_int('panel-size');
const theDefault = 48;
return sizes[monitorIndex] || fallbackSize || theDefault;
}
export function setPanelSize(settings, monitorIndex, value) {
if (!(Number.isInteger(value) && value <= 128 && value >= 16)) {
log('Not setting invalid panel size: ' + value);
return;
}
let sizes = getSettingsJson(settings, 'panel-sizes');
sizes[monitorIndex] = value;
setSettingsJson(settings, 'panel-sizes', sizes);
}
/**
* Returns length of panel on a specific monitor, as a whole number percent,
* from settings. e.g. 100
*/
export function getPanelLength(settings, monitorIndex) {
const lengths = getSettingsJson(settings, 'panel-lengths');
const theDefault = 100;
return lengths[monitorIndex] || theDefault;
}
export function setPanelLength(settings, monitorIndex, value) {
if (!(Number.isInteger(value) && value <= 100 && value >= 0)) {
log('Not setting invalid panel length: ' + value);
return;
}
let lengths = getSettingsJson(settings, 'panel-lengths');
lengths[monitorIndex] = value;
setSettingsJson(settings, 'panel-lengths', lengths);
}
/** Returns position of panel on a specific monitor. */
export function getPanelPosition(settings, monitorIndex) {
const positions = getSettingsJson(settings, 'panel-positions');
const fallbackPosition = settings.get_string('panel-position');
const theDefault = Pos.BOTTOM;
return positions[monitorIndex] || fallbackPosition || theDefault;
}
export function setPanelPosition(settings, monitorIndex, value) {
if (!(value === Pos.TOP || value === Pos.BOTTOM || value === Pos.LEFT
|| value === Pos.RIGHT)) {
log('Not setting invalid panel position: ' + value);
return;
}
const positions = getSettingsJson(settings, 'panel-positions');
positions[monitorIndex] = value;
setSettingsJson(settings, 'panel-positions', positions);
}
/** Returns anchor location of panel on a specific monitor. */
export function getPanelAnchor(settings, monitorIndex) {
const anchors = getSettingsJson(settings, 'panel-anchors');
const theDefault = Pos.MIDDLE;
return anchors[monitorIndex] || theDefault;
}
export function setPanelAnchor(settings, monitorIndex, value) {
if (!(value === Pos.START || value === Pos.MIDDLE || value === Pos.END)) {
log('Not setting invalid panel anchor: ' + value);
return;
}
const anchors = getSettingsJson(settings, 'panel-anchors');
anchors[monitorIndex] = value;
setSettingsJson(settings, 'panel-anchors', anchors);
}

View File

@ -0,0 +1,314 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
* Credits:
* Ideas for recursing child actors and assigning inline styles
* are based on code from the StatusAreaHorizontalSpacing extension
* https://bitbucket.org/mathematicalcoffee/status-area-horizontal-spacing-gnome-shell-extension
* mathematical.coffee@gmail.com
*/
import * as Utils from './utils.js';
import {SETTINGS} from './extension.js';
export const PanelStyle = class {
enable(panel) {
this.panel = panel;
this._applyStyles();
this._bindSettingsChanges();
}
disable() {
for (let i = 0; i < this._dtpSettingsSignalIds.length; ++i) {
SETTINGS.disconnect(this._dtpSettingsSignalIds[i]);
}
this._removeStyles();
}
_bindSettingsChanges() {
let configKeys = [
"tray-size",
"leftbox-size",
"tray-padding",
"leftbox-padding",
"status-icon-padding",
];
this._dtpSettingsSignalIds = [];
for(let i in configKeys) {
this._dtpSettingsSignalIds.push(SETTINGS.connect('changed::' + configKeys[i], () => {
this._removeStyles();
this._applyStyles();
}));
}
}
_applyStyles() {
this._rightBoxOperations = [];
let trayPadding = SETTINGS.get_int('tray-padding');
let isVertical = this.panel.checkIfVertical();
let paddingStyle = 'padding: ' + (isVertical ? '%dpx 0' : '0 %dpx');
if(trayPadding >= 0) {
let operation = {};
let trayPaddingStyleLine;
if (isVertical) {
trayPaddingStyleLine = paddingStyle.format(trayPadding);
operation.compareFn = function (actor) {
let parent = actor.get_parent();
return ((parent && parent.has_style_class_name && (parent.has_style_class_name('panel-button') && !parent.has_style_class_name('clock-display'))) ||
(actor.has_style_class_name && actor.has_style_class_name('clock')));
};
} else {
trayPaddingStyleLine = '-natural-hpadding: %dpx'.format(trayPadding);
if (trayPadding < 6) {
trayPaddingStyleLine += '; -minimum-hpadding: %dpx'.format(trayPadding);
}
operation.compareFn = function (actor) {
return (actor.has_style_class_name && actor.has_style_class_name('panel-button'));
};
}
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, trayPaddingStyleLine, operationIdx);
this._refreshPanelButton(actor);
};
this._rightBoxOperations.push(operation);
}
let statusIconPadding = SETTINGS.get_int('status-icon-padding');
if(statusIconPadding >= 0) {
let statusIconPaddingStyleLine = paddingStyle.format(statusIconPadding)
let operation = {};
operation.compareFn = function (actor) {
return (actor.has_style_class_name && actor.has_style_class_name('system-status-icon'));
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, statusIconPaddingStyleLine, operationIdx);
};
this._rightBoxOperations.push(operation);
}
let trayContentSize = SETTINGS.get_int('tray-size');
if(trayContentSize > 0) {
let trayIconSizeStyleLine = 'icon-size: %dpx'.format(trayContentSize)
let operation = {};
operation.compareFn = function (actor) {
return (actor.constructor && actor.constructor.name == 'St_Icon');
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, trayIconSizeStyleLine, operationIdx);
};
this._rightBoxOperations.push(operation);
let trayContentSizeStyleLine = 'font-size: %dpx'.format(trayContentSize)
operation = {};
operation.compareFn = function (actor) {
return (actor.constructor && actor.constructor.name == 'St_Label');
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, trayContentSizeStyleLine, operationIdx);
};
this._rightBoxOperations.push(operation);
this._overrideStyle(this.panel._rightBox, trayContentSizeStyleLine, 0);
this._overrideStyle(this.panel._centerBox, trayContentSizeStyleLine, 0);
}
// center box has been moved next to the right box and will be treated the same
this._centerBoxOperations = this._rightBoxOperations;
this._leftBoxOperations = [];
let leftboxPadding = SETTINGS.get_int('leftbox-padding');
if(leftboxPadding >= 0) {
let leftboxPaddingStyleLine = paddingStyle.format(leftboxPadding);
let operation = {};
operation.compareFn = function (actor) {
let parent = actor.get_parent();
return (parent && parent.has_style_class_name && parent.has_style_class_name('panel-button'));
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, leftboxPaddingStyleLine, operationIdx);
};
this._leftBoxOperations.push(operation);
}
let leftboxContentSize = SETTINGS.get_int('leftbox-size');
if(leftboxContentSize > 0) {
let leftboxIconSizeStyleLine = 'icon-size: %dpx'.format(leftboxContentSize)
let operation = {};
operation.compareFn = function (actor) {
return (actor.constructor && actor.constructor.name == 'St_Icon');
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, leftboxIconSizeStyleLine, operationIdx);
};
this._leftBoxOperations.push(operation);
let leftboxContentSizeStyleLine = 'font-size: %dpx'.format(leftboxContentSize)
operation = {};
operation.compareFn = function (actor) {
return (actor.constructor && actor.constructor.name == 'St_Label');
};
operation.applyFn = (actor, operationIdx) => {
this._overrideStyle(actor, leftboxContentSizeStyleLine, operationIdx);
};
this._leftBoxOperations.push(operation);
this._overrideStyle(this.panel._leftBox, leftboxContentSizeStyleLine, 0);
}
this._applyStylesRecursively();
/* connect signal */
this._rightBoxActorAddedID = this.panel._rightBox.connect('child-added',
(container, actor) => {
if(this._rightBoxOperations.length && !this._ignoreAddedChild)
this._recursiveApply(actor, this._rightBoxOperations);
this._ignoreAddedChild = 0;
}
);
this._centerBoxActorAddedID = this.panel._centerBox.connect('child-added',
(container, actor) => {
if(this._centerBoxOperations.length && !this._ignoreAddedChild)
this._recursiveApply(actor, this._centerBoxOperations);
this._ignoreAddedChild = 0;
}
);
this._leftBoxActorAddedID = this.panel._leftBox.connect('child-added',
(container, actor) => {
if(this._leftBoxOperations.length)
this._recursiveApply(actor, this._leftBoxOperations);
}
);
}
_removeStyles() {
/* disconnect signal */
if (this._rightBoxActorAddedID)
this.panel._rightBox.disconnect(this._rightBoxActorAddedID);
if (this._centerBoxActorAddedID)
this.panel._centerBox.disconnect(this._centerBoxActorAddedID);
if (this._leftBoxActorAddedID)
this.panel._leftBox.disconnect(this._leftBoxActorAddedID);
this._restoreOriginalStyle(this.panel._rightBox);
this._restoreOriginalStyle(this.panel._centerBox);
this._restoreOriginalStyle(this.panel._leftBox);
this._applyStylesRecursively(true);
}
_applyStylesRecursively(restore) {
/*recurse actors */
if(this._rightBoxOperations.length) {
// add the system menu as we move it from the rightbox to the panel to position it independently
let children = this.panel._rightBox.get_children().concat([this.panel.statusArea[Utils.getSystemMenuInfo().name].container]);
for(let i in children)
this._recursiveApply(children[i], this._rightBoxOperations, restore);
}
if(this._centerBoxOperations.length) {
// add the date menu as we move it from the centerbox to the panel to position it independently
let children = this.panel._centerBox.get_children().concat([this.panel.statusArea.dateMenu.container]);
for(let i in children)
this._recursiveApply(children[i], this._centerBoxOperations, restore);
}
if(this._leftBoxOperations.length) {
let children = this.panel._leftBox.get_children();
for(let i in children)
this._recursiveApply(children[i], this._leftBoxOperations, restore);
}
}
_recursiveApply(actor, operations, restore) {
for(let i in operations) {
let o = operations[i];
if(o.compareFn(actor))
if(restore)
o.restoreFn ? o.restoreFn(actor) : this._restoreOriginalStyle(actor);
else
o.applyFn(actor, i);
}
if(actor.get_children) {
let children = actor.get_children();
for(let i in children) {
this._recursiveApply(children[i], operations, restore);
}
}
}
_overrideStyle(actor, styleLine, operationIdx) {
if (actor._dtp_original_inline_style === undefined) {
actor._dtp_original_inline_style = actor.get_style();
}
if(actor._dtp_style_overrides === undefined) {
actor._dtp_style_overrides = {};
}
actor._dtp_style_overrides[operationIdx] = styleLine;
let newStyleLine = '';
for(let i in actor._dtp_style_overrides)
newStyleLine += actor._dtp_style_overrides[i] + '; ';
actor.set_style(newStyleLine + (actor._dtp_original_inline_style || ''));
}
_restoreOriginalStyle(actor) {
if (actor._dtp_original_inline_style !== undefined) {
actor.set_style(actor._dtp_original_inline_style);
delete actor._dtp_original_inline_style;
delete actor._dtp_style_overrides;
}
if (actor.has_style_class_name('panel-button')) {
this._refreshPanelButton(actor);
}
}
_refreshPanelButton(actor) {
if (actor.visible) {
//force gnome 3.34+ to refresh (having problem with the -natural-hpadding)
let parent = actor.get_parent();
let children = parent.get_children();
let actorIndex = 0;
if (children.length > 1) {
actorIndex = children.indexOf(actor);
}
this._ignoreAddedChild = [this.panel._centerBox, this.panel._rightBox].indexOf(parent) >= 0;
parent.remove_child(actor);
parent.insert_child_at_index(actor, actorIndex);
}
}
}

View File

@ -0,0 +1,597 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
*
* Credits:
* This file is based on code from the Dash to Dock extension by micheleg
*/
import Cairo from 'cairo';
import Gio from 'gi://Gio';
import Clutter from 'gi://Clutter';
import Pango from 'gi://Pango';
import St from 'gi://St';
import * as Utils from './utils.js';
import {SETTINGS} from './extension.js';
import {EventEmitter} from 'resource:///org/gnome/shell/misc/signals.js';
export const ProgressManager = class extends EventEmitter {
constructor() {
super();
this._entriesByDBusName = {};
this._launcher_entry_dbus_signal_id =
Gio.DBus.session.signal_subscribe(null, // sender
'com.canonical.Unity.LauncherEntry', // iface
null, // member
null, // path
null, // arg0
Gio.DBusSignalFlags.NONE,
this._onEntrySignalReceived.bind(this));
this._dbus_name_owner_changed_signal_id =
Gio.DBus.session.signal_subscribe('org.freedesktop.DBus', // sender
'org.freedesktop.DBus', // interface
'NameOwnerChanged', // member
'/org/freedesktop/DBus', // path
null, // arg0
Gio.DBusSignalFlags.NONE,
this._onDBusNameOwnerChanged.bind(this));
this._acquireUnityDBus();
}
destroy() {
if (this._launcher_entry_dbus_signal_id) {
Gio.DBus.session.signal_unsubscribe(this._launcher_entry_dbus_signal_id);
}
if (this._dbus_name_owner_changed_signal_id) {
Gio.DBus.session.signal_unsubscribe(this._dbus_name_owner_changed_signal_id);
}
this._releaseUnityDBus();
}
size() {
return Object.keys(this._entriesByDBusName).length;
}
lookupByDBusName(dbusName) {
return this._entriesByDBusName.hasOwnProperty(dbusName) ? this._entriesByDBusName[dbusName] : null;
}
lookupById(appId) {
let ret = [];
for (let dbusName in this._entriesByDBusName) {
let entry = this._entriesByDBusName[dbusName];
if (entry && entry.appId() == appId) {
ret.push(entry);
}
}
return ret;
}
addEntry(entry) {
let existingEntry = this.lookupByDBusName(entry.dbusName());
if (existingEntry) {
existingEntry.update(entry);
} else {
this._entriesByDBusName[entry.dbusName()] = entry;
this.emit('progress-entry-added', entry);
}
}
removeEntry(entry) {
delete this._entriesByDBusName[entry.dbusName()]
this.emit('progress-entry-removed', entry);
}
_acquireUnityDBus() {
if (!this._unity_bus_id) {
Gio.DBus.session.own_name('com.canonical.Unity',
Gio.BusNameOwnerFlags.ALLOW_REPLACEMENT, null, null);
}
}
_releaseUnityDBus() {
if (this._unity_bus_id) {
Gio.DBus.session.unown_name(this._unity_bus_id);
this._unity_bus_id = 0;
}
}
_onEntrySignalReceived(connection, sender_name, object_path,
interface_name, signal_name, parameters, user_data) {
if (!parameters || !signal_name)
return;
if (signal_name == 'Update') {
if (!sender_name) {
return;
}
this._handleUpdateRequest(sender_name, parameters);
}
}
_onDBusNameOwnerChanged(connection, sender_name, object_path,
interface_name, signal_name, parameters, user_data) {
if (!parameters || !this.size())
return;
let [name, before, after] = parameters.deep_unpack();
if (!after) {
if (this._entriesByDBusName.hasOwnProperty(before)) {
this.removeEntry(this._entriesByDBusName[before]);
}
}
}
_handleUpdateRequest(senderName, parameters) {
if (!senderName || !parameters) {
return;
}
let [appUri, properties] = parameters.deep_unpack();
let appId = appUri.replace(/(^\w+:|^)\/\//, '');
let entry = this.lookupByDBusName(senderName);
if (entry) {
entry.setDBusName(senderName);
entry.update(properties);
} else {
let entry = new AppProgress(senderName, appId, properties);
this.addEntry(entry);
}
}
};
export class AppProgress extends EventEmitter {
constructor(dbusName, appId, properties) {
super();
this._dbusName = dbusName;
this._appId = appId;
this._count = 0;
this._countVisible = false;
this._progress = 0.0;
this._progressVisible = false;
this._urgent = false;
this.update(properties);
}
appId() {
return this._appId;
}
dbusName() {
return this._dbusName;
}
count() {
return this._count;
}
setCount(count) {
if (this._count != count) {
this._count = count;
this.emit('count-changed', this._count);
}
}
countVisible() {
return this._countVisible;
}
setCountVisible(countVisible) {
if (this._countVisible != countVisible) {
this._countVisible = countVisible;
this.emit('count-visible-changed', this._countVisible);
}
}
progress() {
return this._progress;
}
setProgress(progress) {
if (this._progress != progress) {
this._progress = progress;
this.emit('progress-changed', this._progress);
}
}
progressVisible() {
return this._progressVisible;
}
setProgressVisible(progressVisible) {
if (this._progressVisible != progressVisible) {
this._progressVisible = progressVisible;
this.emit('progress-visible-changed', this._progressVisible);
}
}
urgent() {
return this._urgent;
}
setUrgent(urgent) {
if (this._urgent != urgent) {
this._urgent = urgent;
this.emit('urgent-changed', this._urgent);
}
}
setDBusName(dbusName) {
if (this._dbusName != dbusName) {
let oldName = this._dbusName;
this._dbusName = dbusName;
this.emit('dbus-name-changed', oldName);
}
}
update(other) {
if (other instanceof AppProgress) {
this.setDBusName(other.dbusName())
this.setCount(other.count());
this.setCountVisible(other.countVisible());
this.setProgress(other.progress());
this.setProgressVisible(other.progressVisible())
this.setUrgent(other.urgent());
} else {
for (let property in other) {
if (other.hasOwnProperty(property)) {
if (property == 'count') {
this.setCount(other[property].get_int64());
} else if (property == 'count-visible') {
this.setCountVisible(SETTINGS.get_boolean('progress-show-count') && other[property].get_boolean());
} else if (property == 'progress') {
this.setProgress(other[property].get_double());
} else if (property == 'progress-visible') {
this.setProgressVisible(SETTINGS.get_boolean('progress-show-bar') && other[property].get_boolean());
} else if (property == 'urgent') {
this.setUrgent(other[property].get_boolean());
} else {
// Not implemented yet
}
}
}
}
}
}
export const ProgressIndicator = class {
constructor(source, progressManager) {
this._source = source;
this._progressManager = progressManager;
this._signalsHandler = new Utils.GlobalSignalsHandler();
this._sourceDestroyId = this._source.connect('destroy', () => {
this._signalsHandler.destroy();
});
this._notificationBadgeLabel = new St.Label({ style_class: 'badge' });
this._notificationBadgeBin = new St.Bin({
child: this._notificationBadgeLabel, y: 2, x: 2
});
this._notificationBadgeLabel.add_style_class_name('notification-badge');
this._notificationBadgeCount = 0;
this._notificationBadgeBin.hide();
this._source._dtpIconContainer.add_child(this._notificationBadgeBin);
this._source._dtpIconContainer.connect('notify::allocation', this.updateNotificationBadge.bind(this));
this._progressManagerEntries = [];
this._progressManager.lookupById(this._source.app.id).forEach(
(entry) => {
this.insertEntry(entry);
}
);
this._signalsHandler.add([
this._progressManager,
'progress-entry-added',
this._onEntryAdded.bind(this)
], [
this._progressManager,
'progress-entry-removed',
this._onEntryRemoved.bind(this)
]);
}
destroy() {
this._source.disconnect(this._sourceDestroyId);
this._signalsHandler.destroy();
}
_onEntryAdded(appProgress, entry) {
if (!entry || !entry.appId())
return;
if (this._source && this._source.app && this._source.app.id == entry.appId()) {
this.insertEntry(entry);
}
}
_onEntryRemoved(appProgress, entry) {
if (!entry || !entry.appId())
return;
if (this._source && this._source.app && this._source.app.id == entry.appId()) {
this.removeEntry(entry);
}
}
updateNotificationBadge() {
this._source.updateNumberOverlay(this._notificationBadgeBin);
this._notificationBadgeLabel.clutter_text.ellipsize = Pango.EllipsizeMode.MIDDLE;
}
_notificationBadgeCountToText(count) {
if (count <= 9999) {
return count.toString();
} else if (count < 1e5) {
let thousands = count / 1e3;
return thousands.toFixed(1).toString() + "k";
} else if (count < 1e6) {
let thousands = count / 1e3;
return thousands.toFixed(0).toString() + "k";
} else if (count < 1e8) {
let millions = count / 1e6;
return millions.toFixed(1).toString() + "M";
} else if (count < 1e9) {
let millions = count / 1e6;
return millions.toFixed(0).toString() + "M";
} else {
let billions = count / 1e9;
return billions.toFixed(1).toString() + "B";
}
}
setNotificationBadge(count) {
this._notificationBadgeCount = count;
let text = this._notificationBadgeCountToText(count);
this._notificationBadgeLabel.set_text(text);
}
toggleNotificationBadge(activate) {
if (activate && this._notificationBadgeCount > 0) {
this.updateNotificationBadge();
this._notificationBadgeBin.show();
}
else
this._notificationBadgeBin.hide();
}
_showProgressOverlay() {
if (this._progressOverlayArea) {
this._updateProgressOverlay();
return;
}
this._progressOverlayArea = new St.DrawingArea({x_expand: true, y_expand: true});
this._progressOverlayArea.add_style_class_name('progress-bar');
this._progressOverlayArea.connect('repaint', () => {
this._drawProgressOverlay(this._progressOverlayArea);
});
this._source._iconContainer.add_child(this._progressOverlayArea);
let node = this._progressOverlayArea.get_theme_node();
let [hasColor, color] = node.lookup_color('-progress-bar-background', false);
if (hasColor)
this._progressbar_background = color
else
this._progressbar_background = new Utils.ColorUtils.Color({red: 204, green: 204, blue: 204, alpha: 255});
[hasColor, color] = node.lookup_color('-progress-bar-border', false);
if (hasColor)
this._progressbar_border = color;
else
this._progressbar_border = new Utils.ColorUtils.Color({red: 230, green: 230, blue: 230, alpha: 255});
this._updateProgressOverlay();
}
_hideProgressOverlay() {
if (this._progressOverlayArea)
this._progressOverlayArea.destroy();
this._progressOverlayArea = null;
this._progressbar_background = null;
this._progressbar_border = null;
}
_updateProgressOverlay() {
if (this._progressOverlayArea) {
this._progressOverlayArea.queue_repaint();
}
}
_drawProgressOverlay(area) {
let scaleFactor = Utils.getScaleFactor();
let [surfaceWidth, surfaceHeight] = area.get_surface_size();
let cr = area.get_context();
let iconSize = this._source.icon.iconSize * scaleFactor;
let x = Math.floor((surfaceWidth - iconSize) / 2);
let y = Math.floor((surfaceHeight - iconSize) / 2);
let lineWidth = Math.floor(1.0 * scaleFactor);
let padding = Math.floor(iconSize * 0.05);
let width = iconSize - 2.0*padding;
let height = Math.floor(Math.min(18.0*scaleFactor, 0.20*iconSize));
x += padding;
y += iconSize - height - padding;
cr.setLineWidth(lineWidth);
// Draw the outer stroke
let stroke = new Cairo.LinearGradient(0, y, 0, y + height);
let fill = null;
stroke.addColorStopRGBA(0.5, 0.5, 0.5, 0.5, 0.1);
stroke.addColorStopRGBA(0.9, 0.8, 0.8, 0.8, 0.4);
Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, width, height, true, true, stroke, fill);
// Draw the background
x += lineWidth;
y += lineWidth;
width -= 2.0*lineWidth;
height -= 2.0*lineWidth;
stroke = Cairo.SolidPattern.createRGBA(0.20, 0.20, 0.20, 0.9);
fill = new Cairo.LinearGradient(0, y, 0, y + height);
fill.addColorStopRGBA(0.4, 0.25, 0.25, 0.25, 1.0);
fill.addColorStopRGBA(0.9, 0.35, 0.35, 0.35, 1.0);
Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, width, height, true, true, stroke, fill);
// Draw the finished bar
x += lineWidth;
y += lineWidth;
width -= 2.0*lineWidth;
height -= 2.0*lineWidth;
let finishedWidth = Math.ceil(this._progress * width);
let bg = this._progressbar_background;
let bd = this._progressbar_border;
stroke = Cairo.SolidPattern.createRGBA(bd.red/255, bd.green/255, bd.blue/255, bd.alpha/255);
fill = Cairo.SolidPattern.createRGBA(bg.red/255, bg.green/255, bg.blue/255, bg.alpha/255);
if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL)
Utils.drawRoundedLine(cr, x + lineWidth/2.0 + width - finishedWidth, y + lineWidth/2.0, finishedWidth, height, true, true, stroke, fill);
else
Utils.drawRoundedLine(cr, x + lineWidth/2.0, y + lineWidth/2.0, finishedWidth, height, true, true, stroke, fill);
cr.$dispose();
}
setProgress(progress) {
this._progress = Math.min(Math.max(progress, 0.0), 1.0);
this._updateProgressOverlay();
}
toggleProgressOverlay(activate) {
if (activate) {
this._showProgressOverlay();
}
else {
this._hideProgressOverlay();
}
}
insertEntry(appProgress) {
if (!appProgress || this._progressManagerEntries.indexOf(appProgress) !== -1)
return;
this._progressManagerEntries.push(appProgress);
this._selectEntry(appProgress);
}
removeEntry(appProgress) {
if (!appProgress || this._progressManagerEntries.indexOf(appProgress) == -1)
return;
this._progressManagerEntries.splice(this._progressManagerEntries.indexOf(appProgress), 1);
if (this._progressManagerEntries.length > 0) {
this._selectEntry(this._progressManagerEntries[this._progressManagerEntries.length-1]);
} else {
this.setNotificationBadge(0);
this.toggleNotificationBadge(false);
this.setProgress(0);
this.toggleProgressOverlay(false);
this.setUrgent(false);
}
}
_selectEntry(appProgress) {
if (!appProgress)
return;
this._signalsHandler.removeWithLabel('progress-entry');
this._signalsHandler.addWithLabel('progress-entry',
[
appProgress,
'count-changed',
(appProgress, value) => {
this.setNotificationBadge(value);
}
], [
appProgress,
'count-visible-changed',
(appProgress, value) => {
this.toggleNotificationBadge(value);
}
], [
appProgress,
'progress-changed',
(appProgress, value) => {
this.setProgress(value);
}
], [
appProgress,
'progress-visible-changed',
(appProgress, value) => {
this.toggleProgressOverlay(value);
}
], [
appProgress,
'urgent-changed',
(appProgress, value) => {
this.setUrgent(value)
}
]);
this.setNotificationBadge(appProgress.count());
this.toggleNotificationBadge(appProgress.countVisible());
this.setProgress(appProgress.progress());
this.toggleProgressOverlay(appProgress.progressVisible());
this._isUrgent = false;
}
setUrgent(urgent) {
const icon = this._source.icon._iconBin;
if (urgent) {
if (!this._isUrgent) {
icon.set_pivot_point(0.5, 0.5);
this._source.iconAnimator.addAnimation(icon, 'dance');
this._isUrgent = true;
}
} else {
if (this._isUrgent) {
this._source.iconAnimator.removeAnimation(icon, 'dance');
this._isUrgent = false;
}
icon.rotation_angle_z = 0;
}
}
};

View File

@ -0,0 +1,256 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*/
import Meta from 'gi://Meta';
import Mtk from 'gi://Mtk';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as Utils from './utils.js';
//timeout intervals
const MIN_UPDATE_MS = 200;
//timeout names
const T1 = 'limitUpdateTimeout';
export const Mode = {
ALL_WINDOWS: 0,
FOCUSED_WINDOWS: 1,
MAXIMIZED_WINDOWS: 2
};
export class ProximityWatch {
constructor(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
this.actor = actor;
this.monitorIndex = monitorIndex
this.overlap = false;
this.mode = mode;
this.threshold = [xThreshold, yThreshold];
this.handler = handler;
this._allocationChangedId = actor.connect('notify::allocation', () => this._updateWatchRect());
this._updateWatchRect();
}
destroy() {
this.actor.disconnect(this._allocationChangedId);
}
_updateWatchRect() {
let [actorX, actorY] = this.actor.get_position();
this.rect = new Mtk.Rectangle({
x: actorX - this.threshold[0],
y: actorY - this.threshold[1],
width: this.actor.width + this.threshold[0] * 2,
height: this.actor.height + this.threshold[1] * 2
});
}
};
export const ProximityManager = class {
constructor() {
this._counter = 1;
this._watches = {};
this._focusedWindowInfo = null;
this._signalsHandler = new Utils.GlobalSignalsHandler();
this._timeoutsHandler = new Utils.TimeoutsHandler();
this._bindSignals();
this._setFocusedWindow();
}
createWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler) {
let watch = new ProximityWatch(actor, monitorIndex, mode, xThreshold, yThreshold, handler);
this._watches[this._counter] = watch;
this.update();
return this._counter++;
}
removeWatch(id) {
if (this._watches[id]) {
this._watches[id].destroy();
delete this._watches[id];
}
}
update() {
this._queueUpdate(true);
}
destroy() {
this._signalsHandler.destroy();
this._timeoutsHandler.destroy();
this._disconnectFocusedWindow();
Object.keys(this._watches).forEach(id => this.removeWatch(id));
}
_bindSignals() {
this._signalsHandler.add(
[
global.window_manager,
'switch-workspace',
() => this._queueUpdate()
],
[
Main.overview,
'hidden',
() => this._queueUpdate()
],
[
global.display,
'notify::focus-window',
() => {
this._setFocusedWindow();
this._queueUpdate();
}
],
[
global.display,
'restacked',
() => this._queueUpdate()
]
);
}
_setFocusedWindow() {
this._disconnectFocusedWindow();
let focusedWindow = global.display.focus_window;
if (focusedWindow) {
let focusedWindowInfo = this._getFocusedWindowInfo(focusedWindow);
if (focusedWindowInfo && this._checkIfHandledWindowType(focusedWindowInfo.metaWindow)) {
focusedWindowInfo.allocationId = focusedWindowInfo.window.connect('notify::allocation', () => this._queueUpdate());
focusedWindowInfo.destroyId = focusedWindowInfo.window.connect('destroy', () => this._disconnectFocusedWindow(true));
this._focusedWindowInfo = focusedWindowInfo;
}
}
}
_getFocusedWindowInfo(focusedWindow) {
let window = focusedWindow.get_compositor_private();
let focusedWindowInfo;
if (window) {
focusedWindowInfo = { window: window };
focusedWindowInfo.metaWindow = focusedWindow;
if (focusedWindow.is_attached_dialog()) {
let mainMetaWindow = focusedWindow.get_transient_for();
if (focusedWindowInfo.metaWindow.get_frame_rect().height < mainMetaWindow.get_frame_rect().height) {
focusedWindowInfo.window = mainMetaWindow.get_compositor_private();
focusedWindowInfo.metaWindow = mainMetaWindow;
}
}
}
return focusedWindowInfo;
}
_disconnectFocusedWindow(destroy) {
if (this._focusedWindowInfo && !destroy) {
this._focusedWindowInfo.window.disconnect(this._focusedWindowInfo.allocationId);
this._focusedWindowInfo.window.disconnect(this._focusedWindowInfo.destroyId);
}
this._focusedWindowInfo = null;
}
_getHandledWindows() {
return Utils.getCurrentWorkspace()
.list_windows()
.filter(mw => this._checkIfHandledWindow(mw));
}
_checkIfHandledWindow(metaWindow) {
return metaWindow &&
!metaWindow.minimized &&
!metaWindow.customJS_ding &&
this._checkIfHandledWindowType(metaWindow);
}
_checkIfHandledWindowType(metaWindow) {
let metaWindowType = metaWindow.get_window_type();
//https://www.roojs.org/seed/gir-1.2-gtk-3.0/seed/Meta.WindowType.html
return metaWindowType <= Meta.WindowType.SPLASHSCREEN &&
metaWindowType != Meta.WindowType.DESKTOP;
}
_queueUpdate(noDelay) {
if (!noDelay && this._timeoutsHandler.getId(T1)) {
//limit the number of updates
this._pendingUpdate = true;
return;
}
this._timeoutsHandler.add([T1, MIN_UPDATE_MS, () => this._endLimitUpdate()]);
let metaWindows = this._getHandledWindows();
Object.keys(this._watches).forEach(id => {
let watch = this._watches[id];
let overlap = !!this._update(watch, metaWindows);
if (overlap !== watch.overlap) {
watch.handler(overlap);
watch.overlap = overlap;
}
});
}
_endLimitUpdate() {
if (this._pendingUpdate) {
this._pendingUpdate = false;
this._queueUpdate();
}
}
_update(watch, metaWindows) {
if (watch.mode === Mode.FOCUSED_WINDOWS)
return (this._focusedWindowInfo &&
this._checkIfHandledWindow(this._focusedWindowInfo.metaWindow) &&
this._checkProximity(this._focusedWindowInfo.metaWindow, watch));
if (watch.mode === Mode.MAXIMIZED_WINDOWS)
return metaWindows.some(mw => mw.maximized_vertically && mw.maximized_horizontally &&
mw.get_monitor() == watch.monitorIndex);
//Mode.ALL_WINDOWS
return metaWindows.some(mw => this._checkProximity(mw, watch));
}
_checkProximity(metaWindow, watch) {
let windowRect = metaWindow.get_frame_rect();
return windowRect.overlap(watch.rect) &&
((!watch.threshold[0] && !watch.threshold[1]) ||
metaWindow.get_monitor() == watch.monitorIndex ||
windowRect.overlap(global.display.get_monitor_geometry(watch.monitorIndex)));
}
};

View File

@ -0,0 +1,155 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
*
* Credits:
* This file is based on code from the Dash to Dock extension by micheleg
* and code from the Taskbar extension by Zorin OS
* Some code was also adapted from the upstream Gnome Shell source code.
*/
#dashtopanelTaskbar .dash-item-container > StWidget,
.dashtopanelMainPanel .dash-item-container .show-apps {
margin: 0;
padding: 0;
}
#dashtopanelScrollview .overview-tile,
.dashtopanelMainPanel .overview-tile {
background: none;
}
#dashtopanelScrollview .overview-tile .overview-label {
/* must match TITLE_RIGHT_PADDING in apppicons.js */
padding-right: 8px;
text-align: left;
}
#dashtopanelScrollview .overview-tile:hover .dtp-container,
#dashtopanelScrollview .overview-tile:focus .dtp-container,
.dashtopanelMainPanel .dash-item-container .show-apps:hover {
background-color: rgba(238, 238, 238, 0.1);
}
.dashtopanelMainPanel .dash-item-container .show-apps .overview-icon {
color: #FFF;
}
#dashtopanelTaskbar .dash-item-container .overview-tile:hover,
#dashtopanelTaskbar .dash-item-container .overview-tile .dtp-container .overview-icon,
#dashtopanelScrollview .overview-tile:hover .dtp-container.animate-appicon-hover,
.dashtopanelMainPanel .dash-item-container .show-apps:hover .overview-icon {
background: none;
}
#dashtopanelScrollview .overview-tile:active .dtp-container {
background-color: rgba(238, 238, 236, 0.18);
}
#dashtopanelScrollview .overview-tile .favorite {
background-color: rgba(80, 150, 255, 0.4);
}
#dashtopanelTaskbar .scrollview-fade {
background-gradient-end: rgba(0, 0, 0, 0);
}
.dashtopanelSecondaryMenu {
max-width: 400px;
}
.dashtopanelMainPanel.vertical .panel-button {
text-align: center;
}
.dashtopanelMainPanel.vertical .panel-button.vertical *,
.dashtopanelMainPanel.vertical .panel-button.clock-display * {
padding: 0;
margin: 0;
}
.dashtopanelMainPanel.vertical .panel-button > *,
.dashtopanelMainPanel.vertical .panel-button.vertical > *,
.dashtopanelMainPanel.vertical .panel-button.vertical .system-status-icon,
.dashtopanelMainPanel.vertical .panel-button.clock-display > *,
.dashtopanelMainPanel.vertical .panel-button.clock-display .clock {
padding: 8px 0;
}
.dashtopanelMainPanel.vertical .panel-button.clock-display {
-natural-hpadding: 0;
-minimum-hpadding: 0;
}
#dashtopanelThumbnailList {
spacing: 0em;
padding: 0 1em;
}
#dashtopanelThumbnailList .popup-menu-item {
padding: 0;
border-radius: 5px;
spacing: 0;
}
#dashtopanelThumbnailList .window-box {
padding: 0;
spacing: 0;
}
#dashtopanelThumbnailList .preview-window-title {
padding-top: 1em;
}
.popup-menu.panel-menu {
margin-bottom: 0;
}
#panel #panelLeft, #panel #panelCenter {
spacing: 0px;
}
.showdesktop-button-dark-hovered {
background-color: rgba(200, 200, 200, .4);
}
.showdesktop-button-light-hovered {
background-color: rgba(55, 55, 55, .4);
}
#dashtopanelScrollview .badge {
color: rgba(255, 255, 255, 1);
font-weight: bold;
text-align: center;
}
#dashtopanelScrollview .number-overlay {
background-color: rgba(0,0,0,0.8);
}
#dashtopanelScrollview .notification-badge {
background-color: rgba(255,0,0,0.8);
}
#dashtopanelScrollview .progress-bar {
/* Customization of the progress bar style, e.g.:
-progress-bar-background: rgba(0.8, 0.8, 0.8, 1);
-progress-bar-border: rgba(0.9, 0.9, 0.9, 1); */
}
.symbolic-icon-style {
-st-icon-style: symbolic;
}

View File

@ -0,0 +1,252 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*/
import GdkPixbuf from 'gi://GdkPixbuf';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import St from 'gi://St';
import * as Proximity from './proximity.js';
import * as Utils from './utils.js';
import {SETTINGS} from './extension.js';
export const DynamicTransparency = class {
constructor(dtpPanel) {
this._dtpPanel = dtpPanel;
this._proximityManager = dtpPanel.panelManager.proximityManager;
this._proximityWatchId = 0;
this.currentBackgroundColor = 0;
this._initialPanelStyle = dtpPanel.panel.get_style();
this._signalsHandler = new Utils.GlobalSignalsHandler();
this._bindSignals();
this._updateAnimationDuration();
this._updateAllAndSet();
this._updateProximityWatch();
}
destroy() {
this._signalsHandler.destroy();
this._proximityManager.removeWatch(this._proximityWatchId);
this._dtpPanel.panel.set_style(this._initialPanelStyle);
}
updateExternalStyle() {
this._updateComplementaryStyles();
this._setBackground();
}
_bindSignals() {
this._signalsHandler.add(
[
Utils.getStageTheme(),
'changed',
() => this._updateAllAndSet()
],
[
Main.overview,
[
'showing',
'hiding'
],
() => this._updateAlphaAndSet()
],
[
SETTINGS,
[
'changed::trans-use-custom-bg',
'changed::trans-bg-color'
],
() => this._updateColorAndSet()
],
[
SETTINGS,
[
'changed::trans-use-custom-opacity',
'changed::trans-panel-opacity',
'changed::trans-bg-color',
'changed::trans-dynamic-anim-target',
'changed::trans-use-dynamic-opacity'
],
() => this._updateAlphaAndSet()
],
[
SETTINGS,
[
'changed::trans-use-custom-gradient',
'changed::trans-gradient-top-color',
'changed::trans-gradient-bottom-color',
'changed::trans-gradient-top-opacity',
'changed::trans-gradient-bottom-opacity'
],
() => this._updateGradientAndSet()
],
[
SETTINGS,
[
'changed::trans-dynamic-behavior',
'changed::trans-use-dynamic-opacity',
'changed::trans-dynamic-distance'
],
() => this._updateProximityWatch()
],
[
SETTINGS,
'changed::trans-dynamic-anim-time',
() => this._updateAnimationDuration()
]
);
}
_updateProximityWatch() {
this._proximityManager.removeWatch(this._proximityWatchId);
if (SETTINGS.get_boolean('trans-use-dynamic-opacity')) {
let isVertical = this._dtpPanel.checkIfVertical();
let threshold = SETTINGS.get_int('trans-dynamic-distance');
this._windowOverlap = false;
this._updateAlphaAndSet()
this._proximityWatchId = this._proximityManager.createWatch(
this._dtpPanel.panelBox.get_parent(),
this._dtpPanel.monitor.index,
Proximity.Mode[SETTINGS.get_string('trans-dynamic-behavior')],
isVertical ? threshold : 0,
isVertical ? 0 : threshold,
overlap => {
this._windowOverlap = overlap;
this._updateAlphaAndSet();
}
);
}
}
_updateAnimationDuration() {
this.animationDuration = (SETTINGS.get_int('trans-dynamic-anim-time') * 0.001) + 's;';
}
_updateAllAndSet() {
let themeBackground = this._getThemeBackground(true);
this._updateColor(themeBackground);
this._updateAlpha(themeBackground);
this._updateComplementaryStyles();
this._updateGradient();
this._setBackground();
this._setGradient();
}
_updateColorAndSet() {
this._updateColor();
this._setBackground();
}
_updateAlphaAndSet() {
this._updateAlpha();
this._setBackground();
}
_updateGradientAndSet() {
this._updateGradient();
this._setGradient();
}
_updateComplementaryStyles() {
let panelThemeNode = this._dtpPanel.panel.get_theme_node();
this._complementaryStyles = 'border-radius: ' + panelThemeNode.get_border_radius(0) + 'px;';
}
_updateColor(themeBackground) {
this.backgroundColorRgb = SETTINGS.get_boolean('trans-use-custom-bg') ?
SETTINGS.get_string('trans-bg-color') :
(themeBackground || this._getThemeBackground());
}
_updateAlpha(themeBackground) {
if (this._windowOverlap && !Main.overview.visibleTarget && SETTINGS.get_boolean('trans-use-dynamic-opacity')) {
this.alpha = SETTINGS.get_double('trans-dynamic-anim-target');
} else {
this.alpha = SETTINGS.get_boolean('trans-use-custom-opacity') ?
SETTINGS.get_double('trans-panel-opacity') :
(themeBackground || this._getThemeBackground()).alpha * 0.003921569; // 1 / 255 = 0.003921569
}
}
_updateGradient() {
this._gradientStyle = '';
if (SETTINGS.get_boolean('trans-use-custom-gradient')) {
this._gradientStyle += 'background-gradient-direction: ' + (this._dtpPanel.checkIfVertical() ? 'horizontal;' : 'vertical;') +
'background-gradient-start: ' + Utils.getrgbaColor(SETTINGS.get_string('trans-gradient-top-color'),
SETTINGS.get_double('trans-gradient-top-opacity')) +
'background-gradient-end: ' + Utils.getrgbaColor(SETTINGS.get_string('trans-gradient-bottom-color'),
SETTINGS.get_double('trans-gradient-bottom-opacity'));
}
}
_setBackground() {
this.currentBackgroundColor = Utils.getrgbaColor(this.backgroundColorRgb, this.alpha);
let transition = 'transition-duration:' + this.animationDuration;
this._dtpPanel.set_style('background-color: ' + this.currentBackgroundColor + transition + this._complementaryStyles);
}
_setGradient() {
this._dtpPanel.panel.set_style(
'background: none; ' +
'border-image: none; ' +
'background-image: none; ' +
this._gradientStyle +
'transition-duration:' + this.animationDuration
);
}
_getThemeBackground(reload) {
if (reload || !this._themeBackground) {
let fakePanel = new St.Bin({ name: 'panel' });
Main.uiGroup.add_child(fakePanel);
let fakeTheme = fakePanel.get_theme_node()
this._themeBackground = this._getBackgroundImageColor(fakeTheme) || fakeTheme.get_background_color();
Main.uiGroup.remove_child(fakePanel);
}
return this._themeBackground;
}
_getBackgroundImageColor(theme) {
let bg = null;
try {
let imageFile = theme.get_background_image() || theme.get_border_image().get_file();
if (imageFile) {
let imageBuf = GdkPixbuf.Pixbuf.new_from_file(imageFile.get_path());
let pixels = imageBuf.get_pixels();
bg = { red: pixels[0], green: pixels[1], blue: pixels[2], alpha: pixels[3] };
}
} catch (error) {}
return bg;
}
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkBox" id="box_advanced_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Nothing yet!</property>
<property name="subtitle" translatable="yes">For real...</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,189 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<!-- adjustments -->
<object class="GtkAdjustment" id="animate_appicon_hover_options_duration_adjustment">
<property name="lower">0</property>
<property name="upper">300</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="animate_appicon_hover_options_rotation_adjustment">
<property name="lower">-30</property>
<property name="upper">30</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="animate_appicon_hover_options_travel_adjustment">
<property name="lower">0</property>
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="animate_appicon_hover_options_zoom_adjustment">
<property name="lower">100</property>
<property name="upper">250</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="animate_appicon_hover_options_convexity_adjustment">
<property name="lower">0</property>
<property name="upper">3</property>
<property name="step_increment">0.1</property>
<property name="page_increment">1</property>
</object>
<object class="GtkAdjustment" id="animate_appicon_hover_options_extent_adjustment">
<property name="lower">1</property>
<property name="upper">10</property>
<property name="step_increment">0.1</property>
<property name="page_increment">1</property>
</object>
<object class="GtkBox" id="animate_appicon_hover_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animation type</property>
<child>
<object class="GtkComboBoxText" id="animate_appicon_hover_options_type_combo">
<property name="valign">center</property>
<items>
<item id="SIMPLE" translatable="yes">Simple</item>
<item id="RIPPLE" translatable="yes">Ripple</item>
<item id="PLANK" translatable="yes">Plank</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Duration</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_duration_scale">
<property name="valign">center</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_duration_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Rotation</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_rotation_scale">
<property name="valign">end</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_rotation_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Travel</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_travel_scale">
<property name="valign">center</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_travel_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Zoom</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_zoom_scale">
<property name="valign">center</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_zoom_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Convexity</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_convexity_scale">
<property name="valign">end</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_convexity_adjustment</property>
<property name="round_digits">1</property>
<property name="digits">1</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Extent</property>
<child>
<object class="GtkScale" id="animate_appicon_hover_options_extent_scale">
<property name="valign">center</property>
<property name="width-request">300</property>
<property name="adjustment">animate_appicon_hover_options_extent_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,271 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="focus_highlight_opacity_adjustment">
<property name="lower">5</property>
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="dot_size_adjustment">
<property name="upper">5</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkScrolledWindow" id="box_dots_options">
<property name="width-request">600</property>
<property name="height-request">600</property>
<property name="vexpand">True</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Highlight focused application</property>
<child>
<object class="GtkSwitch" id="focus_highlight_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="grid_focus_highlight_options">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Icon dominant color</property>
<child>
<object class="GtkSwitch" id="focus_highlight_dominant_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="focus_highlight_color_label">
<property name="title" translatable="yes">Custom color</property>
<child>
<object class="GtkColorButton" id="focus_highlight_color_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Highlight opacity</property>
<child>
<object class="GtkSpinButton" id="focus_highlight_opacity_spinbutton">
<property name="valign">center</property>
<property name="text">5</property>
<property name="adjustment">focus_highlight_opacity_adjustment</property>
<property name="value">5</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator size (px)</property>
<child>
<object class="GtkSpinButton" id="dot_size_spinbutton">
<property name="valign">center</property>
<property name="text">0</property>
<property name="adjustment">dot_size_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator color - Icon Dominant</property>
<child>
<object class="GtkSwitch" id="dot_color_dominant_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator color - Override Theme</property>
<child>
<object class="GtkSwitch" id="dot_color_override_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="grid_dot_color">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">1 window open (or ungrouped)</property>
<child>
<object class="GtkButton" id="dot_color_apply_all_button">
<property name="valign">center</property>
<property name="label" translatable="yes">Apply to all</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_1_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">2 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_2_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">3 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_3_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">4+ windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_4_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="dot_color_unfocused_box">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use different for unfocused</property>
<child>
<object class="GtkSwitch" id="dot_color_unfocused_different_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="grid_dot_color_unfocused">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">1 window open (or ungrouped)</property>
<child>
<object class="GtkButton" id="dot_color_unfocused_apply_all_button">
<property name="valign">center</property>
<property name="label" translatable="yes">Apply to all</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_1_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">2 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_2_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">3 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_3_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">4+ windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_4_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="trans_distance_adjustment">
<property name="upper">200</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="trans_opacity_min_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="trans_anim_time_adjustment">
<property name="upper">2000</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkBox" id="box_dynamic_opacity_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">The panel background opacity is affected by</property>
<child>
<object class="GtkComboBoxText" id="trans_options_window_type_combo">
<property name="valign">center</property>
<items>
<item id="ALL_WINDOWS" translatable="yes">All windows</item>
<item id="FOCUSED_WINDOWS" translatable="yes">Focused windows</item>
<item id="MAXIMIZED_WINDOWS" translatable="yes">Maximized windows</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Change opacity when a window gets closer than (px)</property>
<child>
<object class="GtkSpinButton" id="trans_options_distance_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">50</property>
<property name="adjustment">trans_distance_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Change opacity to (%)</property>
<child>
<object class="GtkSpinButton" id="trans_options_min_opacity_spinbutton">
<property name="text" translatable="yes">0</property>
<property name="valign">center</property>
<property name="adjustment">trans_opacity_min_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Opacity change animation duration (ms)</property>
<child>
<object class="GtkSpinButton" id="trans_options_anim_time_spinbutton">
<property name="width_chars">4</property>
<property name="text">50</property>
<property name="valign">center</property>
<property name="adjustment">trans_anim_time_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="group_apps_label_font_size_adjustment">
<property name="lower">6</property>
<property name="upper">24</property>
<property name="step_increment">1</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="group_apps_label_max_width_adjustment">
<property name="upper">1000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkBox" id="box_group_apps_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Font size (px) of the application titles (default is 14)</property>
<child>
<object class="GtkSpinButton" id="group_apps_label_font_size_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">group_apps_label_font_size_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Font weight of application titles</property>
<child>
<object class="GtkComboBoxText" id="group_apps_label_font_weight_combo">
<property name="valign">center</property>
<items>
<item id="inherit" translatable="yes">inherit from theme</item>
<item id="normal" translatable="yes">normal</item>
<item id="lighter" translatable="yes">lighter</item>
<item id="bold" translatable="yes">bold</item>
<item id="bolder" translatable="yes">bolder</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Font color of the application titles</property>
<child>
<object class="GtkColorButton" id="group_apps_label_font_color_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Font color of the minimized application titles</property>
<child>
<object class="GtkColorButton" id="group_apps_label_font_color_minimized_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Maximum width (px) of the application titles</property>
<property name="subtitle" translatable="yes">(default is 160)</property>
<child>
<object class="GtkSpinButton" id="group_apps_label_max_width_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">group_apps_label_max_width_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use a fixed width for the application titles</property>
<property name="subtitle" translatable="yes">The application titles all have the same width, even if their texts are shorter than the maximum width. The maximum width value is used as the fixed width.</property>
<child>
<object class="GtkSwitch" id="group_apps_use_fixed_width_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Display running indicators on unfocused applications</property>
<child>
<object class="GtkSwitch" id="group_apps_underline_unfocused_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use the favorite icons as application launchers</property>
<child>
<object class="GtkSwitch" id="group_apps_use_launchers_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="intellihide_pressure_threshold_adjustment">
<property name="lower">1</property>
<property name="upper">9990</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="intellihide_pressure_time_adjustment">
<property name="lower">1</property>
<property name="upper">5000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="intellihide_animation_time_adjustment">
<property name="lower">10</property>
<property name="upper">2000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="intellihide_close_delay_adjustment">
<property name="lower">10</property>
<property name="upper">4000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="intellihide_enable_hide_delay_adjustment">
<property name="upper">10000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkBox" id="box_intellihide_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Only hide the panel when it is obstructed by windows</property>
<child>
<object class="GtkSwitch" id="intellihide_window_hide_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="intellihide_behaviour_options">
<property name="title" translatable="yes">The panel hides from</property>
<child>
<object class="GtkComboBoxText" id="intellihide_behaviour_combo">
<property name="valign">center</property>
<items>
<item id="ALL_WINDOWS" translatable="yes">All windows</item>
<item id="FOCUSED_WINDOWS" translatable="yes">Focused windows</item>
<item id="MAXIMIZED_WINDOWS" translatable="yes">Maximized windows</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Require pressure at the edge of the screen to reveal the panel</property>
<child>
<object class="GtkSwitch" id="intellihide_use_pressure_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="intellihide_use_pressure_options">
<property name="title" translatable="yes">Required pressure threshold (px)</property>
<child>
<object class="GtkSpinButton" id="intellihide_pressure_threshold_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">intellihide_pressure_threshold_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="intellihide_use_pressure_options2">
<property name="title" translatable="yes">Required pressure timeout (ms)</property>
<child>
<object class="GtkSpinButton" id="intellihide_pressure_time_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">intellihide_pressure_time_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Allow the panel to be revealed while in fullscreen mode</property>
<child>
<object class="GtkSwitch" id="intellihide_show_in_fullscreen_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_intellihide_only_secondary">
<property name="title" translatable="yes">Only hide secondary panels</property>
<property name="subtitle" translatable="yes">(requires multi-monitors option)</property>
<child>
<object class="GtkSwitch" id="intellihide_only_secondary_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Keyboard shortcut to reveal and hold the panel</property>
<property name="subtitle" translatable="yes">Syntax: &amp;lt;Shift&amp;gt;, &amp;lt;Ctrl&amp;gt;, &amp;lt;Alt&amp;gt;, &amp;lt;Super&amp;gt;</property>
<child>
<object class="GtkEntry" id="intellihide_toggle_entry">
<property name="valign">center</property>
<property name="width_chars">12</property>
<property name="placeholder_text" translatable="yes">e.g. &lt;Super&gt;i</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Hide and reveal animation duration (ms)</property>
<child>
<object class="GtkSpinButton" id="intellihide_animation_time_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">intellihide_animation_time_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Delay before hiding the panel (ms)</property>
<child>
<object class="GtkSpinButton" id="intellihide_close_delay_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">10</property>
<property name="adjustment">intellihide_close_delay_adjustment</property>
<property name="numeric">True</property>
<property name="value">10</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Delay before enabling intellihide on start (ms)</property>
<child>
<object class="GtkSpinButton" id="intellihide_enable_start_delay_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">10</property>
<property name="adjustment">intellihide_enable_hide_delay_adjustment</property>
<property name="numeric">True</property>
<property name="value">10</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkBox" id="box_middle_click_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Shift+Click action</property>
<property name="subtitle" translatable="yes">When set to minimize, double clicking minimizes all the windows of the application.</property>
<child>
<object class="GtkComboBoxText" id="shift_click_action_combo">
<property name="valign">center</property>
<items>
<item id="RAISE" translatable="yes">Raise windows</item>
<item id="MINIMIZE" translatable="yes">Minimize window</item>
<item id="LAUNCH" translatable="yes">Launch new instance</item>
<item id="CYCLE" translatable="yes">Cycle through windows</item>
<item id="CYCLE-MIN" translatable="yes">Cycle windows + minimize</item>
<item id="TOGGLE-SHOWPREVIEW" translatable="yes">Toggle single / Preview multiple</item>
<item id="TOGGLE-CYCLE" translatable="yes">Toggle single / Cycle multiple</item>
<item id="QUIT" translatable="yes">Quit</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Middle-Click action</property>
<property name="subtitle" translatable="yes">Behavior for Middle-Click.</property>
<child>
<object class="GtkComboBoxText" id="middle_click_action_combo">
<property name="valign">center</property>
<items>
<item id="RAISE" translatable="yes">Raise windows</item>
<item id="MINIMIZE" translatable="yes">Minimize window</item>
<item id="LAUNCH" translatable="yes">Launch new instance</item>
<item id="CYCLE" translatable="yes">Cycle through windows</item>
<item id="CYCLE-MIN" translatable="yes">Cycle windows + minimize</item>
<item id="TOGGLE-SHOWPREVIEW" translatable="yes">Toggle single / Preview multiple</item>
<item id="TOGGLE-CYCLE" translatable="yes">Toggle single / Cycle multiple</item>
<item id="QUIT" translatable="yes">Quit</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Shift+Middle-Click action</property>
<property name="subtitle" translatable="yes">Behavior for Shift+Middle-Click.</property>
<child>
<object class="GtkComboBoxText" id="shift_middle_click_action_combo">
<property name="valign">center</property>
<items>
<item id="RAISE" translatable="yes">Raise windows</item>
<item id="MINIMIZE" translatable="yes">Minimize window</item>
<item id="LAUNCH" translatable="yes">Launch new instance</item>
<item id="CYCLE" translatable="yes">Cycle through windows</item>
<item id="CYCLE-MIN" translatable="yes">Cycle windows + minimize</item>
<item id="TOGGLE-SHOWPREVIEW" translatable="yes">Toggle single / Preview multiple</item>
<item id="TOGGLE-CYCLE" translatable="yes">Toggle single / Cycle multiple</item>
<item id="QUIT" translatable="yes">Quit</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="shortcut_time_adjustment">
<property name="upper">10000</property>
<property name="step_increment">250</property>
<property name="page_increment">1000</property>
</object>
<object class="GtkBox" id="box_overlay_shortcut">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Hotkeys prefix</property>
<property name="subtitle" translatable="yes">Hotkeys will either be Super+Number or Super+Alt+Num</property>
<child>
<object class="GtkComboBoxText" id="hotkey_prefix_combo">
<property name="valign">center</property>
<items>
<item id="Super" translatable="yes">Super</item>
<item id="SuperAlt" translatable="yes">Super + Alt</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Number overlay</property>
<property name="subtitle" translatable="yes">Temporarily show the application numbers over the icons when using the hotkeys.</property>
<child>
<object class="GtkComboBoxText" id="overlay_combo">
<property name="valign">center</property>
<items>
<item id="NEVER" translatable="yes">Never</item>
<item id="TEMPORARILY" translatable="yes">Show temporarily</item>
<item id="ALWAYS" translatable="yes">Always visible</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Hide timeout (ms)</property>
<child>
<object class="GtkSpinButton" id="timeout_spinbutton">
<property name="valign">center</property>
<property name="adjustment">shortcut_time_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Shortcut to show the overlay for 2 seconds</property>
<property name="subtitle" translatable="yes">Syntax: &amp;lt;Shift&amp;gt;, &amp;lt;Ctrl&amp;gt;, &amp;lt;Alt&amp;gt;, &amp;lt;Super&amp;gt;</property>
<child>
<object class="GtkEntry" id="shortcut_entry">
<property name="valign">center</property>
<property name="width_chars">12</property>
<property name="placeholder_text" translatable="yes">e.g. &lt;Super&gt;q</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show window previews on hotkey</property>
<property name="subtitle" translatable="yes">Show previews when the application have multiple instances</property>
<child>
<object class="GtkSwitch" id="shortcut_preview_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Hotkeys are activated with</property>
<property name="subtitle" translatable="yes">Select which keyboard number keys are used to activate the hotkeys</property>
<child>
<object class="GtkComboBoxText" id="shortcut_num_keys_combo">
<property name="valign">center</property>
<items>
<item id="NUM_ROW" translatable="yes">Number row</item>
<item id="NUM_KEYPAD" translatable="yes">Numeric keypad</item>
<item id="BOTH" translatable="yes">Both</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="scroll_icon_options_delay_adjustment">
<property name="upper">2000</property>
<property name="step_increment">10</property>
<property name="page_increment">50</property>
</object>
<object class="GtkBox" id="scroll_icon_options_box">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Delay between mouse scroll events (ms)</property>
<property name="subtitle" translatable="yes">Use this value to limit the number of captured mouse scroll events.</property>
<child>
<object class="GtkSpinButton" id="scroll_icon_options_delay_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">50</property>
<property name="adjustment">scroll_icon_options_delay_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="scroll_panel_options_delay_adjustment">
<property name="upper">2000</property>
<property name="step_increment">10</property>
<property name="page_increment">50</property>
</object>
<object class="GtkBox" id="scroll_panel_options_box">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Delay between mouse scroll events (ms)</property>
<property name="subtitle" translatable="yes">Use this value to limit the number of captured mouse scroll events.</property>
<child>
<object class="GtkSpinButton" id="scroll_panel_options_delay_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">50</property>
<property name="adjustment">scroll_panel_options_delay_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show popup when changing workspace</property>
<property name="subtitle" translatable="yes">This affects workspace popup when scrolling on the panel only.</property>
<child>
<object class="GtkSwitch" id="scroll_panel_options_show_ws_popup_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkBox" id="box_secondarymenu_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Integrate &lt;i&gt;AppMenu&lt;/i&gt; items</property>
<child>
<object class="GtkSwitch" id="secondarymenu_appmenu_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">&lt;i&gt;Show Details&lt;/i&gt; menu item</property>
<child>
<object class="GtkSwitch" id="secondarymenu_showdetails_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="show_applications_side_padding_adjustment">
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkBox" id="show_applications_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show Applications icon</property>
<child>
<object class="GtkImage" id="show_applications_current_icon_image">
<property name="width_request">32</property>
<property name="height_request">32</property>
<property name="icon_name">gtk-missing-image</property>
<property name="pixel_size">32</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesRow">
<child>
<object class="GtkButton" id="show_applications_icon_file_filebutton">
<property name="margin-start">8</property>
<property name="margin-end">8</property>
<property name="margin-top">8</property>
<property name="margin-bottom">8</property>
<property name="width_request">140</property>
<property name="visible">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show Applications icon side padding (px)</property>
<child>
<object class="GtkSpinButton" id="show_applications_side_padding_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">show_applications_side_padding_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Override escape key and return to desktop</property>
<child>
<object class="GtkSwitch" id="show_applications_esc_key_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="show_showdesktop_width_adjustment">
<property name="lower">1</property>
<property name="upper">40</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="show_showdesktop_delay_adjustment">
<property name="upper">5000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="show_showdesktop_time_adjustment">
<property name="upper">5000</property>
<property name="step_increment">10</property>
<property name="page_increment">100</property>
</object>
<object class="GtkBox" id="box_show_showdesktop_options">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow" id="show_showdesktop_width_label">
<child>
<object class="GtkSpinButton" id="show_showdesktop_width_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">1</property>
<property name="adjustment">show_showdesktop_width_adjustment</property>
<property name="numeric">True</property>
<property name="value">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Override Show Desktop line color</property>
<child>
<object class="GtkColorButton" id="override_show_desktop_line_color_colorbutton">>
<property name="receives_default">True</property>
<property name="valign">center</property>
<property name="use_alpha">True</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="override_show_desktop_line_color_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Reveal the desktop when hovering the Show Desktop button</property>
<child>
<object class="GtkSwitch" id="show_showdesktop_hide_switch">
<property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_show_showdesktop_hide_options">
<property name="title" translatable="yes">Delay before revealing the desktop (ms)</property>
<child>
<object class="GtkSpinButton" id="show_showdesktop_delay_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">1</property>
<property name="adjustment">show_showdesktop_delay_adjustment</property>
<property name="numeric">True</property>
<property name="value">1</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_show_showdesktop_hide_options2">
<property name="title" translatable="yes">Fade duration (ms)</property>
<child>
<object class="GtkSpinButton" id="show_showdesktop_time_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">1</property>
<property name="adjustment">show_showdesktop_time_adjustment</property>
<property name="numeric">True</property>
<property name="value">1</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,484 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="preview_timeout_adjustment">
<property name="upper">9999</property>
<property name="step_increment">25</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="preview_animation_time_adjustment">
<property name="upper">1000</property>
<property name="step_increment">10</property>
<property name="page_increment">50</property>
</object>
<object class="GtkAdjustment" id="leave_timeout_adjustment">
<property name="upper">9999</property>
<property name="step_increment">25</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="preview_size_adjustment">
<property name="lower">100</property>
<property name="upper">800</property>
<property name="step_increment">10</property>
<property name="page_increment">50</property>
</object>
<object class="GtkAdjustment" id="preview_padding_adjustment">
<property name="upper">50</property>
<property name="step_increment">1</property>
<property name="page_increment">5</property>
</object>
<object class="GtkAdjustment" id="preview_opacity_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="preview_custom_icon_size_adjustment">
<property name="lower">8</property>
<property name="upper">48</property>
<property name="step_increment">1</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="preview_title_font_size_adjustment">
<property name="lower">6</property>
<property name="upper">24</property>
<property name="step_increment">1</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="enter_peek_mode_timeout_adjustment">
<property name="lower">50</property>
<property name="upper">9999</property>
<property name="step_increment">25</property>
<property name="page_increment">100</property>
</object>
<object class="GtkAdjustment" id="peek_mode_opacity_adjustment">
<property name="upper">255</property>
<property name="step_increment">10</property>
<property name="page_increment">25</property>
</object>
<object class="GtkScrolledWindow" id="box_window_preview_options">
<property name="width-request">800</property>
<property name="height-request">600</property>
<property name="vexpand">True</property>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="width-request">600</property>
<property name="spacing">24</property>
<property name="margin-top">32</property>
<property name="margin-bottom">32</property>
<property name="margin-start">32</property>
<property name="margin-end">32</property>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Time (ms) before showing</property>
<property name="subtitle" translatable="yes">(400 is default)</property>
<child>
<object class="GtkSpinButton" id="preview_timeout_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">preview_timeout_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Time (ms) before hiding</property>
<property name="subtitle" translatable="yes">(100 is default)</property>
<child>
<object class="GtkCheckButton" id="preview_immediate_click_button">
<property name="receives_default">False</property>
<child>
<object class="GtkLabel" id="preview_immediate_click_label">
<property name="name">4</property>
<property name="label" translatable="yes">Immediate on application icon click</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkSpinButton" id="leave_timeout_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">25</property>
<property name="adjustment">leave_timeout_adjustment</property>
<property name="numeric">True</property>
<property name="value">25</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animation time (ms)</property>
<child>
<object class="GtkSpinButton" id="animation_time_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">0</property>
<property name="adjustment">preview_animation_time_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Middle click on the preview to close the window</property>
<child>
<object class="GtkSwitch" id="preview_middle_click_close_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window previews preferred size (px)</property>
<child>
<object class="GtkSpinButton" id="preview_size_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">100</property>
<property name="adjustment">preview_size_adjustment</property>
<property name="numeric">True</property>
<property name="value">100</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window previews aspect ratio X (width)</property>
<child>
<object class="GtkComboBoxText" id="preview_aspect_ratio_x_combo">
<property name="valign">center</property>
<items>
<item id="1" translatable="yes">1</item>
<item id="2" translatable="yes">2</item>
<item id="3" translatable="yes">3</item>
<item id="4" translatable="yes">4</item>
<item id="5" translatable="yes">5</item>
<item id="6" translatable="yes">6</item>
<item id="7" translatable="yes">7</item>
<item id="8" translatable="yes">8</item>
<item id="9" translatable="yes">9</item>
<item id="10" translatable="yes">10</item>
<item id="11" translatable="yes">11</item>
<item id="12" translatable="yes">12</item>
<item id="13" translatable="yes">13</item>
<item id="14" translatable="yes">14</item>
<item id="15" translatable="yes">15</item>
<item id="16" translatable="yes">16</item>
<item id="17" translatable="yes">17</item>
<item id="18" translatable="yes">18</item>
<item id="19" translatable="yes">19</item>
<item id="20" translatable="yes">20</item>
<item id="21" translatable="yes">21</item>
</items>
</object>
</child>
<child>
<object class="GtkToggleButton" id="preview_aspect_ratio_x_fixed_togglebutton">
<property name="label" translatable="yes">Fixed</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window previews aspect ratio Y (height)</property>
<child>
<object class="GtkComboBoxText" id="preview_aspect_ratio_y_combo">
<property name="valign">center</property>
<items>
<item id="1" translatable="yes">1</item>
<item id="2" translatable="yes">2</item>
<item id="3" translatable="yes">3</item>
<item id="4" translatable="yes">4</item>
<item id="5" translatable="yes">5</item>
<item id="6" translatable="yes">6</item>
<item id="7" translatable="yes">7</item>
<item id="8" translatable="yes">8</item>
<item id="9" translatable="yes">9</item>
<item id="10" translatable="yes">10</item>
<item id="11" translatable="yes">11</item>
<item id="12" translatable="yes">12</item>
<item id="13" translatable="yes">13</item>
<item id="14" translatable="yes">14</item>
<item id="15" translatable="yes">15</item>
<item id="16" translatable="yes">16</item>
<item id="17" translatable="yes">17</item>
<item id="18" translatable="yes">18</item>
<item id="19" translatable="yes">19</item>
<item id="20" translatable="yes">20</item>
<item id="21" translatable="yes">21</item>
</items>
</object>
</child>
<child>
<object class="GtkToggleButton" id="preview_aspect_ratio_y_fixed_togglebutton">
<property name="label" translatable="yes">Fixed</property>
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Window previews padding (px)</property>
<child>
<object class="GtkSpinButton" id="preview_padding_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">50</property>
<property name="adjustment">preview_padding_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use custom opacity for the previews background</property>
<property name="subtitle" translatable="yes">If disabled, the previews background have the same opacity as the panel.</property>
<child>
<object class="GtkSwitch" id="preview_custom_opacity_switch">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="preview_custom_opacity_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">5</property>
<property name="adjustment">preview_opacity_adjustment</property>
<property name="value">5</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Close button and header position</property>
<child>
<object class="GtkToggleButton" id="preview_title_position_bottom_button">
<property name="label" translatable="yes">Bottom</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="active">True</property>
<signal name="toggled" handler="preview_title_position_bottom_button_toggled_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="preview_title_position_top_button">
<property name="label" translatable="yes">Top</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="group">preview_title_position_bottom_button</property>
<signal name="toggled" handler="preview_title_position_top_button_toggled_cb" swapped="no"/>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Display window preview headers</property>
<child>
<object class="GtkSwitch" id="preview_show_title_switch">>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_preview_custom_icon_size">
<property name="title" translatable="yes">Icon size (px) of the window preview</property>
<property name="subtitle" translatable="yes">If disabled, the previews icon size will be based on headerbar size</property>
<child>
<object class="GtkSwitch" id="preview_custom_icon_size_switch">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="preview_custom_icon_size_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">6</property>
<property name="adjustment">preview_custom_icon_size_adjustment</property>
<property name="numeric">True</property>
<property name="value">6</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_preview_title_size">
<property name="title" translatable="yes">Font size (px) of the preview titles</property>
<child>
<object class="GtkSpinButton" id="preview_title_size_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text">6</property>
<property name="adjustment">preview_title_font_size_adjustment</property>
<property name="numeric">True</property>
<property name="value">6</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_preview_title_weight">
<property name="title" translatable="yes">Font weight of the preview titles</property>
<child>
<object class="GtkComboBoxText" id="grid_preview_title_weight_combo">
<property name="valign">center</property>
<items>
<item id="inherit" translatable="yes">inherit from theme</item>
<item id="normal" translatable="yes">normal</item>
<item id="lighter" translatable="yes">lighter</item>
<item id="bold" translatable="yes">bold</item>
<item id="bolder" translatable="yes">bolder</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_preview_title_font_color">
<property name="title" translatable="yes">Font color of the preview titles</property>
<child>
<object class="GtkColorButton" id="grid_preview_title_font_color_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Enable window peeking</property>
<property name="subtitle" translatable="yes">When hovering over a window preview for some time, the window gets distinguished.</property>
<child>
<object class="GtkSwitch" id="peek_mode_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_enter_peek_mode_timeout">
<property name="title" translatable="yes">Enter window peeking mode timeout (ms)</property>
<property name="subtitle" translatable="yes">Time of inactivity while hovering over a window preview needed to enter the window peeking mode.</property>
<child>
<object class="GtkSpinButton" id="enter_peek_mode_timeout_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text" translatable="yes">50</property>
<property name="adjustment">enter_peek_mode_timeout_adjustment</property>
<property name="numeric">True</property>
<property name="value">50</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="grid_peek_mode_opacity">
<property name="title" translatable="yes">Window peeking mode opacity</property>
<property name="subtitle" translatable="yes">All windows except for the peeked one have their opacity set to the same value.</property>
<child>
<object class="GtkSpinButton" id="peek_mode_opacity_spinbutton">
<property name="valign">center</property>
<property name="width_chars">4</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">peek_mode_opacity_adjustment</property>
<property name="numeric">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="AdwPreferencesPage" id="about">
<property name="title" translatable="yes">About</property>
<property name="icon_name">help-about-symbolic</property>
<!-- group info -->
<child>
<object class="AdwPreferencesGroup" id="about_group_info">
<property name="title" translatable="yes">Info</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Version</property>
<child>
<object class="GtkLabel" id="extension_version">
<property name="label">...</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Source</property>
<child>
<object class="GtkLinkButton" id="homepage_link">
<property name="label" translatable="yes">GitHub</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="uri">https://github.com/home-sweet-gnome/dash-to-panel</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group export import -->
<child>
<object class="AdwPreferencesGroup" id="about_group_export_and_import">
<property name="title" translatable="yes">Export and Import</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Export and import settings</property>
<property name="subtitle" translatable="yes">Use the buttons below to create a settings file from your current preferences that can be imported on a different machine.</property>
</object>
</child>
<child>
<object class="AdwPreferencesRow">
<child>
<object class="GtkBox">
<property name="margin_start">8</property>
<property name="margin_end">8</property>
<property name="margin_top">4</property>
<property name="margin_bottom">4</property>
<property name="spacing">8</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="importexport_export_button">
<property name="label" translatable="yes">Export to file</property>
<property name="receives_default">True</property>
</object>
</child>
<child>
<object class="GtkButton" id="importexport_import_button">
<property name="label" translatable="yes">Import from file</property>
<property name="receives_default">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group disclaimer -->
<child>
<object class="AdwPreferencesGroup" id="about_group_disclaimer">
<child>
<object class="GtkLabel" id="label1">
<property name="label" translatable="yes">&lt;span size="small"&gt;This program comes with ABSOLUTELY NO WARRANTY.&#10;See the &lt;a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"&gt;GNU General Public License, version 2 or later&lt;/a&gt; for details.&lt;/span&gt;</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
<property name="wrap">True</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="AdwPreferencesPage" id="action">
<property name="title" translatable="yes">Action</property>
<property name="icon_name">view-pin-symbolic</property>
<!-- group click action -->
<child>
<object class="AdwPreferencesGroup" id="action_group_click_action">
<property name="title" translatable="yes">Click action</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Click action</property>
<property name="subtitle" translatable="yes">Behaviour when clicking on the icon of a running application.</property>
<child>
<object class="GtkButton" id="middle_click_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="middle_click_image">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="click_action_combo">
<property name="valign">center</property>
<items>
<item id="CYCLE-MIN" translatable="yes">Cycle windows + minimize</item>
<item id="CYCLE" translatable="yes">Cycle through windows</item>
<item id="TOGGLE-SHOWPREVIEW" translatable="yes">Toggle single / Preview multiple</item>
<item id="TOGGLE-CYCLE" translatable="yes">Toggle single / Cycle multiple</item>
<item id="MINIMIZE" translatable="yes">Toggle windows</item>
<item id="RAISE" translatable="yes">Raise windows</item>
<item id="LAUNCH" translatable="yes">Launch new instance</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group scroll action -->
<child>
<object class="AdwPreferencesGroup" id="action_group_scroll_action">
<property name="title" translatable="yes">Scroll action</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Scroll panel action</property>
<property name="subtitle" translatable="yes">Behavior when mouse scrolling over the panel.</property>
<child>
<object class="GtkButton" id="scroll_panel_options_button">
<property name="visible">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="scroll_panel_options_button_image">
<property name="visible">True</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="scroll_panel_combo">
<property name="visible">True</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<items>
<item id="NOTHING" translatable="yes">Do nothing</item>
<item id="SWITCH_WORKSPACE" translatable="yes">Switch workspace</item>
<item id="CYCLE_WINDOWS" translatable="yes">Cycle windows</item>
<item id="CHANGE_VOLUME" translatable="yes">Change volume</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Scroll icon action</property>
<property name="subtitle" translatable="yes">Behavior when mouse scrolling over an application icon.</property>
<child>
<object class="GtkButton" id="scroll_icon_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="scroll_icon_options_button_image">
<property name="visible">True</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="scroll_icon_combo">
<property name="valign">center</property>
<property name="hexpand">True</property>
<items>
<item id="NOTHING" translatable="yes">Do nothing</item>
<item id="CYCLE_WINDOWS" translatable="yes">Cycle windows</item>
<item id="PASS_THROUGH" translatable="yes">Same as panel</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group hotkey -->
<child>
<object class="AdwPreferencesGroup" id="action_group_hotkry">
<property name="title" translatable="yes">Hotkey overlay</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use hotkeys to activate apps</property>
<property name="subtitle" translatable="yes">Enable Super+(0-9) as shortcuts to activate apps. It can also be used together with Shift and Ctrl.</property>
<child>
<object class="GtkButton" id="overlay_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="image_overlay">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="hot_keys_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="AdwPreferencesPage" id="behavior">
<property name="title" translatable="yes">Behavior</property>
<property name="icon_name">preferences-system-symbolic</property>
<!-- group applications -->
<child>
<object class="AdwPreferencesGroup" id="behavior_group_applications">
<property name="title" translatable="yes">Applications</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show favorite applications</property>
<child>
<object class="GtkSwitch" id="show_favorite_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show favorite applications on secondary panels</property>
<child>
<object class="GtkSwitch" id="multimon_multi_show_favorites_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show running applications</property>
<child>
<object class="GtkSwitch" id="show_runnning_apps_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Ungroup applications</property>
<child>
<object class="GtkButton" id="show_group_apps_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="image_show_group_apps_options">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="group_apps_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show notification counter badge</property>
<child>
<object class="GtkSwitch" id="show_notification_badge_switch">
<property name="visible">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group hover -->
<child>
<object class="AdwPreferencesGroup" id="behavior_group_hover">
<property name="title" translatable="yes">Hover</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show window previews on hover</property>
<child>
<object class="GtkButton" id="show_window_previews_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="image_window_previews_options">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="show_window_previews_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Show tooltip on hover</property>
<child>
<object class="GtkSwitch" id="show_tooltip_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group isolate -->
<child>
<object class="AdwPreferencesGroup" id="behavior_group_isolate">
<property name="title" translatable="yes">Isolate</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Isolate Workspaces</property>
<child>
<object class="GtkSwitch" id="isolate_workspaces_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Isolate monitors</property>
<child>
<object class="GtkSwitch" id="multimon_multi_isolate_monitor_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group overview -->
<child>
<object class="AdwPreferencesGroup" id="behavior_group_overview">
<property name="title" translatable="yes">Overview</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Click empty space to close overview</property>
<child>
<object class="GtkSwitch" id="clicktoexit_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Disable show overview on startup</property>
<child>
<object class="GtkSwitch" id="hide_overview_on_startup_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,279 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="tray_size_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="leftbox_size_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="tray_padding_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="statusicon_padding_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="leftbox_padding_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="AdwPreferencesPage" id="finetune">
<property name="title" translatable="yes">Fine-Tune</property>
<property name="icon_name">preferences-other-symbolic</property>
<!-- group font -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_font">
<property name="title" translatable="yes">Font size</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Tray Font Size</property>
<property name="subtitle" translatable="yes">(0 = theme default)</property>
<child>
<object class="GtkScale" id="tray_size_scale">
<property name="width-request">300</property>
<property name="adjustment">tray_size_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="tray_size_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">LeftBox Font Size</property>
<property name="subtitle" translatable="yes">(0 = theme default)</property>
<child>
<object class="GtkScale" id="leftbox_size_scale">
<property name="width-request">300</property>
<property name="adjustment">leftbox_size_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="leftbox_size_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group panel -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_padding">
<property name="title" translatable="yes">Padding</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Tray Item Padding</property>
<property name="subtitle" translatable="yes">(-1 = theme default)</property>
<child>
<object class="GtkScale" id="tray_padding_scale">
<property name="width-request">300</property>
<property name="adjustment">tray_padding_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="tray_padding_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Status Icon Padding</property>
<property name="subtitle" translatable="yes">(-1 = theme default)</property>
<child>
<object class="GtkScale" id="statusicon_padding_scale">
<property name="width-request">300</property>
<property name="adjustment">statusicon_padding_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="statusicon_padding_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">LeftBox Padding</property>
<property name="subtitle" translatable="yes">(-1 = theme default)</property>
<child>
<object class="GtkScale" id="leftbox_padding_scale">
<property name="width-request">300</property>
<property name="adjustment">leftbox_padding_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="leftbox_padding_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group animate -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_animate">
<property name="title" translatable="yes">Animate</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animate switching applications</property>
<child>
<object class="GtkSwitch" id="animate_app_switch_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animate launching new windows</property>
<child>
<object class="GtkSwitch" id="animate_window_launch_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group gnome -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_gnome">
<property name="title" translatable="yes">Gnome functionality</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Keep original gnome-shell dash</property>
<property name="subtitle" translatable="yes">(overview)</property>
<child>
<object class="GtkSwitch" id="stockgs_dash_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Keep original gnome-shell top panel</property>
<child>
<object class="GtkSwitch" id="stockgs_top_panel_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Activate panel menu buttons on click only</property>
<property name="subtitle" translatable="yes">(e.g. date menu)</property>
<child>
<object class="GtkSwitch" id="stockgs_panelbtn_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Force Activities hot corner on primary monitor</property>
<child>
<object class="GtkSwitch" id="stockgs_hotcorner_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group panel -->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">App icon secondary menu</property>
<property name="subtitle" translatable="yes">(right-click menu)</property>
<child>
<object class="GtkButton" id="secondarymenu_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="secondarymenu_options_button_image">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group advanced-->
<child>
<object class="AdwPreferencesGroup" id="finetune_group_advanced">
<child>
<object class="GtkButton" id="button_advanced_options">
<property name="label" translatable="yes">Advanced Options</property>
<property name="visible">False</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,243 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="panel_size_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="panel_length_adjustment">
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="AdwPreferencesPage" id="position">
<property name="title" translatable="yes">Position</property>
<property name="icon_name">find-location-symbolic</property>
<!-- group panel -->
<child>
<object class="AdwPreferencesGroup" id="position_group_panel">
<property name="title" translatable="yes">Panel</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Display the main panel on</property>
<child>
<object class="GtkComboBoxText" id="multimon_primary_combo">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Display panels on all monitors</property>
<child>
<object class="GtkSwitch" id="multimon_multi_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="position_group_panel2">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel Intellihide</property>
<property name="subtitle" translatable="yes">Hide and reveal the panel according to preferences</property>
<child>
<object class="GtkButton" id="intellihide_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="image_intellihide_options">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="intellihide_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group order and positions -->
<child>
<object class="AdwPreferencesGroup" id="position_group_on_monitor">
<property name="title" translatable="yes">Order and Position on monitors</property>
<child>
<object class="AdwPreferencesRow">
<property name="title" translatable="yes">Monitor</property>
<child>
<object class="GtkBox">
<property name="margin-start">6</property>
<property name="margin-end">6</property>
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<child>
<object class="GtkCheckButton" id="taskbar_position_sync_button">
<property name="label" translatable="yes">Apply changes to all monitors</property>
<property name="receives_default">False</property>
<property name="halign">start</property>
<property name="hexpand">True</property>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="taskbar_position_monitor_combo">
<property name="halign">end</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group order and positions 2 -->
<child>
<object class="AdwPreferencesGroup" id="position_group_on_monitor2">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel screen position</property>
<child>
<object class="GtkToggleButton" id="position_bottom_button">
<property name="label" translatable="yes">Bottom</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="active">True</property>
<signal name="clicked" handler="position_bottom_button_clicked_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="position_top_button">
<property name="label" translatable="yes">Top</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="group">position_bottom_button</property>
<signal name="clicked" handler="position_top_button_clicked_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="position_left_button">
<property name="label" translatable="yes">Left</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="group">position_bottom_button</property>
<signal name="clicked" handler="position_left_button_clicked_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="position_right_button">
<property name="label" translatable="yes">Right</property>
<property name="receives_default">False</property>
<property name="valign">center</property>
<property name="group">position_bottom_button</property>
<signal name="clicked" handler="position_right_button_clicked_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel thickness</property>
<property name="subtitle" translatable="yes">(default is 48)</property>
<child>
<object class="GtkScale" id="panel_size_scale">
<property name="width-request">300</property>
<property name="adjustment">panel_size_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="panel_size_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Panel length (%)</property>
<property name="subtitle" translatable="yes">(default is 100)</property>
<child>
<object class="GtkScale" id="panel_length_scale">
<property name="width-request">300</property>
<property name="adjustment">panel_length_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="panel_anchor_label">
<property name="title" translatable="yes">Anchor</property>
<child>
<object class="GtkComboBoxText" id="panel_anchor_combo">
<property name="valign">center</property>
<items>
<item id="START" translatable="yes">Start</item>
<item id="MIDDLE" translatable="yes">Middle</item>
<item id="END" translatable="yes">End</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group order and positions 3 -->
<child>
<object class="AdwPreferencesGroup" id="position_group_on_monitor3">
<child>
<object class="AdwPreferencesRow">
<property name="title" translatable="yes">Taskbar Display</property>
<child>
<object class="GtkListBox" id="taskbar_display_listbox">
<property name="margin-top">6</property>
<property name="margin-bottom">6</property>
<property name="visible">True</property>
<property name="selection_mode">none</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,359 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk" version="4.0"/>
<object class="GtkAdjustment" id="appicon_margin_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="appicon_padding_adjustment">
<property name="lower">0.33</property>
<property name="upper">1</property>
<property name="step_increment">0.01</property>
<property name="page_increment">0.1</property>
</object>
<object class="GtkAdjustment" id="trans_opacity_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="trans_gradient_opacity1_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="trans_gradient_opacity2_adjustment">
<property name="upper">100</property>
<property name="step_increment">5</property>
<property name="page_increment">10</property>
</object>
<object class="AdwPreferencesPage" id="style">
<property name="title" translatable="yes">Style</property>
<property name="icon_name">applications-graphics-symbolic</property>
<!-- group app icon style -->
<child>
<object class="AdwPreferencesGroup" id="style_group_app_icon_style">
<property name="title" translatable="yes">AppIcon style</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">App Icon Margin</property>
<property name="subtitle" translatable="yes">(default is 8)</property>
<child>
<object class="GtkScale" id="appicon_margin_scale">
<property name="width-request">300</property>
<property name="adjustment">appicon_margin_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="appicon_margin_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">App Icon Padding</property>
<property name="subtitle" translatable="yes">(default is 4)</property>
<child>
<object class="GtkScale" id="appicon_padding_scale">
<property name="width-request">300</property>
<property name="adjustment">appicon_padding_adjustment</property>
<property name="round_digits">0</property>
<property name="digits">0</property>
<property name="value_pos">right</property>
<property name="draw_value">True</property>
<signal name="value-changed" handler="appicon_padding_scale_value_changed_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Animate hovering app icons</property>
<child>
<object class="GtkButton" id="animate_appicon_hover_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="animate_appicon_hover_options_image">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="animate_appicon_hover_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Icon style</property>
<child>
<object class="GtkComboBoxText" id="appicon_style_combo">
<property name="valign">center</property>
<items>
<item id="NORMAL" translatable="yes">Normal</item>
<item id="SYMBOLIC" translatable="yes">Symbolic</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group running indicator -->
<child>
<object class="AdwPreferencesGroup" id="style_group_running_indicator">
<property name="title" translatable="yes">Running indicator</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Running indicator position</property>
<child>
<object class="GtkToggleButton" id="dots_bottom_button">
<property name="label" translatable="yes">Bottom</property>
<property name="valign">center</property>
<signal name="toggled" handler="dots_bottom_button_toggled_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="dots_top_button">
<property name="label" translatable="yes">Top</property>
<property name="valign">center</property>
<property name="group">dots_bottom_button</property>
<signal name="toggled" handler="dots_top_button_toggled_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="dots_left_button">
<property name="label" translatable="yes">Left</property>
<property name="valign">center</property>
<property name="group">dots_bottom_button</property>
<signal name="toggled" handler="dots_left_button_toggled_cb" swapped="no"/>
</object>
</child>
<child>
<object class="GtkToggleButton" id="dots_right_button">
<property name="label" translatable="yes">Right</property>
<property name="valign">center</property>
<property name="group">dots_bottom_button</property>
<signal name="toggled" handler="dots_right_button_toggled_cb" swapped="no"/>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Running indicator style (Focused app)</property>
<child>
<object class="GtkButton" id="dot_style_options_button">
<property name="valign">center</property>
<child>
<object class="GtkImage" id="dot_style_image">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="dot_style_focused_combo">
<property name="valign">center</property>
<items>
<item id="DOTS" translatable="yes">Dots</item>
<item id="SQUARES" translatable="yes">Squares</item>
<item id="DASHES" translatable="yes">Dashes</item>
<item id="SEGMENTED" translatable="yes">Segmented</item>
<item id="SOLID" translatable="yes">Solid</item>
<item id="CILIORA" translatable="yes">Ciliora</item>
<item id="METRO" translatable="yes">Metro</item>
</items>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Running indicator style (Unfocused apps)</property>
<child>
<object class="GtkComboBoxText" id="dot_style_unfocused_combo">
<property name="valign">center</property>
<items>
<item id="DOTS" translatable="yes">Dots</item>
<item id="SQUARES" translatable="yes">Squares</item>
<item id="DASHES" translatable="yes">Dashes</item>
<item id="SEGMENTED" translatable="yes">Segmented</item>
<item id="SOLID" translatable="yes">Solid</item>
<item id="CILIORA" translatable="yes">Ciliora</item>
<item id="METRO" translatable="yes">Metro</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group dynamic trans -->
<child>
<object class="AdwPreferencesGroup" id="style_group_dynamic_trans">
<property name="title" translatable="yes">Panel style</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Override panel theme background color</property>
<child>
<object class="GtkColorButton" id="trans_bg_color_colorbutton">
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="trans_bg_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group dynamic trans2 -->
<child>
<object class="AdwPreferencesGroup" id="style_group_dynamic_trans2">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Override panel theme background opacity</property>
<child>
<object class="GtkSwitch" id="trans_opacity_override_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_opacity_box">
<property name="title" translatable="yes">Panel background opacity (%)</property>
<child>
<object class="GtkSpinButton" id="trans_opacity_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">trans_opacity_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_opacity_box2">
<property name="title" translatable="yes">Dynamic background opacity</property>
<property name="subtitle" translatable="yes">Change opacity when a window gets close to the panel</property>
<child>
<object class="GtkButton" id="trans_dyn_options_button">
<property name="receives_default">True</property>
<property name="valign">center</property>
<child>
<object class="GtkImage" id="image_trans_dyn_options">
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
</child>
<child>
<object class="GtkSwitch" id="trans_dyn_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- group dynamic trans3 -->
<child>
<object class="AdwPreferencesGroup" id="style_group_dynamic_trans3">
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Override panel theme gradient</property>
<child>
<object class="GtkSwitch" id="trans_gradient_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_gradient_box">
<property name="title" translatable="yes">Gradient top color and opacity (%)</property>
<child>
<object class="GtkColorButton" id="trans_gradient_color1_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="trans_gradient_color1_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">trans_gradient_opacity1_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow" id="trans_gradient_box2">
<property name="title" translatable="yes">Gradient bottom color and opacity (%)</property>
<child>
<object class="GtkColorButton" id="trans_gradient_color2_colorbutton">
<property name="receives_default">True</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="trans_gradient_color2_spinbutton">
<property name="valign">center</property>
<property name="text" translatable="yes">0</property>
<property name="adjustment">trans_gradient_opacity2_adjustment</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</interface>

View File

@ -0,0 +1,889 @@
/*
* This file is part of the Dash-To-Panel extension for Gnome 3
*
* 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/>.
*
*
* Credits:
* This file is based on code from the Dash to Dock extension by micheleg
* and code from the Taskbar extension by Zorin OS
* Some code was also adapted from the upstream Gnome Shell source code.
*/
import Clutter from 'gi://Clutter';
import Cogl from 'gi://Cogl';
import GdkPixbuf from 'gi://GdkPixbuf';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import Graphene from 'gi://Graphene';
import Meta from 'gi://Meta';
import Shell from 'gi://Shell';
import St from 'gi://St';
import * as Util from 'resource:///org/gnome/shell/misc/util.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js';
const SCROLL_TIME = Util.SCROLL_TIME / (Util.SCROLL_TIME > 1 ? 1000 : 1);
// simplify global signals and function injections handling
// abstract class
export const BasicHandler = class {
constructor() {
this._storage = new Object();
}
add(/*unlimited 3-long array arguments*/){
// convert arguments object to array, concatenate with generic
let args = [].concat('generic', [].slice.call(arguments));
// call addWithLabel with ags as if they were passed arguments
this.addWithLabel.apply(this, args);
}
destroy() {
for( let label in this._storage )
this.removeWithLabel(label);
}
addWithLabel( label /* plus unlimited 3-long array arguments*/) {
if(this._storage[label] == undefined)
this._storage[label] = new Array();
// skip first element of the arguments
for( let i = 1; i < arguments.length; i++ ) {
let item = this._storage[label];
let handlers = this._create(arguments[i]);
for (let j = 0, l = handlers.length; j < l; ++j) {
item.push(handlers[j]);
}
}
}
removeWithLabel(label){
if(this._storage[label]) {
for( let i = 0; i < this._storage[label].length; i++ ) {
this._remove(this._storage[label][i]);
}
delete this._storage[label];
}
}
/* Virtual methods to be implemented by subclass */
// create single element to be stored in the storage structure
_create(item){
throw new Error('no implementation of _create in ' + this);
}
// correctly delete single element
_remove(item){
throw new Error('no implementation of _remove in ' + this);
}
}
// Manage global signals
export const GlobalSignalsHandler = class extends BasicHandler {
_create(item) {
let handlers = [];
item[1] = [].concat(item[1]);
for (let i = 0, l = item[1].length; i < l; ++i) {
let object = item[0];
let event = item[1][i];
let callback = item[2]
try {
let id = object.connect(event, callback);
handlers.push([object, id]);
} catch (e)
{
}
}
return handlers;
}
_remove(item){
item[0].disconnect(item[1]);
}
};
/**
* Manage function injection: both instances and prototype can be overridden
* and restored
*/
export const InjectionsHandler = class extends BasicHandler {
_create(item) {
let object = item[0];
let name = item[1];
let injectedFunction = item[2];
let original = object[name];
object[name] = injectedFunction;
return [[object, name, injectedFunction, original]];
}
_remove(item) {
let object = item[0];
let name = item[1];
let original = item[3];
object[name] = original;
}
};
/**
* Manage timeouts: the added timeouts have their id reset on completion
*/
export const TimeoutsHandler = class extends BasicHandler {
_create(item) {
let name = item[0];
let delay = item[1];
let timeoutHandler = item[2];
this._remove(item);
this[name] = GLib.timeout_add(GLib.PRIORITY_DEFAULT, delay, () => {
this[name] = 0;
timeoutHandler();
return GLib.SOURCE_REMOVE;
});
return [[name]];
}
remove(name) {
this._remove([name])
}
_remove(item) {
let name = item[0];
if (this[name]) {
GLib.Source.remove(this[name]);
this[name] = 0;
}
}
getId(name) {
return this[name] ? this[name] : 0;
}
};
// This is wrapper to maintain compatibility with GNOME-Shell 3.30+ as well as
// previous versions.
export const DisplayWrapper = {
getScreen() {
return global.screen || global.display;
},
getWorkspaceManager() {
return global.screen || global.workspace_manager;
},
getMonitorManager() {
return global.screen || global.backend.get_monitor_manager();
}
};
let unredirectEnabled = true
export const setDisplayUnredirect = (enable) => {
if (enable && !unredirectEnabled)
Meta.enable_unredirect_for_display(global.display);
else if (!enable && unredirectEnabled)
Meta.disable_unredirect_for_display(global.display);
unredirectEnabled = enable;
};
export const getSystemMenuInfo = function() {
return {
name: 'quickSettings',
constructor: Main.panel.statusArea.quickSettings.constructor
};
}
export const getCurrentWorkspace = function() {
return DisplayWrapper.getWorkspaceManager().get_active_workspace();
};
export const getWorkspaceByIndex = function(index) {
return DisplayWrapper.getWorkspaceManager().get_workspace_by_index(index);
};
export const getWorkspaceCount = function() {
return DisplayWrapper.getWorkspaceManager().n_workspaces;
};
export const getStageTheme = function() {
return St.ThemeContext.get_for_stage(global.stage);
};
export const getScaleFactor = function() {
return getStageTheme().scale_factor || 1;
};
export const findIndex = function(array, predicate) {
if (array) {
if (Array.prototype.findIndex) {
return array.findIndex(predicate);
}
for (let i = 0, l = array.length; i < l; ++i) {
if (predicate(array[i])) {
return i;
}
}
}
return -1;
};
export const find = function(array, predicate) {
let index = findIndex(array, predicate);
if (index > -1) {
return array[index];
}
};
export const mergeObjects = function(main, bck) {
for (const prop in bck) {
if (!main.hasOwnProperty(prop) && bck.hasOwnProperty(prop)) {
main[prop] = bck[prop];
}
}
return main;
};
export const getTrackedActorData = (actor) => {
let trackedIndex = Main.layoutManager._findActor(actor);
if (trackedIndex >= 0)
return Main.layoutManager._trackedActors[trackedIndex]
}
export const getTransformedAllocation = function(actor) {
let extents = actor.get_transformed_extents();
let topLeft = extents.get_top_left();
let bottomRight = extents.get_bottom_right();
return { x1: topLeft.x, x2: bottomRight.x, y1: topLeft.y, y2: bottomRight.y };
};
export const setClip = function(actor, x, y, width, height) {
actor.set_clip(0, 0, width, height);
actor.set_position(x, y);
actor.set_size(width, height);
};
export const addKeybinding = function(key, settings, handler, modes) {
if (!Main.wm._allowedKeybindings[key]) {
Main.wm.addKeybinding(
key,
settings,
Meta.KeyBindingFlags.NONE,
modes || (Shell.ActionMode.NORMAL | Shell.ActionMode.OVERVIEW),
handler
);
}
};
export const removeKeybinding = function(key) {
if (Main.wm._allowedKeybindings[key]) {
Main.wm.removeKeybinding(key);
}
};
export const getrgbColor = function(color) {
color = typeof color === 'string' ? ColorUtils.color_from_string(color)[1] : color;
return { red: color.red, green: color.green, blue: color.blue };
};
export const getrgbaColor = function(color, alpha, offset) {
if (alpha <= 0) {
return 'transparent; ';
}
let rgb = getrgbColor(color);
if (offset) {
['red', 'green', 'blue'].forEach(k => {
rgb[k] = Math.min(255, Math.max(0, rgb[k] + offset));
if (rgb[k] == color[k]) {
rgb[k] = Math.min(255, Math.max(0, rgb[k] - offset));
}
});
}
return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + (Math.floor(alpha * 100) * 0.01) + '); ' ;
};
export const checkIfColorIsBright = function(color) {
let rgb = getrgbColor(color);
let brightness = 0.2126 * rgb.red + 0.7152 * rgb.green + 0.0722 * rgb.blue;
return brightness > 128;
};
export const getMouseScrollDirection = function(event) {
let direction;
switch (event.get_scroll_direction()) {
case Clutter.ScrollDirection.UP:
case Clutter.ScrollDirection.LEFT:
direction = 'up';
break;
case Clutter.ScrollDirection.DOWN:
case Clutter.ScrollDirection.RIGHT:
direction = 'down';
break;
}
return direction;
};
export const checkIfWindowHasTransient = function(window) {
let hasTransient;
window.foreach_transient(t => !(hasTransient = true));
return hasTransient;
};
export const activateSiblingWindow = function(windows, direction, startWindow) {
let windowIndex = windows.indexOf(global.display.focus_window);
let nextWindowIndex = windowIndex < 0 ?
startWindow ? windows.indexOf(startWindow) : 0 :
windowIndex + (direction == 'up' ? -1 : 1);
if (nextWindowIndex == windows.length) {
nextWindowIndex = 0;
} else if (nextWindowIndex < 0) {
nextWindowIndex = windows.length - 1;
}
if (windowIndex != nextWindowIndex) {
Main.activateWindow(windows[nextWindowIndex]);
}
};
export const animateWindowOpacity = function(window, tweenOpts) {
//there currently is a mutter bug with the windowactor opacity, starting with 3.34
//https://gitlab.gnome.org/GNOME/mutter/issues/836
//since 3.36, a workaround is to use the windowactor's child for the fade animation
//this leaves a "shadow" on the desktop, so the windowactor needs to be hidden
//when the animation is complete
let visible = tweenOpts.opacity > 0;
let windowActor = window;
let initialOpacity = window.opacity;
window = windowActor.get_first_child() || windowActor;
if (!windowActor.visible && visible) {
window.opacity = 0;
windowActor.visible = visible;
tweenOpts.opacity = Math.min(initialOpacity, tweenOpts.opacity);
}
if (!visible) {
tweenOpts.onComplete = () => {
windowActor.visible = visible;
window.opacity = initialOpacity;
};
}
animate(window, tweenOpts);
};
export const animate = function(actor, options) {
//the original animations used Tweener instead of Clutter animations, so we
//use "time" and "delay" properties defined in seconds, as opposed to Clutter
//animations "duration" and "delay" which are defined in milliseconds
if (options.delay) {
options.delay = options.delay * 1000;
}
options.duration = options.time * 1000;
delete options.time;
if (options.transition) {
//map Tweener easing equations to Clutter animation modes
options.mode = {
'easeInCubic': Clutter.AnimationMode.EASE_IN_CUBIC,
'easeInOutCubic': Clutter.AnimationMode.EASE_IN_OUT_CUBIC,
'easeInOutQuad': Clutter.AnimationMode.EASE_IN_OUT_QUAD,
'easeOutQuad': Clutter.AnimationMode.EASE_OUT_QUAD
}[options.transition] || Clutter.AnimationMode.LINEAR;
delete options.transition;
}
let params = [options];
if ('value' in options && actor instanceof St.Adjustment) {
params.unshift(options.value);
delete options.value;
}
actor.ease.apply(actor, params);
}
export const isAnimating = function(actor, prop) {
return !!actor.get_transition(prop);
}
export const stopAnimations = function(actor) {
actor.remove_all_transitions();
}
export const getIndicators = function(delegate) {
if (delegate instanceof St.BoxLayout) {
return delegate;
}
return delegate.indicators;
}
export const getPoint = function(coords) {
return new Graphene.Point(coords);
}
export const notify = function(text, iconName, action, isTransient) {
let source = new MessageTray.SystemNotificationSource();
let notification = new MessageTray.Notification(source, 'Dash to Panel', text);
let notifyFunc = source.showNotification || source.notify;
if (iconName) {
source.createIcon = function() {
return new St.Icon({ icon_name: iconName });
};
}
if (action) {
if (!(action instanceof Array)) {
action = [action];
}
action.forEach(a => notification.addAction(a.text, a.func));
}
Main.messageTray.add(source);
notification.setTransient(isTransient);
notifyFunc.call(source, notification);
};
/*
* This is a copy of the same function in utils.js, but also adjust horizontal scrolling
* and perform few further cheks on the current value to avoid changing the values when
* it would be clamp to the current one in any case.
* Return the amount of shift applied
*/
export const ensureActorVisibleInScrollView = function(scrollView, actor, fadeSize, onComplete) {
const vadjustment = scrollView.vadjustment;
const hadjustment = scrollView.hadjustment;
let [vvalue, vlower, vupper, vstepIncrement, vpageIncrement, vpageSize] = vadjustment.get_values();
let [hvalue, hlower, hupper, hstepIncrement, hpageIncrement, hpageSize] = hadjustment.get_values();
let [hvalue0, vvalue0] = [hvalue, vvalue];
let voffset = fadeSize;
let hoffset = fadeSize;
let box = actor.get_allocation_box();
let y1 = box.y1, y2 = box.y2, x1 = box.x1, x2 = box.x2;
let parent = actor.get_parent();
while (parent != scrollView) {
if (!parent)
throw new Error("actor not in scroll view");
let box = parent.get_allocation_box();
y1 += box.y1;
y2 += box.y1;
x1 += box.x1;
x2 += box.x1;
parent = parent.get_parent();
}
if (y1 < vvalue + voffset)
vvalue = Math.max(0, y1 - voffset);
else if (vvalue < vupper - vpageSize && y2 > vvalue + vpageSize - voffset)
vvalue = Math.min(vupper -vpageSize, y2 + voffset - vpageSize);
if (x1 < hvalue + hoffset)
hvalue = Math.max(0, x1 - hoffset);
else if (hvalue < hupper - hpageSize && x2 > hvalue + hpageSize - hoffset)
hvalue = Math.min(hupper - hpageSize, x2 + hoffset - hpageSize);
let tweenOpts = {
time: SCROLL_TIME,
onComplete: onComplete || (() => {}),
transition: 'easeOutQuad'
};
if (vvalue !== vvalue0) {
animate(vadjustment, mergeObjects(tweenOpts, { value: vvalue }));
}
if (hvalue !== hvalue0) {
animate(hadjustment, mergeObjects(tweenOpts, { value: hvalue }));
}
return [hvalue- hvalue0, vvalue - vvalue0];
}
/**
* ColorUtils is adapted from https://github.com/micheleg/dash-to-dock
*/
let colorNs = Clutter.Color ? Clutter : Cogl
export const ColorUtils = {
color_from_string: colorNs.color_from_string,
Color: colorNs.Color,
colorLuminance(r, g, b, dlum) {
// Darken or brighten color by a fraction dlum
// Each rgb value is modified by the same fraction.
// Return "#rrggbb" strin
let rgbString = '#';
rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(r*(1+dlum), 0), 255)), 2);
rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(g*(1+dlum), 0), 255)), 2);
rgbString += ColorUtils._decimalToHex(Math.round(Math.min(Math.max(b*(1+dlum), 0), 255)), 2);
return rgbString;
},
_decimalToHex(d, padding) {
// Convert decimal to an hexadecimal string adding the desired padding
let hex = d.toString(16);
while (hex.length < padding)
hex = '0'+ hex;
return hex;
},
HSVtoRGB(h, s, v) {
// Convert hsv ([0-1, 0-1, 0-1]) to rgb ([0-255, 0-255, 0-255]).
// Following algorithm in https://en.wikipedia.org/wiki/HSL_and_HSV
// here with h = [0,1] instead of [0, 360]
// Accept either (h,s,v) independently or {h:h, s:s, v:v} object.
// Return {r:r, g:g, b:b} object.
if (arguments.length === 1) {
s = h.s;
v = h.v;
h = h.h;
}
let r,g,b;
let c = v*s;
let h1 = h*6;
let x = c*(1 - Math.abs(h1 % 2 - 1));
let m = v - c;
if (h1 <=1)
r = c + m, g = x + m, b = m;
else if (h1 <=2)
r = x + m, g = c + m, b = m;
else if (h1 <=3)
r = m, g = c + m, b = x + m;
else if (h1 <=4)
r = m, g = x + m, b = c + m;
else if (h1 <=5)
r = x + m, g = m, b = c + m;
else
r = c + m, g = m, b = x + m;
return {
r: Math.round(r * 255),
g: Math.round(g * 255),
b: Math.round(b * 255)
};
},
RGBtoHSV(r, g, b) {
// Convert rgb ([0-255, 0-255, 0-255]) to hsv ([0-1, 0-1, 0-1]).
// Following algorithm in https://en.wikipedia.org/wiki/HSL_and_HSV
// here with h = [0,1] instead of [0, 360]
// Accept either (r,g,b) independently or {r:r, g:g, b:b} object.
// Return {h:h, s:s, v:v} object.
if (arguments.length === 1) {
r = r.r;
g = r.g;
b = r.b;
}
let h,s,v;
let M = Math.max(r, g, b);
let m = Math.min(r, g, b);
let c = M - m;
if (c == 0)
h = 0;
else if (M == r)
h = ((g-b)/c) % 6;
else if (M == g)
h = (b-r)/c + 2;
else
h = (r-g)/c + 4;
h = h/6;
v = M/255;
if (M !== 0)
s = c/M;
else
s = 0;
return {h: h, s: s, v: v};
}
};
/**
* DominantColorExtractor is adapted from https://github.com/micheleg/dash-to-dock
*/
let themeLoader = null;
let iconCacheMap = new Map();
const MAX_CACHED_ITEMS = 1000;
const BATCH_SIZE_TO_DELETE = 50;
const DOMINANT_COLOR_ICON_SIZE = 64;
export const DominantColorExtractor = class {
constructor(app){
this._app = app;
}
/**
* Try to get the pixel buffer for the current icon, if not fail gracefully
*/
_getIconPixBuf() {
let iconTexture = this._app.create_icon_texture(16);
if (themeLoader === null) {
themeLoader = new St.IconTheme();
}
// Unable to load the icon texture, use fallback
if (iconTexture instanceof St.Icon === false) {
return null;
}
iconTexture = iconTexture.get_gicon();
// Unable to load the icon texture, use fallback
if (iconTexture === null) {
return null;
}
if (iconTexture instanceof Gio.FileIcon) {
// Use GdkPixBuf to load the pixel buffer from the provided file path
return GdkPixbuf.Pixbuf.new_from_file(iconTexture.get_file().get_path());
}
// Get the pixel buffer from the icon theme
if (iconTexture instanceof Gio.ThemedIcon) {
let icon_info = themeLoader.lookup_icon(iconTexture.get_names()[0],
DOMINANT_COLOR_ICON_SIZE, 0);
if (icon_info !== null) {
return icon_info.load_icon();
}
}
return null;
}
/**
* The backlight color choosing algorithm was mostly ported to javascript from the
* Unity7 C++ source of Canonicals:
* https://bazaar.launchpad.net/~unity-team/unity/trunk/view/head:/launcher/LauncherIcon.cpp
* so it more or less works the same way.
*/
_getColorPalette() {
if (iconCacheMap.get(this._app.get_id())) {
// We already know the answer
return iconCacheMap.get(this._app.get_id());
}
let pixBuf = this._getIconPixBuf();
if (pixBuf == null)
return null;
let pixels = pixBuf.get_pixels(),
offset = 0;
let total = 0,
rTotal = 0,
gTotal = 0,
bTotal = 0;
let resample_y = 1,
resample_x = 1;
// Resampling of large icons
// We resample icons larger than twice the desired size, as the resampling
// to a size s
// DOMINANT_COLOR_ICON_SIZE < s < 2*DOMINANT_COLOR_ICON_SIZE,
// most of the case exactly DOMINANT_COLOR_ICON_SIZE as the icon size is tipycally
// a multiple of it.
let width = pixBuf.get_width();
let height = pixBuf.get_height();
// Resample
if (height >= 2* DOMINANT_COLOR_ICON_SIZE)
resample_y = Math.floor(height/DOMINANT_COLOR_ICON_SIZE);
if (width >= 2* DOMINANT_COLOR_ICON_SIZE)
resample_x = Math.floor(width/DOMINANT_COLOR_ICON_SIZE);
if (resample_x !==1 || resample_y !== 1)
pixels = this._resamplePixels(pixels, resample_x, resample_y);
// computing the limit outside the for (where it would be repeated at each iteration)
// for performance reasons
let limit = pixels.length;
for (let offset = 0; offset < limit; offset+=4) {
let r = pixels[offset],
g = pixels[offset + 1],
b = pixels[offset + 2],
a = pixels[offset + 3];
let saturation = (Math.max(r,g, b) - Math.min(r,g, b));
let relevance = 0.1 * 255 * 255 + 0.9 * a * saturation;
rTotal += r * relevance;
gTotal += g * relevance;
bTotal += b * relevance;
total += relevance;
}
total = total * 255;
let r = rTotal / total,
g = gTotal / total,
b = bTotal / total;
let hsv = ColorUtils.RGBtoHSV(r * 255, g * 255, b * 255);
if (hsv.s > 0.15)
hsv.s = 0.65;
hsv.v = 0.90;
let rgb = ColorUtils.HSVtoRGB(hsv.h, hsv.s, hsv.v);
// Cache the result.
let backgroundColor = {
lighter: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, 0.2),
original: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, 0),
darker: ColorUtils.colorLuminance(rgb.r, rgb.g, rgb.b, -0.5)
};
if (iconCacheMap.size >= MAX_CACHED_ITEMS) {
//delete oldest cached values (which are in order of insertions)
let ctr=0;
for (let key of iconCacheMap.keys()) {
if (++ctr > BATCH_SIZE_TO_DELETE)
break;
iconCacheMap.delete(key);
}
}
iconCacheMap.set(this._app.get_id(), backgroundColor);
return backgroundColor;
}
/**
* Downsample large icons before scanning for the backlight color to
* improve performance.
*
* @param pixBuf
* @param pixels
* @param resampleX
* @param resampleY
*
* @return [];
*/
_resamplePixels(pixels, resampleX, resampleY) {
let resampledPixels = [];
// computing the limit outside the for (where it would be repeated at each iteration)
// for performance reasons
let limit = pixels.length / (resampleX * resampleY) / 4;
for (let i = 0; i < limit; i++) {
let pixel = i * resampleX * resampleY;
resampledPixels.push(pixels[pixel * 4]);
resampledPixels.push(pixels[pixel * 4 + 1]);
resampledPixels.push(pixels[pixel * 4 + 2]);
resampledPixels.push(pixels[pixel * 4 + 3]);
}
return resampledPixels;
}
};
export const drawRoundedLine = function(cr, x, y, width, height, isRoundLeft, isRoundRight, stroke, fill) {
if (height > width) {
y += Math.floor((height - width) / 2.0);
height = width;
}
height = 2.0 * Math.floor(height / 2.0);
const leftRadius = isRoundLeft ? height / 2.0 : 0.0;
const rightRadius = isRoundRight ? height / 2.0 : 0.0;
cr.moveTo(x + width - rightRadius, y);
cr.lineTo(x + leftRadius, y);
if (isRoundLeft)
cr.arcNegative(x + leftRadius, y + leftRadius, leftRadius, -Math.PI/2, Math.PI/2);
else
cr.lineTo(x, y + height);
cr.lineTo(x + width - rightRadius, y + height);
if (isRoundRight)
cr.arcNegative(x + width - rightRadius, y + rightRadius, rightRadius, Math.PI/2, -Math.PI/2);
else
cr.lineTo(x + width, y);
cr.closePath();
if (fill != null) {
cr.setSource(fill);
cr.fillPreserve();
}
if (stroke != null)
cr.setSource(stroke);
cr.stroke();
}

View File

@ -1,21 +0,0 @@
Source: gnome-shell-extension-just-perfection
Section: gnome
Priority: optional
Maintainer: Marco Trevisan <marco@ubuntu.com>
Build-Depends: debhelper (>= 10),
eslint <!nocheck>,
libglib2.0-bin,
node-chalk <!nocheck>,
node-js-yaml <!nocheck>,
node-strip-ansi <!nocheck>,
libgettextpo-dev,
gettext,
sassc
Standards-Version: 4.1.1
Package: gnome-shell-extension-just-perfection
Architecture: all
Depends: gnome-shell,
${misc:Depends},
${shlibs:Depends},
Description: Tweak Tool to Customize GNOME Shell, Change the Behavior and Disable UI Elements

View File

@ -1,675 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
Just Perfection GNOME Shell Desktop
Copyright (C) 2020-2024 Javad Rahmatzadeh
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 <http://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:
Just Perfection GNOME Shell Desktop
Copyright (C) 2020-2024 Javad Rahmatzadeh
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
<http://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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,409 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
<schema id="org.gnome.shell.extensions.just-perfection"
path="/org/gnome/shell/extensions/just-perfection/">
<key type="b" name="panel">
<default>true</default>
<summary>Panel</summary>
<description>Panel Visibility Status</description>
</key>
<key type="b" name="panel-in-overview">
<default>false</default>
<summary>Panel in Overview</summary>
<description>Panel in Overview Visibility Status</description>
</key>
<key type="b" name="background-menu">
<default>true</default>
<summary>Background Menu</summary>
<description>Background Menu Status</description>
</key>
<key type="b" name="search">
<default>true</default>
<summary>Search Box</summary>
<description>Search Box Visibility Status</description>
</key>
<key type="b" name="workspace">
<default>true</default>
<summary>Workspace Switcher</summary>
<description>Workspace Switcher Visibility Status</description>
</key>
<key type="b" name="dash">
<default>true</default>
<summary>Dash</summary>
<description>Dash Visibility Status</description>
</key>
<key type="b" name="osd">
<default>true</default>
<summary>OSD</summary>
<description>OSD Visibility Status</description>
</key>
<key type="b" name="workspace-popup">
<default>true</default>
<summary>Workspace Popup</summary>
<description>Workspace Popup Visibility Status</description>
</key>
<key type="b" name="theme">
<default>false</default>
<summary>Theme</summary>
<description>Theme Status</description>
</key>
<key type="b" name="activities-button">
<default>true</default>
<summary>Activities Button</summary>
<description>Activities Button Visibility Status</description>
</key>
<key type="b" name="clock-menu">
<default>true</default>
<summary>Clock Menu</summary>
<description>Clock Menu Visibility Status</description>
</key>
<key type="b" name="panel-notification-icon">
<default>true</default>
<summary>Panel Notification Icon</summary>
<description>Panel Notification Icon Visibility Status</description>
</key>
<key type="b" name="keyboard-layout">
<default>true</default>
<summary>Keyboard Layout</summary>
<description>Keyboard Layout Visibility Status</description>
</key>
<key type="b" name="accessibility-menu">
<default>true</default>
<summary>Accessibility Menu</summary>
<description>Accessibility Menu Visibility Status</description>
</key>
<key type="b" name="quick-settings">
<default>true</default>
<summary>Quick Settings Menu</summary>
<description>Quick Settings Visibility Status</description>
</key>
<key type="b" name="power-icon">
<default>true</default>
<summary>Power Icon</summary>
<description>Power Icon Visibility Status</description>
</key>
<key type="b" name="window-picker-icon">
<default>true</default>
<summary>Window Picker Icon</summary>
<description>Window Picker Icon Visiblity</description>
</key>
<key type="b" name="type-to-search">
<default>true</default>
<summary>Type to Search</summary>
<description>Type to Search Behavior</description>
</key>
<key type="i" name="panel-corner-size">
<default>0</default>
<range min="0" max="61"/>
<summary>0 means use Shell theme, 1 means no border, 2 - 61 means border size</summary>
<description>Panel Corner Size</description>
</key>
<key type="i" name="workspace-switcher-size">
<default>0</default>
<range min="0" max="30"/>
<summary>Workspace Switcher Size in percent, 0 means use default size</summary>
<description>Workspace Switcher Size</description>
</key>
<key type="i" name="top-panel-position">
<default>0</default>
<range min="0" max="1"/>
<summary>Top Panel Position</summary>
<description>Top Panel Position Status</description>
</key>
<key type="i" name="clock-menu-position">
<default>0</default>
<range min="0" max="2"/>
<summary>0 means center, 1 means right, 2 means left</summary>
<description>Clock Menu Position Status</description>
</key>
<key type="i" name="clock-menu-position-offset">
<default>0</default>
<range min="0" max="20"/>
<summary>0 means start of the position</summary>
<description>Clock Menu Position Offset</description>
</key>
<key type="b" name="show-apps-button">
<default>true</default>
<summary>Show Apps Button Visiblity</summary>
<description>Show Apps Button Visiblity Status</description>
</key>
<key type="i" name="animation">
<default>1</default>
<range min="0" max="7"/>
<summary>0 means disabled, 1 means default speed, animation speed otherwise</summary>
<description>Animation Status</description>
</key>
<key type="b" name="window-demands-attention-focus">
<default>false</default>
<summary>Window Demands Attention Focus</summary>
<description>Window Demands Attention Focus Status</description>
</key>
<key type="b" name="window-maximized-on-create">
<default>false</default>
<summary>Window Maximized on Create</summary>
<description>Window Maximized on Create Status</description>
</key>
<key type="i" name="dash-icon-size">
<default>0</default>
<range min="0" max="64"/>
<summary>0 means default, 16, 22, 24, 32, 40, 48, 56, 64</summary>
<description>Dash Icon Size</description>
</key>
<key type="i" name="startup-status">
<default>1</default>
<range min="0" max="1"/>
<summary>0 means desktop, 1 means overview</summary>
<description>Startup Status</description>
</key>
<key type="b" name="workspaces-in-app-grid">
<default>true</default>
<summary>Workspaces Visiblity in App Grid</summary>
<description>Workspaces Visiblity in App Grid Status</description>
</key>
<key type="i" name="notification-banner-position">
<default>1</default>
<range min="0" max="5"/>
<summary>0: top start, 1: top center, 2: top end, 3: bottom start, 4: bottom center, 5: bottom end</summary>
<description>Notification Banner Position</description>
</key>
<key type="b" name="workspace-switcher-should-show">
<default>false</default>
<summary>Always Show Workspaces Switcher</summary>
<description>Always Show Workspace Switcher Status</description>
</key>
<key type="i" name="panel-size">
<default>0</default>
<range min="0" max="64"/>
<summary>0 means use Shell theme, 1 - 64 means size in pixels</summary>
<description>Panel Size</description>
</key>
<key type="i" name="panel-button-padding-size">
<default>0</default>
<range min="0" max="61"/>
<summary>0 means use Shell theme, 1 means no padding, 2 - 61 means padding size</summary>
<description>Panel Button Padding Size</description>
</key>
<key type="i" name="panel-indicator-padding-size">
<default>0</default>
<range min="0" max="61"/>
<summary>0 means use Shell theme, 1 means no padding, 2 - 61 means padding size</summary>
<description>Panel Indicator Padding Size</description>
</key>
<key type="b" name="window-preview-caption">
<default>true</default>
<summary>Window Preview Caption</summary>
<description>Window Preview Caption Status</description>
</key>
<key type="b" name="window-preview-close-button">
<default>true</default>
<summary>Window Preview Close Button</summary>
<description>Window Preview Close Button Status</description>
</key>
<key type="i" name="workspace-background-corner-size">
<default>0</default>
<range min="0" max="61"/>
<summary>0 means use default shell size, 1 means no radius, 2 - 61 means radius size</summary>
<description>Workspace Background Corner Size</description>
</key>
<key type="b" name="workspace-wrap-around">
<default>false</default>
<summary>Workspace Wrap Around</summary>
<description>Workspace Wrap Around Status</description>
</key>
<key type="b" name="ripple-box">
<default>true</default>
<summary>Ripple Box</summary>
<description>Ripple Box Status</description>
</key>
<key type="b" name="double-super-to-appgrid">
<default>true</default>
<summary>Double Supper To App Grid</summary>
<description>Double Supper To App Grid Status</description>
</key>
<key type="b" name="overlay-key">
<default>true</default>
<summary>Overlay Key</summary>
<description>Overlay Key to Overview Status</description>
</key>
<key type="b" name="switcher-popup-delay">
<default>true</default>
<summary>Switcher Popup Delay</summary>
<description>Removes the delay for all switcher popups like alt-tab, ctrl-alt-tab, keyboard layout, ...</description>
</key>
<key type="b" name="world-clock">
<default>true</default>
<summary>World Clock Visibility in Clock Menu</summary>
<description>World Clock Visibility Status</description>
</key>
<key type="b" name="weather">
<default>true</default>
<summary>Weather Visibility in Clock Menu</summary>
<description>Weather Visibility Status</description>
</key>
<key type="b" name="events-button">
<default>true</default>
<summary>Events Button Visibility in Clock Menu</summary>
<description>Events Button Visibility Status</description>
</key>
<key type="b" name="calendar">
<default>true</default>
<summary>Calendar Visibility in Clock Menu</summary>
<description>Calendar Visibility Status</description>
</key>
<key type="i" name="panel-icon-size">
<default>0</default>
<range min="0" max="60"/>
<summary>0 means use Shell theme, 1 - 60 means panel icon size</summary>
<description>Panel Icon Size</description>
</key>
<key type="b" name="dash-separator">
<default>true</default>
<summary>Dash Separator Visibility</summary>
<description>Dash Separator Visibility Status</description>
</key>
<key type="b" name="workspace-peek">
<default>true</default>
<summary>Workspace Peek</summary>
<description>Workspace Peek Status</description>
</key>
<key type="i" name="looking-glass-width">
<default>0</default>
<range min="0" max="9"/>
<summary>Width Size in percent, 0 means use default size</summary>
<description>Looking Glass Width size</description>
</key>
<key type="i" name="looking-glass-height">
<default>0</default>
<range min="0" max="9"/>
<summary>Height Size in percent, 0 means use default size</summary>
<description>Looking Glass Height size</description>
</key>
<key type="i" name="osd-position">
<default>0</default>
<range min="0" max="9"/>
<summary>OSD Position</summary>
<description>OSD Position Status</description>
</key>
<key type="b" name="window-menu-take-screenshot-button">
<default>true</default>
<summary>Window Menu Take Screenshot Button Visibility</summary>
<description>Window Menu Take Screenshot Button Visibility Status</description>
</key>
<key type="i" name="alt-tab-window-preview-size">
<default>0</default>
<range min="0" max="512"/>
<summary>0 means default size</summary>
<description>Alt Tab Window Preview Size</description>
</key>
<key type="i" name="alt-tab-small-icon-size">
<default>0</default>
<range min="0" max="512"/>
<summary>0 means default size</summary>
<description>Alt Tab Small Icon Size (Window Preview Icon Size)</description>
</key>
<key type="i" name="alt-tab-icon-size">
<default>0</default>
<range min="0" max="512"/>
<summary>0 means default size</summary>
<description>Alt Tab Icon Size</description>
</key>
<key type="b" name="screen-sharing-indicator">
<default>true</default>
<summary>Screen Sharing Indicator Visibility in Panel</summary>
<description>Screen Sharing Indicator Visibility Status</description>
</key>
<key type="b" name="screen-recording-indicator">
<default>true</default>
<summary>Screen Recording Indicator Visibility in Panel</summary>
<description>Screen Recording Indicator Visibility Status</description>
</key>
<key type="i" name="controls-manager-spacing-size">
<default>0</default>
<range min="0" max="150"/>
<summary>0 means default size</summary>
<description>Controls manager spacing Size (overview spacing)</description>
</key>
<key type="b" name="dash-app-running">
<default>true</default>
<summary>Dash app running dot</summary>
<description>Dash app running dot visibility status</description>
</key>
<key type="i" name="max-displayed-search-results">
<default>1</default>
<range min="0" max="40"/>
<summary>0 means default, max displayed search results otherwise</summary>
<description>Max Displayed Search Results</description>
</key>
<key type="b" name="quick-settings-dark-mode">
<default>true</default>
<summary>Dark Mode Toggle Button Visibility In Quick Settings</summary>
<description>Dark Mode Toggle Button Visibility Status</description>
</key>
</schema>
</schemalist>

View File

@ -1,555 +0,0 @@
# Changelog
All notable changes to this project will be documented in this file.
We go to the next version after each release on the
[GNOME Shell Extensions website](https://extensions.gnome.org/).
## [Unreleased]
## [30.0] - 2024-07-31
### Added
- GNOME Shell 47 Support.
## [29.0] - 2024-07-06
### Added
- Dark Mode Toggle Button Visibility in Quick Settings.
- Maximum Displayed Search Results feature (GNOME Shell 45 and higher).
- Gresources compiled file for the preferences window to load faster.
### Fixed
- Alt-Tab Switcher list Item Background Color for Shell Theme Override (GNOME Shell 46).
- Hidden panel timeout priority on Wayland.
- Panel Menu not Showing Up On Bottom Panel When the Height is Larger than the Screen Height.
- The dash app running indicator visibility.
- Workspace Popup visibility CPU usage.
- Japanese Translation by [@gnuey56](https://gitlab.gnome.org/gnuey56).
### Changed
- The clock menu position widget to `AdwSpinRow`.
- The panel height maximum size to 64.
## [28.0 Lear] - 2024-03-06
### Added
- Buy Me a Coffee donation link.
- GNOME Shell 46 Support.
- Option to maximize windows on creation by [@droserasprout](https://gitlab.gnome.org/droserasprout).
### Fixed
- The world clock visibility coming back after reboot or install change.
### Removed
- Window Picker Shell Theme Override.
- Search Shell Theme Override.
- Workspace Animation Shell Theme Override.
- Dash Background Shell Theme Override.
## [27.0 Durer] - 2023-09-14
### Changed
- The world clocks visibility from CSS to JS.
### Added
- "Almost none" option to animation speed feature (GNOME Shell 45).
- GNOME Shell 45 Support.
- Japanese Translation by [@gnuey56](https://gitlab.gnome.org/gnuey56).
### Removed
- Activities button icon feature (GNOME Shell 45).
- App menu indicator (GNOME Shell 45).
## [26.0 Rosa] - 2023-08-07
### Fixed
- Remove not defined.
## [25.0 Rosa] - 2023-08-07
### Changed
- The behavior of the panel is shown only in the overview.
Rather than sliding in from the top, it is now rendered behind the workspaces
by [Schneegans](https://gitlab.gnome.org/Schneegans).
### Fixed
- a11y error in GNOME Shell mobile.
- Activities button error in GNOME Shell mobile.
- Marked as an urgent signal for window demand attention focus feature.
- Panel flickering when its position is at the bottom.
- `.set_icon_size` is not a function error (Date Menu).
- Unwanted padding on the disabled power icon.
- Unwanted shadow for workspace in the app grid.
### Added
- Dash app running visibility.
- Disable the overlay key.
- EGO donations.
- Workspace peek (GNOME Shell 42 and higher).
### Removed
- GNOME Shell support (3.36, 3.38, 40 and 41 no longer getting new features).
## [24.0 Hals] - 2023-03-01
### Changed
- Window preview close button for super minimal profile (to disabled).
### Added
- GNOME Shell 44 support.
- Transparent dash background for shell theme override (GNOME Shell 4x only).
## [23.0 Goya] - 2023-02-10
### Changed
- Clock menu offset maximum to 20.
- Fastest animation speed (twice as fast as before).
### Fixed
- App menu label visibility compatibility issue with open whether extension.
- Hidden workspace switcher padding in overview.
- Keep the clock menu position when another widget is added to the panel.
- Looking Glass API conflicts with the "Dash to Panel" extension.
- Looking Glass error when primary monitor doesn't exist.
- Window preview gap when window picker close button is disabled.
- Workspace boxes top margin in the app grid when the search entry is disabled.
- Italian translation by [@svityboy](https://gitlab.gnome.org/svityboy).
### Added
- More dash icon size (16px, 22px, 24px, 40px and 56px).
- Overview spacing size.
- Screen recording indicator visibility.
- Screen sharing indicator visibility.
- Switcher popup delay by [@koplo199](https://gitlab.gnome.org/koplo199).
## [22.0 Millet] - 2022-09-10
### Fixed
- Dash app button visibility height.
- Looking glass error after unlock.
### Added
- App menu label visibility.
- GNOME Shell 43 support.
- Quick settings menu visibility.
### Removed
- Aggregate menu for GNOME Shell 43 and higher.
## [21.0 Reynolds] - 2022-08-06
### Changed
- Prefs compatibility layer checking to GTK and Adw instead of GNOME Shell version.
### Fixed
- Application button visibility in Ubuntu 22.04.
- Prefs window size for scaled displays.
- Prefs window size for small displays in GNOME Shell 42.
- Racy prefs window size.
- Window caption going out of display area when dash is disabled in GNOME Shell 40 and higher.
- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790).
- Spanish translation by [@Luci](https://gitlab.gnome.org/Luci).
### Added
- Alt-Tab window preview icon size.
- Alt-Tab window preview size.
- Alt-Tab icon size.
- Dash separator visibility.
- Looking glass size by [@AdvendraDeswanta](https://gitlab.gnome.org/AdvendraDeswanta).
- OSD position.
- Take the screenshot button in the window menu visibility.
### Removed
- Gesture API for GNOME Shell 40 and higher.
- List box separators for GNOME Shell 40 and 41 (EOS).
- Prefs intro.
## [20.0 Hayez] - 2022-04-01
### Fixed
- Dynamic workspaces getting disabled by workspace popup.
- Flickering panel after Unlock.
- Notification banner position on GNOME Shell 42.
- Window demands attention focus on GNOME Shell 42.
- French translation by [@GeoffreyCoulaud](https://gitlab.gnome.org/GeoffreyCoulaud).
- Italian translation by [@svityboy](https://gitlab.gnome.org/svityboy).
### Added
- Events visibility in the clock menu.
- Calendar visibility in the clock menu.
- Dutch translation by [@Vistaus](https://gitlab.gnome.org/Vistaus).
## [19.0 Ancher] - 2022-03-02
### Fixed
- Blurry search entry on GNOME Shell themes with "box-shadow".
- Prefs file chooser recursion.
- SecondaryMonitorDisplay error on GNOME Shell 42.
- Shell theme overrides OSD on GNOME Shell 42.
- Shell theme overrides the workspace switcher on GNOME Shell 42.
- Workspace popup visibility in GNOME Shell 42.
### Added
- Libadwaita for GNOME Shell 42 prefs.
- Panel icon size.
- Panel world clock visibility.
- Weather visibility.
## [18.0 Roslin] - 2022-02-12
### Fixed
- GNOME 3.x prefs error.
## [17.0 Roslin] - 2022-02-11
### Fixed
- Emitting panel show when panel is visible.
- Looking glass not showing up.
- Looking glass position on startup when panel is hidden.
- Prefs height going off the screen in small displays.
- Prefs lunching url freeze on Wayland.
- Prefs padding in GNOME Shell 42.
- Prefs UI Improvement by [@muqtxdir](https://gitlab.gnome.org/muqtxdir).
- Startup animation for hiding panel when panel is disabled.
- Type to search when text entry content is replaced with another content.
- Window goes under panel after unlock on Wayland.
- Window picker caption visibility issue on Pop Shell.
- Galician translation by [@frandieguez](https://gitlab.gnome.org/frandieguez).
### Added
- Bottom to notification banner position.
### Removed
- Panel corner size option for GNOME Shell 42.
## [16.0 Rembrandt] - 2021-11-15
### Fixed
- Animation jump when search entry is disabled and entering app grid.
- Clock menu revealing in lockscreen when the position is left or right.
- Startup status for Ubuntu.
- Workspace switcher visibility in GNOME Shell 41.
### Removed
- Hot corner for GNOME Shell 41.
- Hot corner library for all supported Shell versions.
### Added
- Double supper to app grid for GNOME Shell 40 and 41.
- Panel corner size when panel is disabled.
- Panel visibility in overview when panel is disabled.
- Prefs window intro.
- Profile selector to the prefs window.
- Ripple box.
## [15.0 Magnetized] - 2021-09-22
### Fixed
- unlock recursion error.
### Added
- Hot corner support for GNOME Shell 41.
## [14.0 Magnetized] - 2021-09-22
### Changed
- Repo folder structure to have better organization.
### Fixed
- Bottom panel position for multi monitors by [@harshadgavali](https://gitlab.gnome.org/harshadgavali).
- First swipe up in desktop startup status.
- Looking glass position on bottom panel.
- Maximized window gap on Wayland.
- Search entry animation for type to search when search entry is disabled.
- Search entry API to avoid conflicting with other extensions.
- Window picker caption border on disable.
- Window picker disapearing on wayland with shell theme override.
- Galician translation by [@frandieguez](https://gitlab.gnome.org/frandieguez).
- Spanish translation by [@DiegoIvanME](https://gitlab.gnome.org/DiegoIvanME).
### Removed
- Donation popover in prefs.
- Hot corner for GNOME Shell 41.
### Added
- GNOME Shell 41 support.
- Panel indicator padding size.
- Window picker close button visibility.
## [13.0 Ring] - 2021-08-10
### Changed
- Search button position in prefs window.
### Fixed
- Accessing dash in case the original dash has been removed by third party extensions.
- API.monitorGetInfo for "pMonitor is null" error.
- Dropdown align in preferences dialog.
- Startup status blocking shortcut keys.
- Unwanted window demands attention focus.
- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790).
### Removed
- Settings and Translation library and using ExtensionUtils instead.
### Added
- Panel button padding size.
- Panel height.
- Window picker caption visibility.
- Workspace background corner size in overview.
- Workspace wraparound (modified version of WorkspaceSwitcherWrapAround by [@war1025](https://github.com/war1025)).
## [12.0 Queen Red] - 2021-06-29
### Changed
- Lighter background color for switcher list (alt+tab) in override theme.
- Workspace switcher max size now maxed out to 30%.
### Fixed
- Combobox scroll issue on GTK4.
- Window demands attention focus notification popup.
- French translation by [@GeoffreyCoulaud](https://gitlab.gnome.org/GeoffreyCoulaud).
- Russian translation by [@librusekus35790](https://gitlab.gnome.org/librusekus35790).
### Added
- Always show workspace switcher on dynamic workspaces.
- More descriptions to the preferences dialog.
- Notification banner position.
- Startup status for GNOME Shell 40.
- Workspace animation background color for shell theme override.
- Workspaces visibility in app grid by [@fmuellner](https://gitlab.gnome.org/fmuellner).
- Chinese (Taiwan) translation by [@r0930514](https://gitlab.com/r0930514).
## [11.0 Whisper] - 2021-05-20
### Changed
- App gesture now only works on GNOME 3.36 and 3.38.
- Donation icon to GTK4 non-compatible icon sets.
- Shell theme override is now disabled by default.
- Workspace switcher size for GNOME Shell 40 is now maxed out to 15%.
### Fixed
- Gap when panel position is at the bottom and shell override theme happens.
- Panel menu margin when panel is in bottom.
- Window picker icon visibility on drag.
- Workspace switcher size for multi monitor setup.
- Arabic translation by [@AliGalal](https://gitlab.com/AliGalal).
- Chinese translation by [@wsxy162](https://gitlab.com/wsxy162).
- Italian translation by [@l3nn4rt](https://gitlab.com/l3nn4rt).
- Swedish translation by [@MorganAntonsson](https://gitlab.com/MorganAntonsson).
### Added
- Activities button icon.
- Dash icon size.
- Window demands attention focus.
## [10.0] - 2021-03-26
### Changed
- Organized prefs UI for icons and behavior.
- Removed quotes and side bar image from prefs UI.
### Fixed
- Fake hot corner primary monitor position.
- Horizontal scroll in prefs.
- Primary Monitor Panel Position.
- Arabic translation by [@karem34](https://gitlab.com/karem34).
- Russian translation by [@librusekus35790](https://gitlab.com/librusekus35790).
### Added
- Clock menu position.
- Disable animation or change the animation speed.
- Disable applications button in dash.
- Disable app menu icon.
- Disable panel arrow in GNOME 3.36 and 3.38.
- Disable panel notification icon.
- No results found for prefs window.
- Brazilian Portuguese translation by [@Zelling](https://gitlab.com/Zelling).
- Catalan translation by [@juxuanu](https://gitlab.com/juxuanu).
- Galician translation by [@frandieguez](https://gitlab.com/frandieguez).
## [9.0] - 2021-03-06
### Changed
- Prefs interface.
### Fixed
- Default value for hot corner on extension disable.
- GNOME Shell 40.beta version.
### Added
- Disable power icon.
- Panel position.
- Support to prefs window.
## [8.0] - 2021-02-22
### Changed
- Holding back lonely overview until the final GNOME 40 release.
### Fixed
- Dash override theme on GNOME Shell 40 beta.
- Focus for find entry on prefs.
- Search controller for GNOME Shell 40 beta.
- Start search for GNOME Shell 40 beta.
- Workspace switcher enable related to workspace switcher size.
- Nepali translation filename by [@IBA4](https://gitlab.com/IBA4).
## [7.0] - 2021-02-12
### Fixed
- GNOME Shell 40 hidden side by side workspace preview.
- GNOME Shell 40 search padding when panel is disabled.
- Initial prefs window size.
### Added
- GNOME Shell 40 window picker icon visibility to the settings.
- GNOME Shell 40 workspace switcher size to the settings.
- Panel corner size to the settings.
- Search feature to the settings.
- Type to Search to the settings.
- Nepali translation by [@IBA4](https://gitlab.com/IBA4).
- Spanish translation by [@oscfdezdz](https://gitlab.com/oscfdezdz).
## [6.0] - 2021-01-29
### Fixed
- GNOME Shell 3.38 extra padding on no workspace switcher.
- GNOME Shell 40 and GTK4 support for prefs.
- GNOME Shell 40 support for search entry.
- GNOME Shell 40 support for workspace switcher.
## [5.0] - 2021-01-05
### Added
- Accessibility Menu visibility to the settings.
- Activities button visibility to the settings.
- App menu visibility to the settings.
- Clock menu visibility to the settings.
- Keyboard Layout visibility to the settings.
- System Menu (Aggregate Menu) visibility to the settings.
### Changed
- OSD in settings to "On Screen Display (OSD)".
### Fixed
- Hot corner when top panel is visible.
- Padding on no dash.
- Search top padding on no top panel.
## [4.0] 2020-12-25
### Added
- API to decouple all libraries from using GNOME Shell ui directly.
- Automate build process by [@daPhipz](https://gitlab.com/daPhipz).
- CHANGELOG.md file.
- Compatibility layer for API.
- Translation automation script by [@daPhipz](https://gitlab.com/daPhipz).
### Changed
- Default settings to enable.
- Displaying error for generate-mo.sh by [@daPhipz](https://gitlab.com/daPhipz).
- German translation by [@M4he](https://gitlab.com/M4he).
### Fixed
- Top padding on no search and no top panel.
## [3.0] - 2020-12-21
### Added
- CONTRIBUTING.md file.
- Decoupled library from GNOME Shell ui.
- Extension logo.
- Initial Translations.
- Prefs as extension settings.
## [2.0] - 2020-11-18
### Fixed
- Destroy hot corner on disable.
### Added
- Disable app gesture.
- Disable background menu.
- Hide dash.
- Hide search.
- Hide top panel.
- Hide workspace switcher.
- Hot corner to toggle overview visibility.

View File

@ -1,675 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://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.
Just Perfection GNOME Shell Desktop
Copyright (C) 2020-2024 Javad Rahmatzadeh
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 <http://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:
Just Perfection GNOME Shell Desktop
Copyright (C) 2020-2024 Javad Rahmatzadeh
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
<http://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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,134 +0,0 @@
/**
* Extension
*
* @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com>
* @copyright 2020-2024
* @license GPL-3.0-only
*/
import Clutter from 'gi://Clutter';
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import Meta from 'gi://Meta';
import St from 'gi://St';
import * as AltTab from 'resource:///org/gnome/shell/ui/altTab.js';
import * as BackgroundMenu from 'resource:///org/gnome/shell/ui/backgroundMenu.js';
import * as LookingGlass from 'resource:///org/gnome/shell/ui/lookingGlass.js';
import * as Main from 'resource:///org/gnome/shell/ui/main.js';
import * as MessageTray from 'resource:///org/gnome/shell/ui/messageTray.js';
import * as OSDWindow from 'resource:///org/gnome/shell/ui/osdWindow.js';
import * as OverviewControls from 'resource:///org/gnome/shell/ui/overviewControls.js';
import * as Panel from 'resource:///org/gnome/shell/ui/panel.js';
import * as PanelMenu from 'resource:///org/gnome/shell/ui/panelMenu.js';
import * as Search from 'resource:///org/gnome/shell/ui/search.js';
import * as SearchController from 'resource:///org/gnome/shell/ui/searchController.js';
import * as SwitcherPopup from 'resource:///org/gnome/shell/ui/switcherPopup.js';
import * as WindowMenu from 'resource:///org/gnome/shell/ui/windowMenu.js';
import * as WindowPreview from 'resource:///org/gnome/shell/ui/windowPreview.js';
import * as Workspace from 'resource:///org/gnome/shell/ui/workspace.js';
import * as WorkspacesView from 'resource:///org/gnome/shell/ui/workspacesView.js';
import * as WorkspaceSwitcherPopup from 'resource:///org/gnome/shell/ui/workspaceSwitcherPopup.js';
import * as WorkspaceThumbnail from 'resource:///org/gnome/shell/ui/workspaceThumbnail.js';
import * as Config from 'resource:///org/gnome/shell/misc/config.js';
import * as Util from 'resource:///org/gnome/shell/misc/util.js';
import {Extension} from 'resource:///org/gnome/shell/extensions/extension.js';
import {API} from './lib/API.js';
import {Manager} from './lib/Manager.js';
/**
* Extension entry point
*/
export default class JustPerfection extends Extension
{
/**
* Instance of API
*
* @type {API|null}
*/
#api = null;
/**
* Instance of Manager
*
* @type {Manager|null}
*/
#manager = null;
/**
* Enable extension
*
* @returns {void}
*/
enable()
{
const shellVersion = parseFloat(Config.PACKAGE_VERSION);
let InterfaceSettings = new Gio.Settings({schema_id: 'org.gnome.desktop.interface'});
this.#api = new API(
{
Main,
BackgroundMenu,
OverviewControls,
WorkspaceSwitcherPopup,
SwitcherPopup,
InterfaceSettings,
Search,
SearchController,
WorkspaceThumbnail,
WorkspacesView,
Panel,
PanelMenu,
WindowPreview,
Workspace,
LookingGlass,
MessageTray,
OSDWindow,
WindowMenu,
AltTab,
St,
GLib,
Clutter,
Util,
Meta,
GObject,
},
shellVersion
);
this.#api.open();
let settings = this.getSettings();
this.#manager = new Manager(
{
API: this.#api,
Settings: settings,
},
shellVersion
);
this.#manager.registerSettingsSignals();
this.#manager.applyAll();
}
/**
* Disable extension
*
* @returns {void}
*/
disable()
{
this.#manager?.revertAll();
this.#manager = null;
this.#api?.close();
this.#api = null;
}
}

View File

@ -1,410 +0,0 @@
/**
* Prefs Library
*
* @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com>
* @copyright 2020-2024
* @license GPL-3.0-only
*/
/**
* prefs widget for showing prefs window
*/
export class Prefs
{
/**
* Current shell version
*
* @type {number|null}
*/
#shellVersion = null;
/**
* Instance of PrefsKeys
*
* @type {PrefsKeys|null}
*/
#prefsKeys = null;
/**
* Instance of Gtk.Builder
*
* @type {Gtk.Builder|null}
*/
#builder = null;
/**
* Instance of Gio.Settings
*
* @type {Settings|null}
*/
#settings = null;
/**
* Instance of Resource
*
* @type {Gio.Resource|null}
*/
#resource = null;
/**
* Instance of Gdk
*
* @type {Gdk|null}
*/
#gdk = null;
/**
* Instance of Gio
*
* @type {Gio|null}
*/
#gio = null;
/**
* All available profile names
*
* @type {Array}
*/
#profiles = [
'default',
'minimal',
'superminimal',
];
/**
* class constructor
*
* @param {Object} dependencies
* 'Builder' instance of Gtk::Builder
* 'Settings' instance of Gio::Settings
* 'Gdk' reference to Gdk
* 'Gio' reference to Gio
* @param {PrefsKeys.PrefsKeys} prefsKeys instance of PrefsKeys
* @param {number} shellVersion float in major.minor format
*/
constructor(dependencies, prefsKeys, shellVersion)
{
this.#settings = dependencies['Settings'] || null;
this.#builder = dependencies['Builder'] || null;
this.#gdk = dependencies['Gdk'] || null;
this.#gio = dependencies['Gio'] || null;
this.#prefsKeys = prefsKeys;
this.#shellVersion = shellVersion;
}
/**
* fill prefs window
*
* @param {Adw.PreferencesWindow} window prefs dialog
* @param {string} ResourcesFolderPath folder path to resources folder
* @param {string} gettextDomain gettext domain
*
* @returns {void}
*/
fillPrefsWindow(window, ResourcesFolderPath, gettextDomain)
{
// changing the order here can change the elements order in ui
let uiFilenames = [
'profile',
'visibility',
'icons',
'behavior',
'customize',
];
this.#loadResource(ResourcesFolderPath);
this.#builder.set_translation_domain(gettextDomain);
for (let uiFilename of uiFilenames) {
this.#builder.add_from_resource(
`/org/gnome/Shell/Extensions/justperfection/ui/${uiFilename}.ui`
);
}
for (let uiFilename of uiFilenames) {
let page = this.#builder.get_object(uiFilename);
window.add(page);
}
this.#setValues();
this.#guessProfile();
this.#onlyShowSupportedRows();
this.#registerAllSignals(window);
this.#setWindowSize(window);
window.search_enabled = true;
}
/**
* load resource
*
* @param {string} folder path to the resources folder
*
* @returns {void}
*/
#loadResource(path)
{
this.#resource = this.#gio.Resource.load(`${path}/resources.gresource`);
this.#gio.resources_register(this.#resource);
}
/**
* set window size
*
* @param {Adw.PreferencesWindow} window prefs window
*
* @returns {void}
*/
#setWindowSize(window)
{
let [pmWidth, pmHeight, pmScale] = this.#getPrimaryMonitorInfo();
let sizeTolerance = 50;
let width = 600;
let height = 730;
if (
(pmWidth / pmScale) - sizeTolerance >= width &&
(pmHeight / pmScale) - sizeTolerance >= height
) {
window.set_default_size(width, height);
}
}
/**
* get primary monitor info
*
* @returns {Array} [width, height, scale]
*/
#getPrimaryMonitorInfo()
{
let display = this.#gdk.Display.get_default();
let pm = display.get_monitors().get_item(0);
if (!pm) {
return [700, 500, 1];
}
let geo = pm.get_geometry();
let scale = pm.get_scale_factor();
return [geo.width, geo.height, scale];
}
/**
* register all signals
*
* @param {Adw.PreferencesWindow} window prefs dialog
*
* @returns {void}
*/
#registerAllSignals(window)
{
this.#registerKeySignals();
this.#registerProfileSignals();
this.#registerCloseSignal(window);
}
/**
* register close signal
*
* @param {Adw.PreferencesWindow} window prefs dialog
*
* @returns {void}
*/
#registerCloseSignal(window)
{
window.connect('close-request', () => {
if (this.#resource) {
this.#gio.resources_unregister(this.#resource);
}
});
}
/**
* register signals of all prefs keys
*
* @returns {void}
*/
#registerKeySignals()
{
// all available keys
for (let [, key] of Object.entries(this.#prefsKeys.keys)) {
switch (key.widgetType) {
case 'GtkSwitch':
this.#builder.get_object(key.widgetId).connect('state-set', (w) => {
this.#settings.set_boolean(key.name, w.get_active());
this.#guessProfile();
});
break;
case 'AdwActionRow':
this.#builder.get_object(key.widgetId).connect('notify::selected-item', (w) => {
let index = w.get_selected();
let value = (index in key.maps) ? key.maps[index] : index;
this.#settings.set_int(key.name, value);
this.#guessProfile();
});
break;
case 'AdwSpinRow':
this.#builder.get_object(key.widgetId).connect('notify::value', (w) => {
let value = w.get_value();
this.#settings.set_int(key.name, value);
this.#guessProfile();
});
break;
}
}
}
/**
* register profile signals
*
* @returns {void}
*/
#registerProfileSignals()
{
for (let profile of this.#profiles) {
let widget = this.#builder.get_object(`profile_${profile}`);
if (!widget) {
break;
}
widget.connect('clicked', (w) => {
this.#setValues(profile);
});
}
}
/**
* can check all current values and guess the profile based on the values
*
* @returns {void}
*/
#guessProfile()
{
let totalCount = 0;
let matchCount = {};
for (let profile of this.#profiles) {
matchCount[profile] = 0;
}
for (let [, key] of Object.entries(this.#prefsKeys.keys)) {
if (!key.supported) {
continue;
}
let value;
switch (key.widgetType) {
case 'GtkSwitch':
value = this.#builder.get_object(key.widgetId).get_active();
break;
case 'AdwActionRow':
value = this.#builder.get_object(key.widgetId).get_selected();
break;
case 'AdwSpinRow':
value = this.#builder.get_object(key.widgetId).get_value();
break;
default:
value = '';
continue;
}
for (let profile of this.#profiles) {
if (key.profiles[profile] === value) {
matchCount[profile]++;
}
}
totalCount++;
}
let currentProfile = 'custom';
for (let profile of this.#profiles) {
if (matchCount[profile] === totalCount) {
currentProfile = profile;
break;
}
}
let widget = this.#builder.get_object(`profile_${currentProfile}`);
if (widget) {
widget.set_active(true);
}
}
/**
* set values for all elements
*
* @param {string} profile profile name or null for get it from gsettings
*
* @returns {void}
*/
#setValues(profile)
{
for (let [, key] of Object.entries(this.#prefsKeys.keys)) {
let widget = this.#builder.get_object(key.widgetId);
let value;
switch (key.widgetType) {
case 'GtkSwitch':
value
= (profile)
? key.profiles[profile]
: this.#settings.get_boolean(key.name);
widget.set_active(value);
break;
case 'AdwActionRow':
let index
= (profile)
? key.profiles[profile]
: this.#settings.get_int(key.name);
for (let k in key.maps) {
if (key.maps[k] === index) {
index = k;
break;
}
}
widget.set_selected(index);
break;
case 'AdwSpinRow':
value
= (profile)
? key.profiles[profile]
: this.#settings.get_int(key.name);
widget.set_value(value);
break;
}
}
}
/**
* apply all supported keys to the elements
*
* @returns {void}
*/
#onlyShowSupportedRows()
{
for (let [, key] of Object.entries(this.#prefsKeys.keys)) {
let row = this.#builder.get_object(`${key.id}_row`);
let visible = key.supported;
row.visible = visible;
}
}
};

View File

@ -1,880 +0,0 @@
/**
* PrefsKeys Library
*
* @author Javad Rahmatzadeh <j.rahmatzadeh@gmail.com>
* @copyright 2020-2024
* @license GPL-3.0-only
*/
/**
* prefs keys
*/
export class PrefsKeys
{
/**
* Current shell version
*
* @type {number|null}
*/
#shellVersion = null;
/**
* class constructor
*
* @param {number} shellVersion float in major.minor format
*/
constructor(shellVersion)
{
this.#shellVersion = shellVersion;
/**
* holds all keys generated by this.#setKey()
*
* @member {Object}
*/
this.keys = {};
this.#setDefaults();
}
/**
* set all default keys
*
* @returns {void}
*/
#setDefaults()
{
this.#setKey(
'visibility',
'panel',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'visibility',
'panel-in-overview',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'activities-button',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'clock-menu',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'keyboard-layout',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'accessibility-menu',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: true,
}
);
this.#setKey(
'visibility',
'quick-settings',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'quick-settings-dark-mode',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'screen-sharing-indicator',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'screen-recording-indicator',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'search',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'visibility',
'dash',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'dash-separator',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'dash-app-running',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'osd',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'workspace-popup',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'workspace',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'visibility',
'background-menu',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'show-apps-button',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: true,
}
);
this.#setKey(
'visibility',
'workspaces-in-app-grid',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'visibility',
'window-preview-caption',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'window-preview-close-button',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'visibility',
'ripple-box',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'visibility',
'world-clock',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'weather',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'calendar',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'events-button',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'visibility',
'window-menu-take-screenshot-button',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'icons',
'panel-notification-icon',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'icons',
'power-icon',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'icons',
'window-picker-icon',
'GtkSwitch',
true,
{
default: true,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'behavior',
'type-to-search',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'behavior',
'window-demands-attention-focus',
'GtkSwitch',
true,
{
default: false,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'behavior',
'window-maximized-on-create',
'GtkSwitch',
true,
{
default: false,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'behavior',
'workspace-switcher-should-show',
'GtkSwitch',
true,
{
default: false,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'behavior',
'startup-status',
'AdwActionRow',
true,
{
default: 1,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'behavior',
'workspace-wrap-around',
'GtkSwitch',
true,
{
default: false,
minimal: false,
superminimal: false,
}
);
this.#setKey(
'behavior',
'workspace-peek',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'behavior',
'overlay-key',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'behavior',
'double-super-to-appgrid',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: false,
}
);
this.#setKey(
'behavior',
'switcher-popup-delay',
'GtkSwitch',
true,
{
default: true,
minimal: true,
superminimal: true,
}
);
this.#setKey(
'customize',
'controls-manager-spacing-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 22,
}
);
this.#setKey(
'customize',
'workspace-background-corner-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 15,
}
);
this.#setKey(
'customize',
'top-panel-position',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'clock-menu-position',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'clock-menu-position-offset',
'AdwSpinRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'workspace-switcher-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'animation',
'AdwActionRow',
true,
{
default: 1,
minimal: 1,
superminimal: 1,
}
);
this.#setKey(
'customize',
'dash-icon-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 1,
superminimal: 0,
},
{
'1': 16,
'2': 22,
'3': 24,
'4': 32,
'5': 40,
'6': 48,
'7': 56,
'8': 64,
}
);
this.#setKey(
'customize',
'notification-banner-position',
'AdwActionRow',
true,
{
default: 1,
minimal: 1,
superminimal: 1,
}
);
this.#setKey(
'customize',
'panel-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'panel-button-padding-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'panel-indicator-padding-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'panel-icon-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'osd-position',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'looking-glass-width',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'looking-glass-height',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'customize',
'alt-tab-window-preview-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
},
{
'0': 0,
'1': 32,
'2': 64,
'3': 128,
'4': 256,
'5': 512,
}
);
this.#setKey(
'customize',
'alt-tab-small-icon-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
},
{
'0': 0,
'1': 32,
'2': 64,
'3': 128,
'4': 256,
'5': 512,
}
);
this.#setKey(
'customize',
'alt-tab-icon-size',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
},
{
'0': 0,
'1': 32,
'2': 64,
'3': 128,
'4': 256,
'5': 512,
}
);
this.#setKey(
'customize',
'max-displayed-search-results',
'AdwActionRow',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
}
);
this.#setKey(
'override',
'theme',
'GtkSwitch',
true,
{
default: false,
minimal: true,
superminimal: true,
}
);
}
/**
* set key
*
* @param {string} category possible values:
* - visibility
* - icons
* - behavior
* - customize
* - override
* @param {string} name should be the same as gsettings key name
* @param {string} widgetType gtk widget type like 'GtkSwitch'.
* @param {boolean} supported whether supported in the current shell
* @param {Object} profiles values for each profile. for example:
* {default: true, minimal: false}
* @param {Object} [maps] for example for combobox you can specify
* if the index is 1 use 32 as value:
* {1 : 32}
*
* @returns {void}
*/
#setKey(category, name, widgetType, supported, profiles, maps = {})
{
let id = name.replace(/-/g, '_');
let widgetName = widgetType.toLowerCase().replace('gtk', '');
let widgetId
= (widgetType === 'AdwActionRow' || widgetType === 'AdwSpinRow')
? `${id}_row`
: `${id}_${widgetName}`;
this.keys[id] = {
category,
widgetType,
name,
id,
widgetId,
supported,
profiles,
maps,
};
}
/**
* delete key
*
* @param {string} id key id
*
* @returns {void}
*/
deleteKey(id)
{
delete(this.keys[id]);
}
};

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