Full Code of arthurdeka/cedro-modern-dock for AI

main ccc216cf26f0 cached
91 files
335.3 KB
80.9k tokens
381 symbols
1 requests
Download .txt
Showing preview only (390K chars total). Download the full file or copy to clipboard to get everything.
Repository: arthurdeka/cedro-modern-dock
Branch: main
Commit: ccc216cf26f0
Files: 91
Total size: 335.3 KB

Directory structure:
gitextract_8_0nq8pf/

├── .gitattributes
├── .github/
│   └── FUNDING.yml
├── .gitignore
├── .mvn/
│   └── wrapper/
│       └── maven-wrapper.properties
├── LICENSE
├── README.md
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src/
    ├── main/
    │   ├── java/
    │   │   ├── com/
    │   │   │   └── github/
    │   │   │       └── arthurdeka/
    │   │   │           └── cedromoderndock/
    │   │   │               ├── App.java
    │   │   │               ├── application/
    │   │   │               │   ├── AppServices.java
    │   │   │               │   ├── DockAppearanceService.java
    │   │   │               │   ├── DockItemActionService.java
    │   │   │               │   ├── DockPositioningService.java
    │   │   │               │   ├── DockService.java
    │   │   │               │   ├── DockTheme.java
    │   │   │               │   ├── LocalizationService.java
    │   │   │               │   ├── ProgramSelectionResolver.java
    │   │   │               │   ├── SupportedLanguage.java
    │   │   │               │   └── WindowPreviewService.java
    │   │   │               ├── controller/
    │   │   │               │   ├── AcknowledgementsModalController.java
    │   │   │               │   ├── AddWindowsModulesModalController.java
    │   │   │               │   ├── DockController.java
    │   │   │               │   └── SettingsController.java
    │   │   │               ├── domain/
    │   │   │               │   ├── DockRepository.java
    │   │   │               │   ├── FolderLauncher.java
    │   │   │               │   ├── IconGateway.java
    │   │   │               │   ├── ProgramLauncher.java
    │   │   │               │   ├── WindowQueryGateway.java
    │   │   │               │   └── WindowsModuleLauncher.java
    │   │   │               ├── infrastructure/
    │   │   │               │   ├── persistence/
    │   │   │               │   │   └── JsonDockRepository.java
    │   │   │               │   └── system/
    │   │   │               │       ├── CachedWindowsIconGateway.java
    │   │   │               │       ├── DefaultFolderLauncher.java
    │   │   │               │       ├── DefaultProgramLauncher.java
    │   │   │               │       ├── DefaultWindowsModuleLauncher.java
    │   │   │               │       └── JnaWindowQueryGateway.java
    │   │   │               ├── model/
    │   │   │               │   ├── DockFolderItemModel.java
    │   │   │               │   ├── DockHorizontalAnchor.java
    │   │   │               │   ├── DockItem.java
    │   │   │               │   ├── DockItemType.java
    │   │   │               │   ├── DockModel.java
    │   │   │               │   ├── DockPositioningMode.java
    │   │   │               │   ├── DockProgramItemModel.java
    │   │   │               │   ├── DockSettingsItemModel.java
    │   │   │               │   ├── DockVerticalAnchor.java
    │   │   │               │   └── DockWindowsModuleItemModel.java
    │   │   │               ├── util/
    │   │   │               │   ├── ColorManipulation.java
    │   │   │               │   ├── Logger.java
    │   │   │               │   ├── NativeWindowUtils.java
    │   │   │               │   ├── SaveAndLoadDockSettings.java
    │   │   │               │   ├── SettingsWindowLauncher.java
    │   │   │               │   ├── SingleInstanceGuard.java
    │   │   │               │   ├── SystemTrayManager.java
    │   │   │               │   ├── UIUtils.java
    │   │   │               │   └── WindowsIconHandler.java
    │   │   │               └── view/
    │   │   │                   └── WindowPreviewPopup.java
    │   │   └── module-info.java
    │   └── resources/
    │       └── com/
    │           └── github/
    │               └── arthurdeka/
    │                   └── cedromoderndock/
    │                       ├── css/
    │                       │   ├── dock.css
    │                       │   └── dockSettings.css
    │                       ├── fxml/
    │                       │   ├── AcknowledgementsModalView.fxml
    │                       │   ├── AddWindowsModulesModalView.fxml
    │                       │   ├── DockSettingsView.fxml
    │                       │   └── DockView.fxml
    │                       └── i18n/
    │                           ├── messages_ar_SA.properties
    │                           ├── messages_bn_BD.properties
    │                           ├── messages_de_DE.properties
    │                           ├── messages_en_US.properties
    │                           ├── messages_es_ES.properties
    │                           ├── messages_fr_FR.properties
    │                           ├── messages_hi_IN.properties
    │                           ├── messages_id_ID.properties
    │                           ├── messages_ja_JP.properties
    │                           ├── messages_mr_IN.properties
    │                           ├── messages_pcm_NG.properties
    │                           ├── messages_pt_BR.properties
    │                           ├── messages_ru_RU.properties
    │                           ├── messages_ta_IN.properties
    │                           ├── messages_te_IN.properties
    │                           ├── messages_tr_TR.properties
    │                           ├── messages_ur_PK.properties
    │                           ├── messages_vi_VN.properties
    │                           ├── messages_yue_HK.properties
    │                           ├── messages_zh_CN.properties
    │                           └── messages_zh_TW.properties
    └── test/
        └── java/
            └── com/
                └── github/
                    └── arthurdeka/
                        └── cedromoderndock/
                            ├── application/
                            │   ├── DockItemActionServiceTest.java
                            │   ├── DockServiceTest.java
                            │   ├── LocalizationServiceTest.java
                            │   └── ProgramSelectionResolverTest.java
                            ├── infrastructure/
                            │   ├── persistence/
                            │   │   └── JsonDockRepositoryTest.java
                            │   └── system/
                            │       └── DefaultProgramLauncherTest.java
                            └── util/
                                └── SingleInstanceGuardTest.java

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto


================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: [arthurdeka]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: arthurcodes
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: #['https://customlink.com/donate']

================================================
FILE: .gitignore
================================================
config.json
log.txt
.superpowers

target
target/

# Build output and packages
/target/
*.jar
*.war
*.ear

# Logs
*.log

# IDE files
.idea/
.project
.classpath
.settings/
*.iml
*.iws

# Operating system files
.DS_Store
Thumbs.db

# Maven generated files
.mvn/timing.properties

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*



================================================
FILE: .mvn/wrapper/maven-wrapper.properties
================================================
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

================================================
FILE: LICENSE
================================================
GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
![GitHub contributors](https://img.shields.io/github/contributors/arthurdeka/cedro-modern-dock?style=for-the-badge)
![GitHub forks](https://img.shields.io/github/forks/arthurdeka/cedro-modern-dock?style=for-the-badge)
![GitHub Repo stars](https://img.shields.io/github/stars/arthurdeka/cedro-modern-dock?style=for-the-badge)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/arthurdeka/cedro-modern-dock?style=for-the-badge)
![GitHub License](https://img.shields.io/github/license/arthurdeka/cedro-modern-dock?style=for-the-badge)
![X (formerly Twitter) Follow](https://img.shields.io/twitter/follow/TeiuAlligator?style=for-the-badge)


<img width="769" height="163" alt="img1" src="https://github.com/user-attachments/assets/3a7cf5f1-a203-4d7b-aa9f-6e0904031eb5" />
<img width="785" height="270" alt="img3" src="https://github.com/user-attachments/assets/1489345d-4ddc-4482-a074-ca676da8eb28" />



> Follow @TeiuAlligator on X to stay tuned for new features and updates!


> ## How To Install
> 1. Go to [Releases](https://github.com/arthurdeka/cedro-modern-dock/releases):
> 2. Download the latest `CedroSetup.exe` file
> 3. Execute and install
<br>

## Features

- **Quick Launch Shortcuts:** Add your favorite `.exe` files to the dock for fast access.
- **Folder Shortcuts:** Pin folders alongside apps and open them directly from the dock.
- **Built-in Windows Modules:** Add native Windows shortcuts such as **This PC**, **Recycle Bin**, **Control Panel**, and **Settings**.
- **Appearance Customization:** Adjust icon size, spacing, background color, transparency, and dock corner rounding.
- **Flexible Positioning:** Choose between a static anchored layout with per-edge spacing or a dynamic draggable dock.
- **Running App Indicators:** Program shortcuts show a live indicator when matching windows are currently open.
- **Window Preview Popup:** Hovering a running app can show its open windows, and clicking a preview brings that window to the front.
- **Desktop-Friendly Behavior:** Includes system tray integration for quick access to settings.
<br>

## Supported Languages

- 🇺🇸  English
- 🇧🇷 Portuguese (Brazil)
- 🇪🇸 Spanish
- 🇫🇷 French
- 🇩🇪 German
- 🇯🇵 Japanese
- 🇨🇳 Chinese (Simplified)
- 🇹🇼 Chinese (Traditional)
- 🇮🇳 Hindi
- 🇸🇦 Arabic
- 🇧🇩 Bengali
- 🇷🇺 Russian
- 🇵🇰 Urdu
- 🇮🇩 Indonesian
- 🇳🇬 Nigerian Pidgin
- 🇮🇳 Marathi
- 🇮🇳 Telugu
- 🇹🇷 Turkish
- 🇮🇳 Tamil
- 🇭🇰 Cantonese
- 🇻🇳 Vietnamese
<br>

<!-- BUILT WITH -->
## Built With

* ![JavaFX](https://img.shields.io/badge/javafx-%23FF0000.svg?style=for-the-badge&logo=javafx&logoColor=white)
<br>

<!-- GETTING STARTED -->
## How To Contribute
> Only for those who wish to contribute in the project's coding, none of this is required for you to do if you [just want to download it](https://github.com/arthurdeka/cedro-modern-dock/releases)
### Understand the project architecture:

The project now follows a lightweight layered architecture:

- `controller`: JavaFX controllers and UI event handling
- `application`: dock use cases, appearance rules, item actions and preview orchestration
- `domain`: ports/interfaces for persistence, icon resolution, program launch and native window queries
- `infrastructure`: Jackson persistence and Windows-specific adapters
- `model`: serializable dock data structures used by the application layer
- `view` and `resources`: popup rendering, FXML, CSS and static assets

`App.java` is responsible for composing these dependencies and injecting them into the JavaFX controllers.

<!-- PREREQUISITES -->
### Prerequisites

Before you begin, ensure you have the following installed on your system: (required only for development)

- **An IDE** (IntelliJ IDEA recommended).
- **JDK 21**.
- **Apache Maven**.
- **Git** for cloning the repository.

<br>

### How To Run Locally

1. Clone the repository
2. Before running, make sure to install all the dependencies
3. Run `App.java` to run the program
4. Make desired changes
5. Commit your changes
6. Open a pull request

<br>

### How To `COMPILE` Locally

1. Clone the repository
2. Install all dependencies
3. Run `mvn clean package` on the terminal
4. The `.exe` file will be available at `target\dist\Cedro Modern Dock`

<br>


================================================
FILE: mvnw
================================================
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#    https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Maven Start Up Batch script
#
# Required ENV vars:
# ------------------
#   JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
#   M2_HOME - location of maven2's installed home dir
#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
#     e.g. to debug Maven itself, use
#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------

if [ -z "$MAVEN_SKIP_RC" ] ; then

  if [ -f /usr/local/etc/mavenrc ] ; then
    . /usr/local/etc/mavenrc
  fi

  if [ -f /etc/mavenrc ] ; then
    . /etc/mavenrc
  fi

  if [ -f "$HOME/.mavenrc" ] ; then
    . "$HOME/.mavenrc"
  fi

fi

# OS specific support.  $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
  CYGWIN*) cygwin=true ;;
  MINGW*) mingw=true;;
  Darwin*) darwin=true
    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
    if [ -z "$JAVA_HOME" ]; then
      if [ -x "/usr/libexec/java_home" ]; then
        export JAVA_HOME="`/usr/libexec/java_home`"
      else
        export JAVA_HOME="/Library/Java/Home"
      fi
    fi
    ;;
esac

if [ -z "$JAVA_HOME" ] ; then
  if [ -r /etc/gentoo-release ] ; then
    JAVA_HOME=`java-config --jre-home`
  fi
fi

if [ -z "$M2_HOME" ] ; then
  ## resolve links - $0 may be a link to maven's home
  PRG="$0"

  # need this for relative symlinks
  while [ -h "$PRG" ] ; do
    ls=`ls -ld "$PRG"`
    link=`expr "$ls" : '.*-> \(.*\)$'`
    if expr "$link" : '/.*' > /dev/null; then
      PRG="$link"
    else
      PRG="`dirname "$PRG"`/$link"
    fi
  done

  saveddir=`pwd`

  M2_HOME=`dirname "$PRG"`/..

  # make it fully qualified
  M2_HOME=`cd "$M2_HOME" && pwd`

  cd "$saveddir"
  # echo Using m2 at $M2_HOME
fi

# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --unix "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi

# For Mingw, ensure paths are in UNIX format before anything is touched
if $mingw ; then
  [ -n "$M2_HOME" ] &&
    M2_HOME="`(cd "$M2_HOME"; pwd)`"
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
fi

if [ -z "$JAVA_HOME" ]; then
  javaExecutable="`which javac`"
  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
    # readlink(1) is not available as standard on Solaris 10.
    readLink=`which readlink`
    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
      if $darwin ; then
        javaHome="`dirname \"$javaExecutable\"`"
        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
      else
        javaExecutable="`readlink -f \"$javaExecutable\"`"
      fi
      javaHome="`dirname \"$javaExecutable\"`"
      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
      JAVA_HOME="$javaHome"
      export JAVA_HOME
    fi
  fi
fi

if [ -z "$JAVACMD" ] ; then
  if [ -n "$JAVA_HOME"  ] ; then
    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
      # IBM's JDK on AIX uses strange locations for the executables
      JAVACMD="$JAVA_HOME/jre/sh/java"
    else
      JAVACMD="$JAVA_HOME/bin/java"
    fi
  else
    JAVACMD="`\\unset -f command; \\command -v java`"
  fi
fi

if [ ! -x "$JAVACMD" ] ; then
  echo "Error: JAVA_HOME is not defined correctly." >&2
  echo "  We cannot execute $JAVACMD" >&2
  exit 1
fi

if [ -z "$JAVA_HOME" ] ; then
  echo "Warning: JAVA_HOME environment variable is not set."
fi

CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher

# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {

  if [ -z "$1" ]
  then
    echo "Path not specified to find_maven_basedir"
    return 1
  fi

  basedir="$1"
  wdir="$1"
  while [ "$wdir" != '/' ] ; do
    if [ -d "$wdir"/.mvn ] ; then
      basedir=$wdir
      break
    fi
    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
    if [ -d "${wdir}" ]; then
      wdir=`cd "$wdir/.."; pwd`
    fi
    # end of workaround
  done
  echo "${basedir}"
}

# concatenates all lines of a file
concat_lines() {
  if [ -f "$1" ]; then
    echo "$(tr -s '\n' ' ' < "$1")"
  fi
}

BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
  exit 1;
fi

##########################################################################################
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
# This allows using the maven wrapper in projects that prohibit checking in binary data.
##########################################################################################
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Found .mvn/wrapper/maven-wrapper.jar"
    fi
else
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
    fi
    if [ -n "$MVNW_REPOURL" ]; then
      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
    else
      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
    fi
    while IFS="=" read key value; do
      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
      esac
    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
    if [ "$MVNW_VERBOSE" = true ]; then
      echo "Downloading from: $jarUrl"
    fi
    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
    if $cygwin; then
      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
    fi

    if command -v wget > /dev/null; then
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Found wget ... using wget"
        fi
        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
        else
            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
        fi
    elif command -v curl > /dev/null; then
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Found curl ... using curl"
        fi
        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
            curl -o "$wrapperJarPath" "$jarUrl" -f
        else
            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
        fi

    else
        if [ "$MVNW_VERBOSE" = true ]; then
          echo "Falling back to using Java to download"
        fi
        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
        # For Cygwin, switch paths to Windows format before running javac
        if $cygwin; then
          javaClass=`cygpath --path --windows "$javaClass"`
        fi
        if [ -e "$javaClass" ]; then
            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
                if [ "$MVNW_VERBOSE" = true ]; then
                  echo " - Compiling MavenWrapperDownloader.java ..."
                fi
                # Compiling the Java class
                ("$JAVA_HOME/bin/javac" "$javaClass")
            fi
            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
                # Running the downloader
                if [ "$MVNW_VERBOSE" = true ]; then
                  echo " - Running MavenWrapperDownloader.java ..."
                fi
                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
            fi
        fi
    fi
fi
##########################################################################################
# End of extension
##########################################################################################

export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
if [ "$MVNW_VERBOSE" = true ]; then
  echo $MAVEN_PROJECTBASEDIR
fi
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
  [ -n "$M2_HOME" ] &&
    M2_HOME=`cygpath --path --windows "$M2_HOME"`
  [ -n "$JAVA_HOME" ] &&
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
  [ -n "$CLASSPATH" ] &&
    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi

# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS

WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
  $MAVEN_OPTS \
  $MAVEN_DEBUG_OPTS \
  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
  "-Dmaven.home=${M2_HOME}" \
  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"


================================================
FILE: mvnw.cmd
================================================
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements.  See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership.  The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License.  You may obtain a copy of the License at
@REM
@REM    https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied.  See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM     e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM set title of command window
title %0
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"

FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
)

@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
if exist %WRAPPER_JAR% (
    if "%MVNW_VERBOSE%" == "true" (
        echo Found %WRAPPER_JAR%
    )
) else (
    if not "%MVNW_REPOURL%" == "" (
        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
    )
    if "%MVNW_VERBOSE%" == "true" (
        echo Couldn't find %WRAPPER_JAR%, downloading it ...
        echo Downloading from: %DOWNLOAD_URL%
    )

    powershell -Command "&{"^
		"$webclient = new-object System.Net.WebClient;"^
		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
		"}"^
		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
		"}"
    if "%MVNW_VERBOSE%" == "true" (
        echo Finished downloading %WRAPPER_JAR%
    )
)
@REM End of extension

@REM Provide a "standardized" way to retrieve the CLI args that will
@REM work with both Windows and non-Windows executions.
set MAVEN_CMD_LINE_ARGS=%*

%MAVEN_JAVA_EXE% ^
  %JVM_CONFIG_MAVEN_PROPS% ^
  %MAVEN_OPTS% ^
  %MAVEN_DEBUG_OPTS% ^
  -classpath %WRAPPER_JAR% ^
  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%"=="on" pause

if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%

cmd /C exit /B %ERROR_CODE%


================================================
FILE: pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.arthurdeka</groupId>
    <artifactId>cedro-modern-dock</artifactId>
    <version>1.0</version>
    <name>Cedro Modern Dock</name>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <junit.version>5.10.2</junit.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>23.0.1</version>
            <classifier>win</classifier>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>23.0.1</version>
            <classifier>win</classifier>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>23.0.1</version>
            <classifier>win</classifier>
        </dependency>

        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>23.0.1</version>
            <classifier>win</classifier>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna</artifactId>
            <version>5.13.0</version>
        </dependency>

        <dependency>
            <groupId>net.java.dev.jna</groupId>
            <artifactId>jna-platform</artifactId>
            <version>5.13.0</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.17.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.38</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>21</source>
                    <target>21</target>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.38</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.2.5</version>
            </plugin>

            <plugin>
                <groupId>org.moditect</groupId>
                <artifactId>moditect-maven-plugin</artifactId>
                <version>1.2.1.Final</version>
                <executions>
                    <execution>
                        <id>add-module-infos</id>
                        <phase>package</phase>
                        <goals>
                            <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/modified-mods</outputDirectory>
                            <modules>
                                <module>
                                    <artifact>
                                        <groupId>net.java.dev.jna</groupId>
                                        <artifactId>jna</artifactId>
                                    </artifact>
                                    <moduleInfo>
                                        <name>com.sun.jna</name>
                                    </moduleInfo>
                                </module>
                                <module>
                                    <artifact>
                                        <groupId>net.java.dev.jna</groupId>
                                        <artifactId>jna-platform</artifactId>
                                    </artifact>
                                    <moduleInfoSource>
                                        module com.sun.jna.platform {
                                        // Declara a dependência CRÍTICA no módulo base
                                        requires transitive com.sun.jna;
                                        // Exporta os pacotes para que seu código possa usá-los
                                        exports com.sun.jna.platform.win32;
                                        }
                                    </moduleInfoSource>
                                </module>
                            </modules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.7.1</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/mods</outputDirectory>
                            <includeScope>runtime</includeScope>
                            <excludeArtifactIds>jna,jna-platform</excludeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.panteleyev</groupId>
                <artifactId>jpackage-maven-plugin</artifactId>
                <version>1.6.0</version>
                <configuration>
                    <name>Cedro Modern Dock</name>
                    <destination>target/dist</destination>
                    <module>com.github.arthurdeka.cedromoderndock/com.github.arthurdeka.cedromoderndock.App</module>
                    <modulePaths>
                        <path>${project.build.directory}/mods</path>
                        <path>${project.build.directory}/modified-mods</path>
                        <path>${project.build.directory}/${project.build.finalName}.jar</path>
                    </modulePaths>
                    <type>APP_IMAGE</type>
                    <appVersion>${project.version}</appVersion>
                    <vendor>com.github.arthurdeka</vendor>
                    <copyright>Copyright (C) 2024</copyright>
                    <icon>src/main/resources/com/github/arthurdeka/cedromoderndock/icons/cedro/logo_256_ICO.ico</icon>
                </configuration>
                <executions>
                    <execution>
                        <id>jpackage</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jpackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/App.java
================================================
package com.github.arthurdeka.cedromoderndock;

import com.github.arthurdeka.cedromoderndock.application.AppServices;
import com.github.arthurdeka.cedromoderndock.application.DockAppearanceService;
import com.github.arthurdeka.cedromoderndock.application.DockItemActionService;
import com.github.arthurdeka.cedromoderndock.application.DockPositioningService;
import com.github.arthurdeka.cedromoderndock.application.DockService;
import com.github.arthurdeka.cedromoderndock.application.LocalizationService;
import com.github.arthurdeka.cedromoderndock.application.SupportedLanguage;
import com.github.arthurdeka.cedromoderndock.application.WindowPreviewService;
import com.github.arthurdeka.cedromoderndock.controller.DockController;
import com.github.arthurdeka.cedromoderndock.infrastructure.persistence.JsonDockRepository;
import com.github.arthurdeka.cedromoderndock.infrastructure.system.CachedWindowsIconGateway;
import com.github.arthurdeka.cedromoderndock.infrastructure.system.DefaultFolderLauncher;
import com.github.arthurdeka.cedromoderndock.infrastructure.system.DefaultProgramLauncher;
import com.github.arthurdeka.cedromoderndock.infrastructure.system.DefaultWindowsModuleLauncher;
import com.github.arthurdeka.cedromoderndock.infrastructure.system.JnaWindowQueryGateway;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import com.github.arthurdeka.cedromoderndock.util.SettingsWindowLauncher;
import com.github.arthurdeka.cedromoderndock.util.SingleInstanceGuard;
import com.github.arthurdeka.cedromoderndock.util.SystemTrayManager;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

import javax.swing.JOptionPane;
import java.io.IOException;

import static com.github.arthurdeka.cedromoderndock.util.UIUtils.setStageIcon;

public class App extends Application {
    private static SingleInstanceGuard singleInstanceGuard;
    private SystemTrayManager systemTrayManager;

    @Override
    public void start(Stage primaryStage) throws IOException {
        AppServices appServices = createServices();

        // invisble primary stage to dont show the dock icon in the taskbar
        primaryStage.initStyle(StageStyle.UTILITY);
        primaryStage.setOpacity(0);
        primaryStage.show();

        // creates a new stage for the dock
        Stage dockStage = new Stage();

        // loading dock interface and controller.
        FXMLLoader loader = new FXMLLoader(App.class.getResource("fxml/DockView.fxml"));
        Scene scene = new Scene(loader.load());

        // configuring dock stage.
        dockStage.setTitle("Cedro Modern Dock");
        setStageIcon(dockStage);
        // defining the invisible window as the "owner" of the dock (this makes the dock invisible).
        dockStage.initOwner(primaryStage);
        dockStage.initStyle(StageStyle.TRANSPARENT);
        scene.setFill(Color.TRANSPARENT);
        dockStage.setScene(scene);

        DockController dockController = loader.getController();
        dockController.setStage(dockStage);
        dockController.setAppServices(appServices);
        dockController.handleInitialization();

        dockStage.iconifiedProperty().addListener((observable, wasIconified, isIconified) -> {
            if (!isIconified) {
                return;
            }

            Platform.runLater(() -> {
                dockStage.setIconified(false);
                if (!dockStage.isShowing()) {
                    dockStage.show();
                }
            });
        });

        Platform.setImplicitExit(false);
        dockStage.show();
        appServices.positioningService().applyPosition(dockStage);
        systemTrayManager = new SystemTrayManager(
                () -> openSettingsWindow(appServices, dockController, dockStage),
                Platform::exit
        );
        systemTrayManager.install();
    }

    @Override
    public void stop() {
        if (systemTrayManager != null) {
            systemTrayManager.dispose();
            systemTrayManager = null;
        }
        if (singleInstanceGuard != null) {
            singleInstanceGuard.close();
            singleInstanceGuard = null;
        }
    }

    public static void main(String[] args) {
        singleInstanceGuard = new SingleInstanceGuard();
        if (!singleInstanceGuard.tryAcquire()) {
            SupportedLanguage language = new JsonDockRepository().load().getLanguage();
            JOptionPane.showMessageDialog(
                    null,
                    LocalizationService.bootstrapText(language, "dialog.singleInstance.message"),
                    "Cedro Modern Dock",
                    JOptionPane.WARNING_MESSAGE
            );
            return;
        }

        try {
            launch();
        } finally {
            if (singleInstanceGuard != null) {
                singleInstanceGuard.close();
                singleInstanceGuard = null;
            }
        }
    }

    private AppServices createServices() {
        DockService dockService = new DockService(new JsonDockRepository());
        DockAppearanceService appearanceService = new DockAppearanceService(dockService);
        DockPositioningService positioningService = new DockPositioningService(dockService);
        LocalizationService localizationService = new LocalizationService(dockService);
        DockItemActionService itemActionService = new DockItemActionService(
                new DefaultProgramLauncher(),
                new DefaultFolderLauncher(),
                new DefaultWindowsModuleLauncher()
        );
        WindowPreviewService windowPreviewService = new WindowPreviewService(new JnaWindowQueryGateway());

        return new AppServices(
                dockService,
                appearanceService,
                positioningService,
                itemActionService,
                windowPreviewService,
                new CachedWindowsIconGateway(),
                localizationService
        );
    }

    private void openSettingsWindow(AppServices appServices, DockController dockController, Stage dockStage) {
        SettingsWindowLauncher.open(
                appServices,
                dockController::updateDockUI,
                positioningMode -> handlePositioningModeChange(appServices, dockStage, positioningMode)
        );
    }

    private void handlePositioningModeChange(
            AppServices appServices,
            Stage dockStage,
            DockPositioningMode positioningMode
    ) {
        DockPositioningMode currentMode = appServices.positioningService().getPositioningMode();
        if (currentMode == DockPositioningMode.STATIC && positioningMode == DockPositioningMode.DYNAMIC) {
            appServices.dockService().setDockPosition(dockStage.getX(), dockStage.getY());
        }
        appServices.positioningService().setPositioningMode(positioningMode);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/AppServices.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.domain.IconGateway;

public record AppServices(
        DockService dockService,
        DockAppearanceService appearanceService,
        DockPositioningService positioningService,
        DockItemActionService itemActionService,
        WindowPreviewService windowPreviewService,
        IconGateway iconGateway,
        LocalizationService localizationService
) {
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockAppearanceService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.model.DockModel;

public class DockAppearanceService {
    private final DockService dockService;

    public DockAppearanceService(DockService dockService) {
        this.dockService = dockService;
    }

    public DockModel getDock() {
        return dockService.getDock();
    }

    public int getIconsSize() {
        return getDock().getIconsSize();
    }

    public void setIconsSize(int iconsSize) {
        getDock().setIconsSize(iconsSize);
        dockService.saveChanges();
    }

    public int getSpacingBetweenIcons() {
        return getDock().getSpacingBetweenIcons();
    }

    public void setSpacingBetweenIcons(int spacingValue) {
        getDock().setSpacingBetweenIcons(spacingValue);
        dockService.saveChanges();
    }

    public int getDockTransparencyPercentage() {
        return (int) (getDock().getDockTransparency() * 100);
    }

    public void setDockTransparencyPercentage(int value) {
        getDock().setDockTransparency((double) value / 100);
        dockService.saveChanges();
    }

    public int getDockBorderRounding() {
        return getDock().getDockBorderRounding();
    }

    public void setDockBorderRounding(int value) {
        getDock().setDockBorderRounding(value);
        dockService.saveChanges();
    }

    public String getDockColorRGB() {
        return getDock().getDockColorRGB();
    }

    public void setDockColorRGB(String value) {
        getDock().setDockColorRGB(value);
        dockService.saveChanges();
    }

    public DockTheme getDockTheme() {
        DockModel dock = getDock();
        return new DockTheme(dock.getDockColorRGB(), dock.getDockTransparency(), dock.getDockBorderRounding());
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.domain.FolderLauncher;
import com.github.arthurdeka.cedromoderndock.domain.ProgramLauncher;
import com.github.arthurdeka.cedromoderndock.domain.WindowsModuleLauncher;
import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockItemType;
import com.github.arthurdeka.cedromoderndock.model.DockFolderItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;

public class DockItemActionService {
    private final FolderLauncher folderLauncher;
    private final ProgramLauncher programLauncher;
    private final WindowsModuleLauncher windowsModuleLauncher;

    public DockItemActionService(
            ProgramLauncher programLauncher,
            FolderLauncher folderLauncher,
            WindowsModuleLauncher windowsModuleLauncher
    ) {
        this.programLauncher = programLauncher;
        this.folderLauncher = folderLauncher;
        this.windowsModuleLauncher = windowsModuleLauncher;
    }

    public void execute(DockItem item, Runnable openSettingsAction) {
        if (item.getType() == DockItemType.PROGRAM && item instanceof DockProgramItemModel programItem) {
            programLauncher.launch(programItem.getExecutablePath(), programItem.getLabel());
            return;
        }

        if (item.getType() == DockItemType.FOLDER && item instanceof DockFolderItemModel folderItem) {
            folderLauncher.launch(folderItem.getFolderPath(), folderItem.getLabel());
            return;
        }

        if (item.getType() == DockItemType.WINDOWS_MODULE && item instanceof DockWindowsModuleItemModel windowsModuleItem) {
            windowsModuleLauncher.launch(windowsModuleItem.getModule(), windowsModuleItem.getLabel());
            return;
        }

        if (item.getType() == DockItemType.SETTINGS) {
            openSettingsAction.run();
        }
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockPositioningService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.model.DockHorizontalAnchor;
import com.github.arthurdeka.cedromoderndock.model.DockModel;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import com.github.arthurdeka.cedromoderndock.model.DockVerticalAnchor;
import javafx.geometry.Rectangle2D;
import javafx.stage.Screen;
import javafx.stage.Stage;

public class DockPositioningService {
    private final DockService dockService;

    public DockPositioningService(DockService dockService) {
        this.dockService = dockService;
    }

    public DockPositioningMode getPositioningMode() {
        return dockService.getDock().getPositioningMode();
    }

    public void setPositioningMode(DockPositioningMode positioningMode) {
        dockService.getDock().setPositioningMode(positioningMode);
        dockService.saveChanges();
    }

    public DockVerticalAnchor getVerticalAnchor() {
        return dockService.getDock().getVerticalAnchor();
    }

    public void setVerticalAnchor(DockVerticalAnchor verticalAnchor) {
        dockService.getDock().setVerticalAnchor(verticalAnchor);
        dockService.saveChanges();
    }

    public DockHorizontalAnchor getHorizontalAnchor() {
        return dockService.getDock().getHorizontalAnchor();
    }

    public void setHorizontalAnchor(DockHorizontalAnchor horizontalAnchor) {
        dockService.getDock().setHorizontalAnchor(horizontalAnchor);
        dockService.saveChanges();
    }

    public int getScreenEdgeSpacing() {
        return dockService.getDock().getTopSpacing();
    }

    public void setScreenEdgeSpacing(int spacing) {
        setTopSpacing(spacing);
        setLeftSpacing(spacing);
        setRightSpacing(spacing);
        setBottomSpacing(spacing);
    }

    public int getTopSpacing() {
        return dockService.getDock().getTopSpacing();
    }

    public void setTopSpacing(int spacing) {
        dockService.getDock().setTopSpacing(Math.max(0, spacing));
        dockService.saveChanges();
    }

    public int getLeftSpacing() {
        return dockService.getDock().getLeftSpacing();
    }

    public void setLeftSpacing(int spacing) {
        dockService.getDock().setLeftSpacing(Math.max(0, spacing));
        dockService.saveChanges();
    }

    public int getRightSpacing() {
        return dockService.getDock().getRightSpacing();
    }

    public void setRightSpacing(int spacing) {
        dockService.getDock().setRightSpacing(Math.max(0, spacing));
        dockService.saveChanges();
    }

    public int getBottomSpacing() {
        return dockService.getDock().getBottomSpacing();
    }

    public void setBottomSpacing(int spacing) {
        dockService.getDock().setBottomSpacing(Math.max(0, spacing));
        dockService.saveChanges();
    }

    public boolean isDynamicPositioning() {
        return getPositioningMode() == DockPositioningMode.DYNAMIC;
    }

    public void applyPosition(Stage stage) {
        if (stage == null) {
            return;
        }

        DockModel dock = dockService.getDock();
        if (dock.getPositioningMode() == DockPositioningMode.DYNAMIC) {
            stage.setX(snapToPixel(dock.getDockPositionX()));
            stage.setY(snapToPixel(dock.getDockPositionY()));
            return;
        }

        Rectangle2D bounds = Screen.getPrimary().getVisualBounds();
        double stageWidth = stage.getWidth();
        double stageHeight = stage.getHeight();

        stage.setX(snapToPixel(resolveHorizontalPosition(bounds, stageWidth, dock)));
        stage.setY(snapToPixel(resolveVerticalPosition(bounds, stageHeight, dock)));
    }

    static double snapToPixel(double value) {
        return Math.round(value);
    }

    private double resolveHorizontalPosition(
            Rectangle2D bounds,
            double stageWidth,
            DockModel dock
    ) {
        return switch (dock.getHorizontalAnchor()) {
            case LEFT -> bounds.getMinX() + dock.getLeftSpacing();
            case MIDDLE -> bounds.getMinX() + ((bounds.getWidth() - stageWidth) / 2);
            case RIGHT -> bounds.getMaxX() - stageWidth - dock.getRightSpacing();
        };
    }

    private double resolveVerticalPosition(
            Rectangle2D bounds,
            double stageHeight,
            DockModel dock
    ) {
        return switch (dock.getVerticalAnchor()) {
            case TOP -> bounds.getMinY() + dock.getTopSpacing();
            case MIDDLE -> bounds.getMinY() + ((bounds.getHeight() - stageHeight) / 2);
            case DOWN -> bounds.getMaxY() - stageHeight - dock.getBottomSpacing();
        };
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.domain.DockRepository;
import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockModel;

import java.util.List;

public class DockService {
    private final DockRepository repository;
    private final DockModel dock;

    public DockService(DockRepository repository) {
        this.repository = repository;
        this.dock = repository.load();
    }

    public DockModel getDock() {
        return dock;
    }

    public List<DockItem> getItems() {
        return dock.getItems();
    }

    public void addItem(DockItem item) {
        dock.addItem(item);
        saveChanges();
    }

    public void removeItem(int index) {
        dock.removeItem(index);
        saveChanges();
    }

    public void swapItems(int firstItemIdx, int secondItemIdx) {
        dock.swapItems(firstItemIdx, secondItemIdx);
        saveChanges();
    }

    public void setDockPosition(double positionX, double positionY) {
        dock.setDockPosition(
                DockPositioningService.snapToPixel(positionX),
                DockPositioningService.snapToPixel(positionY)
        );
        saveChanges();
    }

    public void saveChanges() {
        repository.save(dock);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockTheme.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

public record DockTheme(String colorRgb, double transparency, int borderRounding) {
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/LocalizationService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockItemType;
import com.github.arthurdeka.cedromoderndock.model.DockSettingsItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;

import java.text.MessageFormat;
import java.util.List;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
import java.util.concurrent.CopyOnWriteArrayList;

public class LocalizationService {
    private static final String BUNDLE_BASE_NAME = "com.github.arthurdeka.cedromoderndock.i18n.messages";

    private final DockService dockService;
    private final List<Runnable> listeners = new CopyOnWriteArrayList<>();
    private ResourceBundle bundle;

    public LocalizationService(DockService dockService) {
        this.dockService = dockService;
        this.bundle = loadBundle(getCurrentLanguage());
    }

    public SupportedLanguage getCurrentLanguage() {
        SupportedLanguage language = dockService.getDock().getLanguage();
        return language == null ? SupportedLanguage.EN_US : language;
    }

    public void setLanguage(SupportedLanguage language) {
        SupportedLanguage resolvedLanguage = language == null ? SupportedLanguage.EN_US : language;
        if (resolvedLanguage == getCurrentLanguage()) {
            return;
        }

        dockService.getDock().setLanguage(resolvedLanguage);
        dockService.saveChanges();
        bundle = loadBundle(resolvedLanguage);
        notifyListeners();
    }

    public String text(String key, Object... arguments) {
        String pattern = bundle.containsKey(key) ? bundle.getString(key) : key;
        if (arguments == null || arguments.length == 0) {
            return pattern;
        }
        return MessageFormat.format(pattern, arguments);
    }

    public String languageDisplayName(SupportedLanguage language) {
        SupportedLanguage resolvedLanguage = language == null ? SupportedLanguage.EN_US : language;
        return resolvedLanguage.nativeDisplayName();
    }

    public String dockItemLabel(DockItem item) {
        if (item == null) {
            return "";
        }

        if (item.getType() == DockItemType.SETTINGS || item instanceof DockSettingsItemModel) {
            return text("dockItem.settings");
        }

        if (item.getType() == DockItemType.WINDOWS_MODULE && item instanceof DockWindowsModuleItemModel windowsModuleItem) {
            return switch (windowsModuleItem.getModule()) {
                case "mypc" -> text("windowsModule.myComputer");
                case "trash" -> text("windowsModule.recycleBin");
                case "ctrlpnl" -> text("windowsModule.controlPanel");
                case "pconfig" -> text("windowsModule.settings");
                default -> item.getLabel();
            };
        }

        return item.getLabel();
    }

    public void addListener(Runnable listener) {
        listeners.add(listener);
    }

    public void removeListener(Runnable listener) {
        listeners.remove(listener);
    }

    public static String bootstrapText(SupportedLanguage language, String key, Object... arguments) {
        try {
            ResourceBundle bundle = loadBundle(language == null ? SupportedLanguage.EN_US : language);
            String pattern = bundle.containsKey(key) ? bundle.getString(key) : key;
            if (arguments == null || arguments.length == 0) {
                return pattern;
            }
            return MessageFormat.format(pattern, arguments);
        } catch (MissingResourceException e) {
            return key;
        }
    }

    private void notifyListeners() {
        for (Runnable listener : listeners) {
            listener.run();
        }
    }

    private static ResourceBundle loadBundle(SupportedLanguage language) {
        return ResourceBundle.getBundle(BUNDLE_BASE_NAME, language.locale());
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolver.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.stream.Stream;

public final class ProgramSelectionResolver {

    private ProgramSelectionResolver() {
    }

    public static ResolvedProgramSelection resolve(Path selectedExecutable) {
        Path normalizedPath = selectedExecutable.toAbsolutePath().normalize();
        Path resolvedExecutable = resolveSquirrelExecutable(normalizedPath);
        return new ResolvedProgramSelection(
                resolvedExecutable.toString(),
                stripExtension(resolvedExecutable.getFileName().toString())
        );
    }

    private static Path resolveSquirrelExecutable(Path selectedExecutable) {
        if (!isUpdaterExecutable(selectedExecutable)) {
            return selectedExecutable;
        }

        Path installDir = selectedExecutable.getParent();
        if (installDir == null) {
            return selectedExecutable;
        }

        String installFolderName = installDir.getFileName() == null ? "" : installDir.getFileName().toString();
        List<Path> appDirectories = listAppDirectories(installDir);
        for (Path appDirectory : appDirectories) {
            Path preferredExecutable = appDirectory.resolve(installFolderName + ".exe");
            if (Files.isRegularFile(preferredExecutable)) {
                return preferredExecutable;
            }

            Path fallbackExecutable = findFirstExecutable(appDirectory);
            if (fallbackExecutable != null) {
                return fallbackExecutable;
            }
        }

        return selectedExecutable;
    }

    private static boolean isUpdaterExecutable(Path executablePath) {
        Path fileName = executablePath.getFileName();
        return fileName != null && fileName.toString().equalsIgnoreCase("Update.exe");
    }

    private static List<Path> listAppDirectories(Path installDir) {
        try (Stream<Path> paths = Files.list(installDir)) {
            return paths
                    .filter(Files::isDirectory)
                    .filter(path -> path.getFileName() != null)
                    .filter(path -> path.getFileName().toString().toLowerCase(Locale.ROOT).startsWith("app-"))
                    .sorted(Comparator.comparing(ProgramSelectionResolver::lastModifiedTime).reversed())
                    .toList();
        } catch (IOException e) {
            return List.of();
        }
    }

    private static long lastModifiedTime(Path path) {
        try {
            return Files.getLastModifiedTime(path).toMillis();
        } catch (IOException e) {
            return Long.MIN_VALUE;
        }
    }

    private static Path findFirstExecutable(Path appDirectory) {
        try (Stream<Path> files = Files.list(appDirectory)) {
            return files
                    .filter(Files::isRegularFile)
                    .filter(path -> path.getFileName() != null)
                    .filter(path -> path.getFileName().toString().toLowerCase(Locale.ROOT).endsWith(".exe"))
                    .filter(path -> !path.getFileName().toString().equalsIgnoreCase("Update.exe"))
                    .sorted(Comparator.comparing(path -> path.getFileName().toString()))
                    .findFirst()
                    .orElse(null);
        } catch (IOException e) {
            return null;
        }
    }

    private static String stripExtension(String fileName) {
        int lastDot = fileName.lastIndexOf('.');
        return lastDot > 0 ? fileName.substring(0, lastDot) : fileName;
    }

    public record ResolvedProgramSelection(String executablePath, String label) {
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/SupportedLanguage.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import java.util.Locale;

public enum SupportedLanguage {
    EN_US("en", "US", "English"),
    ZH_CN("zh", "CN", "\u7B80\u4F53\u4E2D\u6587"),
    ZH_TW("zh", "TW", "\u7E41\u9AD4\u4E2D\u6587"),
    HI_IN("hi", "IN", "\u0939\u093F\u0928\u094D\u0926\u0940"),
    ES_ES("es", "ES", "Espa\u00F1ol"),
    FR_FR("fr", "FR", "Fran\u00E7ais"),
    AR_SA("ar", "SA", "\u0627\u0644\u0639\u0631\u0628\u064A\u0629"),
    BN_BD("bn", "BD", "\u09AC\u09BE\u0982\u09B2\u09BE"),
    PT_BR("pt", "BR", "Portugu\u00EAs (Brasil)"),
    RU_RU("ru", "RU", "\u0420\u0443\u0441\u0441\u043A\u0438\u0439"),
    UR_PK("ur", "PK", "\u0627\u0631\u062F\u0648"),
    ID_ID("id", "ID", "Bahasa Indonesia"),
    DE_DE("de", "DE", "Deutsch"),
    JA_JP("ja", "JP", "\u65E5\u672C\u8A9E"),
    PCM_NG("pcm", "NG", "Naij\u00E1"),
    MR_IN("mr", "IN", "\u092E\u0930\u093E\u0920\u0940"),
    TE_IN("te", "IN", "\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41"),
    TR_TR("tr", "TR", "T\u00FCrk\u00E7e"),
    TA_IN("ta", "IN", "\u0BA4\u0BAE\u0BBF\u0BB4\u0BCD"),
    YUE_HK("yue", "HK", "\u7CB5\u8A9E"),
    VI_VN("vi", "VN", "Ti\u1EBFng Vi\u1EC7t");

    private final Locale locale;
    private final String nativeDisplayName;

    SupportedLanguage(String language, String country, String nativeDisplayName) {
        this.locale = Locale.of(language, country);
        this.nativeDisplayName = nativeDisplayName;
    }

    public Locale locale() {
        return locale;
    }

    public String nativeDisplayName() {
        return nativeDisplayName;
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/WindowPreviewService.java
================================================
package com.github.arthurdeka.cedromoderndock.application;

import com.github.arthurdeka.cedromoderndock.domain.WindowQueryGateway;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.util.NativeWindowUtils;

import java.util.List;

public class WindowPreviewService {
    private final WindowQueryGateway windowQueryGateway;

    public WindowPreviewService(WindowQueryGateway windowQueryGateway) {
        this.windowQueryGateway = windowQueryGateway;
    }

    public List<NativeWindowUtils.WindowInfo> loadPreview(DockProgramItemModel item) {
        return windowQueryGateway.findOpenWindows(item.getExecutablePath());
    }

    public boolean hasOpenWindows(String executablePath) {
        return !windowQueryGateway.findOpenWindows(executablePath).isEmpty();
    }

    public void activate(NativeWindowUtils.WindowInfo windowInfo) {
        windowQueryGateway.activate(windowInfo);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/AcknowledgementsModalController.java
================================================
package com.github.arthurdeka.cedromoderndock.controller;

import com.github.arthurdeka.cedromoderndock.application.AppServices;
import javafx.fxml.FXML;
import javafx.scene.control.Label;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

public class AcknowledgementsModalController {
    @FXML
    private Label titleLabel;
    @FXML
    private Label subtitleLabel;
    @FXML
    private Label sectionTitleLabel;

    private AppServices appServices;
    private final Runnable localizationListener = this::applyLocalizedTexts;
    private boolean localizationRegistered;
    private boolean cleanupRegistered;

    public void initialize() {
        titleLabel.sceneProperty().addListener((observableValue, oldScene, newScene) -> {
            if (newScene == null) {
                return;
            }

            newScene.windowProperty().addListener((windowObservable, oldWindow, newWindow) -> {
                if (newWindow == null) {
                    return;
                }
                updateWindowTitle();
                if (!cleanupRegistered) {
                    cleanupRegistered = true;
                    newWindow.addEventHandler(WindowEvent.WINDOW_HIDDEN, event -> unregisterLocalizationListener());
                }
            });
        });
    }

    public void handleInitialization() {
        if (!localizationRegistered) {
            appServices.localizationService().addListener(localizationListener);
            localizationRegistered = true;
        }
        applyLocalizedTexts();
    }

    public void setAppServices(AppServices appServices) {
        this.appServices = appServices;
    }

    private void applyLocalizedTexts() {
        if (appServices == null) {
            return;
        }

        titleLabel.setText(text("acknowledgements.title"));
        subtitleLabel.setText(text("acknowledgements.subtitle"));
        sectionTitleLabel.setText(text("acknowledgements.sectionTitle"));
        updateWindowTitle();
    }

    private void updateWindowTitle() {
        if (titleLabel.getScene() != null && titleLabel.getScene().getWindow() instanceof Stage stage && appServices != null) {
            stage.setTitle(text("acknowledgements.window.title"));
        }
    }

    private void unregisterLocalizationListener() {
        if (appServices != null && localizationRegistered) {
            appServices.localizationService().removeListener(localizationListener);
            localizationRegistered = false;
        }
    }

    private String text(String key) {
        return appServices.localizationService().text(key);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/AddWindowsModulesModalController.java
================================================
package com.github.arthurdeka.cedromoderndock.controller;

import com.github.arthurdeka.cedromoderndock.App;
import com.github.arthurdeka.cedromoderndock.application.AppServices;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;
import com.github.arthurdeka.cedromoderndock.util.Logger;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;

import java.util.List;
import java.util.function.Consumer;

import static com.github.arthurdeka.cedromoderndock.util.UIUtils.setStageIcon;

public class AddWindowsModulesModalController {
    private static final List<String> MODULE_IDS = List.of("mypc", "trash", "ctrlpnl", "pconfig");

    @FXML
    private Label titleLabel;
    @FXML
    private Label subtitleLabel;
    @FXML
    private Label availableModulesTitleLabel;
    @FXML
    private Label availableModulesHelperLabel;
    @FXML
    private ListView<String> listView;
    @FXML
    private Button addSelectedModuleButton;

    private AppServices appServices;
    private Runnable dockRefreshAction = () -> {};
    private Consumer<DockPositioningMode> positioningModeChangeAction = positioningMode -> {};
    private final Runnable localizationListener = this::applyLocalizedTexts;
    private boolean localizationRegistered;
    private boolean cleanupRegistered;

    public void initialize() {
        Logger.info("[Initializing] AddWindowsModulesModalController");
        listView.sceneProperty().addListener((observableValue, oldScene, newScene) -> {
            if (newScene == null) {
                return;
            }

            newScene.windowProperty().addListener((windowObservable, oldWindow, newWindow) -> {
                if (newWindow == null) {
                    return;
                }
                updateWindowTitle();
                if (!cleanupRegistered) {
                    cleanupRegistered = true;
                    newWindow.addEventHandler(WindowEvent.WINDOW_HIDDEN, event -> unregisterLocalizationListener());
                }
            });
        });
    }

    public void handleInitialization() {
        if (!localizationRegistered) {
            appServices.localizationService().addListener(localizationListener);
            localizationRegistered = true;
        }
        applyLocalizedTexts();
    }

    @FXML
    private void handleAddSelectedModule() {
        int selectedIdx = listView.getSelectionModel().getSelectedIndex();
        if (selectedIdx < 0 || selectedIdx >= MODULE_IDS.size()) {
            return;
        }

        String moduleId = MODULE_IDS.get(selectedIdx);
        appServices.dockService().addItem(new DockWindowsModuleItemModel(defaultModuleLabel(moduleId), moduleId));
        dockRefreshAction.run();
        openSettingsWindow();
    }

    private void openSettingsWindow() {
        try {
            Stage currentStage = (Stage) listView.getScene().getWindow();

            FXMLLoader loader = new FXMLLoader(App.class.getResource("fxml/DockSettingsView.fxml"));
            Parent root = loader.load();

            SettingsController settingsController = loader.getController();
            settingsController.setAppServices(appServices);
            settingsController.setDockRefreshAction(dockRefreshAction);
            settingsController.setPositioningModeChangeAction(positioningModeChangeAction);
            settingsController.handleInitialization();

            Stage stage = new Stage();
            stage.setTitle(text("settings.window.title"));
            setStageIcon(stage);
            stage.setScene(new Scene(root));
            stage.show();
            stage.setMinHeight(stage.getHeight());
            stage.setMaxHeight(stage.getHeight());

            currentStage.close();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    public void setAppServices(AppServices appServices) {
        this.appServices = appServices;
    }

    public void setDockRefreshAction(Runnable dockRefreshAction) {
        this.dockRefreshAction = dockRefreshAction;
    }

    public void setPositioningModeChangeAction(Consumer<DockPositioningMode> positioningModeChangeAction) {
        this.positioningModeChangeAction = positioningModeChangeAction;
    }

    private void applyLocalizedTexts() {
        if (appServices == null) {
            return;
        }

        titleLabel.setText(text("windowsModule.modal.title"));
        subtitleLabel.setText(text("windowsModule.modal.subtitle"));
        availableModulesTitleLabel.setText(text("windowsModule.modal.available.title"));
        availableModulesHelperLabel.setText(text("windowsModule.modal.available.helper"));
        addSelectedModuleButton.setText(text("windowsModule.modal.addSelected"));
        listView.getItems().setAll(MODULE_IDS.stream().map(this::resolveModuleLabel).toList());
        updateWindowTitle();
    }

    private String resolveModuleLabel(String moduleId) {
        return switch (moduleId) {
            case "mypc" -> text("windowsModule.myComputer");
            case "trash" -> text("windowsModule.recycleBin");
            case "ctrlpnl" -> text("windowsModule.controlPanel");
            case "pconfig" -> text("windowsModule.settings");
            default -> moduleId;
        };
    }

    private String defaultModuleLabel(String moduleId) {
        return switch (moduleId) {
            case "mypc" -> "My Computer";
            case "trash" -> "Recycle Bin";
            case "ctrlpnl" -> "Control Panel";
            case "pconfig" -> "Settings";
            default -> moduleId;
        };
    }

    private void updateWindowTitle() {
        if (listView.getScene() != null && listView.getScene().getWindow() instanceof Stage stage && appServices != null) {
            stage.setTitle(text("windowsModule.modal.title"));
        }
    }

    private void unregisterLocalizationListener() {
        if (appServices != null && localizationRegistered) {
            appServices.localizationService().removeListener(localizationListener);
            localizationRegistered = false;
        }
    }

    private String text(String key) {
        return appServices.localizationService().text(key);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/DockController.java
================================================
package com.github.arthurdeka.cedromoderndock.controller;

import com.github.arthurdeka.cedromoderndock.App;
import com.github.arthurdeka.cedromoderndock.application.AppServices;
import com.github.arthurdeka.cedromoderndock.application.DockTheme;
import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockFolderItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockSettingsItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;
import com.github.arthurdeka.cedromoderndock.util.Logger;
import javafx.application.Platform;
import javafx.animation.PauseTransition;
import javafx.concurrent.Task;
import javafx.util.Duration;
import com.github.arthurdeka.cedromoderndock.util.NativeWindowUtils;
import com.github.arthurdeka.cedromoderndock.view.WindowPreviewPopup;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.geometry.Pos;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import com.github.arthurdeka.cedromoderndock.util.SettingsWindowLauncher;

public class DockController {
    private static final double HOVER_SCALE = 1.3;

    @FXML
    private AnchorPane rootPane;

    @FXML
    private HBox hBoxContainer;

    private AppServices appServices;
    private Stage stage;
    // Runs native window queries off the FX thread; single daemon thread avoids unbounded thread creation.
    private final ExecutorService windowPreviewExecutor = Executors.newSingleThreadExecutor(r -> {
        Thread t = new Thread(r, "WindowPreviewFetcher");
        t.setDaemon(true);
        return t;
    });
    private WindowPreviewPopup windowPreviewPopup;
    private PauseTransition hideDebounce;
    private boolean isHoveringPopup = false;
    private Button currentHoverButton;
    private Button popupOwnerButton;
    private final ExecutorService openStateExecutor = Executors.newSingleThreadExecutor(r -> {
        Thread t = new Thread(r, "DockOpenStateWatcher");
        t.setDaemon(true);
        return t;
    });
    private final Map<String, List<Circle>> programIndicators = new HashMap<>();
    private final Rectangle dockClip = new Rectangle();
    // Monotonic id to ignore stale async results from previous hover requests.
    private int hoverRequestId = 0;
    private final Runnable localizationListener = this::updateDockUI;

    // variables for the enableDrag function
    private double xOffset = 0;
    private double yOffset = 0;

    // Run when FXML is loaded
    public void handleInitialization() {
        appServices.localizationService().addListener(localizationListener);
        dockClip.widthProperty().bind(hBoxContainer.widthProperty());
        dockClip.heightProperty().bind(hBoxContainer.heightProperty());
        hBoxContainer.setClip(dockClip);

        // Popup that lists open windows for a program icon on hover.
        windowPreviewPopup = new WindowPreviewPopup();
        windowPreviewPopup.getContainer().setOnMouseEntered(e -> {
            isHoveringPopup = true;
            hideDebounce.stop();
        });
        windowPreviewPopup.getContainer().setOnMouseExited(e -> {
            isHoveringPopup = false;
            scheduleHide();
        });

        // Small delay prevents flicker when moving between icon and popup.
        hideDebounce = new PauseTransition(Duration.millis(80));
        hideDebounce.setOnFinished(e -> {
            if (shouldHidePreview()) {
                windowPreviewPopup.hide();
                popupOwnerButton = null;
            }
        });

        enableDrag();
        updateDockUI();
        startOpenStateWatcher();
    }

    // enables dock drag effect
    private void enableDrag() {
        rootPane.setOnMousePressed(event -> {
            if (!appServices.positioningService().isDynamicPositioning()) {
                return;
            }
            xOffset = event.getSceneX();
            yOffset = event.getSceneY();
        });
        rootPane.setOnMouseDragged(event -> {
            if (!appServices.positioningService().isDynamicPositioning()) {
                return;
            }
            stage.setX(event.getScreenX() - xOffset);
            stage.setY(event.getScreenY() - yOffset);
        });

        // saves the dock position on the model
        rootPane.setOnMouseReleased(event -> {
            if (!appServices.positioningService().isDynamicPositioning()) {
                appServices.positioningService().applyPosition(stage);
                return;
            }
            appServices.dockService().setDockPosition(stage.getX(), stage.getY());
            appServices.positioningService().applyPosition(stage);
        });
    }

    public void addDockItem(DockItem item) {
        appServices.dockService().addItem(item);
    }

    public void removeDockItem(int index) {
        appServices.dockService().removeItem(index);
    }

    public List<DockItem> getDockItems() {
        return appServices.dockService().getItems();
    }

    public void swapItems(int firstItemIdx, int secondItemIdx) {
        appServices.dockService().swapItems(firstItemIdx, secondItemIdx);
        updateDockUI();
    }

    /* this method updates the DockView (actual rendered Dock) style and saves the changes */
    public void updateDockUI() {
        var dock = appServices.dockService().getDock();
        hBoxContainer.getChildren().clear();
        synchronized (programIndicators) {
            programIndicators.clear();
        }
        dockClip.setArcWidth(dock.getDockBorderRounding() * 2.0);
        dockClip.setArcHeight(dock.getDockBorderRounding() * 2.0);
        hBoxContainer.setSpacing(getDockIconsSpacing());
        hBoxContainer.setStyle("-fx-background-color: rgba(" + dock.getDockColorRGB() + " " + dock.getDockTransparency() + ");" + "-fx-background-radius: " + dock.getDockBorderRounding() + ";");

        for (DockItem item : dock.getItems()) {
            Button button = createButton(item);
            if (button != null) {
                hBoxContainer.getChildren().add(button);
            }
        }

        // resize DockView window to account for DockItem additions or removing
        stage.sizeToScene();
        appServices.positioningService().applyPosition(stage);
        requestProgramIndicatorRefresh();
    }

    private Button createButton(DockItem item) {
        String buttonLabel = appServices.localizationService().dockItemLabel(item);

        if (item instanceof DockSettingsItemModel) {
            Image icon = loadDockResourceImage(item.getPath());
            ImageView imageView = createDockImageView(icon);

            Button button = new Button(buttonLabel);
            button.getStyleClass().add("dock-button");
            button.setGraphic(imageView);
            button.setOnAction(e -> appServices.itemActionService().execute(item, this::openSettingsWindow));
            return button;

        } else if (item instanceof DockWindowsModuleItemModel) {
            Image icon = loadDockResourceImage(item.getPath());
            ImageView imageView = createDockImageView(icon);

            Button button = new Button(buttonLabel);
            button.getStyleClass().add("dock-button");
            button.setGraphic(imageView);
            button.setOnAction(e -> appServices.itemActionService().execute(item, this::openSettingsWindow));
            return button;
        } else if (item instanceof DockProgramItemModel programItem) {
            // Logic for DockProgramItemModel runs on a background thread.
            Path iconPath = appServices.iconGateway().resolveProgramIcon(programItem.getExecutablePath());

            // if file does not exist
            if (iconPath == null || Files.notExists(iconPath)) {
                Logger.error("DockController - createButton - path for cached icon not found");
                return null;
            }

            Image icon = loadDockFileImage(iconPath);
            ImageView imageView = createDockImageView(icon);
            Circle runningIndicator = createRunningIndicator();
            VBox graphic = createProgramGraphic(imageView, runningIndicator);

            Button button = new Button(buttonLabel);
            button.getStyleClass().add("dock-button");
            button.setGraphic(graphic);
            synchronized (programIndicators) {
                programIndicators
                        .computeIfAbsent(programItem.getExecutablePath(), ignored -> new ArrayList<>())
                        .add(runningIndicator);
            }

            button.setOnAction(e -> appServices.itemActionService().execute(item, this::openSettingsWindow));

            // Show a window list preview when hovering this program icon.
            setupHoverPreview(button, programItem, icon);

            return button;
        } else if (item instanceof DockFolderItemModel folderItem) {
            Path iconPath = appServices.iconGateway().resolveFolderIcon(folderItem.getFolderPath());
            if (iconPath == null || Files.notExists(iconPath)) {
                appServices.iconGateway().cacheFolderIcon(folderItem.getFolderPath());
                iconPath = appServices.iconGateway().resolveFolderIcon(folderItem.getFolderPath());
            }

            Image icon;
            if (iconPath != null && Files.exists(iconPath)) {
                icon = loadDockFileImage(iconPath);
            } else {
                icon = loadDockResourceImage("/com/github/arthurdeka/cedromoderndock/icons/folder.png");
            }

            ImageView imageView = createDockImageView(icon);

            Button button = new Button(buttonLabel);
            button.getStyleClass().add("dock-button");
            button.setGraphic(imageView);
            button.setOnAction(e -> appServices.itemActionService().execute(item, this::openSettingsWindow));
            return button;

        } else {
            return null;
        }
    }

    private VBox createProgramGraphic(ImageView imageView, Circle runningIndicator) {
        VBox graphic = new VBox(4, imageView, runningIndicator);
        graphic.setAlignment(Pos.CENTER);
        return graphic;
    }

    private Image loadDockResourceImage(String resourcePath) {
        return new Image(
                App.class.getResource(resourcePath).toExternalForm(),
                getRequestedIconSize(),
                getRequestedIconSize(),
                true,
                true,
                false
        );
    }

    private Image loadDockFileImage(Path iconPath) {
        return new Image(
                iconPath.toUri().toString(),
                getRequestedIconSize(),
                getRequestedIconSize(),
                true,
                true,
                false
        );
    }

    private ImageView createDockImageView(Image icon) {
        ImageView imageView = new ImageView(icon);
        imageView.setFitWidth(appServices.appearanceService().getIconsSize());
        imageView.setFitHeight(appServices.appearanceService().getIconsSize());
        imageView.setPreserveRatio(true);
        imageView.setSmooth(true);
        return imageView;
    }

    private int getRequestedIconSize() {
        return Math.max(
                appServices.appearanceService().getIconsSize(),
                (int) Math.ceil(appServices.appearanceService().getIconsSize() * HOVER_SCALE)
        );
    }

    private Circle createRunningIndicator() {
        Circle runningIndicator = new Circle(1.5);
        runningIndicator.setFill(Color.WHITE);
        runningIndicator.setManaged(true);
        runningIndicator.setOpacity(0);
        runningIndicator.setMouseTransparent(true);
        return runningIndicator;
    }

    private void startOpenStateWatcher() {
        openStateExecutor.execute(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    refreshProgramIndicatorsInBackground();
                    Thread.sleep(1200);
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                } catch (Exception e) {
                    Logger.error("Failed to refresh running program indicators: " + e.getMessage());
                }
            }
        });
    }

    private void requestProgramIndicatorRefresh() {
        openStateExecutor.execute(this::refreshProgramIndicatorsInBackground);
    }

    private void refreshProgramIndicatorsInBackground() {
        Map<String, List<Circle>> indicatorSnapshot = snapshotProgramIndicators();
        if (indicatorSnapshot.isEmpty()) {
            return;
        }

        Map<String, Boolean> openStateByExecutable = new HashMap<>();
        for (String executablePath : indicatorSnapshot.keySet()) {
            openStateByExecutable.put(executablePath, appServices.windowPreviewService().hasOpenWindows(executablePath));
        }

        Platform.runLater(() -> applyProgramIndicatorState(indicatorSnapshot, openStateByExecutable));
    }

    private Map<String, List<Circle>> snapshotProgramIndicators() {
        synchronized (programIndicators) {
            Map<String, List<Circle>> snapshot = new HashMap<>();
            for (Map.Entry<String, List<Circle>> entry : programIndicators.entrySet()) {
                snapshot.put(entry.getKey(), new ArrayList<>(entry.getValue()));
            }
            return snapshot;
        }
    }

    private void applyProgramIndicatorState(Map<String, List<Circle>> indicatorSnapshot, Map<String, Boolean> openStateByExecutable) {
        for (Map.Entry<String, Boolean> entry : openStateByExecutable.entrySet()) {
            List<Circle> indicators = indicatorSnapshot.getOrDefault(entry.getKey(), List.of());
            boolean isOpen = entry.getValue();
            for (Circle indicator : indicators) {
                indicator.setOpacity(isOpen ? 1 : 0);
            }
        }
    }

    private void setupHoverPreview(Button button, DockProgramItemModel item, Image icon) {
        // Track hover state for the icon and popup to avoid flicker.
        button.setOnMouseEntered(e -> {
            currentHoverButton = button;
            hideDebounce.stop();
            // If another icon owns the popup, close it before showing new content.
            if (windowPreviewPopup.isShowing() && popupOwnerButton != button) {
                windowPreviewPopup.hide();
                popupOwnerButton = null;
            }
            showWindowPreview(button, item, icon);
        });

        button.setOnMouseExited(e -> {
            if (currentHoverButton == button) {
                currentHoverButton = null;
            }
            // Hide with a short debounce to allow moving into the popup.
            scheduleHide();
        });
    }

    private void showWindowPreview(Button button, DockProgramItemModel item, Image icon) {
        int requestId = ++hoverRequestId;
        // Query native windows on a background thread.
        Task<List<NativeWindowUtils.WindowInfo>> task = new Task<>() {
            @Override
            protected List<NativeWindowUtils.WindowInfo> call() throws Exception {
                return appServices.windowPreviewService().loadPreview(item);
            }
        };

        task.setOnSucceeded(e -> {
            // Ignore results from older hover requests.
            if (requestId != hoverRequestId) {
                return;
            }
            List<NativeWindowUtils.WindowInfo> windows = task.getValue();
            // If the mouse left the icon, do nothing.
            if (currentHoverButton != button || !button.isHover()) {
                return;
            }
            // Only show popup when there is at least one window.
            if (!windows.isEmpty()) {
                DockTheme dockTheme = appServices.appearanceService().getDockTheme();
                windowPreviewPopup.updateContent(
                        windows,
                        icon,
                        item.getLabel(),
                        dockTheme,
                        appServices.windowPreviewService()::activate
                );
                windowPreviewPopup.showAbove(button, hBoxContainer);
                popupOwnerButton = button;

            } else if (windowPreviewPopup.isShowing() && popupOwnerButton == button) {
                windowPreviewPopup.hide();
                popupOwnerButton = null;
            }
        });

        task.setOnFailed(e -> {
            Logger.error("Failed to fetch windows for " + item.getLabel() + ": " + task.getException().getMessage());
        });

        windowPreviewExecutor.execute(task);
    }

    private void scheduleHide() {
        hideDebounce.stop();
        hideDebounce.playFromStart();
    }

    private boolean shouldHidePreview() {
        if (isHoveringPopup) {
            return false;
        }
        if (currentHoverButton == null) {
            return true;
        }
        return !currentHoverButton.isHover();
    }

    private void openSettingsWindow() {
        SettingsWindowLauncher.open(
                appServices,
                this::updateDockUI,
                this::handlePositioningModeChange
        );
    }

    public void setDockIconsSize(int iconsSize) {
        appServices.appearanceService().setIconsSize(iconsSize);
        updateDockUI();
    }

    public int getDockIconsSize() {
        return appServices.appearanceService().getIconsSize();
    }

    public void setDockIconsSpacing(int spacingValue) {
        appServices.appearanceService().setSpacingBetweenIcons(spacingValue);
        updateDockUI();
    }

    public int getDockIconsSpacing() {
        return appServices.appearanceService().getSpacingBetweenIcons();
    }

    public int getDockTransparency() {
        return appServices.appearanceService().getDockTransparencyPercentage();
    }

    public void setDockTransparency(int value) {
        appServices.appearanceService().setDockTransparencyPercentage(value);
        updateDockUI();
    }

    public void setDockBorderRounding(int value) {
        appServices.appearanceService().setDockBorderRounding(value);
        updateDockUI();

    }

    public int getDockBorderRounding() {
        return appServices.appearanceService().getDockBorderRounding();
    }

    public void setStage(Stage stage) {
        this.stage = stage;
        this.stage.setOnHidden(event -> {
            appServices.localizationService().removeListener(localizationListener);
            windowPreviewExecutor.shutdownNow();
            openStateExecutor.shutdownNow();
        });
    }

    public String getDockColorRGB() {
        return appServices.appearanceService().getDockColorRGB();
    }

    public void setDockColorRGB(String value) {
        appServices.appearanceService().setDockColorRGB(value);
        updateDockUI();
    }

    public void saveChanges() {
        appServices.dockService().saveChanges();
    }

    public void setAppServices(AppServices appServices) {
        this.appServices = appServices;
    }

    private void handlePositioningModeChange(DockPositioningMode positioningMode) {
        DockPositioningMode currentMode = appServices.positioningService().getPositioningMode();
        if (currentMode == DockPositioningMode.STATIC && positioningMode == DockPositioningMode.DYNAMIC) {
            appServices.dockService().setDockPosition(stage.getX(), stage.getY());
        }
        appServices.positioningService().setPositioningMode(positioningMode);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/SettingsController.java
================================================
package com.github.arthurdeka.cedromoderndock.controller;

import com.github.arthurdeka.cedromoderndock.App;
import com.github.arthurdeka.cedromoderndock.application.AppServices;
import com.github.arthurdeka.cedromoderndock.application.ProgramSelectionResolver;
import com.github.arthurdeka.cedromoderndock.application.SupportedLanguage;
import com.github.arthurdeka.cedromoderndock.model.DockHorizontalAnchor;
import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockFolderItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockSettingsItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockVerticalAnchor;
import com.github.arthurdeka.cedromoderndock.util.ColorManipulation;
import com.github.arthurdeka.cedromoderndock.util.Logger;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ChoiceBox;
import javafx.scene.control.ColorPicker;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.RadioButton;
import javafx.scene.control.Slider;
import javafx.scene.control.Tab;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import javafx.util.StringConverter;

import java.io.File;
import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
import java.util.function.Consumer;

import static com.github.arthurdeka.cedromoderndock.util.UIUtils.setStageIcon;

public class SettingsController {
    private static final double LIST_VIEW_CELL_HEIGHT = 40;
    private static final double LIST_VIEW_MAX_HEIGHT = 200;

    @FXML
    private Label mainTitleLabel;
    @FXML
    private Label mainSubtitleLabel;
    @FXML
    private Label languageLabel;
    @FXML
    private ChoiceBox<SupportedLanguage> languageChoiceBox;
    @FXML
    private Tab iconsTab;
    @FXML
    private Tab iconsCustomizationTab;
    @FXML
    private Tab dockCustomizationTab;
    @FXML
    private Tab dockPositioningTab;
    @FXML
    private Tab generalTab;

    @FXML
    private ListView<String> listView;
    @FXML
    private Label dockItemsTitleLabel;
    @FXML
    private Label dockItemsHelperLabel;
    @FXML
    private Label actionsTitleLabel;
    @FXML
    private Label actionsHelperLabel;
    @FXML
    private Button addProgramButton;
    @FXML
    private Button addFolderButton;
    @FXML
    private Button addWindowsModuleButton;
    @FXML
    private Button removeProgramButton;
    @FXML
    private Button moveItemUpButton;
    @FXML
    private Button moveItemDownButton;

    @FXML
    private Slider iconSizeSlider;
    @FXML
    private Slider spacingBetweenIconsSlider;
    @FXML
    private Label iconsSizeTitleLabel;
    @FXML
    private Label iconsSizeHelperLabel;
    @FXML
    private Label spacingTitleLabel;
    @FXML
    private Label spacingHelperLabel;

    @FXML
    private Slider dockTransparencySlider;
    @FXML
    private Slider dockBorderRoundingSlider;
    @FXML
    private ColorPicker dockColorPicker;
    @FXML
    private Label transparencyTitleLabel;
    @FXML
    private Label transparencyHelperLabel;
    @FXML
    private Label roundingTitleLabel;
    @FXML
    private Label roundingHelperLabel;
    @FXML
    private Label backgroundColorTitleLabel;
    @FXML
    private Label backgroundColorHelperLabel;

    @FXML
    private RadioButton staticPositioningRadio;
    @FXML
    private RadioButton dynamicPositioningRadio;
    @FXML
    private ChoiceBox<DockVerticalAnchor> verticalPositionChoiceBox;
    @FXML
    private ChoiceBox<DockHorizontalAnchor> horizontalPositionChoiceBox;
    @FXML
    private Slider topSpacingSlider;
    @FXML
    private Slider leftSpacingSlider;
    @FXML
    private Slider rightSpacingSlider;
    @FXML
    private Slider bottomSpacingSlider;
    @FXML
    private VBox staticPositioningPane;
    @FXML
    private VBox dynamicPositioningPane;
    @FXML
    private Label positioningModeTitleLabel;
    @FXML
    private Label positioningModeHelperLabel;
    @FXML
    private Label alignmentTitleLabel;
    @FXML
    private Label verticalLabel;
    @FXML
    private Label horizontalLabel;
    @FXML
    private Label screenSpacingTitleLabel;
    @FXML
    private Label topSpacingLabel;
    @FXML
    private Label leftSpacingLabel;
    @FXML
    private Label rightSpacingLabel;
    @FXML
    private Label bottomSpacingLabel;
    @FXML
    private Label dynamicPositioningTitleLabel;
    @FXML
    private Label dynamicPositioningHelperLabel;

    @FXML
    private Label versionLabel;
    @FXML
    private Label repositoryLabel;
    @FXML
    private Label contactLabel;
    @FXML
    private Label openSourceLabel;
    @FXML
    private Button acknowledgementsButton;

    private final ObservableList<String> listItems = FXCollections.observableArrayList();
    private final Runnable localizationListener = this::handleLocalizationChanged;
    private boolean suppressionEnabled;
    private boolean localizationRegistered;
    private boolean cleanupRegistered;

    private AppServices appServices;
    private Runnable dockRefreshAction = () -> {};
    private Consumer<DockPositioningMode> positioningModeChangeAction = positioningMode -> {};

    public void initialize() {
        Logger.info("[Initializing] SettingsController");

        javafx.scene.control.ToggleGroup positioningModeGroup = new javafx.scene.control.ToggleGroup();
        staticPositioningRadio.setToggleGroup(positioningModeGroup);
        dynamicPositioningRadio.setToggleGroup(positioningModeGroup);
        listView.setFixedCellSize(LIST_VIEW_CELL_HEIGHT);
        listView.sceneProperty().addListener((observableValue, oldScene, newScene) -> {
            if (newScene == null) {
                return;
            }

            newScene.windowProperty().addListener((windowObservable, oldWindow, newWindow) -> {
                if (newWindow == null) {
                    return;
                }
                updateWindowTitle();
                if (!cleanupRegistered) {
                    cleanupRegistered = true;
                    newWindow.addEventHandler(WindowEvent.WINDOW_HIDDEN, event -> unregisterLocalizationListener());
                }
            });
        });
    }

    public void handleInitialization() {
        registerLocalization();
        configureLocalizationControls();

        addDockItemsToListView(appServices.dockService().getItems());
        listView.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> handleListViewItemSelection());

        iconSizeSlider.setValue(appServices.appearanceService().getIconsSize());
        iconSizeSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> handleSetIconSizeSlider((int) iconSizeSlider.getValue()));

        spacingBetweenIconsSlider.setValue(appServices.appearanceService().getSpacingBetweenIcons());
        spacingBetweenIconsSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> handleSetIconsSpacingSlider((int) spacingBetweenIconsSlider.getValue()));

        dockTransparencySlider.setValue(appServices.appearanceService().getDockTransparencyPercentage());
        dockTransparencySlider.valueProperty().addListener((observableValue, oldValue, newValue) -> handleSetDockTransparencySlider((int) dockTransparencySlider.getValue()));

        dockBorderRoundingSlider.setValue(appServices.appearanceService().getDockBorderRounding());
        dockBorderRoundingSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> handleSetDockBorderRoundingSlider((int) dockBorderRoundingSlider.getValue()));

        Color rgbaColor = ColorManipulation.fromRGBtoRGBA(appServices.appearanceService().getDockColorRGB());
        dockColorPicker.setValue(rgbaColor);

        initializePositioningControls();
        applyLocalizedTexts();
    }

    private void registerLocalization() {
        if (!localizationRegistered) {
            appServices.localizationService().addListener(localizationListener);
            localizationRegistered = true;
        }
    }

    private void unregisterLocalizationListener() {
        if (appServices != null && localizationRegistered) {
            appServices.localizationService().removeListener(localizationListener);
            localizationRegistered = false;
        }
    }

    private void configureLocalizationControls() {
        languageChoiceBox.setConverter(new StringConverter<>() {
            @Override
            public String toString(SupportedLanguage language) {
                return language == null ? "" : appServices.localizationService().languageDisplayName(language);
            }

            @Override
            public SupportedLanguage fromString(String string) {
                return appServices.localizationService().getCurrentLanguage();
            }
        });

        verticalPositionChoiceBox.setConverter(new StringConverter<>() {
            @Override
            public String toString(DockVerticalAnchor anchor) {
                return anchor == null ? "" : verticalAnchorText(anchor);
            }

            @Override
            public DockVerticalAnchor fromString(String string) {
                return DockVerticalAnchor.TOP;
            }
        });

        horizontalPositionChoiceBox.setConverter(new StringConverter<>() {
            @Override
            public String toString(DockHorizontalAnchor anchor) {
                return anchor == null ? "" : horizontalAnchorText(anchor);
            }

            @Override
            public DockHorizontalAnchor fromString(String string) {
                return DockHorizontalAnchor.LEFT;
            }
        });

        languageChoiceBox.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
            if (suppressionEnabled || newValue == null) {
                return;
            }

            appServices.localizationService().setLanguage(newValue);
            dockRefreshAction.run();
        });
    }

    private void initializePositioningControls() {
        DockPositioningMode positioningMode = appServices.positioningService().getPositioningMode();
        if (positioningMode == DockPositioningMode.DYNAMIC) {
            dynamicPositioningRadio.setSelected(true);
        } else {
            staticPositioningRadio.setSelected(true);
        }

        verticalPositionChoiceBox.setValue(appServices.positioningService().getVerticalAnchor());
        horizontalPositionChoiceBox.setValue(appServices.positioningService().getHorizontalAnchor());
        topSpacingSlider.setValue(appServices.positioningService().getTopSpacing());
        leftSpacingSlider.setValue(appServices.positioningService().getLeftSpacing());
        rightSpacingSlider.setValue(appServices.positioningService().getRightSpacing());
        bottomSpacingSlider.setValue(appServices.positioningService().getBottomSpacing());

        verticalPositionChoiceBox.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
            if (suppressionEnabled || newValue == null) {
                return;
            }
            appServices.positioningService().setVerticalAnchor(newValue);
            dockRefreshAction.run();
        });

        horizontalPositionChoiceBox.getSelectionModel().selectedItemProperty().addListener((observableValue, oldValue, newValue) -> {
            if (suppressionEnabled || newValue == null) {
                return;
            }
            appServices.positioningService().setHorizontalAnchor(newValue);
            dockRefreshAction.run();
        });

        topSpacingSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> {
            appServices.positioningService().setTopSpacing((int) Math.round(newValue.doubleValue()));
            dockRefreshAction.run();
        });

        leftSpacingSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> {
            appServices.positioningService().setLeftSpacing((int) Math.round(newValue.doubleValue()));
            dockRefreshAction.run();
        });

        rightSpacingSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> {
            appServices.positioningService().setRightSpacing((int) Math.round(newValue.doubleValue()));
            dockRefreshAction.run();
        });

        bottomSpacingSlider.valueProperty().addListener((observableValue, oldValue, newValue) -> {
            appServices.positioningService().setBottomSpacing((int) Math.round(newValue.doubleValue()));
            dockRefreshAction.run();
        });

        updatePositioningModeUI();
    }

    @FXML
    private void handlePositioningModeChange() {
        DockPositioningMode positioningMode = staticPositioningRadio.isSelected()
                ? DockPositioningMode.STATIC
                : DockPositioningMode.DYNAMIC;
        positioningModeChangeAction.accept(positioningMode);
        updatePositioningModeUI();
        dockRefreshAction.run();
    }

    private void updatePositioningModeUI() {
        boolean isStaticMode = staticPositioningRadio.isSelected();
        staticPositioningPane.setVisible(isStaticMode);
        staticPositioningPane.setManaged(isStaticMode);
        dynamicPositioningPane.setVisible(!isStaticMode);
        dynamicPositioningPane.setManaged(!isStaticMode);
    }

    private void handleListViewItemSelection() {
        int selectedIdx = listView.getSelectionModel().getSelectedIndex();
        if (selectedIdx < 0) {
            removeProgramButton.setDisable(true);
            moveItemUpButton.setDisable(true);
            moveItemDownButton.setDisable(true);
            return;
        }

        DockItem item = appServices.dockService().getItems().get(selectedIdx);
        removeProgramButton.setDisable(item instanceof DockSettingsItemModel);
        moveItemUpButton.setDisable(selectedIdx == 0);
        moveItemDownButton.setDisable(selectedIdx == listItems.size() - 1);
    }

    private void addDockItemsToListView(List<DockItem> dockItems) {
        listItems.clear();

        for (DockItem item : dockItems) {
            String label = appServices.localizationService().dockItemLabel(item);
            listItems.add(label);
            Logger.info("[Initializing][listView] Adding item to ListView: " + label);
        }

        listView.setItems(listItems);
        updateListViewHeight();
    }

    private void updateListViewHeight() {
        int visibleRows = Math.max(1, listItems.size());
        double contentHeight = visibleRows * listView.getFixedCellSize() + 2;
        double boundedHeight = Math.min(contentHeight, LIST_VIEW_MAX_HEIGHT);

        listView.setMinHeight(boundedHeight);
        listView.setPrefHeight(boundedHeight);
        listView.setMaxHeight(LIST_VIEW_MAX_HEIGHT);
    }

    @FXML
    private void openAddWindowsModuleWindow() {
        try {
            Stage currentStage = (Stage) listView.getScene().getWindow();

            FXMLLoader loader = new FXMLLoader(App.class.getResource("fxml/AddWindowsModulesModalView.fxml"));
            Parent root = loader.load();

            AddWindowsModulesModalController addWindowsModulesModalController = loader.getController();
            addWindowsModulesModalController.setAppServices(appServices);
            addWindowsModulesModalController.setDockRefreshAction(dockRefreshAction);
            addWindowsModulesModalController.setPositioningModeChangeAction(positioningModeChangeAction);
            addWindowsModulesModalController.handleInitialization();

            Stage stage = new Stage();
            stage.setTitle(text("windowsModule.modal.title"));
            setStageIcon(stage);
            stage.setScene(new Scene(root));
            stage.show();

            currentStage.close();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    @FXML
    private void handleAddProgram() {
        FileChooser fileChooser = new FileChooser();
        fileChooser.setTitle(text("dialog.fileChooser.executableTitle"));
        fileChooser.getExtensionFilters().add(
                new FileChooser.ExtensionFilter(text("dialog.fileChooser.executableFilter"), "*.exe")
        );

        File file = fileChooser.showOpenDialog(null);
        if (file != null) {
            ProgramSelectionResolver.ResolvedProgramSelection selection =
                    ProgramSelectionResolver.resolve(Path.of(file.getAbsolutePath()));
            String selectedExePath = selection.executablePath();
            String selectedExeName = selection.label();

            appServices.iconGateway().cacheProgramIcon(selectedExePath);
            DockItem newItem = new DockProgramItemModel(selectedExeName, selectedExePath);
            appServices.dockService().addItem(newItem);
            Logger.info("[listView] Program added: " + selectedExeName);
        }

        addDockItemsToListView(appServices.dockService().getItems());
        dockRefreshAction.run();
    }

    @FXML
    private void handleAddFolder() {
        DirectoryChooser directoryChooser = new DirectoryChooser();
        directoryChooser.setTitle(text("dialog.directoryChooser.title"));

        Stage owner = (Stage) listView.getScene().getWindow();
        File selectedFolder = directoryChooser.showDialog(owner);
        if (selectedFolder == null || !selectedFolder.isDirectory()) {
            return;
        }

        String folderPath = selectedFolder.getAbsolutePath();
        String folderName = selectedFolder.getName();
        String label = (folderName == null || folderName.isBlank()) ? folderPath : folderName;

        appServices.iconGateway().cacheFolderIcon(folderPath);
        DockItem newItem = new DockFolderItemModel(label, folderPath);
        appServices.dockService().addItem(newItem);
        Logger.info("[listView] Folder added: " + label);

        addDockItemsToListView(appServices.dockService().getItems());
        dockRefreshAction.run();
    }

    @FXML
    private void handleRemoveProgram() {
        int selectedIdx = listView.getSelectionModel().getSelectedIndex();
        Logger.info("[listView] Removing item on index: " + selectedIdx);

        appServices.dockService().removeItem(selectedIdx);
        addDockItemsToListView(appServices.dockService().getItems());
        dockRefreshAction.run();
    }

    @FXML
    private void handleMoveItem(ActionEvent event) {
        int selectedIdx = listView.getSelectionModel().getSelectedIndex();
        if (selectedIdx < 0) {
            return;
        }

        int newSelectedIdx = selectedIdx;
        if (event.getSource() == moveItemUpButton) {
            if (selectedIdx == 0) {
                return;
            }
            Logger.info("[listView] moving item up");
            Collections.swap(listItems, selectedIdx, selectedIdx - 1);
            appServices.dockService().swapItems(selectedIdx, selectedIdx - 1);
            newSelectedIdx = selectedIdx - 1;
        } else {
            if (selectedIdx >= listItems.size() - 1) {
                return;
            }
            Logger.info("[listView] moving item down");
            Collections.swap(listItems, selectedIdx, selectedIdx + 1);
            appServices.dockService().swapItems(selectedIdx, selectedIdx + 1);
            newSelectedIdx = selectedIdx + 1;
        }

        addDockItemsToListView(appServices.dockService().getItems());
        listView.getSelectionModel().select(newSelectedIdx);
        handleListViewItemSelection();
        dockRefreshAction.run();
    }

    private void handleSetIconSizeSlider(int value) {
        appServices.appearanceService().setIconsSize(value);
        dockRefreshAction.run();
    }

    private void handleSetIconsSpacingSlider(int value) {
        appServices.appearanceService().setSpacingBetweenIcons(value);
        dockRefreshAction.run();
    }

    private void handleSetDockTransparencySlider(int value) {
        appServices.appearanceService().setDockTransparencyPercentage(value);
        dockRefreshAction.run();
    }

    private void handleSetDockBorderRoundingSlider(int value) {
        appServices.appearanceService().setDockBorderRounding(value);
        dockRefreshAction.run();
    }

    @FXML
    private void handleSetDockColor() {
        String rgbaColor = String.valueOf(dockColorPicker.getValue());
        String rgbColor = ColorManipulation.fromRGBAtoRGB(rgbaColor);

        appServices.appearanceService().setDockColorRGB(rgbColor);
        dockRefreshAction.run();
    }

    public void setAppServices(AppServices appServices) {
        this.appServices = appServices;
    }

    public void setDockRefreshAction(Runnable dockRefreshAction) {
        this.dockRefreshAction = dockRefreshAction;
    }

    public void setPositioningModeChangeAction(Consumer<DockPositioningMode> positioningModeChangeAction) {
        this.positioningModeChangeAction = positioningModeChangeAction;
    }

    @FXML
    private void openAknowledgementsWindow() {
        try {
            FXMLLoader loader = new FXMLLoader(App.class.getResource("fxml/AcknowledgementsModalView.fxml"));
            Parent root = loader.load();

            AcknowledgementsModalController controller = loader.getController();
            controller.setAppServices(appServices);
            controller.handleInitialization();

            Stage stage = new Stage();
            stage.setTitle(text("acknowledgements.window.title"));
            setStageIcon(stage);
            stage.setScene(new Scene(root));
            stage.show();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    private void handleLocalizationChanged() {
        applyLocalizedTexts();
        addDockItemsToListView(appServices.dockService().getItems());
        handleListViewItemSelection();
    }

    private void applyLocalizedTexts() {
        if (appServices == null) {
            return;
        }

        suppressionEnabled = true;
        languageChoiceBox.setItems(FXCollections.observableArrayList(SupportedLanguage.values()));
        languageChoiceBox.setValue(appServices.localizationService().getCurrentLanguage());
        verticalPositionChoiceBox.setItems(FXCollections.observableArrayList(DockVerticalAnchor.values()));
        verticalPositionChoiceBox.setValue(appServices.positioningService().getVerticalAnchor());
        horizontalPositionChoiceBox.setItems(FXCollections.observableArrayList(DockHorizontalAnchor.values()));
        horizontalPositionChoiceBox.setValue(appServices.positioningService().getHorizontalAnchor());
        suppressionEnabled = false;

        mainTitleLabel.setText(text("settings.page.title"));
        mainSubtitleLabel.setText(text("settings.page.subtitle"));
        languageLabel.setText(text("settings.language.label"));

        iconsTab.setText(text("settings.tab.icons"));
        iconsCustomizationTab.setText(text("settings.tab.iconsCustomization"));
        dockCustomizationTab.setText(text("settings.tab.dockCustomization"));
        dockPositioningTab.setText(text("settings.tab.dockPositioning"));
        generalTab.setText(text("settings.tab.general"));

        dockItemsTitleLabel.setText(text("settings.icons.items.title"));
        dockItemsHelperLabel.setText(text("settings.icons.items.helper"));
        actionsTitleLabel.setText(text("settings.icons.actions.title"));
        actionsHelperLabel.setText(text("settings.icons.actions.helper"));
        moveItemUpButton.setText(text("settings.icons.moveUp"));
        moveItemDownButton.setText(text("settings.icons.moveDown"));
        addProgramButton.setText(text("settings.icons.addProgram"));
        addFolderButton.setText(text("settings.icons.addFolder"));
        addWindowsModuleButton.setText(text("settings.icons.addWindowsModule"));
        removeProgramButton.setText(text("settings.icons.removeSelected"));

        iconsSizeTitleLabel.setText(text("settings.iconsCustomization.size.title"));
        iconsSizeHelperLabel.setText(text("settings.iconsCustomization.size.helper"));
        spacingTitleLabel.setText(text("settings.iconsCustomization.spacing.title"));
        spacingHelperLabel.setText(text("settings.iconsCustomization.spacing.helper"));

        transparencyTitleLabel.setText(text("settings.dockCustomization.transparency.title"));
        transparencyHelperLabel.setText(text("settings.dockCustomization.transparency.helper"));
        roundingTitleLabel.setText(text("settings.dockCustomization.rounding.title"));
        roundingHelperLabel.setText(text("settings.dockCustomization.rounding.helper"));
        backgroundColorTitleLabel.setText(text("settings.dockCustomization.background.title"));
        backgroundColorHelperLabel.setText(text("settings.dockCustomization.background.helper"));

        positioningModeTitleLabel.setText(text("settings.positioning.mode.title"));
        positioningModeHelperLabel.setText(text("settings.positioning.mode.helper"));
        staticPositioningRadio.setText(text("settings.positioning.mode.static"));
        dynamicPositioningRadio.setText(text("settings.positioning.mode.dynamic"));
        alignmentTitleLabel.setText(text("settings.positioning.alignment.title"));
        verticalLabel.setText(text("settings.positioning.alignment.vertical"));
        horizontalLabel.setText(text("settings.positioning.alignment.horizontal"));
        screenSpacingTitleLabel.setText(text("settings.positioning.spacing.title"));
        topSpacingLabel.setText(text("settings.positioning.spacing.top"));
        leftSpacingLabel.setText(text("settings.positioning.spacing.left"));
        rightSpacingLabel.setText(text("settings.positioning.spacing.right"));
        bottomSpacingLabel.setText(text("settings.positioning.spacing.down"));
        dynamicPositioningTitleLabel.setText(text("settings.positioning.dynamic.title"));
        dynamicPositioningHelperLabel.setText(text("settings.positioning.dynamic.helper"));

        versionLabel.setText(text("settings.general.version"));
        repositoryLabel.setText(text("settings.general.repository"));
        contactLabel.setText(text("settings.general.contact"));
        openSourceLabel.setText(text("settings.general.openSource"));
        acknowledgementsButton.setText(text("settings.general.acknowledgements"));

        updateWindowTitle();
    }

    private void updateWindowTitle() {
        if (listView.getScene() != null && listView.getScene().getWindow() instanceof Stage stage && appServices != null) {
            stage.setTitle(text("settings.window.title"));
        }
    }

    private String verticalAnchorText(DockVerticalAnchor verticalAnchor) {
        return switch (verticalAnchor) {
            case TOP -> text("settings.positioning.choice.top");
            case MIDDLE -> text("settings.positioning.choice.middle");
            case DOWN -> text("settings.positioning.choice.down");
        };
    }

    private String horizontalAnchorText(DockHorizontalAnchor horizontalAnchor) {
        return switch (horizontalAnchor) {
            case LEFT -> text("settings.positioning.choice.left");
            case MIDDLE -> text("settings.positioning.choice.middle");
            case RIGHT -> text("settings.positioning.choice.right");
        };
    }

    private String text(String key) {
        return appServices.localizationService().text(key);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/DockRepository.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

import com.github.arthurdeka.cedromoderndock.model.DockModel;

public interface DockRepository {
    DockModel load();

    void save(DockModel model);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/FolderLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

public interface FolderLauncher {
    void launch(String folderPath, String label);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/IconGateway.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

import java.nio.file.Path;

public interface IconGateway {
    Path resolveProgramIcon(String executablePath);
    Path resolveFolderIcon(String folderPath);

    void cacheProgramIcon(String executablePath);
    void cacheFolderIcon(String folderPath);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/ProgramLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

public interface ProgramLauncher {
    void launch(String executablePath, String label);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowQueryGateway.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

import com.github.arthurdeka.cedromoderndock.util.NativeWindowUtils;

import java.util.List;

public interface WindowQueryGateway {
    List<NativeWindowUtils.WindowInfo> findOpenWindows(String executablePath);

    void activate(NativeWindowUtils.WindowInfo windowInfo);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowsModuleLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.domain;

public interface WindowsModuleLauncher {
    void launch(String module, String label);
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepository.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.persistence;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.github.arthurdeka.cedromoderndock.domain.DockRepository;
import com.github.arthurdeka.cedromoderndock.model.DockModel;
import com.github.arthurdeka.cedromoderndock.util.Logger;

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;

public final class JsonDockRepository implements DockRepository {
    private static final String CONFIG_FILE_NAME = "config.json";
    private final Path configFilePath;
    private final ObjectMapper mapper;

    public JsonDockRepository() {
        this(getDefaultConfigPath());
    }

    public JsonDockRepository(Path configFilePath) {
        this.configFilePath = configFilePath;
        this.mapper = createObjectMapper();
    }

    private static Path getDefaultConfigPath() {
        String appDataPath = System.getenv("APPDATA");
        if (appDataPath == null || appDataPath.isEmpty()) {
            appDataPath = System.getProperty("user.home");
        }

        Path configDir = Paths.get(appDataPath, "CedroModernDock");
        File dir = configDir.toFile();
        if (!dir.exists()) {
            dir.mkdirs();
        }

        return configDir.resolve(CONFIG_FILE_NAME);
    }

    private static ObjectMapper createObjectMapper() {
        ObjectMapper objectMapper = new ObjectMapper();
        objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
        objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
        return objectMapper;
    }

    @Override
    public void save(DockModel model) {
        try {
            mapper.writeValue(configFilePath.toFile(), model);
        } catch (IOException e) {
            Logger.error("Error saving the DockModel: " + e.getMessage());
            e.printStackTrace();
        }
    }

    @Override
    public DockModel load() {
        File configFile = configFilePath.toFile();
        if (configFile.exists() && configFile.length() > 0) {
            try {
                DockModel model = mapper.readValue(configFile, DockModel.class);
                Logger.info("[JsonDockRepository] Dock config.json loaded successfully from: " + configFilePath);
                return model;
            } catch (IOException e) {
                Logger.error("Error reading config.json, creating a new default config file: " + e.getMessage());
                return createAndSaveDefault();
            }
        }

        Logger.error("config.json not found or is empty. Creating a new default config file at: " + configFilePath);
        return createAndSaveDefault();
    }

    private DockModel createAndSaveDefault() {
        DockModel model = new DockModel();
        model.loadDefaultItems();
        save(model);
        return model;
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/CachedWindowsIconGateway.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;

import com.github.arthurdeka.cedromoderndock.domain.IconGateway;
import com.github.arthurdeka.cedromoderndock.util.WindowsIconHandler;

import java.nio.file.Path;

public class CachedWindowsIconGateway implements IconGateway {
    @Override
    public Path resolveProgramIcon(String executablePath) {
        return WindowsIconHandler.getCachedIconPath(executablePath);
    }

    @Override
    public Path resolveFolderIcon(String folderPath) {
        return WindowsIconHandler.getCachedFolderIconPath(folderPath);
    }

    @Override
    public void cacheProgramIcon(String executablePath) {
        WindowsIconHandler.extractAndCacheIcon(executablePath);
    }

    @Override
    public void cacheFolderIcon(String folderPath) {
        WindowsIconHandler.extractAndCacheFolderIcon(folderPath);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultFolderLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;

import com.github.arthurdeka.cedromoderndock.domain.FolderLauncher;
import com.github.arthurdeka.cedromoderndock.util.Logger;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

public class DefaultFolderLauncher implements FolderLauncher {
    @Override
    public void launch(String folderPath, String label) {
        Logger.info(label + " Clicked");

        if (folderPath == null || folderPath.trim().isEmpty()) {
            Logger.error("Folder path not defined for: " + label);
            return;
        }

        Path path = Path.of(folderPath);
        if (!Files.isDirectory(path)) {
            Logger.error("Folder path is invalid: " + folderPath);
            return;
        }

        try {
            new ProcessBuilder("explorer.exe", folderPath).start();
            Logger.info("Opening folder: " + label);
        } catch (IOException e) {
            Logger.error("Failed to open folder: " + label);
            Logger.error("Path: " + folderPath);
            Logger.error("Error: " + e.getMessage());
        }
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;

import com.github.arthurdeka.cedromoderndock.domain.ProgramLauncher;
import com.github.arthurdeka.cedromoderndock.util.Logger;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Locale;

public class DefaultProgramLauncher implements ProgramLauncher {
    @Override
    public void launch(String executablePath, String label) {
        Logger.info(label + " Clicked");

        if (executablePath == null || executablePath.trim().isEmpty()) {
            Logger.error("Executable path not defined for: " + label);
            return;
        }

        try {
            executeAndHandleElevation(executablePath, label);
        } catch (IOException e) {
            Logger.error("Failed to open: " + label);
            Logger.error("Path: " + executablePath);
            Logger.error("Error: " + e.getMessage());
        } catch (InterruptedException e) {
            Logger.error("Process interrupted: " + e.getMessage());
            throw new RuntimeException(e);
        }
    }

    private void executeAndHandleElevation(String path, String label) throws IOException, InterruptedException {
        LaunchCommand launchCommand = resolveLaunchCommand(path);
        try {
            new ProcessBuilder(launchCommand.toCommandLine()).start();
            Logger.info("Executing: " + label);
        } catch (IOException e) {
            if (e.getMessage() != null && e.getMessage().contains("error=740")) {
                Logger.info("Standard execution failed. Requesting elevation...");
                String command = buildElevationCommand(launchCommand);
                new ProcessBuilder("powershell.exe", "-Command", command).start();
                Logger.info("(Elevated) Executing: " + label);
            } else {
                Logger.error("Error trying to execute program");
                throw e;
            }
        }
    }

    static LaunchCommand resolveLaunchCommand(String executablePath) {
        Path normalizedPath = Path.of(executablePath).toAbsolutePath().normalize();
        if (isDiscordExecutable(normalizedPath)) {
            Path installDirectory = normalizedPath.getParent() == null ? null : normalizedPath.getParent().getParent();
            if (installDirectory != null) {
                Path updateExecutable = installDirectory.resolve("Update.exe");
                if (Files.isRegularFile(updateExecutable)) {
                    return new LaunchCommand(
                            updateExecutable.toString(),
                            List.of("--processStart", normalizedPath.getFileName().toString())
                    );
                }
            }
        }

        return new LaunchCommand(normalizedPath.toString(), List.of());
    }

    private static boolean isDiscordExecutable(Path executablePath) {
        Path fileName = executablePath.getFileName();
        Path versionDirectory = executablePath.getParent();
        Path installDirectory = versionDirectory == null ? null : versionDirectory.getParent();
        if (fileName == null || versionDirectory == null || installDirectory == null) {
            return false;
        }

        return fileName.toString().equalsIgnoreCase("Discord.exe")
                && versionDirectory.getFileName() != null
                && versionDirectory.getFileName().toString().toLowerCase(Locale.ROOT).startsWith("app-")
                && installDirectory.getFileName() != null
                && installDirectory.getFileName().toString().equalsIgnoreCase("Discord");
    }

    private static String buildElevationCommand(LaunchCommand launchCommand) {
        String escapedFilePath = escapePowerShellArgument(launchCommand.executablePath());
        if (launchCommand.arguments().isEmpty()) {
            return "Start-Process -FilePath '" + escapedFilePath + "' -Verb RunAs";
        }

        String escapedArguments = launchCommand.arguments().stream()
                .map(DefaultProgramLauncher::escapePowerShellArgument)
                .map(argument -> "'" + argument + "'")
                .reduce((first, second) -> first + ", " + second)
                .orElse("");

        return "Start-Process -FilePath '" + escapedFilePath + "' -ArgumentList " + escapedArguments + " -Verb RunAs";
    }

    private static String escapePowerShellArgument(String argument) {
        return argument.replace("'", "''");
    }

    record LaunchCommand(String executablePath, List<String> arguments) {
        List<String> toCommandLine() {
            if (arguments.isEmpty()) {
                return List.of(executablePath);
            }

            java.util.ArrayList<String> command = new java.util.ArrayList<>();
            command.add(executablePath);
            command.addAll(arguments);
            return command;
        }
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultWindowsModuleLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;

import com.github.arthurdeka.cedromoderndock.domain.WindowsModuleLauncher;
import com.github.arthurdeka.cedromoderndock.util.Logger;

import java.io.IOException;
import java.util.Objects;

public class DefaultWindowsModuleLauncher implements WindowsModuleLauncher {
    @Override
    public void launch(String module, String label) {
        try {
            if (Objects.equals(module, "mypc")) {
                new ProcessBuilder("explorer.exe", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}").start();
            } else if (Objects.equals(module, "trash")) {
                new ProcessBuilder("explorer.exe", "::{645FF040-5081-101B-9F08-00AA002F954E}").start();
            } else if (Objects.equals(module, "ctrlpnl")) {
                new ProcessBuilder("control.exe").start();
            } else if (Objects.equals(module, "pconfig")) {
                new ProcessBuilder("cmd", "/c", "start", "ms-settings:").start();
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }

        Logger.info(label + " Clicked");
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/JnaWindowQueryGateway.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;

import com.github.arthurdeka.cedromoderndock.domain.WindowQueryGateway;
import com.github.arthurdeka.cedromoderndock.util.NativeWindowUtils;

import java.util.List;

public class JnaWindowQueryGateway implements WindowQueryGateway {
    @Override
    public List<NativeWindowUtils.WindowInfo> findOpenWindows(String executablePath) {
        return NativeWindowUtils.getOpenWindows(executablePath);
    }

    @Override
    public void activate(NativeWindowUtils.WindowInfo windowInfo) {
        NativeWindowUtils.activateWindow(windowInfo.hwnd());
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockFolderItemModel.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.NoArgsConstructor;

@NoArgsConstructor
public class DockFolderItemModel implements DockItem {

    private String label = "";
    private String folderPath = "";

    public DockFolderItemModel(String label, String folderPath) {
        this.label = label;
        this.folderPath = folderPath;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getPath() {
        return folderPath;
    }

    @JsonIgnore
    public String getFolderPath() {
        return folderPath;
    }

    @Override
    public DockItemType getType() {
        return DockItemType.FOLDER;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public void setPath(String path) {
        this.folderPath = path;
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockHorizontalAnchor.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

public enum DockHorizontalAnchor {
    LEFT,
    MIDDLE,
    RIGHT
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItem.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;

/*
* Those annotations are needed for the Serialization Library (Jackson) to work properly
* */
@JsonTypeInfo(
        use = JsonTypeInfo.Id.NAME,
        include = JsonTypeInfo.As.PROPERTY,
        property = "@type"
)
@JsonSubTypes({
        @JsonSubTypes.Type(value = DockProgramItemModel.class, name = "programItem"),
        @JsonSubTypes.Type(value = DockFolderItemModel.class, name = "folderItem"),
        @JsonSubTypes.Type(value = DockWindowsModuleItemModel.class, name = "windowsModuleItem"),
        @JsonSubTypes.Type(value = DockSettingsItemModel.class, name = "settingsItem")
})
public interface DockItem {

    String getLabel();
    String getPath();
    @JsonIgnore
    DockItemType getType();

    void setLabel(String label);
    void setPath(String path);

}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItemType.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

public enum DockItemType {
    PROGRAM,
    FOLDER,
    WINDOWS_MODULE,
    SETTINGS
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockModel.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import com.github.arthurdeka.cedromoderndock.application.SupportedLanguage;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class DockModel {

    @Getter
    private List<DockItem> items = new ArrayList<>();
    private int iconsSize = 24;
    private int spacingBetweenIcons = 0;
    private double dockTransparency = 0.3;
    @Setter
    @Getter
    private int dockBorderRounding = 10;
    @Setter
    @Getter
    private String dockColorRGB = "0, 0, 0, ";
    @Getter
    private double dockPositionX;
    @Getter
    private double dockPositionY;
    @Getter
    @Setter
    private DockPositioningMode positioningMode = DockPositioningMode.STATIC;
    @Getter
    @Setter
    private DockVerticalAnchor verticalAnchor = DockVerticalAnchor.TOP;
    @Getter
    @Setter
    private DockHorizontalAnchor horizontalAnchor = DockHorizontalAnchor.MIDDLE;
    @Getter
    @Setter
    private int topSpacing = 20;
    @Getter
    @Setter
    private int leftSpacing = 20;
    @Getter
    @Setter
    private int rightSpacing = 20;
    @Getter
    @Setter
    private int bottomSpacing = 20;
    @Getter
    @Setter
    private SupportedLanguage language = SupportedLanguage.EN_US;

    public void addItem(DockItem item) {
        items.add(item);

    }

    public void removeItem(int index) {
        items.remove(index);

    }

    public void loadDefaultItems() {
        items.add(new DockSettingsItemModel());
    }

    public void swapItems(int firstItemIdx, int secondItemIdx) {
        Collections.swap(items, firstItemIdx, secondItemIdx);
    }

    public Integer getIconsSize() {
        return iconsSize;
    }

    public void setIconsSize(Integer iconsSize) {
        this.iconsSize = iconsSize;
    }

    public Integer getSpacingBetweenIcons() {
        return spacingBetweenIcons;
    }

    public void setSpacingBetweenIcons(Integer spacingBetweenIcons) {
        this.spacingBetweenIcons = spacingBetweenIcons;
    }

    public Double getDockTransparency() {
        return dockTransparency;
    }

    public void setDockTransparency(Double dockTransparency) {
        this.dockTransparency = dockTransparency;
    }

    public void setDockPosition(Double PositionX, Double PositionY) {
        this.dockPositionX = PositionX;
        this.dockPositionY = PositionY;
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockPositioningMode.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

public enum DockPositioningMode {
    STATIC,
    DYNAMIC
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockProgramItemModel.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.NoArgsConstructor;

@NoArgsConstructor
public class DockProgramItemModel implements DockItem {

    private String label = "";
    private String exePath = "";

    public DockProgramItemModel(String label, String exePath) {
        this.label = label;
        this.exePath = exePath;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getPath() {
        return exePath;
    }

    @JsonIgnore
    public String getExecutablePath() {
        return exePath;
    }

    @Override
    public DockItemType getType() {
        return DockItemType.PROGRAM;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public void setPath(String path) {
        this.exePath = path;
    }

}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockSettingsItemModel.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import lombok.NoArgsConstructor;

@NoArgsConstructor
public class DockSettingsItemModel implements DockItem{

    private String label = "Settings";
    private String iconPath = "/com/github/arthurdeka/cedromoderndock/icons/settings.png";


    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getPath() {
        return iconPath;
    }

    @Override
    public DockItemType getType() {
        return DockItemType.SETTINGS;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public void setPath(String path) {
        this.iconPath = path;
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockVerticalAnchor.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

public enum DockVerticalAnchor {
    TOP,
    MIDDLE,
    DOWN
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockWindowsModuleItemModel.java
================================================
package com.github.arthurdeka.cedromoderndock.model;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.Objects;

@NoArgsConstructor
public class DockWindowsModuleItemModel implements DockItem {

    private String label = "";
    private String iconPath = "";
    @Setter
    @Getter
    private String module = "";

    public DockWindowsModuleItemModel(String label, String module) {


        if (Objects.equals(module, "mypc")) {
            this.iconPath = "/com/github/arthurdeka/cedromoderndock/icons/my_computer.png";

        } else if (Objects.equals(module, "trash")) {
            this.iconPath = "/com/github/arthurdeka/cedromoderndock/icons/trash.png";

        } else if (Objects.equals(module, "ctrlpnl")) {
            this.iconPath = "/com/github/arthurdeka/cedromoderndock/icons/control.png";

        } else if (Objects.equals(module, "pconfig")) {
            this.iconPath = "/com/github/arthurdeka/cedromoderndock/icons/windows_settings.png";

        }

        this.label = label;
        this.module = module;
    }

    @Override
    public String getLabel() {
        return label;
    }

    @Override
    public String getPath() {
        return iconPath;
    }

    @Override
    public DockItemType getType() {
        return DockItemType.WINDOWS_MODULE;
    }

    @Override
    public void setLabel(String label) {
        this.label = label;
    }

    @Override
    public void setPath(String path) {
        this.iconPath = path;
    }

}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/ColorManipulation.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import javafx.scene.paint.Color;

public class ColorManipulation {

    /*
    * This class exists to translate colors between the formats 0xAARRGGBB and RGB
    * Why? Because to apply the dock color, we use the RGB format
    * However, to get and set the color on the JavaFX ColorPicker, it will only accept 0xAARRGGBB
    *
    * if you know any better way to do this, I'm all ears
    *
    * */

    public static String fromRGBAtoRGB(String RGBAColor) {
        Color color = Color.web(RGBAColor);

        int red = (int) (color.getRed() * 255);
        int green = (int) (color.getGreen() * 255);
        int blue = (int) (color.getBlue() * 255);

        String RGBcolor = red + ", " + green + ", " + blue + ", ";

        return RGBcolor;
    }

    public static Color fromRGBtoRGBA(String RGBColor) {
        // the expected format is String RGBColor = "255, 255, 255, "

        //removing , and extra spaces
        String[] rgbValues = RGBColor.trim().split(",\\s*");

        int red = Integer.parseInt(rgbValues[0]);
        int green = Integer.parseInt(rgbValues[1]);
        int blue = Integer.parseInt(rgbValues[2]);

        // alpha is always 100%
        int alpha = 255;

        Color color = Color.rgb(red, green, blue);

        return color;
    }

}



================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/Logger.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Final utility class for application logging.
 * Provides static methods for informational and error logs.
 */
public final class Logger {

    private static final String LOG_FILE_NAME = "log.txt";
    private static final Path LOG_FILE_PATH = getLogFilePath();
    private static final DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    // Private constructor to prevent this utility class from being instantiated.
    private Logger() {
    }

    /**
     * Determines the absolute path for the log file in the user's
     * AppData/Roaming directory.
     * @return The absolute Path to the log file.
     */
    private static Path getLogFilePath() {
        // Get the AppData\Roaming folder path (standard for user-specific data, same for config.json file)
        String appDataPath = System.getenv("APPDATA");
        if (appDataPath == null || appDataPath.isEmpty()) {
            // Fallback to user home directory if APPDATA is not available
            appDataPath = System.getProperty("user.home");
        }

        // Create a dedicated directory for our application to keep things clean
        Path configDir = Paths.get(appDataPath, "CedroModernDock");

        // Ensure the directory exists
        File dir = configDir.toFile();
        if (!dir.exists()) {
            dir.mkdirs();
        }

        // Return the full path to our log file
        return configDir.resolve(LOG_FILE_NAME);
    }

    /**
     * Logs an informational message to the console.
     * The format includes the [INFO] log level.
     */
    public static void info(String message) {
        System.out.println("[INFO] - " + message);
    }

    /**
     * Logs an error message to a log file (log.txt).
     * Messages are appended to the end of the file.
     */
    public static void error(String message) {
        String timestamp = dtf.format(LocalDateTime.now());
        String logMessage = String.format("[%s] [ERROR] %s", timestamp, message);

        // Prints a notification to the console that an error has been logged.
        System.err.println(logMessage + " | Check " + LOG_FILE_PATH + " for more details.");

        try (FileWriter fw = new FileWriter(LOG_FILE_PATH.toFile(), true);
             BufferedWriter bw = new BufferedWriter(fw);
             PrintWriter out = new PrintWriter(bw)) {

            out.println(logMessage);
            out.println("----------------------------------------------------");

        } catch (IOException e) {
            System.err.println("CRITICAL ERROR: Could not write to the log file.");
            e.printStackTrace();
        }
    }
}

================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/NativeWindowUtils.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HWND;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.ptr.IntByReference;

import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

public class NativeWindowUtils {

    // Minimal info required by the popup to activate and label a window.
    public record WindowInfo(HWND hwnd, String title) {}

    public static List<WindowInfo> getOpenWindows(String executablePath) {
        List<WindowInfo> windows = new ArrayList<>();
        if (executablePath == null || executablePath.isEmpty()) {
            return windows;
        }

        // Normalize the target executable path so comparisons are stable.
        final Path targetPath = Paths.get(executablePath).toAbsolutePath().normalize();

        User32.INSTANCE.EnumWindows((hWnd, arg1) -> {
            if (User32.INSTANCE.IsWindowVisible(hWnd)) {
                char[] buffer = new char[1024];
                User32.INSTANCE.GetWindowText(hWnd, buffer, 1024);
                String title = new String(buffer).trim();

                // Skip windows without title or hidden ones (some invisible windows report visible but have empty title/rect).
                if (title.isEmpty()) {
                    return true;
                }

                // Keep only windows belonging to the executable path requested.
                if (isWindowFromExecutable(hWnd, targetPath)) {
                    windows.add(new WindowInfo(hWnd, title));
                }
            }
            return true;
        }, null);

        return windows;
    }

    private static boolean isWindowFromExecutable(HWND hWnd, Path targetPath) {
        IntByReference pidRef = new IntByReference();
        User32.INSTANCE.GetWindowThreadProcessId(hWnd, pidRef);
        int pid = pidRef.getValue();

        // Query the process image path to match it against the target executable.
        WinNT.HANDLE process = Kernel32.INSTANCE.OpenProcess(
                WinNT.PROCESS_QUERY_LIMITED_INFORMATION,
                false,
                pid
        );

        if (process != null) {
            try {
                char[] pathBuffer = new char[1024];
                IntByReference size = new IntByReference(pathBuffer.length);
                if (Kernel32.INSTANCE.QueryFullProcessImageName(process, 0, pathBuffer, size)) {
                    String processPathStr = new String(pathBuffer, 0, size.getValue());
                    Path processPath = Paths.get(processPathStr).toAbsolutePath().normalize();
                    // Prefer full path match, but fall back to filename match for edge cases.
                    if (isSameExecutable(processPath, targetPath)) {
                        return true;
                    }
                }
            } finally {
                Kernel32.INSTANCE.CloseHandle(process);
            }
        }
        return false;
    }

    private static boolean isSameExecutable(Path processPath, Path targetPath) {
        if (processPath == null || targetPath == null) {
            return false;
        }

        // Exact path match.
        if (processPath.equals(targetPath)) {
            return true;
        }

        // Case-insensitive path match (Windows path comparisons).
        String processStr = normalizePathString(processPath);
        String targetStr = normalizePathString(targetPath);
        if (processStr.equalsIgnoreCase(targetStr)) {
            return true;
        }

        // Fallback: match only the filename when the full path is not comparable.
        Path processFile = processPath.getFileName();
        Path targetFile = targetPath.getFileName();
        if (processFile != null && targetFile != null) {
            return processFile.toString().equalsIgnoreCase(targetFile.toString());
        }

        return false;
    }

    private static String normalizePathString(Path path) {
        String value = path.toString();
        // Strip Windows extended-length path prefix if present.
        if (value.startsWith("\\\\?\\")) {
            value = value.substring(4);
        }
        return value;
    }

    public static void activateWindow(HWND hwnd) {
        if (hwnd == null) return;

        // Restore window if minimized
        User32.INSTANCE.ShowWindow(hwnd, User32.SW_RESTORE);

        // Bring to front
        User32.INSTANCE.SetForegroundWindow(hwnd);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SaveAndLoadDockSettings.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import com.github.arthurdeka.cedromoderndock.domain.DockRepository;
import com.github.arthurdeka.cedromoderndock.infrastructure.persistence.JsonDockRepository;
import com.github.arthurdeka.cedromoderndock.model.DockModel;

/**
 * Utility class used to save and load the Dock's settings
 */
public final class SaveAndLoadDockSettings {
    private static final DockRepository REPOSITORY = new JsonDockRepository();

    private SaveAndLoadDockSettings() {}

    /**
     * saves the DockModel object in the config file (config.json).
     * @param model DockModel object to be saved.
     */
    public static void save(DockModel model) {
        REPOSITORY.save(model);
    }

    /**
     * This method loads the currennt config.json file and returns a DockModel.
     * If the file is corrupted or does not exist, a new one with only a DockSettings item is created and returned
     *
     * @return A DockModel instance, always valid (loaded or default).
     */
    public static DockModel load() {
        return REPOSITORY.load();
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SettingsWindowLauncher.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import com.github.arthurdeka.cedromoderndock.App;
import com.github.arthurdeka.cedromoderndock.application.AppServices;
import com.github.arthurdeka.cedromoderndock.controller.SettingsController;
import com.github.arthurdeka.cedromoderndock.model.DockPositioningMode;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.util.function.Consumer;

import static com.github.arthurdeka.cedromoderndock.util.UIUtils.setStageIcon;

public final class SettingsWindowLauncher {
    private SettingsWindowLauncher() {
    }

    public static void open(
            AppServices appServices,
            Runnable dockRefreshAction,
            Consumer<DockPositioningMode> positioningModeChangeAction
    ) {
        try {
            FXMLLoader loader = new FXMLLoader(App.class.getResource("fxml/DockSettingsView.fxml"));
            Parent root = loader.load();

            SettingsController settingsController = loader.getController();
            settingsController.setAppServices(appServices);
            settingsController.setDockRefreshAction(dockRefreshAction);
            settingsController.setPositioningModeChangeAction(positioningModeChangeAction);
            settingsController.handleInitialization();

            Stage stage = new Stage();
            stage.setTitle(appServices.localizationService().text("settings.window.title"));
            setStageIcon(stage);
            stage.setScene(new Scene(root));
            stage.show();
            stage.setMinHeight(stage.getHeight());
            stage.setMaxHeight(stage.getHeight());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuard.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.nio.channels.OverlappingFileLockException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;

public final class SingleInstanceGuard implements AutoCloseable {
    private static final String LOCK_FILE_NAME = "app.lock";

    private final Path lockFilePath;
    private FileChannel channel;
    private FileLock lock;

    public SingleInstanceGuard() {
        this(getDefaultLockPath());
    }

    public SingleInstanceGuard(Path lockFilePath) {
        this.lockFilePath = lockFilePath;
    }

    public boolean tryAcquire() {
        try {
            Path parent = lockFilePath.getParent();
            if (parent != null) {
                Files.createDirectories(parent);
            }

            channel = FileChannel.open(
                    lockFilePath,
                    StandardOpenOption.CREATE,
                    StandardOpenOption.WRITE
            );
            lock = channel.tryLock();
            return lock != null;
        } catch (IOException e) {
            Logger.error("Failed to acquire single-instance lock: " + e.getMessage());
            closeQuietly();
            return false;
        } catch (OverlappingFileLockException e) {
            closeQuietly();
            return false;
        }
    }

    @Override
    public void close() {
        closeQuietly();
    }

    private void closeQuietly() {
        try {
            if (lock != null && lock.isValid()) {
                lock.release();
            }
        } catch (IOException e) {
            Logger.error("Failed to release single-instance lock: " + e.getMessage());
        } finally {
            lock = null;
        }

        try {
            if (channel != null && channel.isOpen()) {
                channel.close();
            }
        } catch (IOException e) {
            Logger.error("Failed to close single-instance lock channel: " + e.getMessage());
        } finally {
            channel = null;
        }
    }

    private static Path getDefaultLockPath() {
        String appDataPath = System.getenv("APPDATA");
        if (appDataPath == null || appDataPath.isEmpty()) {
            appDataPath = System.getProperty("user.home");
        }

        return Paths.get(appDataPath, "CedroModernDock", LOCK_FILE_NAME);
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SystemTrayManager.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import com.github.arthurdeka.cedromoderndock.App;
import javafx.application.Platform;

import javax.imageio.ImageIO;
import java.awt.AWTException;
import java.awt.EventQueue;
import java.awt.Image;
import java.awt.MenuItem;
import java.awt.PopupMenu;
import java.awt.SystemTray;
import java.awt.TrayIcon;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.io.InputStream;

public final class SystemTrayManager {
    private final Runnable openSettingsAction;
    private final Runnable exitAction;
    private TrayIcon trayIcon;

    public SystemTrayManager(Runnable openSettingsAction, Runnable exitAction) {
        this.openSettingsAction = openSettingsAction;
        this.exitAction = exitAction;
    }

    public void install() {
        if (!SystemTray.isSupported()) {
            Logger.info("System tray is not supported on this system.");
            return;
        }

        EventQueue.invokeLater(() -> {
            if (trayIcon != null) {
                return;
            }

            try {
                TrayIcon createdTrayIcon = createTrayIcon();
                SystemTray.getSystemTray().add(createdTrayIcon);
                trayIcon = createdTrayIcon;
                Logger.info("System tray icon installed.");
            } catch (AWTException | IOException e) {
                Logger.error("Failed to install system tray icon: " + e.getMessage());
            }
        });
    }

    public void dispose() {
        EventQueue.invokeLater(() -> {
            if (trayIcon == null || !SystemTray.isSupported()) {
                return;
            }

            SystemTray.getSystemTray().remove(trayIcon);
            trayIcon = null;
            Logger.info("System tray icon removed.");
        });
    }

    private TrayIcon createTrayIcon() throws IOException {
        PopupMenu popupMenu = new PopupMenu();

        MenuItem openSettingsMenuItem = new MenuItem("Open Settings");
        openSettingsMenuItem.addActionListener(event -> Platform.runLater(openSettingsAction));
        popupMenu.add(openSettingsMenuItem);

        MenuItem exitMenuItem = new MenuItem("Exit");
        exitMenuItem.addActionListener(event -> Platform.runLater(exitAction));
        popupMenu.add(exitMenuItem);

        TrayIcon createdTrayIcon = new TrayIcon(loadTrayImage(), "Cedro Modern Dock", popupMenu);
        createdTrayIcon.setImageAutoSize(true);
        createdTrayIcon.addMouseListener(new MouseAdapter() {
            @Override
            public void mouseClicked(MouseEvent event) {
                if (event.getButton() == MouseEvent.BUTTON1 && event.getClickCount() == 1) {
                    Platform.runLater(openSettingsAction);
                }
            }
        });
        return createdTrayIcon;
    }

    private Image loadTrayImage() throws IOException {
        try (InputStream inputStream = App.class.getResourceAsStream(
                "/com/github/arthurdeka/cedromoderndock/icons/cedro/logo_32.png"
        )) {
            if (inputStream == null) {
                throw new IOException("Tray icon resource not found.");
            }
            return ImageIO.read(inputStream);
        }
    }
}


================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/UIUtils.java
================================================
package com.github.arthurdeka.cedromoderndock.util;

import com.github.arthurdeka.cedromoderndock.App;
import javafx.scene.image.Image;
import javafx.stage.Stage;

/**
 * Utility class to UI related operations
 */
public final class UIUtils {

    // Construtor privado para impedir a instanciação.
    private UIUtils() {}

    /**
     * Defines a standard app icon to a stage.
     * @param stage The stage which the icon will be applied to
     */
    public static void setStageIcon(Stage stage) {
        try {
            Image icon = new Image(App.class.getResourceAsStream("/com/github/arthurdeka/cedromoderndock/icons/cedro/logo_2
Download .txt
gitextract_8_0nq8pf/

├── .gitattributes
├── .github/
│   └── FUNDING.yml
├── .gitignore
├── .mvn/
│   └── wrapper/
│       └── maven-wrapper.properties
├── LICENSE
├── README.md
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src/
    ├── main/
    │   ├── java/
    │   │   ├── com/
    │   │   │   └── github/
    │   │   │       └── arthurdeka/
    │   │   │           └── cedromoderndock/
    │   │   │               ├── App.java
    │   │   │               ├── application/
    │   │   │               │   ├── AppServices.java
    │   │   │               │   ├── DockAppearanceService.java
    │   │   │               │   ├── DockItemActionService.java
    │   │   │               │   ├── DockPositioningService.java
    │   │   │               │   ├── DockService.java
    │   │   │               │   ├── DockTheme.java
    │   │   │               │   ├── LocalizationService.java
    │   │   │               │   ├── ProgramSelectionResolver.java
    │   │   │               │   ├── SupportedLanguage.java
    │   │   │               │   └── WindowPreviewService.java
    │   │   │               ├── controller/
    │   │   │               │   ├── AcknowledgementsModalController.java
    │   │   │               │   ├── AddWindowsModulesModalController.java
    │   │   │               │   ├── DockController.java
    │   │   │               │   └── SettingsController.java
    │   │   │               ├── domain/
    │   │   │               │   ├── DockRepository.java
    │   │   │               │   ├── FolderLauncher.java
    │   │   │               │   ├── IconGateway.java
    │   │   │               │   ├── ProgramLauncher.java
    │   │   │               │   ├── WindowQueryGateway.java
    │   │   │               │   └── WindowsModuleLauncher.java
    │   │   │               ├── infrastructure/
    │   │   │               │   ├── persistence/
    │   │   │               │   │   └── JsonDockRepository.java
    │   │   │               │   └── system/
    │   │   │               │       ├── CachedWindowsIconGateway.java
    │   │   │               │       ├── DefaultFolderLauncher.java
    │   │   │               │       ├── DefaultProgramLauncher.java
    │   │   │               │       ├── DefaultWindowsModuleLauncher.java
    │   │   │               │       └── JnaWindowQueryGateway.java
    │   │   │               ├── model/
    │   │   │               │   ├── DockFolderItemModel.java
    │   │   │               │   ├── DockHorizontalAnchor.java
    │   │   │               │   ├── DockItem.java
    │   │   │               │   ├── DockItemType.java
    │   │   │               │   ├── DockModel.java
    │   │   │               │   ├── DockPositioningMode.java
    │   │   │               │   ├── DockProgramItemModel.java
    │   │   │               │   ├── DockSettingsItemModel.java
    │   │   │               │   ├── DockVerticalAnchor.java
    │   │   │               │   └── DockWindowsModuleItemModel.java
    │   │   │               ├── util/
    │   │   │               │   ├── ColorManipulation.java
    │   │   │               │   ├── Logger.java
    │   │   │               │   ├── NativeWindowUtils.java
    │   │   │               │   ├── SaveAndLoadDockSettings.java
    │   │   │               │   ├── SettingsWindowLauncher.java
    │   │   │               │   ├── SingleInstanceGuard.java
    │   │   │               │   ├── SystemTrayManager.java
    │   │   │               │   ├── UIUtils.java
    │   │   │               │   └── WindowsIconHandler.java
    │   │   │               └── view/
    │   │   │                   └── WindowPreviewPopup.java
    │   │   └── module-info.java
    │   └── resources/
    │       └── com/
    │           └── github/
    │               └── arthurdeka/
    │                   └── cedromoderndock/
    │                       ├── css/
    │                       │   ├── dock.css
    │                       │   └── dockSettings.css
    │                       ├── fxml/
    │                       │   ├── AcknowledgementsModalView.fxml
    │                       │   ├── AddWindowsModulesModalView.fxml
    │                       │   ├── DockSettingsView.fxml
    │                       │   └── DockView.fxml
    │                       └── i18n/
    │                           ├── messages_ar_SA.properties
    │                           ├── messages_bn_BD.properties
    │                           ├── messages_de_DE.properties
    │                           ├── messages_en_US.properties
    │                           ├── messages_es_ES.properties
    │                           ├── messages_fr_FR.properties
    │                           ├── messages_hi_IN.properties
    │                           ├── messages_id_ID.properties
    │                           ├── messages_ja_JP.properties
    │                           ├── messages_mr_IN.properties
    │                           ├── messages_pcm_NG.properties
    │                           ├── messages_pt_BR.properties
    │                           ├── messages_ru_RU.properties
    │                           ├── messages_ta_IN.properties
    │                           ├── messages_te_IN.properties
    │                           ├── messages_tr_TR.properties
    │                           ├── messages_ur_PK.properties
    │                           ├── messages_vi_VN.properties
    │                           ├── messages_yue_HK.properties
    │                           ├── messages_zh_CN.properties
    │                           └── messages_zh_TW.properties
    └── test/
        └── java/
            └── com/
                └── github/
                    └── arthurdeka/
                        └── cedromoderndock/
                            ├── application/
                            │   ├── DockItemActionServiceTest.java
                            │   ├── DockServiceTest.java
                            │   ├── LocalizationServiceTest.java
                            │   └── ProgramSelectionResolverTest.java
                            ├── infrastructure/
                            │   ├── persistence/
                            │   │   └── JsonDockRepositoryTest.java
                            │   └── system/
                            │       └── DefaultProgramLauncherTest.java
                            └── util/
                                └── SingleInstanceGuardTest.java
Download .txt
SYMBOL INDEX (381 symbols across 52 files)

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/App.java
  class App (line 35) | public class App extends Application {
    method start (line 39) | @Override
    method stop (line 92) | @Override
    method main (line 104) | public static void main(String[] args) {
    method createServices (line 127) | private AppServices createServices() {
    method openSettingsWindow (line 150) | private void openSettingsWindow(AppServices appServices, DockControlle...
    method handlePositioningModeChange (line 158) | private void handlePositioningModeChange(

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockAppearanceService.java
  class DockAppearanceService (line 5) | public class DockAppearanceService {
    method DockAppearanceService (line 8) | public DockAppearanceService(DockService dockService) {
    method getDock (line 12) | public DockModel getDock() {
    method getIconsSize (line 16) | public int getIconsSize() {
    method setIconsSize (line 20) | public void setIconsSize(int iconsSize) {
    method getSpacingBetweenIcons (line 25) | public int getSpacingBetweenIcons() {
    method setSpacingBetweenIcons (line 29) | public void setSpacingBetweenIcons(int spacingValue) {
    method getDockTransparencyPercentage (line 34) | public int getDockTransparencyPercentage() {
    method setDockTransparencyPercentage (line 38) | public void setDockTransparencyPercentage(int value) {
    method getDockBorderRounding (line 43) | public int getDockBorderRounding() {
    method setDockBorderRounding (line 47) | public void setDockBorderRounding(int value) {
    method getDockColorRGB (line 52) | public String getDockColorRGB() {
    method setDockColorRGB (line 56) | public void setDockColorRGB(String value) {
    method getDockTheme (line 61) | public DockTheme getDockTheme() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionService.java
  class DockItemActionService (line 12) | public class DockItemActionService {
    method DockItemActionService (line 17) | public DockItemActionService(
    method execute (line 27) | public void execute(DockItem item, Runnable openSettingsAction) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockPositioningService.java
  class DockPositioningService (line 11) | public class DockPositioningService {
    method DockPositioningService (line 14) | public DockPositioningService(DockService dockService) {
    method getPositioningMode (line 18) | public DockPositioningMode getPositioningMode() {
    method setPositioningMode (line 22) | public void setPositioningMode(DockPositioningMode positioningMode) {
    method getVerticalAnchor (line 27) | public DockVerticalAnchor getVerticalAnchor() {
    method setVerticalAnchor (line 31) | public void setVerticalAnchor(DockVerticalAnchor verticalAnchor) {
    method getHorizontalAnchor (line 36) | public DockHorizontalAnchor getHorizontalAnchor() {
    method setHorizontalAnchor (line 40) | public void setHorizontalAnchor(DockHorizontalAnchor horizontalAnchor) {
    method getScreenEdgeSpacing (line 45) | public int getScreenEdgeSpacing() {
    method setScreenEdgeSpacing (line 49) | public void setScreenEdgeSpacing(int spacing) {
    method getTopSpacing (line 56) | public int getTopSpacing() {
    method setTopSpacing (line 60) | public void setTopSpacing(int spacing) {
    method getLeftSpacing (line 65) | public int getLeftSpacing() {
    method setLeftSpacing (line 69) | public void setLeftSpacing(int spacing) {
    method getRightSpacing (line 74) | public int getRightSpacing() {
    method setRightSpacing (line 78) | public void setRightSpacing(int spacing) {
    method getBottomSpacing (line 83) | public int getBottomSpacing() {
    method setBottomSpacing (line 87) | public void setBottomSpacing(int spacing) {
    method isDynamicPositioning (line 92) | public boolean isDynamicPositioning() {
    method applyPosition (line 96) | public void applyPosition(Stage stage) {
    method snapToPixel (line 116) | static double snapToPixel(double value) {
    method resolveHorizontalPosition (line 120) | private double resolveHorizontalPosition(
    method resolveVerticalPosition (line 132) | private double resolveVerticalPosition(

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/DockService.java
  class DockService (line 9) | public class DockService {
    method DockService (line 13) | public DockService(DockRepository repository) {
    method getDock (line 18) | public DockModel getDock() {
    method getItems (line 22) | public List<DockItem> getItems() {
    method addItem (line 26) | public void addItem(DockItem item) {
    method removeItem (line 31) | public void removeItem(int index) {
    method swapItems (line 36) | public void swapItems(int firstItemIdx, int secondItemIdx) {
    method setDockPosition (line 41) | public void setDockPosition(double positionX, double positionY) {
    method saveChanges (line 49) | public void saveChanges() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/LocalizationService.java
  class LocalizationService (line 14) | public class LocalizationService {
    method LocalizationService (line 21) | public LocalizationService(DockService dockService) {
    method getCurrentLanguage (line 26) | public SupportedLanguage getCurrentLanguage() {
    method setLanguage (line 31) | public void setLanguage(SupportedLanguage language) {
    method text (line 43) | public String text(String key, Object... arguments) {
    method languageDisplayName (line 51) | public String languageDisplayName(SupportedLanguage language) {
    method dockItemLabel (line 56) | public String dockItemLabel(DockItem item) {
    method addListener (line 78) | public void addListener(Runnable listener) {
    method removeListener (line 82) | public void removeListener(Runnable listener) {
    method bootstrapText (line 86) | public static String bootstrapText(SupportedLanguage language, String ...
    method notifyListeners (line 99) | private void notifyListeners() {
    method loadBundle (line 105) | private static ResourceBundle loadBundle(SupportedLanguage language) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolver.java
  class ProgramSelectionResolver (line 11) | public final class ProgramSelectionResolver {
    method ProgramSelectionResolver (line 13) | private ProgramSelectionResolver() {
    method resolve (line 16) | public static ResolvedProgramSelection resolve(Path selectedExecutable) {
    method resolveSquirrelExecutable (line 25) | private static Path resolveSquirrelExecutable(Path selectedExecutable) {
    method isUpdaterExecutable (line 52) | private static boolean isUpdaterExecutable(Path executablePath) {
    method listAppDirectories (line 57) | private static List<Path> listAppDirectories(Path installDir) {
    method lastModifiedTime (line 70) | private static long lastModifiedTime(Path path) {
    method findFirstExecutable (line 78) | private static Path findFirstExecutable(Path appDirectory) {
    method stripExtension (line 93) | private static String stripExtension(String fileName) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/SupportedLanguage.java
  type SupportedLanguage (line 5) | public enum SupportedLanguage {
    method SupportedLanguage (line 31) | SupportedLanguage(String language, String country, String nativeDispla...
    method locale (line 36) | public Locale locale() {
    method nativeDisplayName (line 40) | public String nativeDisplayName() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/application/WindowPreviewService.java
  class WindowPreviewService (line 9) | public class WindowPreviewService {
    method WindowPreviewService (line 12) | public WindowPreviewService(WindowQueryGateway windowQueryGateway) {
    method loadPreview (line 16) | public List<NativeWindowUtils.WindowInfo> loadPreview(DockProgramItemM...
    method hasOpenWindows (line 20) | public boolean hasOpenWindows(String executablePath) {
    method activate (line 24) | public void activate(NativeWindowUtils.WindowInfo windowInfo) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/AcknowledgementsModalController.java
  class AcknowledgementsModalController (line 9) | public class AcknowledgementsModalController {
    method initialize (line 22) | public void initialize() {
    method handleInitialization (line 41) | public void handleInitialization() {
    method setAppServices (line 49) | public void setAppServices(AppServices appServices) {
    method applyLocalizedTexts (line 53) | private void applyLocalizedTexts() {
    method updateWindowTitle (line 64) | private void updateWindowTitle() {
    method unregisterLocalizationListener (line 70) | private void unregisterLocalizationListener() {
    method text (line 77) | private String text(String key) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/AddWindowsModulesModalController.java
  class AddWindowsModulesModalController (line 23) | public class AddWindowsModulesModalController {
    method initialize (line 46) | public void initialize() {
    method handleInitialization (line 66) | public void handleInitialization() {
    method handleAddSelectedModule (line 74) | @FXML
    method openSettingsWindow (line 87) | private void openSettingsWindow() {
    method setAppServices (line 114) | public void setAppServices(AppServices appServices) {
    method setDockRefreshAction (line 118) | public void setDockRefreshAction(Runnable dockRefreshAction) {
    method setPositioningModeChangeAction (line 122) | public void setPositioningModeChangeAction(Consumer<DockPositioningMod...
    method applyLocalizedTexts (line 126) | private void applyLocalizedTexts() {
    method resolveModuleLabel (line 140) | private String resolveModuleLabel(String moduleId) {
    method defaultModuleLabel (line 150) | private String defaultModuleLabel(String moduleId) {
    method updateWindowTitle (line 160) | private void updateWindowTitle() {
    method unregisterLocalizationListener (line 166) | private void unregisterLocalizationListener() {
    method text (line 173) | private String text(String key) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/DockController.java
  class DockController (line 46) | public class DockController {
    method handleInitialization (line 84) | public void handleInitialization() {
    method enableDrag (line 116) | private void enableDrag() {
    method addDockItem (line 143) | public void addDockItem(DockItem item) {
    method removeDockItem (line 147) | public void removeDockItem(int index) {
    method getDockItems (line 151) | public List<DockItem> getDockItems() {
    method swapItems (line 155) | public void swapItems(int firstItemIdx, int secondItemIdx) {
    method updateDockUI (line 161) | public void updateDockUI() {
    method createButton (line 185) | private Button createButton(DockItem item) {
    method createProgramGraphic (line 264) | private VBox createProgramGraphic(ImageView imageView, Circle runningI...
    method loadDockResourceImage (line 270) | private Image loadDockResourceImage(String resourcePath) {
    method loadDockFileImage (line 281) | private Image loadDockFileImage(Path iconPath) {
    method createDockImageView (line 292) | private ImageView createDockImageView(Image icon) {
    method getRequestedIconSize (line 301) | private int getRequestedIconSize() {
    method createRunningIndicator (line 308) | private Circle createRunningIndicator() {
    method startOpenStateWatcher (line 317) | private void startOpenStateWatcher() {
    method requestProgramIndicatorRefresh (line 332) | private void requestProgramIndicatorRefresh() {
    method refreshProgramIndicatorsInBackground (line 336) | private void refreshProgramIndicatorsInBackground() {
    method snapshotProgramIndicators (line 350) | private Map<String, List<Circle>> snapshotProgramIndicators() {
    method applyProgramIndicatorState (line 360) | private void applyProgramIndicatorState(Map<String, List<Circle>> indi...
    method setupHoverPreview (line 370) | private void setupHoverPreview(Button button, DockProgramItemModel ite...
    method showWindowPreview (line 392) | private void showWindowPreview(Button button, DockProgramItemModel ite...
    method scheduleHide (line 438) | private void scheduleHide() {
    method shouldHidePreview (line 443) | private boolean shouldHidePreview() {
    method openSettingsWindow (line 453) | private void openSettingsWindow() {
    method setDockIconsSize (line 461) | public void setDockIconsSize(int iconsSize) {
    method getDockIconsSize (line 466) | public int getDockIconsSize() {
    method setDockIconsSpacing (line 470) | public void setDockIconsSpacing(int spacingValue) {
    method getDockIconsSpacing (line 475) | public int getDockIconsSpacing() {
    method getDockTransparency (line 479) | public int getDockTransparency() {
    method setDockTransparency (line 483) | public void setDockTransparency(int value) {
    method setDockBorderRounding (line 488) | public void setDockBorderRounding(int value) {
    method getDockBorderRounding (line 494) | public int getDockBorderRounding() {
    method setStage (line 498) | public void setStage(Stage stage) {
    method getDockColorRGB (line 507) | public String getDockColorRGB() {
    method setDockColorRGB (line 511) | public void setDockColorRGB(String value) {
    method saveChanges (line 516) | public void saveChanges() {
    method setAppServices (line 520) | public void setAppServices(AppServices appServices) {
    method handlePositioningModeChange (line 524) | private void handlePositioningModeChange(DockPositioningMode positioni...

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/controller/SettingsController.java
  class SettingsController (line 47) | public class SettingsController {
    method initialize (line 191) | public void initialize() {
    method handleInitialization (line 216) | public void handleInitialization() {
    method registerLocalization (line 242) | private void registerLocalization() {
    method unregisterLocalizationListener (line 249) | private void unregisterLocalizationListener() {
    method configureLocalizationControls (line 256) | private void configureLocalizationControls() {
    method initializePositioningControls (line 303) | private void initializePositioningControls() {
    method handlePositioningModeChange (line 357) | @FXML
    method updatePositioningModeUI (line 367) | private void updatePositioningModeUI() {
    method handleListViewItemSelection (line 375) | private void handleListViewItemSelection() {
    method addDockItemsToListView (line 390) | private void addDockItemsToListView(List<DockItem> dockItems) {
    method updateListViewHeight (line 403) | private void updateListViewHeight() {
    method openAddWindowsModuleWindow (line 413) | @FXML
    method handleAddProgram (line 439) | @FXML
    method handleAddFolder (line 464) | @FXML
    method handleRemoveProgram (line 488) | @FXML
    method handleMoveItem (line 498) | @FXML
    method handleSetIconSizeSlider (line 530) | private void handleSetIconSizeSlider(int value) {
    method handleSetIconsSpacingSlider (line 535) | private void handleSetIconsSpacingSlider(int value) {
    method handleSetDockTransparencySlider (line 540) | private void handleSetDockTransparencySlider(int value) {
    method handleSetDockBorderRoundingSlider (line 545) | private void handleSetDockBorderRoundingSlider(int value) {
    method handleSetDockColor (line 550) | @FXML
    method setAppServices (line 559) | public void setAppServices(AppServices appServices) {
    method setDockRefreshAction (line 563) | public void setDockRefreshAction(Runnable dockRefreshAction) {
    method setPositioningModeChangeAction (line 567) | public void setPositioningModeChangeAction(Consumer<DockPositioningMod...
    method openAknowledgementsWindow (line 571) | @FXML
    method handleLocalizationChanged (line 591) | private void handleLocalizationChanged() {
    method applyLocalizedTexts (line 597) | private void applyLocalizedTexts() {
    method updateWindowTitle (line 668) | private void updateWindowTitle() {
    method verticalAnchorText (line 674) | private String verticalAnchorText(DockVerticalAnchor verticalAnchor) {
    method horizontalAnchorText (line 682) | private String horizontalAnchorText(DockHorizontalAnchor horizontalAnc...
    method text (line 690) | private String text(String key) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/DockRepository.java
  type DockRepository (line 5) | public interface DockRepository {
    method load (line 6) | DockModel load();
    method save (line 8) | void save(DockModel model);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/FolderLauncher.java
  type FolderLauncher (line 3) | public interface FolderLauncher {
    method launch (line 4) | void launch(String folderPath, String label);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/IconGateway.java
  type IconGateway (line 5) | public interface IconGateway {
    method resolveProgramIcon (line 6) | Path resolveProgramIcon(String executablePath);
    method resolveFolderIcon (line 7) | Path resolveFolderIcon(String folderPath);
    method cacheProgramIcon (line 9) | void cacheProgramIcon(String executablePath);
    method cacheFolderIcon (line 10) | void cacheFolderIcon(String folderPath);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/ProgramLauncher.java
  type ProgramLauncher (line 3) | public interface ProgramLauncher {
    method launch (line 4) | void launch(String executablePath, String label);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowQueryGateway.java
  type WindowQueryGateway (line 7) | public interface WindowQueryGateway {
    method findOpenWindows (line 8) | List<NativeWindowUtils.WindowInfo> findOpenWindows(String executablePa...
    method activate (line 10) | void activate(NativeWindowUtils.WindowInfo windowInfo);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowsModuleLauncher.java
  type WindowsModuleLauncher (line 3) | public interface WindowsModuleLauncher {
    method launch (line 4) | void launch(String module, String label);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepository.java
  class JsonDockRepository (line 15) | public final class JsonDockRepository implements DockRepository {
    method JsonDockRepository (line 20) | public JsonDockRepository() {
    method JsonDockRepository (line 24) | public JsonDockRepository(Path configFilePath) {
    method getDefaultConfigPath (line 29) | private static Path getDefaultConfigPath() {
    method createObjectMapper (line 44) | private static ObjectMapper createObjectMapper() {
    method save (line 51) | @Override
    method load (line 61) | @Override
    method createAndSaveDefault (line 79) | private DockModel createAndSaveDefault() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/CachedWindowsIconGateway.java
  class CachedWindowsIconGateway (line 8) | public class CachedWindowsIconGateway implements IconGateway {
    method resolveProgramIcon (line 9) | @Override
    method resolveFolderIcon (line 14) | @Override
    method cacheProgramIcon (line 19) | @Override
    method cacheFolderIcon (line 24) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultFolderLauncher.java
  class DefaultFolderLauncher (line 10) | public class DefaultFolderLauncher implements FolderLauncher {
    method launch (line 11) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncher.java
  class DefaultProgramLauncher (line 12) | public class DefaultProgramLauncher implements ProgramLauncher {
    method launch (line 13) | @Override
    method executeAndHandleElevation (line 34) | private void executeAndHandleElevation(String path, String label) thro...
    method resolveLaunchCommand (line 52) | static LaunchCommand resolveLaunchCommand(String executablePath) {
    method isDiscordExecutable (line 70) | private static boolean isDiscordExecutable(Path executablePath) {
    method buildElevationCommand (line 85) | private static String buildElevationCommand(LaunchCommand launchComman...
    method escapePowerShellArgument (line 100) | private static String escapePowerShellArgument(String argument) {
    method toCommandLine (line 105) | List<String> toCommandLine() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultWindowsModuleLauncher.java
  class DefaultWindowsModuleLauncher (line 9) | public class DefaultWindowsModuleLauncher implements WindowsModuleLaunch...
    method launch (line 10) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/JnaWindowQueryGateway.java
  class JnaWindowQueryGateway (line 8) | public class JnaWindowQueryGateway implements WindowQueryGateway {
    method findOpenWindows (line 9) | @Override
    method activate (line 14) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockFolderItemModel.java
  class DockFolderItemModel (line 6) | @NoArgsConstructor
    method DockFolderItemModel (line 12) | public DockFolderItemModel(String label, String folderPath) {
    method getLabel (line 17) | @Override
    method getPath (line 22) | @Override
    method getFolderPath (line 27) | @JsonIgnore
    method getType (line 32) | @Override
    method setLabel (line 37) | @Override
    method setPath (line 42) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockHorizontalAnchor.java
  type DockHorizontalAnchor (line 3) | public enum DockHorizontalAnchor {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItem.java
  type DockItem (line 10) | @JsonTypeInfo(
    method getLabel (line 23) | String getLabel();
    method getPath (line 24) | String getPath();
    method getType (line 25) | @JsonIgnore
    method setLabel (line 28) | void setLabel(String label);
    method setPath (line 29) | void setPath(String path);

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItemType.java
  type DockItemType (line 3) | public enum DockItemType {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockModel.java
  class DockModel (line 11) | public class DockModel {
    method addItem (line 53) | public void addItem(DockItem item) {
    method removeItem (line 58) | public void removeItem(int index) {
    method loadDefaultItems (line 63) | public void loadDefaultItems() {
    method swapItems (line 67) | public void swapItems(int firstItemIdx, int secondItemIdx) {
    method getIconsSize (line 71) | public Integer getIconsSize() {
    method setIconsSize (line 75) | public void setIconsSize(Integer iconsSize) {
    method getSpacingBetweenIcons (line 79) | public Integer getSpacingBetweenIcons() {
    method setSpacingBetweenIcons (line 83) | public void setSpacingBetweenIcons(Integer spacingBetweenIcons) {
    method getDockTransparency (line 87) | public Double getDockTransparency() {
    method setDockTransparency (line 91) | public void setDockTransparency(Double dockTransparency) {
    method setDockPosition (line 95) | public void setDockPosition(Double PositionX, Double PositionY) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockPositioningMode.java
  type DockPositioningMode (line 3) | public enum DockPositioningMode {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockProgramItemModel.java
  class DockProgramItemModel (line 6) | @NoArgsConstructor
    method DockProgramItemModel (line 12) | public DockProgramItemModel(String label, String exePath) {
    method getLabel (line 17) | @Override
    method getPath (line 22) | @Override
    method getExecutablePath (line 27) | @JsonIgnore
    method getType (line 32) | @Override
    method setLabel (line 37) | @Override
    method setPath (line 42) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockSettingsItemModel.java
  class DockSettingsItemModel (line 5) | @NoArgsConstructor
    method getLabel (line 12) | @Override
    method getPath (line 17) | @Override
    method getType (line 22) | @Override
    method setLabel (line 27) | @Override
    method setPath (line 32) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockVerticalAnchor.java
  type DockVerticalAnchor (line 3) | public enum DockVerticalAnchor {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/model/DockWindowsModuleItemModel.java
  class DockWindowsModuleItemModel (line 9) | @NoArgsConstructor
    method DockWindowsModuleItemModel (line 18) | public DockWindowsModuleItemModel(String label, String module) {
    method getLabel (line 39) | @Override
    method getPath (line 44) | @Override
    method getType (line 49) | @Override
    method setLabel (line 54) | @Override
    method setPath (line 59) | @Override

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/ColorManipulation.java
  class ColorManipulation (line 5) | public class ColorManipulation {
    method fromRGBAtoRGB (line 16) | public static String fromRGBAtoRGB(String RGBAColor) {
    method fromRGBtoRGBA (line 28) | public static Color fromRGBtoRGBA(String RGBColor) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/Logger.java
  class Logger (line 17) | public final class Logger {
    method Logger (line 24) | private Logger() {
    method getLogFilePath (line 32) | private static Path getLogFilePath() {
    method info (line 57) | public static void info(String message) {
    method error (line 65) | public static void error(String message) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/NativeWindowUtils.java
  class NativeWindowUtils (line 14) | public class NativeWindowUtils {
    method getOpenWindows (line 19) | public static List<WindowInfo> getOpenWindows(String executablePath) {
    method isWindowFromExecutable (line 50) | private static boolean isWindowFromExecutable(HWND hWnd, Path targetPa...
    method isSameExecutable (line 81) | private static boolean isSameExecutable(Path processPath, Path targetP...
    method normalizePathString (line 108) | private static String normalizePathString(Path path) {
    method activateWindow (line 117) | public static void activateWindow(HWND hwnd) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SaveAndLoadDockSettings.java
  class SaveAndLoadDockSettings (line 10) | public final class SaveAndLoadDockSettings {
    method SaveAndLoadDockSettings (line 13) | private SaveAndLoadDockSettings() {}
    method save (line 19) | public static void save(DockModel model) {
    method load (line 29) | public static DockModel load() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SettingsWindowLauncher.java
  class SettingsWindowLauncher (line 16) | public final class SettingsWindowLauncher {
    method SettingsWindowLauncher (line 17) | private SettingsWindowLauncher() {
    method open (line 20) | public static void open(

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuard.java
  class SingleInstanceGuard (line 12) | public final class SingleInstanceGuard implements AutoCloseable {
    method SingleInstanceGuard (line 19) | public SingleInstanceGuard() {
    method SingleInstanceGuard (line 23) | public SingleInstanceGuard(Path lockFilePath) {
    method tryAcquire (line 27) | public boolean tryAcquire() {
    method close (line 51) | @Override
    method closeQuietly (line 56) | private void closeQuietly() {
    method getDefaultLockPath (line 78) | private static Path getDefaultLockPath() {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/SystemTrayManager.java
  class SystemTrayManager (line 19) | public final class SystemTrayManager {
    method SystemTrayManager (line 24) | public SystemTrayManager(Runnable openSettingsAction, Runnable exitAct...
    method install (line 29) | public void install() {
    method dispose (line 51) | public void dispose() {
    method createTrayIcon (line 63) | private TrayIcon createTrayIcon() throws IOException {
    method loadTrayImage (line 87) | private Image loadTrayImage() throws IOException {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/UIUtils.java
  class UIUtils (line 10) | public final class UIUtils {
    method UIUtils (line 13) | private UIUtils() {}
    method setStageIcon (line 19) | public static void setStageIcon(Stage stage) {

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/WindowsIconHandler.java
  class WindowsIconHandler (line 34) | public final class WindowsIconHandler {
    method WindowsIconHandler (line 36) | private WindowsIconHandler() {
    type User32Ex (line 49) | private interface User32Ex extends StdCallLibrary {
      method PrivateExtractIconsW (line 52) | int PrivateExtractIconsW(String szFileName, int nIconIndex, int cxIc...
    type Shell32Ex (line 56) | private interface Shell32Ex extends StdCallLibrary {
      method SHGetFileInfoW (line 59) | long SHGetFileInfoW(String pszPath, int dwFileAttributes, SHFILEINFO...
      method SHGetImageList (line 60) | int SHGetImageList(int iImageList, Guid.IID riid, com.sun.jna.ptr.Po...
    type Comctl32Ex (line 63) | private interface Comctl32Ex extends StdCallLibrary {
      method ImageList_GetIcon (line 66) | HICON ImageList_GetIcon(com.sun.jna.Pointer himl, int i, int flags);
    class SHFILEINFO (line 69) | @Structure.FieldOrder({"hIcon", "iIcon", "dwAttributes", "szDisplayNam...
    method getCachedIconPath (line 84) | public static Path getCachedIconPath(String exePath) {
    method getCachedFolderIconPath (line 88) | public static Path getCachedFolderIconPath(String folderPath) {
    method getCachedPath (line 92) | private static Path getCachedPath(String inputPath, String kind) {
    method extractAndCacheIcon (line 108) | public static Path extractAndCacheIcon(String exePath) {
    method extractAndCacheFolderIcon (line 112) | public static Path extractAndCacheFolderIcon(String folderPath) {
    method extractAndCacheProgramIcon (line 143) | private static Path extractAndCacheProgramIcon(String exePath) {
    method extractFolderIconWithShellApi (line 171) | private static BufferedImage extractFolderIconWithShellApi(File folder) {
    method extractIconWithShellApi (line 207) | private static boolean extractIconWithShellApi(String exePath, Path ou...
    method iconToBufferedImage (line 243) | private static BufferedImage iconToBufferedImage(HICON hIcon) {
    method cleanupIconInfo (line 317) | private static void cleanupIconInfo(WinGDI.ICONINFO iconInfo) {
    method getCacheDirectory (line 329) | private static Path getCacheDirectory() {
    method getHashedFileName (line 347) | private static String getHashedFileName(String input) throws NoSuchAlg...

FILE: src/main/java/com/github/arthurdeka/cedromoderndock/view/WindowPreviewPopup.java
  class WindowPreviewPopup (line 23) | public class WindowPreviewPopup extends Popup {
    method WindowPreviewPopup (line 31) | public WindowPreviewPopup() {
    method updateContent (line 45) | public void updateContent(
    method getTextColorForBackground (line 72) | private Color getTextColorForBackground(String dockColorRGB) {
    method createWindowItem (line 91) | private HBox createWindowItem(
    method formatWindowTitle (line 136) | private String formatWindowTitle(String windowTitle, String appLabel) {
    method stripRedundantAppSuffix (line 141) | private String stripRedundantAppSuffix(String windowTitle, String appL...
    method truncateTitle (line 160) | private String truncateTitle(String title, int maxLength) {
    method getContainer (line 170) | public VBox getContainer() {
    method showAbove (line 174) | public void showAbove(Node target, Node dockContainer) {
    method reposition (line 186) | private void reposition() {
    method getScreenBounds (line 211) | private Rectangle2D getScreenBounds(Bounds bounds) {
    method getDockBounds (line 224) | private Bounds getDockBounds(Bounds fallbackBounds) {

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionServiceTest.java
  class DockItemActionServiceTest (line 11) | class DockItemActionServiceTest {
    method executesProgramItemsThroughProgramLauncher (line 13) | @Test
    method executesFolderItemsThroughFolderLauncher (line 29) | @Test
    method executesWindowsModuleItemsThroughWindowsModuleLauncher (line 45) | @Test
    method executesSettingsItemsThroughSettingsAction (line 61) | @Test
    class InvocationCapture (line 75) | private static final class InvocationCapture {
      method record (line 80) | private void record(String kind, String value, String label) {
      method openSettings (line 86) | private void openSettings() {

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/DockServiceTest.java
  class DockServiceTest (line 9) | class DockServiceTest {
    method snapsSavedDockCoordinatesToWholePixels (line 11) | @Test
    class InMemoryDockRepository (line 23) | private static final class InMemoryDockRepository implements DockRepos...
      method save (line 27) | @Override
      method load (line 32) | @Override

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/LocalizationServiceTest.java
  class LocalizationServiceTest (line 15) | class LocalizationServiceTest {
    method localizesBuiltInItemsButKeepsProgramLabelsUntouched (line 17) | @Test
    method persistsLanguageAndNotifiesListeners (line 34) | @Test
    method languageSelectorUsesNativeLanguageNames (line 48) | @Test
    method everySupportedLanguageHasATranslationBundle (line 58) | @Test
    class InMemoryDockRepository (line 71) | private static final class InMemoryDockRepository implements DockRepos...
      method load (line 74) | @Override
      method save (line 79) | @Override

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolverTest.java
  class ProgramSelectionResolverTest (line 12) | class ProgramSelectionResolverTest {
    method keepsRegularExecutablesUntouched (line 17) | @Test
    method resolvesSquirrelUpdaterToRealApplicationExecutable (line 27) | @Test
    method fallsBackToFirstExecutableWhenFolderNameDoesNotMatch (line 41) | @Test

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepositoryTest.java
  class JsonDockRepositoryTest (line 16) | class JsonDockRepositoryTest {
    method savesAndLoadsFolderItems (line 21) | @Test
    method savesAndLoadsSelectedLanguage (line 41) | @Test

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncherTest.java
  class DefaultProgramLauncherTest (line 13) | class DefaultProgramLauncherTest {
    method launchesRegularProgramsDirectly (line 18) | @Test
    method launchesDiscordThroughUpdateExecutable (line 29) | @Test

FILE: src/test/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuardTest.java
  class SingleInstanceGuardTest (line 11) | class SingleInstanceGuardTest {
    method blocksSecondGuardWhileFirstIsHoldingLock (line 16) | @Test
    method allowsAcquireAgainAfterFirstGuardReleasesLock (line 31) | @Test
Condensed preview — 91 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (386K chars).
[
  {
    "path": ".gitattributes",
    "chars": 66,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 581,
    "preview": "# These are supported funding model platforms\n\ngithub: [arthurdeka]\npatreon: # Replace with a single Patreon username\nop"
  },
  {
    "path": ".gitignore",
    "chars": 455,
    "preview": "config.json\nlog.txt\n.superpowers\n\ntarget\ntarget/\n\n# Build output and packages\n/target/\n*.jar\n*.war\n*.ear\n\n# Logs\n*.log\n\n"
  },
  {
    "path": ".mvn/wrapper/maven-wrapper.properties",
    "chars": 232,
    "preview": "distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.5/apache-maven-3.8.5-bin.zip\nwrap"
  },
  {
    "path": "LICENSE",
    "chars": 35129,
    "preview": "GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free Software Foundation,"
  },
  {
    "path": "README.md",
    "chars": 4205,
    "preview": "![GitHub contributors](https://img.shields.io/github/contributors/arthurdeka/cedro-modern-dock?style=for-the-badge)\n![Gi"
  },
  {
    "path": "mvnw",
    "chars": 10284,
    "preview": "#!/bin/sh\n# ----------------------------------------------------------------------------\n# Licensed to the Apache Softwa"
  },
  {
    "path": "mvnw.cmd",
    "chars": 6734,
    "preview": "@REM ----------------------------------------------------------------------------\n@REM Licensed to the Apache Software F"
  },
  {
    "path": "pom.xml",
    "chars": 8252,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/App.java",
    "chars": 7034,
    "preview": "package com.github.arthurdeka.cedromoderndock;\n\nimport com.github.arthurdeka.cedromoderndock.application.AppServices;\nim"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/AppServices.java",
    "chars": 473,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.IconGate"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/DockAppearanceService.java",
    "chars": 1791,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.model.DockModel"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionService.java",
    "chars": 2061,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.FolderLa"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/DockPositioningService.java",
    "chars": 4665,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.model.DockHoriz"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/DockService.java",
    "chars": 1344,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.DockRepo"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/DockTheme.java",
    "chars": 146,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\npublic record DockTheme(String colorRgb, double transparency"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/LocalizationService.java",
    "chars": 3988,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.model.DockItem;"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolver.java",
    "chars": 3774,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport java.io.IOException;\nimport java.nio.file.Files;\nimpo"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/SupportedLanguage.java",
    "chars": 1575,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport java.util.Locale;\n\npublic enum SupportedLanguage {\n  "
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/application/WindowPreviewService.java",
    "chars": 967,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.WindowQu"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/controller/AcknowledgementsModalController.java",
    "chars": 2615,
    "preview": "package com.github.arthurdeka.cedromoderndock.controller;\n\nimport com.github.arthurdeka.cedromoderndock.application.AppS"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/controller/AddWindowsModulesModalController.java",
    "chars": 6493,
    "preview": "package com.github.arthurdeka.cedromoderndock.controller;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport com."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/controller/DockController.java",
    "chars": 20261,
    "preview": "package com.github.arthurdeka.cedromoderndock.controller;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport com."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/controller/SettingsController.java",
    "chars": 27988,
    "preview": "package com.github.arthurdeka.cedromoderndock.controller;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport com."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/DockRepository.java",
    "chars": 209,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\nimport com.github.arthurdeka.cedromoderndock.model.DockModel;\n\npu"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/FolderLauncher.java",
    "chars": 141,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\npublic interface FolderLauncher {\n    void launch(String folderPa"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/IconGateway.java",
    "chars": 311,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\nimport java.nio.file.Path;\n\npublic interface IconGateway {\n    Pa"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/ProgramLauncher.java",
    "chars": 146,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\npublic interface ProgramLauncher {\n    void launch(String executa"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowQueryGateway.java",
    "chars": 329,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\nimport com.github.arthurdeka.cedromoderndock.util.NativeWindowUti"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/domain/WindowsModuleLauncher.java",
    "chars": 144,
    "preview": "package com.github.arthurdeka.cedromoderndock.domain;\n\npublic interface WindowsModuleLauncher {\n    void launch(String m"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepository.java",
    "chars": 2994,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.persistence;\n\nimport com.fasterxml.jackson.databind.Deseria"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/CachedWindowsIconGateway.java",
    "chars": 878,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport com.github.arthurdeka.cedromoderndock.domai"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultFolderLauncher.java",
    "chars": 1151,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport com.github.arthurdeka.cedromoderndock.domai"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncher.java",
    "chars": 4918,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport com.github.arthurdeka.cedromoderndock.domai"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultWindowsModuleLauncher.java",
    "chars": 1146,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport com.github.arthurdeka.cedromoderndock.domai"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/JnaWindowQueryGateway.java",
    "chars": 627,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport com.github.arthurdeka.cedromoderndock.domai"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockFolderItemModel.java",
    "chars": 936,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport lombok."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockHorizontalAnchor.java",
    "chars": 123,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\npublic enum DockHorizontalAnchor {\n    LEFT,\n    MIDDLE,\n    RIGHT"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItem.java",
    "chars": 995,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport com.fas"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockItemType.java",
    "chars": 141,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\npublic enum DockItemType {\n    PROGRAM,\n    FOLDER,\n    WINDOWS_MO"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockModel.java",
    "chars": 2442,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport com.github.arthurdeka.cedromoderndock.application.Supported"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockPositioningMode.java",
    "chars": 114,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\npublic enum DockPositioningMode {\n    STATIC,\n    DYNAMIC\n}\n"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockProgramItemModel.java",
    "chars": 923,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport com.fasterxml.jackson.annotation.JsonIgnore;\nimport lombok."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockSettingsItemModel.java",
    "chars": 722,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport lombok.NoArgsConstructor;\n\n@NoArgsConstructor\npublic class "
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockVerticalAnchor.java",
    "chars": 119,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\npublic enum DockVerticalAnchor {\n    TOP,\n    MIDDLE,\n    DOWN\n}\n"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/model/DockWindowsModuleItemModel.java",
    "chars": 1522,
    "preview": "package com.github.arthurdeka.cedromoderndock.model;\n\nimport lombok.Getter;\nimport lombok.NoArgsConstructor;\nimport lomb"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/ColorManipulation.java",
    "chars": 1334,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport javafx.scene.paint.Color;\n\npublic class ColorManipulation {\n"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/Logger.java",
    "chars": 2960,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport java.io.BufferedWriter;\nimport java.io.File;\nimport java.io."
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/NativeWindowUtils.java",
    "chars": 4573,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.sun.jna.platform.win32.Kernel32;\nimport com.sun.jna.plat"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/SaveAndLoadDockSettings.java",
    "chars": 1098,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.github.arthurdeka.cedromoderndock.domain.DockRepository;"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/SettingsWindowLauncher.java",
    "chars": 1770,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport com.github"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuard.java",
    "chars": 2500,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport java.io.IOException;\nimport java.nio.channels.FileChannel;\ni"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/SystemTrayManager.java",
    "chars": 3282,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport javafx.app"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/UIUtils.java",
    "chars": 820,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.github.arthurdeka.cedromoderndock.App;\nimport javafx.sce"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/util/WindowsIconHandler.java",
    "chars": 12888,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport com.sun.jna.Memory;\nimport com.sun.jna.Native;\nimport com.su"
  },
  {
    "path": "src/main/java/com/github/arthurdeka/cedromoderndock/view/WindowPreviewPopup.java",
    "chars": 8165,
    "preview": "package com.github.arthurdeka.cedromoderndock.view;\n\nimport com.github.arthurdeka.cedromoderndock.application.DockTheme;"
  },
  {
    "path": "src/main/java/module-info.java",
    "chars": 857,
    "preview": "module com.github.arthurdeka.cedromoderndock {\n    requires javafx.controls;\n    requires javafx.fxml;\n    requires java"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/css/dock.css",
    "chars": 422,
    "preview": "#myAnchorPane {\n    -fx-background-color: transparent;\n\n}\n\n#MyHBox {\n    -fx-background-color: black;\n\n}\n\n.dock-button {"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/css/dockSettings.css",
    "chars": 7236,
    "preview": ".root {\n    -fx-font-family: \"Segoe UI\", Arial, sans-serif;\n    -fx-background-color: #111315;\n    -fx-base: #111315;\n  "
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/AcknowledgementsModalView.fxml",
    "chars": 1628,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<?import javafx.geometry.Insets?>\n<?import javafx.scene.control.Label?>\n<?import"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/AddWindowsModulesModalView.fxml",
    "chars": 1658,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<?import javafx.geometry.Insets?>\n<?import javafx.scene.control.Button?>\n<?impor"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/DockSettingsView.fxml",
    "chars": 21565,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<?import javafx.geometry.Insets?>\n<?import javafx.scene.control.Button?>\n<?impor"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/DockView.fxml",
    "chars": 644,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<?import javafx.geometry.Insets?>\n<?import javafx.scene.layout.AnchorPane?>\n<?im"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ar_SA.properties",
    "chars": 3834,
    "preview": "dialog.singleInstance.message=يوجد بالفعل مثيل من Cedro Modern Dock قيد التشغيل. تحقق من سطح المكتب.\n\nsettings.window.ti"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_bn_BD.properties",
    "chars": 3950,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock-এর একটি সংস্করণ ইতিমধ্যে চলছে। আপনার ডেস্কটপ দেখুন।\n\nsettings.window.tit"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_de_DE.properties",
    "chars": 4331,
    "preview": "dialog.singleInstance.message=Es läuft bereits eine Instanz von Cedro Modern Dock. Bitte prüfe deinen Desktop.\n\nsettings"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_en_US.properties",
    "chars": 4197,
    "preview": "language.english=English\nlanguage.portugueseBrazil=Portuguese (Brazil)\n\ndialog.singleInstance.message=There is already a"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_es_ES.properties",
    "chars": 4353,
    "preview": "dialog.singleInstance.message=Ya hay una instancia de Cedro Modern Dock en ejecución. Revisa tu escritorio.\n\nsettings.wi"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_fr_FR.properties",
    "chars": 4361,
    "preview": "dialog.singleInstance.message=Une instance de Cedro Modern Dock est déjà en cours d’exécution. Vérifiez votre bureau.\n\ns"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_hi_IN.properties",
    "chars": 3916,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock का एक संस्करण पहले से चल रहा है। अपना डेस्कटॉप जाँचें।\n\nsettings.window."
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_id_ID.properties",
    "chars": 4091,
    "preview": "dialog.singleInstance.message=Sudah ada instance Cedro Modern Dock yang sedang berjalan. Periksa desktop Anda.\n\nsettings"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ja_JP.properties",
    "chars": 3233,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock はすでに実行中です。デスクトップを確認してください。\n\nsettings.window.title=設定\nsettings.page.title"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_mr_IN.properties",
    "chars": 3812,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock ची एक प्रत आधीपासून चालू आहे. तुमचा डेस्कटॉप तपासा.\n\nsettings.window.tit"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_pcm_NG.properties",
    "chars": 3994,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock don already dey run. Check your desktop.\n\nsettings.window.title=Settings"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_pt_BR.properties",
    "chars": 4429,
    "preview": "language.english=Inglês\nlanguage.portugueseBrazil=Português (Brasil)\n\ndialog.singleInstance.message=Já existe uma instân"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ru_RU.properties",
    "chars": 4188,
    "preview": "dialog.singleInstance.message=Экземпляр Cedro Modern Dock уже запущен. Проверьте рабочий стол.\n\nsettings.window.title=На"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ta_IN.properties",
    "chars": 4265,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock ஏற்கனவே இயங்கிக்கொண்டிருக்கிறது. உங்கள் டெஸ்க்டாப்பைச் சரிபார்க்கவும்.\n\n"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_te_IN.properties",
    "chars": 4118,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock ఇప్పటికే నడుస్తోంది. మీ డెస్క్‌టాప్‌ను తనిఖీ చేయండి.\n\nsettings.window.ti"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_tr_TR.properties",
    "chars": 3985,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock zaten çalışıyor. Lütfen masaüstünü kontrol et.\n\nsettings.window.title=Ay"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ur_PK.properties",
    "chars": 3926,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock پہلے ہی چل رہا ہے۔ اپنا ڈیسک ٹاپ چیک کریں۔\n\nsettings.window.title=ترتیبا"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_vi_VN.properties",
    "chars": 3977,
    "preview": "dialog.singleInstance.message=Đã có một phiên bản Cedro Modern Dock đang chạy. Hãy kiểm tra màn hình nền của bạn.\n\nsetti"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_yue_HK.properties",
    "chars": 3002,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock 已經喺度運行緊。請檢查你嘅桌面。\n\nsettings.window.title=設定\nsettings.page.title=Dock 設定\ns"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_zh_CN.properties",
    "chars": 2994,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock 已在运行。请检查你的桌面。\n\nsettings.window.title=设置\nsettings.page.title=Dock 设置\nsett"
  },
  {
    "path": "src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_zh_TW.properties",
    "chars": 2993,
    "preview": "dialog.singleInstance.message=Cedro Modern Dock 已在執行中。請檢查你的桌面。\n\nsettings.window.title=設定\nsettings.page.title=Dock 設定\nset"
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionServiceTest.java",
    "chars": 3606,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.model.DockFolde"
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/application/DockServiceTest.java",
    "chars": 1120,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.DockRepo"
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/application/LocalizationServiceTest.java",
    "chars": 4038,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport com.github.arthurdeka.cedromoderndock.domain.DockRepo"
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolverTest.java",
    "chars": 2155,
    "preview": "package com.github.arthurdeka.cedromoderndock.application;\n\nimport org.junit.jupiter.api.Test;\nimport org.junit.jupiter."
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepositoryTest.java",
    "chars": 2009,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.persistence;\n\nimport com.github.arthurdeka.cedromoderndock."
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncherTest.java",
    "chars": 1553,
    "preview": "package com.github.arthurdeka.cedromoderndock.infrastructure.system;\n\nimport org.junit.jupiter.api.Test;\nimport org.juni"
  },
  {
    "path": "src/test/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuardTest.java",
    "chars": 1354,
    "preview": "package com.github.arthurdeka.cedromoderndock.util;\n\nimport org.junit.jupiter.api.Test;\nimport org.junit.jupiter.api.io."
  }
]

About this extraction

This page contains the full source code of the arthurdeka/cedro-modern-dock GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 91 files (335.3 KB), approximately 80.9k tokens, and a symbol index with 381 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!