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






> 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
## 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.
## 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
## Built With
* 
## 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
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.
### 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
### 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`
================================================
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
================================================
4.0.0com.github.arthurdekacedro-modern-dock1.0Cedro Modern DockUTF-85.10.2org.openjfxjavafx-controls23.0.1winorg.openjfxjavafx-fxml23.0.1winorg.openjfxjavafx-graphics23.0.1winorg.openjfxjavafx-base23.0.1winorg.junit.jupiterjunit-jupiter-api${junit.version}testorg.junit.jupiterjunit-jupiter-engine${junit.version}testnet.java.dev.jnajna5.13.0net.java.dev.jnajna-platform5.13.0com.fasterxml.jackson.corejackson-databind2.17.2org.projectlomboklombok1.18.38providedorg.apache.maven.pluginsmaven-compiler-plugin3.13.02121org.projectlomboklombok1.18.38org.apache.maven.pluginsmaven-surefire-plugin3.2.5org.moditectmoditect-maven-plugin1.2.1.Finaladd-module-infospackageadd-module-info${project.build.directory}/modified-modsnet.java.dev.jnajnacom.sun.jnanet.java.dev.jnajna-platform
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;
}
org.apache.maven.pluginsmaven-dependency-plugin3.7.1copy-dependenciespackagecopy-dependencies${project.build.directory}/modsruntimejna,jna-platformorg.panteleyevjpackage-maven-plugin1.6.0Cedro Modern Docktarget/distcom.github.arthurdeka.cedromoderndock/com.github.arthurdeka.cedromoderndock.App${project.build.directory}/mods${project.build.directory}/modified-mods${project.build.directory}/${project.build.finalName}.jarAPP_IMAGE${project.version}com.github.arthurdekaCopyright (C) 2024src/main/resources/com/github/arthurdeka/cedromoderndock/icons/cedro/logo_256_ICO.icojpackagepackagejpackage
================================================
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 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 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 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 listAppDirectories(Path installDir) {
try (Stream 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 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 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 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 listView;
@FXML
private Button addSelectedModuleButton;
private AppServices appServices;
private Runnable dockRefreshAction = () -> {};
private Consumer 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 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> 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 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> indicatorSnapshot = snapshotProgramIndicators();
if (indicatorSnapshot.isEmpty()) {
return;
}
Map openStateByExecutable = new HashMap<>();
for (String executablePath : indicatorSnapshot.keySet()) {
openStateByExecutable.put(executablePath, appServices.windowPreviewService().hasOpenWindows(executablePath));
}
Platform.runLater(() -> applyProgramIndicatorState(indicatorSnapshot, openStateByExecutable));
}
private Map> snapshotProgramIndicators() {
synchronized (programIndicators) {
Map> snapshot = new HashMap<>();
for (Map.Entry> entry : programIndicators.entrySet()) {
snapshot.put(entry.getKey(), new ArrayList<>(entry.getValue()));
}
return snapshot;
}
}
private void applyProgramIndicatorState(Map> indicatorSnapshot, Map openStateByExecutable) {
for (Map.Entry entry : openStateByExecutable.entrySet()) {
List 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> task = new Task<>() {
@Override
protected List call() throws Exception {
return appServices.windowPreviewService().loadPreview(item);
}
};
task.setOnSucceeded(e -> {
// Ignore results from older hover requests.
if (requestId != hoverRequestId) {
return;
}
List 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 languageChoiceBox;
@FXML
private Tab iconsTab;
@FXML
private Tab iconsCustomizationTab;
@FXML
private Tab dockCustomizationTab;
@FXML
private Tab dockPositioningTab;
@FXML
private Tab generalTab;
@FXML
private ListView 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 verticalPositionChoiceBox;
@FXML
private ChoiceBox 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 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 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 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 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 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 arguments) {
List toCommandLine() {
if (arguments.isEmpty()) {
return List.of(executablePath);
}
java.util.ArrayList 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 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 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 getOpenWindows(String executablePath) {
List 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 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_256.png"));
stage.getIcons().add(icon);
} catch (Exception e) {
Logger.error("Failed to load application icon: " + e.getMessage());
}
}
}
================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/util/WindowsIconHandler.java
================================================
package com.github.arthurdeka.cedromoderndock.util;
import com.sun.jna.Memory;
import com.sun.jna.Native;
import com.sun.jna.Structure;
import com.sun.jna.platform.win32.GDI32;
import com.sun.jna.platform.win32.Guid;
import com.sun.jna.platform.win32.User32;
import com.sun.jna.platform.win32.WinDef.HBITMAP;
import com.sun.jna.platform.win32.WinDef.HDC;
import com.sun.jna.platform.win32.WinDef.HICON;
import com.sun.jna.platform.win32.WinGDI;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
/**
* Extracts the icon from executables (.exe) and saves it to a persistent cache folder in AppData.
* The extraction uses Windows Shell API (JNA) to request a high-resolution icon.
*/
public final class WindowsIconHandler {
private WindowsIconHandler() {
} // static utility
// Persistent cache directory in %APPDATA%/CedroModernDock/iconsCache
private static final Path CACHE_DIR = getCacheDirectory();
// Target extraction size to capture the highest-quality icon available.
private static final int ICON_SIZE = 256;
private static final int SHGFI_ICON = 0x000000100;
private static final int SHGFI_SYSICONINDEX = 0x000004000;
private static final int FILE_ATTRIBUTE_DIRECTORY = 0x00000010;
private static final int SHIL_JUMBO = 0x4;
private static final int ILD_TRANSPARENT = 0x00000001;
private interface User32Ex extends StdCallLibrary {
User32Ex INSTANCE = Native.load("user32", User32Ex.class, W32APIOptions.DEFAULT_OPTIONS);
int PrivateExtractIconsW(String szFileName, int nIconIndex, int cxIcon, int cyIcon,
HICON[] phicon, int[] piconid, int nIcons, int flags);
}
private interface Shell32Ex extends StdCallLibrary {
Shell32Ex INSTANCE = Native.load("shell32", Shell32Ex.class, W32APIOptions.DEFAULT_OPTIONS);
long SHGetFileInfoW(String pszPath, int dwFileAttributes, SHFILEINFO psfi, int cbFileInfo, int uFlags);
int SHGetImageList(int iImageList, Guid.IID riid, com.sun.jna.ptr.PointerByReference ppv);
}
private interface Comctl32Ex extends StdCallLibrary {
Comctl32Ex INSTANCE = Native.load("comctl32", Comctl32Ex.class, W32APIOptions.DEFAULT_OPTIONS);
HICON ImageList_GetIcon(com.sun.jna.Pointer himl, int i, int flags);
}
@Structure.FieldOrder({"hIcon", "iIcon", "dwAttributes", "szDisplayName", "szTypeName"})
public static class SHFILEINFO extends Structure {
public HICON hIcon;
public int iIcon;
public int dwAttributes;
public char[] szDisplayName = new char[260];
public char[] szTypeName = new char[80];
}
/**
* Get the cached icon path
*
* @param exePath complete path to the .exe. (take it from the value in the config.json file)
* @return The path to the icon in the cache folder
*/
public static Path getCachedIconPath(String exePath) {
return getCachedPath(exePath, "program");
}
public static Path getCachedFolderIconPath(String folderPath) {
return getCachedPath(folderPath, "folder_v3");
}
private static Path getCachedPath(String inputPath, String kind) {
try {
String fileName = kind + "_" + getHashedFileName(inputPath) + ".png";
return CACHE_DIR.resolve(fileName);
} catch (NoSuchAlgorithmException e) {
Logger.error("getCachedIconPath - Failed to generate hashed file name for " + inputPath + e);
return null;
}
}
/**
* Extracts the icon from executables
*
* @param exePath complete path to the .exe.
* @return The path to the icon in the cache folder
*/
public static Path extractAndCacheIcon(String exePath) {
return extractAndCacheProgramIcon(exePath);
}
public static Path extractAndCacheFolderIcon(String folderPath) {
try {
Path cachedIconPath = getCachedFolderIconPath(folderPath);
if (cachedIconPath == null) {
return null;
}
if (Files.exists(cachedIconPath)) {
Logger.info("Icon for " + folderPath + " found in cache.");
return cachedIconPath;
}
File folder = new File(folderPath);
if (!folder.isDirectory()) {
Logger.error("Folder icon extraction failed because folder is invalid: " + folderPath);
return null;
}
BufferedImage image = extractFolderIconWithShellApi(folder);
if (image == null) {
return null;
}
ImageIO.write(image, "png", cachedIconPath.toFile());
return Files.exists(cachedIconPath) && Files.size(cachedIconPath) > 0 ? cachedIconPath : null;
} catch (IOException e) {
Logger.error("WindowsIconExtractor error on extractAndCacheFolderIcon: " + e.getMessage() + e);
return null;
}
}
private static Path extractAndCacheProgramIcon(String exePath) {
try {
Path cachedIconPath = getCachedIconPath(exePath);
if (cachedIconPath == null) {
return null;
}
// If the icon already exists, return its path immediately.
if (Files.exists(cachedIconPath)) {
Logger.info("Icon for " + exePath + " found in cache.");
return cachedIconPath;
}
if (!extractIconWithShellApi(exePath, cachedIconPath)) {
Logger.error("Failed to extract icon for " + exePath + " using Shell API.");
Files.deleteIfExists(cachedIconPath); // Clean up empty or corrupted file
return null;
}
Logger.info("[extractAndCacheIcon] Icon for " + exePath + " successfully extracted and cached at iconsCache");
return cachedIconPath; // Return the path of the newly saved icon.
} catch (IOException e) {
Logger.error("WindowsIconExtractor error on extractAndCacheIcon: " + e.getMessage() + e);
return null;
}
}
private static BufferedImage extractFolderIconWithShellApi(File folder) {
SHFILEINFO shFileInfo = new SHFILEINFO();
long result = Shell32Ex.INSTANCE.SHGetFileInfoW(
folder.getAbsolutePath(),
FILE_ATTRIBUTE_DIRECTORY,
shFileInfo,
shFileInfo.size(),
SHGFI_SYSICONINDEX
);
if (result == 0) {
return null;
}
com.sun.jna.ptr.PointerByReference imageListRef = new com.sun.jna.ptr.PointerByReference();
Guid.IID iImageListId = new Guid.IID("{46EB5926-582E-4017-9FDF-E8998DAA0950}");
int hr = Shell32Ex.INSTANCE.SHGetImageList(SHIL_JUMBO, iImageListId, imageListRef);
if (hr != 0 || imageListRef.getValue() == null) {
return null;
}
HICON hIcon = Comctl32Ex.INSTANCE.ImageList_GetIcon(imageListRef.getValue(), shFileInfo.iIcon, ILD_TRANSPARENT);
if (hIcon == null) {
return null;
}
try {
return iconToBufferedImage(hIcon);
} finally {
User32.INSTANCE.DestroyIcon(hIcon);
}
}
/**
* Extracts the icon using the Windows Shell API and saves it as a PNG.
*/
private static boolean extractIconWithShellApi(String exePath, Path outputPath) throws IOException {
HICON[] icons = new HICON[1];
int[] iconIds = new int[1];
int extracted = User32Ex.INSTANCE.PrivateExtractIconsW(
exePath,
0,
ICON_SIZE,
ICON_SIZE,
icons,
iconIds,
1,
0
);
if (extracted <= 0 || icons[0] == null) {
return false;
}
BufferedImage image;
try {
image = iconToBufferedImage(icons[0]);
} finally {
User32.INSTANCE.DestroyIcon(icons[0]);
}
if (image == null) {
return false;
}
ImageIO.write(image, "png", outputPath.toFile());
return Files.exists(outputPath) && Files.size(outputPath) > 0;
}
/**
* Converts a Windows HICON into a BufferedImage.
*/
private static BufferedImage iconToBufferedImage(HICON hIcon) {
WinGDI.ICONINFO iconInfo = new WinGDI.ICONINFO();
if (!User32.INSTANCE.GetIconInfo(hIcon, iconInfo)) {
return null;
}
try {
HBITMAP hBitmap = iconInfo.hbmColor != null ? iconInfo.hbmColor : iconInfo.hbmMask;
if (hBitmap == null) {
return null;
}
WinGDI.BITMAP bitmap = new WinGDI.BITMAP();
GDI32.INSTANCE.GetObject(hBitmap, bitmap.size(), bitmap.getPointer());
bitmap.read();
int width = bitmap.bmWidth.intValue();
int height = bitmap.bmHeight.intValue();
if (width <= 0 || height <= 0) {
return null;
}
WinGDI.BITMAPINFO bmi = new WinGDI.BITMAPINFO();
bmi.bmiHeader.biSize = bmi.bmiHeader.size();
bmi.bmiHeader.biWidth = width;
// Negative height creates a top-down DIB (no vertical flip).
bmi.bmiHeader.biHeight = -height;
bmi.bmiHeader.biPlanes = 1;
bmi.bmiHeader.biBitCount = 32;
bmi.bmiHeader.biCompression = WinGDI.BI_RGB;
int bufferSize = width * height * 4;
Memory buffer = new Memory(bufferSize);
HDC hdc = GDI32.INSTANCE.CreateCompatibleDC(null);
if (hdc == null) {
return null;
}
WinNT.HANDLE oldBitmap = GDI32.INSTANCE.SelectObject(hdc, hBitmap);
int lines = GDI32.INSTANCE.GetDIBits(
hdc,
hBitmap,
0,
height,
buffer,
bmi,
WinGDI.DIB_RGB_COLORS
);
GDI32.INSTANCE.SelectObject(hdc, oldBitmap);
GDI32.INSTANCE.DeleteDC(hdc);
if (lines == 0) {
return null;
}
byte[] data = buffer.getByteArray(0, bufferSize);
int[] pixels = new int[width * height];
for (int i = 0, p = 0; i < pixels.length; i++) {
int b = data[p++] & 0xFF;
int g = data[p++] & 0xFF;
int r = data[p++] & 0xFF;
int a = data[p++] & 0xFF;
pixels[i] = (a << 24) | (r << 16) | (g << 8) | b;
}
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
image.setRGB(0, 0, width, height, pixels, 0, width);
return image;
} finally {
cleanupIconInfo(iconInfo);
}
}
private static void cleanupIconInfo(WinGDI.ICONINFO iconInfo) {
if (iconInfo.hbmColor != null) {
GDI32.INSTANCE.DeleteObject(iconInfo.hbmColor);
}
if (iconInfo.hbmMask != null) {
GDI32.INSTANCE.DeleteObject(iconInfo.hbmMask);
}
}
/**
* Returns the icons cache directory (creating AppData/CedroModernDock/iconsCache if it does not exist)
*/
private static Path getCacheDirectory() {
try {
String appData = System.getenv("APPDATA");
if (appData == null || appData.isEmpty()) {
Logger.error("AppData Not found.");
}
Path cacheDir = Paths.get(appData, "CedroModernDock", "iconsCache");
Files.createDirectories(cacheDir); // Creates the folder structure if it doesn't exist
return cacheDir;
} catch (IOException e) {
Logger.error("Failed to create icon cache directory." + e);
throw new RuntimeException("Could not create cache directory.", e);
}
}
/**
* Generates a safe filename using a SHA-256 hash of the executable path.
*/
private static String getHashedFileName(String input) throws NoSuchAlgorithmException {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] hash = digest.digest(input.getBytes(StandardCharsets.UTF_8));
return new BigInteger(1, hash).toString(16);
}
}
================================================
FILE: src/main/java/com/github/arthurdeka/cedromoderndock/view/WindowPreviewPopup.java
================================================
package com.github.arthurdeka.cedromoderndock.view;
import com.github.arthurdeka.cedromoderndock.application.DockTheme;
import com.github.arthurdeka.cedromoderndock.util.NativeWindowUtils;
import javafx.beans.value.ChangeListener;
import javafx.geometry.Bounds;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.geometry.Rectangle2D;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Popup;
import javafx.stage.Screen;
import java.util.List;
import java.util.function.Consumer;
public class WindowPreviewPopup extends Popup {
private final VBox container;
private Node currentTarget;
private Node currentDock;
// Reposition whenever popup size changes (content can grow/shrink).
private final ChangeListener sizeListener = (obs, old, val) -> reposition();
public WindowPreviewPopup() {
this.container = new VBox();
this.container.setPadding(new Insets(10));
this.container.setSpacing(5);
this.container.setAlignment(Pos.CENTER_LEFT);
// Prevent auto-hide when clicking inside the popup
this.setAutoHide(false);
this.getContent().add(container);
widthProperty().addListener(sizeListener);
heightProperty().addListener(sizeListener);
}
public void updateContent(
List windows,
Image appIcon,
String appLabel,
DockTheme dockTheme,
Consumer activateWindowAction
) {
container.getChildren().clear();
// Apply style from dock model so the popup matches the dock theme.
String style = String.format(
"-fx-background-color: rgba(%s %s); -fx-background-radius: %s;",
dockTheme.colorRgb(),
dockTheme.transparency(),
dockTheme.borderRounding()
);
container.setStyle(style);
// Choose a readable text color based on dock background brightness.
Color textColor = getTextColorForBackground(dockTheme.colorRgb());
for (NativeWindowUtils.WindowInfo window : windows) {
HBox item = createWindowItem(window, appIcon, appLabel, textColor, activateWindowAction);
container.getChildren().add(item);
}
}
private Color getTextColorForBackground(String dockColorRGB) {
try {
// Remove commas and trim
String cleanRGB = dockColorRGB.replace(",", " ").trim();
String[] parts = cleanRGB.split("\\s+");
if (parts.length >= 3) {
int r = Integer.parseInt(parts[0]);
int g = Integer.parseInt(parts[1]);
int b = Integer.parseInt(parts[2]);
// Calculate brightness to choose black/white contrast.
double brightness = (r * 0.299 + g * 0.587 + b * 0.114);
return brightness > 128 ? Color.BLACK : Color.WHITE;
}
} catch (NumberFormatException e) {
// Ignore, default to white
}
return Color.WHITE;
}
private HBox createWindowItem(
NativeWindowUtils.WindowInfo window,
Image appIcon,
String appLabel,
Color textColor,
Consumer activateWindowAction
) {
HBox item = new HBox();
item.setSpacing(10);
item.setPadding(new Insets(5, 10, 5, 10));
item.setAlignment(Pos.CENTER_LEFT);
item.setStyle("-fx-background-color: transparent; -fx-background-radius: 5; -fx-cursor: hand;");
// Icon
ImageView iconView = new ImageView(appIcon);
iconView.setFitWidth(16);
iconView.setFitHeight(16);
iconView.setPreserveRatio(true);
// Title
Label titleLabel = new Label(formatWindowTitle(window.title(), appLabel));
titleLabel.setTextFill(textColor);
titleLabel.setStyle("-fx-font-size: 12px;");
item.getChildren().addAll(iconView, titleLabel);
// Hover effect for better visual feedback.
item.setOnMouseEntered(e -> {
item.setStyle("-fx-background-color: rgba(255, 255, 255, 0.2); -fx-background-radius: 5; -fx-cursor: hand;");
titleLabel.setTextFill(Color.WHITE); // Always white on hover for better contrast against hover bg
});
item.setOnMouseExited(e -> {
item.setStyle("-fx-background-color: transparent; -fx-background-radius: 5; -fx-cursor: hand;");
titleLabel.setTextFill(textColor);
});
// Click action
item.setOnMouseClicked(e -> {
activateWindowAction.accept(window);
this.hide();
});
return item;
}
private String formatWindowTitle(String windowTitle, String appLabel) {
String sanitizedTitle = stripRedundantAppSuffix(windowTitle, appLabel);
return truncateTitle(sanitizedTitle, 40);
}
private String stripRedundantAppSuffix(String windowTitle, String appLabel) {
if (windowTitle == null) {
return "";
}
if (appLabel == null || appLabel.isBlank()) {
return windowTitle;
}
String suffix = " - " + appLabel;
if (windowTitle.regionMatches(true, Math.max(0, windowTitle.length() - suffix.length()), suffix, 0, suffix.length())) {
String stripped = windowTitle.substring(0, windowTitle.length() - suffix.length()).trim();
if (!stripped.isEmpty()) {
return stripped;
}
}
return windowTitle;
}
private String truncateTitle(String title, int maxLength) {
if (title == null) {
return "";
}
if (title.length() <= maxLength) {
return title;
}
return title.substring(0, maxLength) + "...";
}
public VBox getContainer() {
return container;
}
public void showAbove(Node target, Node dockContainer) {
this.currentTarget = target;
this.currentDock = dockContainer;
Bounds bounds = target.localToScreen(target.getBoundsInLocal());
// Initial show, then reposition to avoid flicker.
if (!isShowing()) {
this.show(target, bounds.getMinX(), bounds.getMinY());
}
reposition();
}
private void reposition() {
if (currentTarget == null || !isShowing()) return;
Bounds bounds = currentTarget.localToScreen(currentTarget.getBoundsInLocal());
if (bounds == null) return;
double w = getWidth();
double h = getHeight();
double gap = 5;
// Center horizontally over the target icon.
setX(bounds.getMinX() + (bounds.getWidth() / 2) - (w / 2));
Rectangle2D screenBounds = getScreenBounds(bounds);
Bounds dockBounds = getDockBounds(bounds);
double yAbove = dockBounds.getMinY() - h - gap;
double yBelow = dockBounds.getMaxY() + gap;
// If there's no room above the dock, place below instead.
if (yAbove < screenBounds.getMinY() + gap) {
setY(yBelow);
} else {
setY(yAbove);
}
}
private Rectangle2D getScreenBounds(Bounds bounds) {
// Use the screen containing the target bounds.
for (Screen screen : Screen.getScreensForRectangle(
bounds.getMinX(),
bounds.getMinY(),
bounds.getWidth(),
bounds.getHeight()
)) {
return screen.getVisualBounds();
}
return Screen.getPrimary().getVisualBounds();
}
private Bounds getDockBounds(Bounds fallbackBounds) {
if (currentDock == null) {
return fallbackBounds;
}
Bounds dockBounds = currentDock.localToScreen(currentDock.getBoundsInLocal());
return dockBounds != null ? dockBounds : fallbackBounds;
}
}
================================================
FILE: src/main/java/module-info.java
================================================
module com.github.arthurdeka.cedromoderndock {
requires javafx.controls;
requires javafx.fxml;
requires java.desktop;
requires com.sun.jna;
requires com.sun.jna.platform;
requires com.fasterxml.jackson.databind;
requires static lombok;
opens com.github.arthurdeka.cedromoderndock.controller to javafx.fxml;
opens com.github.arthurdeka.cedromoderndock to javafx.fxml;
opens com.github.arthurdeka.cedromoderndock.fxml to javafx.fxml;
opens com.github.arthurdeka.cedromoderndock.application to com.fasterxml.jackson.databind;
opens com.github.arthurdeka.cedromoderndock.model to com.fasterxml.jackson.databind;
opens com.github.arthurdeka.cedromoderndock.util to com.sun.jna;
exports com.github.arthurdeka.cedromoderndock;
exports com.github.arthurdeka.cedromoderndock.controller to javafx.fxml;
}
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/css/dock.css
================================================
#myAnchorPane {
-fx-background-color: transparent;
}
#MyHBox {
-fx-background-color: black;
}
.dock-button {
-fx-content-display: graphic-only;
-fx-background-color: transparent;
-fx-cursor: hand;
transition-property: -fx-scale-x, -fx-scale-y;
transition-duration: 0.3s;
-fx-scale-x: 1.0;
-fx-scale-y: 1.0;
}
.dock-button:hover {
-fx-scale-x: 1.3;
-fx-scale-y: 1.3;
}
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/css/dockSettings.css
================================================
.root {
-fx-font-family: "Segoe UI", Arial, sans-serif;
-fx-background-color: #111315;
-fx-base: #111315;
-fx-accent: #007acc;
-fx-focus-color: transparent;
-fx-faint-focus-color: transparent;
}
.window-root {
-fx-background-color: linear-gradient(to bottom, #15181c 0%, #111315 100%);
}
.settings-window {
-fx-background-insets: 0;
}
.modal-root {
-fx-background-color: #111315;
}
.label {
-fx-text-fill: #e6edf3;
-fx-font-size: 13px;
}
.page-header {
-fx-padding: 0 0 4 0;
}
#mainTitle,
.main-title {
-fx-text-fill: #f5f7fa;
-fx-font-size: 30px;
-fx-font-weight: bold;
}
.modal-title {
-fx-font-size: 26px;
}
.main-subtitle {
-fx-text-fill: #8f9aa6;
-fx-font-size: 13px;
}
.content-shell {
-fx-background-color: transparent;
}
.tab-scroll-pane {
-fx-background-color: transparent;
-fx-background: transparent;
-fx-border-color: transparent;
-fx-fit-to-width: true;
}
.tab-scroll-pane > .viewport {
-fx-background-color: transparent;
}
.tab-scroll-pane > .corner {
-fx-background-color: transparent;
}
.section-card {
-fx-background-color: #1a1d21;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-border-radius: 4px;
-fx-background-radius: 4px;
-fx-padding: 18px;
}
.action-panel {
-fx-background-color: #171a1e;
}
.hero-card,
.logo-card {
-fx-background-color: #171a1e;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-border-radius: 4px;
-fx-background-radius: 4px;
-fx-padding: 18px;
}
.hero-image-wrap {
-fx-background-color: #111315;
-fx-border-color: #28313a;
-fx-border-width: 1px;
-fx-border-radius: 4px;
-fx-background-radius: 4px;
-fx-padding: 18px;
}
.section-title {
-fx-text-fill: #007acc;
-fx-font-size: 17px;
-fx-font-weight: bold;
}
.section-helper {
-fx-text-fill: #97a3b0;
-fx-font-size: 12px;
}
.field-label {
-fx-text-fill: #dce3ea;
-fx-font-size: 12px;
-fx-font-weight: bold;
}
.meta-card {
-fx-min-width: 440px;
}
.meta-value {
-fx-text-fill: #d7dee6;
-fx-font-size: 13px;
}
.general-link {
-fx-text-fill: #8fbfe8;
}
.footer-note {
-fx-text-fill: #b9c3ce;
-fx-font-weight: bold;
}
.ack-item {
-fx-background-color: #13161a;
-fx-border-color: #262d35;
-fx-border-width: 1px;
-fx-border-radius: 4px;
-fx-background-radius: 4px;
-fx-padding: 10px 12px;
-fx-text-fill: #dde6ef;
-fx-font-size: 13px;
}
.tab-pane {
-fx-background-color: transparent;
-fx-tab-min-height: 36px;
-fx-tab-max-height: 36px;
}
.tab-pane .tab-header-area {
-fx-padding: 0 0 8 0;
}
.tab-pane .tab-header-area .tab-header-background {
-fx-background-color: transparent;
}
.tab-pane .headers-region {
-fx-background-color: transparent;
}
.tab-pane .tab {
-fx-background-color: #1a1d21;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-border-radius: 4px 4px 0 0;
-fx-background-radius: 4px 4px 0 0;
-fx-padding: 8 16 8 16;
}
.tab-pane .tab:hover {
-fx-background-color: #20242a;
}
.tab-pane .tab:selected {
-fx-background-color: #20242a;
-fx-border-color: #007acc #2d333b #20242a #2d333b;
-fx-border-width: 2px 1px 1px 1px;
}
.tab-pane .tab .tab-label {
-fx-text-fill: #a9b4bf;
-fx-font-size: 12px;
-fx-font-weight: bold;
}
.tab-pane .tab:selected .tab-label {
-fx-text-fill: #f5f7fa;
}
.tab-pane .tab-content-area {
-fx-background-color: #14181c;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-background-radius: 0 4px 4px 4px;
-fx-border-radius: 0 4px 4px 4px;
}
.button {
-fx-background-color: #007acc;
-fx-text-fill: white;
-fx-font-size: 13px;
-fx-font-weight: bold;
-fx-padding: 11px 16px;
-fx-background-radius: 4px;
-fx-border-radius: 4px;
-fx-border-width: 1px;
-fx-border-color: #007acc;
}
.button:hover {
-fx-background-color: #1387d7;
-fx-border-color: #1387d7;
-fx-cursor: hand;
}
.button:pressed {
-fx-background-color: #0060a2;
-fx-border-color: #0060a2;
}
.button:disabled {
-fx-opacity: 0.48;
}
.secondary-button {
-fx-background-color: #1a1d21;
-fx-border-color: #2f3943;
-fx-text-fill: #e6edf3;
}
.secondary-button:hover {
-fx-background-color: #22272e;
-fx-border-color: #3b4753;
}
.secondary-button:pressed {
-fx-background-color: #171b1f;
-fx-border-color: #2f3943;
}
.list-view {
-fx-background-color: #111315;
-fx-control-inner-background: #111315;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-background-radius: 4px;
-fx-border-radius: 4px;
-fx-padding: 4px;
}
.list-cell {
-fx-background-color: transparent;
-fx-text-fill: #dce3ea;
-fx-font-size: 13px;
-fx-padding: 10px 12px;
}
.list-cell:filled:hover {
-fx-background-color: #1d2329;
-fx-text-fill: #f5f7fa;
}
.list-cell:filled:selected,
.list-cell:filled:selected:hover {
-fx-background-color: #007acc;
-fx-text-fill: #ffffff;
}
.scroll-bar:vertical,
.scroll-bar:horizontal {
-fx-background-color: transparent;
}
.scroll-bar .thumb {
-fx-background-color: #2f3943;
-fx-background-radius: 4px;
}
.scroll-bar .thumb:hover {
-fx-background-color: #3d4956;
}
.slider .track {
-fx-background-color: #2a3036;
-fx-background-radius: 2px;
-fx-pref-height: 4px;
}
.slider .thumb {
-fx-background-color: #007acc;
-fx-background-radius: 100px;
-fx-padding: 8px;
}
.slider .axis {
-fx-tick-label-fill: #8f9aa6;
-fx-tick-length: 4px;
}
.slider .axis .tick-mark {
-fx-stroke: #5f6a75;
}
.radio-button {
-fx-text-fill: #dce3ea;
-fx-font-size: 13px;
-fx-font-weight: bold;
}
.radio-button .radio {
-fx-background-color: #111315;
-fx-border-color: #55616e;
-fx-border-width: 1px;
-fx-border-radius: 100px;
-fx-background-radius: 100px;
-fx-padding: 4px;
}
.radio-button:selected .radio {
-fx-border-color: #007acc;
}
.radio-button:selected .dot {
-fx-background-color: #007acc;
-fx-background-insets: 0;
}
.choice-box,
.color-picker {
-fx-background-color: #111315;
-fx-border-color: #2d333b;
-fx-border-width: 1px;
-fx-background-radius: 4px;
-fx-border-radius: 4px;
-fx-mark-color: #007acc;
-fx-padding: 4px 8px;
}
.choice-box:hover,
.color-picker:hover {
-fx-background-color: #161a1f;
-fx-border-color: #3a4652;
}
.choice-box > .label,
.color-picker .label {
-fx-text-fill: #e6edf3;
-fx-font-size: 13px;
-fx-font-weight: bold;
}
.choice-box .context-menu {
-fx-background-color: #171b20;
}
.choice-box .menu-item:focused {
-fx-background-color: #007acc;
}
.choice-box .menu-item > .label {
-fx-text-fill: #e6edf3;
-fx-font-size: 13px;
}
.choice-box .menu-item:focused > .label {
-fx-text-fill: white;
}
#dockColorPicker .arrow {
-fx-background-color: #007acc;
}
#dockColorPicker .color-picker-label {
-fx-text-fill: #e6edf3;
}
#dockColorPicker .color-picker-grid .opacity-slider,
#dockColorPicker .color-picker-grid .opacity-label {
visibility: hidden;
max-height: 0;
padding: 0;
}
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/AcknowledgementsModalView.fxml
================================================
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/AddWindowsModulesModalView.fxml
================================================
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/DockSettingsView.fxml
================================================
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/fxml/DockView.fxml
================================================
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ar_SA.properties
================================================
dialog.singleInstance.message=يوجد بالفعل مثيل من Cedro Modern Dock قيد التشغيل. تحقق من سطح المكتب.
settings.window.title=الإعدادات
settings.page.title=إعدادات Dock
settings.page.subtitle=تصميم حديث ومتجاوب، وعناصر تحكم حديثة، وتنظيم قائم على علامات التبويب.
settings.language.label=اللغة
settings.tab.icons=الأيقونات
settings.tab.iconsCustomization=تخصيص الأيقونات
settings.tab.dockCustomization=تخصيص Dock
settings.tab.dockPositioning=موضع Dock
settings.tab.general=عام
settings.icons.items.title=عناصر Dock
settings.icons.items.helper=أعد ترتيب الأيقونات الحالية وأدر البرامج أو وحدات Windows من مكان واحد.
settings.icons.actions.title=الإجراءات
settings.icons.actions.helper=أضف ملفات تنفيذية مخصصة أو وحدات Windows أصلية أو أزل العنصر المحدد.
settings.icons.moveUp=نقل العنصر لأعلى
settings.icons.moveDown=نقل العنصر لأسفل
settings.icons.addProgram=إضافة برنامج
settings.icons.addFolder=إضافة مجلد
settings.icons.addWindowsModule=إضافة وحدة Windows
settings.icons.removeSelected=إزالة العنصر المحدد
settings.iconsCustomization.size.title=حجم الأيقونات
settings.iconsCustomization.size.helper=اضبط الحضور البصري لكل أيقونة مع الحفاظ على مظهر Dock النظيف.
settings.iconsCustomization.spacing.title=المسافة بين الأيقونات
settings.iconsCustomization.spacing.helper=تحكم في مدى تماسك Dock أو اتساعه دون تغيير ترتيب العناصر.
settings.dockCustomization.transparency.title=شفافية Dock
settings.dockCustomization.transparency.helper=وازن بين وضوح Dock وخفته فوق خلفية سطح المكتب.
settings.dockCustomization.rounding.title=استدارة الحواف
settings.dockCustomization.rounding.helper=أبقِ المظهر حادًا وحديثًا أو نعّم الزوايا قليلًا مع الحفاظ على النمط المسطح.
settings.dockCustomization.background.title=لون خلفية Dock
settings.dockCustomization.background.helper=اختر اللون الأساسي الذي يظهر أسفل أيقونات Dock.
settings.positioning.mode.title=وضع التموضع
settings.positioning.mode.helper=اختر بين تثبيت Dock في موضع ثابت أو سحبه بحرية.
settings.positioning.mode.static=تموضع ثابت
settings.positioning.mode.dynamic=تموضع ديناميكي
settings.positioning.alignment.title=المحاذاة
settings.positioning.alignment.vertical=عمودي
settings.positioning.alignment.horizontal=أفقي
settings.positioning.spacing.title=المسافات على الشاشة
settings.positioning.spacing.top=أعلى
settings.positioning.spacing.left=يسار
settings.positioning.spacing.right=يمين
settings.positioning.spacing.down=أسفل
settings.positioning.dynamic.title=تموضع ديناميكي
settings.positioning.dynamic.helper=اسحب Dock بحرية على الشاشة وضعه أينما تريد.
settings.positioning.choice.top=أعلى
settings.positioning.choice.middle=وسط
settings.positioning.choice.down=أسفل
settings.positioning.choice.left=يسار
settings.positioning.choice.right=يمين
settings.general.version=الإصدار fx1.1 - 03/2026
settings.general.repository=المستودع: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=التواصل: github.com/arthurdeka
settings.general.openSource=برنامج مجاني ومفتوح المصدر
settings.general.acknowledgements=شكر وتقدير
dialog.fileChooser.executableTitle=اختر .exe
dialog.fileChooser.executableFilter=ملف تنفيذي
dialog.directoryChooser.title=اختر مجلدًا
windowsModule.modal.title=إضافة وحدة Windows
windowsModule.modal.subtitle=اختر وجهة Windows أصلية لإضافتها إلى Dock.
windowsModule.modal.available.title=الوحدات المتاحة
windowsModule.modal.available.helper=تقوم هذه العناصر بإنشاء اختصارات Dock لأسطح Windows المدمجة.
windowsModule.modal.addSelected=إضافة الوحدة المحددة
acknowledgements.window.title=شكر وتقدير
acknowledgements.title=شكر وتقدير
acknowledgements.subtitle=المكتبات وأطر العمل المستخدمة في Cedro Modern Dock.
acknowledgements.sectionTitle=المكتبات وأطر العمل
dockItem.settings=الإعدادات
windowsModule.myComputer=جهاز الكمبيوتر الخاص بي
windowsModule.recycleBin=سلة المحذوفات
windowsModule.controlPanel=لوحة التحكم
windowsModule.settings=الإعدادات
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_bn_BD.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock-এর একটি সংস্করণ ইতিমধ্যে চলছে। আপনার ডেস্কটপ দেখুন।
settings.window.title=সেটিংস
settings.page.title=Dock সেটিংস
settings.page.subtitle=আধুনিক রেসপনসিভ লেআউট, আধুনিক কন্ট্রোল এবং ট্যাবভিত্তিক বিন্যাস।
settings.language.label=ভাষা
settings.tab.icons=আইকন
settings.tab.iconsCustomization=আইকন কাস্টমাইজেশন
settings.tab.dockCustomization=Dock কাস্টমাইজেশন
settings.tab.dockPositioning=Dock অবস্থান
settings.tab.general=সাধারণ
settings.icons.items.title=Dock আইটেম
settings.icons.items.helper=বর্তমান আইকনগুলো পুনর্বিন্যাস করুন এবং এক জায়গা থেকে প্রোগ্রাম বা Windows মডিউল পরিচালনা করুন।
settings.icons.actions.title=অ্যাকশন
settings.icons.actions.helper=কাস্টম executable, Windows মডিউল যোগ করুন অথবা নির্বাচিত আইটেম সরান।
settings.icons.moveUp=আইটেম উপরে নিন
settings.icons.moveDown=আইটেম নিচে নিন
settings.icons.addProgram=প্রোগ্রাম যোগ করুন
settings.icons.addFolder=ফোল্ডার যোগ করুন
settings.icons.addWindowsModule=Windows মডিউল যোগ করুন
settings.icons.removeSelected=নির্বাচিত আইটেম সরান
settings.iconsCustomization.size.title=আইকনের আকার
settings.iconsCustomization.size.helper=Dock-এর পরিষ্কার চেহারা রেখে প্রতিটি আইকনের দৃশ্যমান আকার ঠিক করুন।
settings.iconsCustomization.spacing.title=আইকনের ফাঁক
settings.iconsCustomization.spacing.helper=আইটেমের ক্রম না বদলে Dock-কে ঘন বা ফাঁকাভাবে সাজান।
settings.dockCustomization.transparency.title=Dock স্বচ্ছতা
settings.dockCustomization.transparency.helper=ডেস্কটপের পটভূমিতে Dock-এর উপস্থিতি ও সূক্ষ্মতার ভারসাম্য রাখুন।
settings.dockCustomization.rounding.title=বর্ডারের গোলাকৃতি
settings.dockCustomization.rounding.helper=ফ্ল্যাট স্টাইল বজায় রেখে প্রান্তগুলোকে তীক্ষ্ণ বা নরম করুন।
settings.dockCustomization.background.title=Dock ব্যাকগ্রাউন্ড রং
settings.dockCustomization.background.helper=Dock আইকনের নিচে থাকা মূল রংটি নির্বাচন করুন।
settings.positioning.mode.title=অবস্থান মোড
settings.positioning.mode.helper=স্থির স্ক্রিন অ্যাঙ্কর বা স্বাধীনভাবে টানা যায় এমন Dock বেছে নিন।
settings.positioning.mode.static=স্থির অবস্থান
settings.positioning.mode.dynamic=গতিশীল অবস্থান
settings.positioning.alignment.title=সারিবিন্যাস
settings.positioning.alignment.vertical=উল্লম্ব
settings.positioning.alignment.horizontal=আনুভূমিক
settings.positioning.spacing.title=স্ক্রিনের দূরত্ব
settings.positioning.spacing.top=উপরে
settings.positioning.spacing.left=বামে
settings.positioning.spacing.right=ডানে
settings.positioning.spacing.down=নিচে
settings.positioning.dynamic.title=গতিশীল অবস্থান
settings.positioning.dynamic.helper=Dock-কে স্ক্রিনে যেকোনো জায়গায় টেনে নিয়ে যান।
settings.positioning.choice.top=উপরে
settings.positioning.choice.middle=মাঝখানে
settings.positioning.choice.down=নিচে
settings.positioning.choice.left=বামে
settings.positioning.choice.right=ডানে
settings.general.version=সংস্করণ fx1.1 - 03/2026
settings.general.repository=রিপোজিটরি: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=যোগাযোগ: github.com/arthurdeka
settings.general.openSource=বিনামূল্যের মুক্ত উৎস সফটওয়্যার
settings.general.acknowledgements=কৃতজ্ঞতা
dialog.fileChooser.executableTitle=.exe নির্বাচন করুন
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=ফোল্ডার নির্বাচন করুন
windowsModule.modal.title=Windows মডিউল যোগ করুন
windowsModule.modal.subtitle=Dock-এ যোগ করার জন্য একটি Windows গন্তব্য নির্বাচন করুন।
windowsModule.modal.available.title=উপলভ্য মডিউল
windowsModule.modal.available.helper=এই এন্ট্রিগুলো Windows-এর বিল্ট-ইন অংশগুলোর জন্য Dock শর্টকাট তৈরি করে।
windowsModule.modal.addSelected=নির্বাচিত মডিউল যোগ করুন
acknowledgements.window.title=কৃতজ্ঞতা
acknowledgements.title=কৃতজ্ঞতা
acknowledgements.subtitle=Cedro Modern Dock-এ ব্যবহৃত লাইব্রেরি ও ফ্রেমওয়ার্ক।
acknowledgements.sectionTitle=লাইব্রেরি ও ফ্রেমওয়ার্ক
dockItem.settings=সেটিংস
windowsModule.myComputer=আমার কম্পিউটার
windowsModule.recycleBin=রিসাইকেল বিন
windowsModule.controlPanel=কন্ট্রোল প্যানেল
windowsModule.settings=সেটিংস
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_de_DE.properties
================================================
dialog.singleInstance.message=Es läuft bereits eine Instanz von Cedro Modern Dock. Bitte prüfe deinen Desktop.
settings.window.title=Einstellungen
settings.page.title=Dock-Einstellungen
settings.page.subtitle=Modernes responsives Layout, moderne Steuerelemente und eine tabbasierte Organisation.
settings.language.label=Sprache
settings.tab.icons=Symbole
settings.tab.iconsCustomization=Symbolanpassung
settings.tab.dockCustomization=Dock-Anpassung
settings.tab.dockPositioning=Dock-Positionierung
settings.tab.general=Allgemein
settings.icons.items.title=Dock-Elemente
settings.icons.items.helper=Ordne die aktuellen Symbole neu und verwalte Programme oder Windows-Module an einem Ort.
settings.icons.actions.title=Aktionen
settings.icons.actions.helper=Füge benutzerdefinierte Programme oder Windows-Module hinzu oder entferne das ausgewählte Element.
settings.icons.moveUp=Element nach oben
settings.icons.moveDown=Element nach unten
settings.icons.addProgram=Programm hinzufügen
settings.icons.addFolder=Ordner hinzufügen
settings.icons.addWindowsModule=Windows-Modul hinzufügen
settings.icons.removeSelected=Ausgewähltes Element entfernen
settings.iconsCustomization.size.title=Symbolgröße
settings.iconsCustomization.size.helper=Passe die Wirkung jedes Symbols an und behalte dabei eine klare Dock-Silhouette.
settings.iconsCustomization.spacing.title=Abstand zwischen Symbolen
settings.iconsCustomization.spacing.helper=Stelle ein, wie kompakt oder luftig das Dock wirkt, ohne die Reihenfolge zu ändern.
settings.dockCustomization.transparency.title=Dock-Transparenz
settings.dockCustomization.transparency.helper=Finde das Gleichgewicht zwischen Präsenz und Zurückhaltung auf dem Desktop-Hintergrund.
settings.dockCustomization.rounding.title=Abrundung der Ränder
settings.dockCustomization.rounding.helper=Halte das Gehäuse modern und scharf oder weiche die Ecken leicht ab, ohne den flachen Stil zu verlassen.
settings.dockCustomization.background.title=Dock-Hintergrundfarbe
settings.dockCustomization.background.helper=Wähle den Grundton unter den Dock-Symbolen.
settings.positioning.mode.title=Positionierungsmodus
settings.positioning.mode.helper=Wähle zwischen einem festen Bildschirmanker oder einem frei verschiebbaren Dock.
settings.positioning.mode.static=Statische Positionierung
settings.positioning.mode.dynamic=Dynamische Positionierung
settings.positioning.alignment.title=Ausrichtung
settings.positioning.alignment.vertical=Vertikal
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Bildschirmabstand
settings.positioning.spacing.top=Oben
settings.positioning.spacing.left=Links
settings.positioning.spacing.right=Rechts
settings.positioning.spacing.down=Unten
settings.positioning.dynamic.title=Dynamische Positionierung
settings.positioning.dynamic.helper=Ziehe das Dock frei über den Bildschirm und platziere es, wo du möchtest.
settings.positioning.choice.top=Oben
settings.positioning.choice.middle=Mitte
settings.positioning.choice.down=Unten
settings.positioning.choice.left=Links
settings.positioning.choice.right=Rechts
settings.general.version=Version fx1.1 - 03/2026
settings.general.repository=Repository: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Kontakt: github.com/arthurdeka
settings.general.openSource=Freie Open-Source-Software
settings.general.acknowledgements=Danksagungen
dialog.fileChooser.executableTitle=.exe auswählen
dialog.fileChooser.executableFilter=Programmdatei
dialog.directoryChooser.title=Ordner auswählen
windowsModule.modal.title=Windows-Modul hinzufügen
windowsModule.modal.subtitle=Wähle ein natives Windows-Ziel aus, das dem Dock hinzugefügt werden soll.
windowsModule.modal.available.title=Verfügbare Module
windowsModule.modal.available.helper=Diese Einträge erstellen Dock-Verknüpfungen zu integrierten Windows-Bereichen.
windowsModule.modal.addSelected=Ausgewähltes Modul hinzufügen
acknowledgements.window.title=Danksagungen
acknowledgements.title=Danksagungen
acknowledgements.subtitle=Von Cedro Modern Dock verwendete Bibliotheken und Frameworks.
acknowledgements.sectionTitle=Bibliotheken und Frameworks
dockItem.settings=Einstellungen
windowsModule.myComputer=Dieser PC
windowsModule.recycleBin=Papierkorb
windowsModule.controlPanel=Systemsteuerung
windowsModule.settings=Einstellungen
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_en_US.properties
================================================
language.english=English
language.portugueseBrazil=Portuguese (Brazil)
dialog.singleInstance.message=There is already an instance of Cedro Modern Dock running. Check your desktop.
settings.window.title=Settings
settings.page.title=Dock Settings
settings.page.subtitle=Dark flat redesign with responsive layout, modern controls and tab-based organization.
settings.language.label=Language
settings.tab.icons=Icons
settings.tab.iconsCustomization=Icons Customization
settings.tab.dockCustomization=Dock Customization
settings.tab.dockPositioning=Dock Positioning
settings.tab.general=General
settings.icons.items.title=Dock items
settings.icons.items.helper=Reorder the current icons and manage programs or Windows modules from one place.
settings.icons.actions.title=Actions
settings.icons.actions.helper=Add custom executables, include native Windows modules or remove the selected item.
settings.icons.moveUp=Move Item Up
settings.icons.moveDown=Move Item Down
settings.icons.addProgram=Add Program
settings.icons.addFolder=Add Folder
settings.icons.addWindowsModule=Add Windows Module
settings.icons.removeSelected=Remove Selected Item
settings.iconsCustomization.size.title=Icons Size
settings.iconsCustomization.size.helper=Adjust the visual prominence of each icon while preserving a clean, flat dock silhouette.
settings.iconsCustomization.spacing.title=Spacing Between Icons
settings.iconsCustomization.spacing.helper=Control how compact or airy the dock feels without disrupting the item order.
settings.dockCustomization.transparency.title=Dock Transparency
settings.dockCustomization.transparency.helper=Balance presence and subtlety for the dock surface against the desktop background.
settings.dockCustomization.rounding.title=Border Rounding
settings.dockCustomization.rounding.helper=Keep the shell sharp and modern or soften the corners slightly while staying within the flat style.
settings.dockCustomization.background.title=Dock Background Color
settings.dockCustomization.background.helper=Choose the base tone that sits beneath the dock icons.
settings.positioning.mode.title=Positioning Mode
settings.positioning.mode.helper=Choose between a fixed screen anchor or a freely draggable dock.
settings.positioning.mode.static=Static positioning
settings.positioning.mode.dynamic=Dynamic positioning
settings.positioning.alignment.title=Alignment
settings.positioning.alignment.vertical=Vertical
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Screen Spacing
settings.positioning.spacing.top=Top
settings.positioning.spacing.left=Left
settings.positioning.spacing.right=Right
settings.positioning.spacing.down=Down
settings.positioning.dynamic.title=Dynamic Positioning
settings.positioning.dynamic.helper=Drag the dock freely on the screen to place it wherever you want.
settings.positioning.choice.top=Top
settings.positioning.choice.middle=Middle
settings.positioning.choice.down=Down
settings.positioning.choice.left=Left
settings.positioning.choice.right=Right
settings.general.version=Version fx1.1 - 03/2026
settings.general.repository=Repository: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Contact: github.com/arthurdeka
settings.general.openSource=Free and Open-Source Software
settings.general.acknowledgements=Acknowledgements
dialog.fileChooser.executableTitle=Choose .exe
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=Choose folder
windowsModule.modal.title=Add Windows Module
windowsModule.modal.subtitle=Pick a native Windows destination to add to the dock.
windowsModule.modal.available.title=Available modules
windowsModule.modal.available.helper=These entries create dock shortcuts for built-in Windows surfaces.
windowsModule.modal.addSelected=Add Selected Module
acknowledgements.window.title=Acknowledgements
acknowledgements.title=Acknowledgements
acknowledgements.subtitle=Libraries and frameworks used by Cedro Modern Dock.
acknowledgements.sectionTitle=Libraries & Frameworks
dockItem.settings=Settings
windowsModule.myComputer=My Computer
windowsModule.recycleBin=Recycle Bin
windowsModule.controlPanel=Control Panel
windowsModule.settings=Settings
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_es_ES.properties
================================================
dialog.singleInstance.message=Ya hay una instancia de Cedro Modern Dock en ejecución. Revisa tu escritorio.
settings.window.title=Configuración
settings.page.title=Configuración del Dock
settings.page.subtitle=Diseño moderno y adaptable, controles modernos y organización basada en pestañas.
settings.language.label=Idioma
settings.tab.icons=Iconos
settings.tab.iconsCustomization=Personalización de iconos
settings.tab.dockCustomization=Personalización del Dock
settings.tab.dockPositioning=Posición del Dock
settings.tab.general=General
settings.icons.items.title=Elementos del Dock
settings.icons.items.helper=Reordena los iconos actuales y gestiona programas o módulos de Windows desde un solo lugar.
settings.icons.actions.title=Acciones
settings.icons.actions.helper=Añade ejecutables personalizados, módulos nativos de Windows o elimina el elemento seleccionado.
settings.icons.moveUp=Mover elemento arriba
settings.icons.moveDown=Mover elemento abajo
settings.icons.addProgram=Añadir programa
settings.icons.addFolder=Añadir carpeta
settings.icons.addWindowsModule=Añadir módulo de Windows
settings.icons.removeSelected=Eliminar elemento seleccionado
settings.iconsCustomization.size.title=Tamaño de los iconos
settings.iconsCustomization.size.helper=Ajusta la presencia visual de cada icono sin perder la silueta limpia del Dock.
settings.iconsCustomization.spacing.title=Espaciado entre iconos
settings.iconsCustomization.spacing.helper=Controla si el Dock se siente más compacto o más aireado sin alterar el orden.
settings.dockCustomization.transparency.title=Transparencia del Dock
settings.dockCustomization.transparency.helper=Equilibra presencia y sutileza del Dock sobre el fondo del escritorio.
settings.dockCustomization.rounding.title=Redondeo del borde
settings.dockCustomization.rounding.helper=Mantén una carcasa moderna y afilada o suaviza las esquinas sin salir del estilo plano.
settings.dockCustomization.background.title=Color de fondo del Dock
settings.dockCustomization.background.helper=Elige el tono base que aparece debajo de los iconos del Dock.
settings.positioning.mode.title=Modo de posición
settings.positioning.mode.helper=Elige entre un anclaje fijo en la pantalla o un Dock que se pueda arrastrar libremente.
settings.positioning.mode.static=Posicionamiento estático
settings.positioning.mode.dynamic=Posicionamiento dinámico
settings.positioning.alignment.title=Alineación
settings.positioning.alignment.vertical=Vertical
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Separación en pantalla
settings.positioning.spacing.top=Arriba
settings.positioning.spacing.left=Izquierda
settings.positioning.spacing.right=Derecha
settings.positioning.spacing.down=Abajo
settings.positioning.dynamic.title=Posicionamiento dinámico
settings.positioning.dynamic.helper=Arrastra el Dock libremente por la pantalla y colócalo donde quieras.
settings.positioning.choice.top=Arriba
settings.positioning.choice.middle=Centro
settings.positioning.choice.down=Abajo
settings.positioning.choice.left=Izquierda
settings.positioning.choice.right=Derecha
settings.general.version=Versión fx1.1 - 03/2026
settings.general.repository=Repositorio: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Contacto: github.com/arthurdeka
settings.general.openSource=Software libre y de código abierto
settings.general.acknowledgements=Agradecimientos
dialog.fileChooser.executableTitle=Elegir .exe
dialog.fileChooser.executableFilter=Ejecutable
dialog.directoryChooser.title=Elegir carpeta
windowsModule.modal.title=Añadir módulo de Windows
windowsModule.modal.subtitle=Elige un destino nativo de Windows para añadirlo al Dock.
windowsModule.modal.available.title=Módulos disponibles
windowsModule.modal.available.helper=Estas entradas crean accesos directos del Dock a superficies integradas de Windows.
windowsModule.modal.addSelected=Añadir módulo seleccionado
acknowledgements.window.title=Agradecimientos
acknowledgements.title=Agradecimientos
acknowledgements.subtitle=Bibliotecas y frameworks utilizados por Cedro Modern Dock.
acknowledgements.sectionTitle=Bibliotecas y frameworks
dockItem.settings=Configuración
windowsModule.myComputer=Mi PC
windowsModule.recycleBin=Papelera de reciclaje
windowsModule.controlPanel=Panel de control
windowsModule.settings=Configuración
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_fr_FR.properties
================================================
dialog.singleInstance.message=Une instance de Cedro Modern Dock est déjà en cours d’exécution. Vérifiez votre bureau.
settings.window.title=Paramètres
settings.page.title=Paramètres du Dock
settings.page.subtitle=Interface moderne et adaptative, contrôles modernes et organisation par onglets.
settings.language.label=Langue
settings.tab.icons=Icônes
settings.tab.iconsCustomization=Personnalisation des icônes
settings.tab.dockCustomization=Personnalisation du Dock
settings.tab.dockPositioning=Position du Dock
settings.tab.general=Général
settings.icons.items.title=Éléments du Dock
settings.icons.items.helper=Réorganisez les icônes actuelles et gérez vos programmes ou modules Windows depuis un seul endroit.
settings.icons.actions.title=Actions
settings.icons.actions.helper=Ajoutez des exécutables personnalisés, des modules Windows natifs ou supprimez l’élément sélectionné.
settings.icons.moveUp=Monter l’élément
settings.icons.moveDown=Descendre l’élément
settings.icons.addProgram=Ajouter un programme
settings.icons.addFolder=Ajouter un dossier
settings.icons.addWindowsModule=Ajouter un module Windows
settings.icons.removeSelected=Supprimer l’élément sélectionné
settings.iconsCustomization.size.title=Taille des icônes
settings.iconsCustomization.size.helper=Réglez la présence visuelle de chaque icône tout en gardant une silhouette propre du Dock.
settings.iconsCustomization.spacing.title=Espacement entre les icônes
settings.iconsCustomization.spacing.helper=Rendez le Dock plus compact ou plus aéré sans changer l’ordre des éléments.
settings.dockCustomization.transparency.title=Transparence du Dock
settings.dockCustomization.transparency.helper=Équilibrez présence et discrétion du Dock sur le fond du bureau.
settings.dockCustomization.rounding.title=Arrondi des bordures
settings.dockCustomization.rounding.helper=Gardez une apparence nette et moderne ou adoucissez les angles sans quitter le style plat.
settings.dockCustomization.background.title=Couleur de fond du Dock
settings.dockCustomization.background.helper=Choisissez la couleur de base affichée sous les icônes du Dock.
settings.positioning.mode.title=Mode de positionnement
settings.positioning.mode.helper=Choisissez entre un ancrage fixe à l’écran ou un Dock librement déplaçable.
settings.positioning.mode.static=Positionnement statique
settings.positioning.mode.dynamic=Positionnement dynamique
settings.positioning.alignment.title=Alignement
settings.positioning.alignment.vertical=Vertical
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Espacement à l’écran
settings.positioning.spacing.top=Haut
settings.positioning.spacing.left=Gauche
settings.positioning.spacing.right=Droite
settings.positioning.spacing.down=Bas
settings.positioning.dynamic.title=Positionnement dynamique
settings.positioning.dynamic.helper=Faites glisser librement le Dock sur l’écran pour le placer où vous voulez.
settings.positioning.choice.top=Haut
settings.positioning.choice.middle=Centre
settings.positioning.choice.down=Bas
settings.positioning.choice.left=Gauche
settings.positioning.choice.right=Droite
settings.general.version=Version fx1.1 - 03/2026
settings.general.repository=Dépôt : github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Contact : github.com/arthurdeka
settings.general.openSource=Logiciel libre et open source
settings.general.acknowledgements=Remerciements
dialog.fileChooser.executableTitle=Choisir un .exe
dialog.fileChooser.executableFilter=Exécutable
dialog.directoryChooser.title=Choisir un dossier
windowsModule.modal.title=Ajouter un module Windows
windowsModule.modal.subtitle=Choisissez une destination native de Windows à ajouter au Dock.
windowsModule.modal.available.title=Modules disponibles
windowsModule.modal.available.helper=Ces entrées créent des raccourcis Dock vers des surfaces intégrées de Windows.
windowsModule.modal.addSelected=Ajouter le module sélectionné
acknowledgements.window.title=Remerciements
acknowledgements.title=Remerciements
acknowledgements.subtitle=Bibliothèques et frameworks utilisés par Cedro Modern Dock.
acknowledgements.sectionTitle=Bibliothèques et frameworks
dockItem.settings=Paramètres
windowsModule.myComputer=Mon ordinateur
windowsModule.recycleBin=Corbeille
windowsModule.controlPanel=Panneau de configuration
windowsModule.settings=Paramètres
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_hi_IN.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock का एक संस्करण पहले से चल रहा है। अपना डेस्कटॉप जाँचें।
settings.window.title=सेटिंग्स
settings.page.title=Dock सेटिंग्स
settings.page.subtitle=आधुनिक रिस्पॉन्सिव लेआउट, आधुनिक नियंत्रण और टैब आधारित व्यवस्था।
settings.language.label=भाषा
settings.tab.icons=आइकन
settings.tab.iconsCustomization=आइकन अनुकूलन
settings.tab.dockCustomization=Dock अनुकूलन
settings.tab.dockPositioning=Dock स्थिति
settings.tab.general=सामान्य
settings.icons.items.title=Dock आइटम
settings.icons.items.helper=मौजूदा आइकनों को क्रम बदलें और प्रोग्राम या Windows मॉड्यूल एक ही जगह से प्रबंधित करें।
settings.icons.actions.title=क्रियाएँ
settings.icons.actions.helper=कस्टम executable, Windows मॉड्यूल जोड़ें या चुना हुआ आइटम हटाएँ।
settings.icons.moveUp=आइटम ऊपर ले जाएँ
settings.icons.moveDown=आइटम नीचे ले जाएँ
settings.icons.addProgram=प्रोग्राम जोड़ें
settings.icons.addFolder=फ़ोल्डर जोड़ें
settings.icons.addWindowsModule=Windows मॉड्यूल जोड़ें
settings.icons.removeSelected=चुना हुआ आइटम हटाएँ
settings.iconsCustomization.size.title=आइकन आकार
settings.iconsCustomization.size.helper=Dock को साफ रखते हुए हर आइकन का दृश्य आकार समायोजित करें।
settings.iconsCustomization.spacing.title=आइकनों के बीच दूरी
settings.iconsCustomization.spacing.helper=आइटम क्रम बदले बिना Dock को अधिक सघन या खुला बनाएँ।
settings.dockCustomization.transparency.title=Dock पारदर्शिता
settings.dockCustomization.transparency.helper=डेस्कटॉप पृष्ठभूमि पर Dock की मौजूदगी और सूक्ष्मता का संतुलन रखें।
settings.dockCustomization.rounding.title=किनारों की गोलाई
settings.dockCustomization.rounding.helper=फ्लैट शैली बनाए रखते हुए किनारों को तेज़ या थोड़ा मुलायम करें।
settings.dockCustomization.background.title=Dock पृष्ठभूमि रंग
settings.dockCustomization.background.helper=वह मूल रंग चुनें जो Dock आइकनों के नीचे दिखाई देगा।
settings.positioning.mode.title=स्थिति मोड
settings.positioning.mode.helper=स्थिर स्क्रीन एंकर या स्वतंत्र रूप से खींचे जा सकने वाले Dock में से चुनें।
settings.positioning.mode.static=स्थिर स्थिति
settings.positioning.mode.dynamic=गतिशील स्थिति
settings.positioning.alignment.title=संरेखण
settings.positioning.alignment.vertical=ऊर्ध्वाधर
settings.positioning.alignment.horizontal=क्षैतिज
settings.positioning.spacing.title=स्क्रीन दूरी
settings.positioning.spacing.top=ऊपर
settings.positioning.spacing.left=बाएँ
settings.positioning.spacing.right=दाएँ
settings.positioning.spacing.down=नीचे
settings.positioning.dynamic.title=गतिशील स्थिति
settings.positioning.dynamic.helper=Dock को स्क्रीन पर कहीं भी खींचकर अपनी पसंद की जगह रखें।
settings.positioning.choice.top=ऊपर
settings.positioning.choice.middle=मध्य
settings.positioning.choice.down=नीचे
settings.positioning.choice.left=बाएँ
settings.positioning.choice.right=दाएँ
settings.general.version=संस्करण fx1.1 - 03/2026
settings.general.repository=रिपॉज़िटरी: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=संपर्क: github.com/arthurdeka
settings.general.openSource=मुफ़्त और मुक्त स्रोत सॉफ़्टवेयर
settings.general.acknowledgements=आभार
dialog.fileChooser.executableTitle=.exe चुनें
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=फ़ोल्डर चुनें
windowsModule.modal.title=Windows मॉड्यूल जोड़ें
windowsModule.modal.subtitle=Dock में जोड़ने के लिए कोई मूल Windows गंतव्य चुनें।
windowsModule.modal.available.title=उपलब्ध मॉड्यूल
windowsModule.modal.available.helper=ये प्रविष्टियाँ Windows की अंतर्निहित सतहों के लिए Dock शॉर्टकट बनाती हैं।
windowsModule.modal.addSelected=चुना हुआ मॉड्यूल जोड़ें
acknowledgements.window.title=आभार
acknowledgements.title=आभार
acknowledgements.subtitle=Cedro Modern Dock द्वारा उपयोग की गई लाइब्रेरी और फ़्रेमवर्क।
acknowledgements.sectionTitle=लाइब्रेरी और फ़्रेमवर्क
dockItem.settings=सेटिंग्स
windowsModule.myComputer=मेरा कंप्यूटर
windowsModule.recycleBin=रिसायकल बिन
windowsModule.controlPanel=कंट्रोल पैनल
windowsModule.settings=सेटिंग्स
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_id_ID.properties
================================================
dialog.singleInstance.message=Sudah ada instance Cedro Modern Dock yang sedang berjalan. Periksa desktop Anda.
settings.window.title=Pengaturan
settings.page.title=Pengaturan Dock
settings.page.subtitle=Tata letak responsif modern, kontrol modern, dan organisasi berbasis tab.
settings.language.label=Bahasa
settings.tab.icons=Ikon
settings.tab.iconsCustomization=Kustomisasi Ikon
settings.tab.dockCustomization=Kustomisasi Dock
settings.tab.dockPositioning=Posisi Dock
settings.tab.general=Umum
settings.icons.items.title=Item Dock
settings.icons.items.helper=Atur ulang ikon saat ini dan kelola program atau modul Windows dari satu tempat.
settings.icons.actions.title=Aksi
settings.icons.actions.helper=Tambahkan executable kustom, modul Windows asli, atau hapus item yang dipilih.
settings.icons.moveUp=Pindahkan item ke atas
settings.icons.moveDown=Pindahkan item ke bawah
settings.icons.addProgram=Tambah program
settings.icons.addFolder=Tambah folder
settings.icons.addWindowsModule=Tambah modul Windows
settings.icons.removeSelected=Hapus item yang dipilih
settings.iconsCustomization.size.title=Ukuran ikon
settings.iconsCustomization.size.helper=Sesuaikan tampilan setiap ikon sambil mempertahankan bentuk Dock yang bersih.
settings.iconsCustomization.spacing.title=Jarak antar ikon
settings.iconsCustomization.spacing.helper=Atur Dock agar lebih rapat atau lebih lapang tanpa mengubah urutan item.
settings.dockCustomization.transparency.title=Transparansi Dock
settings.dockCustomization.transparency.helper=Seimbangkan kehadiran dan kesan halus Dock di atas latar desktop.
settings.dockCustomization.rounding.title=Kelengkungan sudut
settings.dockCustomization.rounding.helper=Pertahankan tampilan modern yang tegas atau haluskan sudut tanpa meninggalkan gaya datar.
settings.dockCustomization.background.title=Warna latar Dock
settings.dockCustomization.background.helper=Pilih warna dasar yang muncul di bawah ikon Dock.
settings.positioning.mode.title=Mode posisi
settings.positioning.mode.helper=Pilih antara jangkar layar tetap atau Dock yang bisa diseret bebas.
settings.positioning.mode.static=Posisi statis
settings.positioning.mode.dynamic=Posisi dinamis
settings.positioning.alignment.title=Perataan
settings.positioning.alignment.vertical=Vertikal
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Jarak layar
settings.positioning.spacing.top=Atas
settings.positioning.spacing.left=Kiri
settings.positioning.spacing.right=Kanan
settings.positioning.spacing.down=Bawah
settings.positioning.dynamic.title=Posisi dinamis
settings.positioning.dynamic.helper=Seret Dock dengan bebas di layar dan letakkan di mana pun Anda mau.
settings.positioning.choice.top=Atas
settings.positioning.choice.middle=Tengah
settings.positioning.choice.down=Bawah
settings.positioning.choice.left=Kiri
settings.positioning.choice.right=Kanan
settings.general.version=Versi fx1.1 - 03/2026
settings.general.repository=Repositori: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Kontak: github.com/arthurdeka
settings.general.openSource=Perangkat lunak gratis dan sumber terbuka
settings.general.acknowledgements=Ucapan terima kasih
dialog.fileChooser.executableTitle=Pilih .exe
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=Pilih folder
windowsModule.modal.title=Tambah modul Windows
windowsModule.modal.subtitle=Pilih tujuan Windows asli untuk ditambahkan ke Dock.
windowsModule.modal.available.title=Modul yang tersedia
windowsModule.modal.available.helper=Entri ini membuat pintasan Dock untuk permukaan bawaan Windows.
windowsModule.modal.addSelected=Tambah modul yang dipilih
acknowledgements.window.title=Ucapan terima kasih
acknowledgements.title=Ucapan terima kasih
acknowledgements.subtitle=Pustaka dan framework yang digunakan oleh Cedro Modern Dock.
acknowledgements.sectionTitle=Pustaka dan framework
dockItem.settings=Pengaturan
windowsModule.myComputer=Komputer Saya
windowsModule.recycleBin=Tempat Sampah
windowsModule.controlPanel=Panel Kontrol
windowsModule.settings=Pengaturan
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ja_JP.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock はすでに実行中です。デスクトップを確認してください。
settings.window.title=設定
settings.page.title=Dock 設定
settings.page.subtitle=モダンなレスポンシブレイアウト、モダンなコントロール、タブベースの構成です。
settings.language.label=言語
settings.tab.icons=アイコン
settings.tab.iconsCustomization=アイコンのカスタマイズ
settings.tab.dockCustomization=Dock のカスタマイズ
settings.tab.dockPositioning=Dock の位置
settings.tab.general=一般
settings.icons.items.title=Dock 項目
settings.icons.items.helper=現在のアイコンを並べ替え、プログラムや Windows モジュールをまとめて管理します。
settings.icons.actions.title=操作
settings.icons.actions.helper=カスタム実行ファイルや Windows モジュールを追加するか、選択した項目を削除します。
settings.icons.moveUp=項目を上へ移動
settings.icons.moveDown=項目を下へ移動
settings.icons.addProgram=プログラムを追加
settings.icons.addFolder=フォルダーを追加
settings.icons.addWindowsModule=Windows モジュールを追加
settings.icons.removeSelected=選択した項目を削除
settings.iconsCustomization.size.title=アイコンサイズ
settings.iconsCustomization.size.helper=Dock の見た目を保ちながら、各アイコンの大きさを調整します。
settings.iconsCustomization.spacing.title=アイコン間隔
settings.iconsCustomization.spacing.helper=項目の順序を変えずに Dock の密度を調整します。
settings.dockCustomization.transparency.title=Dock の透明度
settings.dockCustomization.transparency.helper=デスクトップ背景に対する Dock の存在感と控えめさのバランスを取ります。
settings.dockCustomization.rounding.title=角の丸み
settings.dockCustomization.rounding.helper=フラットなスタイルを保ちながら、角をシャープにも柔らかくもできます。
settings.dockCustomization.background.title=Dock の背景色
settings.dockCustomization.background.helper=Dock アイコンの下に表示される基本色を選択します。
settings.positioning.mode.title=配置モード
settings.positioning.mode.helper=固定配置または自由にドラッグできる Dock を選択します。
settings.positioning.mode.static=固定配置
settings.positioning.mode.dynamic=動的配置
settings.positioning.alignment.title=配置
settings.positioning.alignment.vertical=縦方向
settings.positioning.alignment.horizontal=横方向
settings.positioning.spacing.title=画面の余白
settings.positioning.spacing.top=上
settings.positioning.spacing.left=左
settings.positioning.spacing.right=右
settings.positioning.spacing.down=下
settings.positioning.dynamic.title=動的配置
settings.positioning.dynamic.helper=Dock を画面上で自由にドラッグして好きな場所に置けます。
settings.positioning.choice.top=上
settings.positioning.choice.middle=中央
settings.positioning.choice.down=下
settings.positioning.choice.left=左
settings.positioning.choice.right=右
settings.general.version=バージョン fx1.1 - 03/2026
settings.general.repository=リポジトリ: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=連絡先: github.com/arthurdeka
settings.general.openSource=無料のオープンソースソフトウェア
settings.general.acknowledgements=謝辞
dialog.fileChooser.executableTitle=.exe を選択
dialog.fileChooser.executableFilter=実行ファイル
dialog.directoryChooser.title=フォルダーを選択
windowsModule.modal.title=Windows モジュールを追加
windowsModule.modal.subtitle=Dock に追加する Windows の標準項目を選択してください。
windowsModule.modal.available.title=利用可能なモジュール
windowsModule.modal.available.helper=これらの項目は Windows 標準機能への Dock ショートカットを作成します。
windowsModule.modal.addSelected=選択したモジュールを追加
acknowledgements.window.title=謝辞
acknowledgements.title=謝辞
acknowledgements.subtitle=Cedro Modern Dock で使用されているライブラリとフレームワークです。
acknowledgements.sectionTitle=ライブラリとフレームワーク
dockItem.settings=設定
windowsModule.myComputer=マイ コンピューター
windowsModule.recycleBin=ごみ箱
windowsModule.controlPanel=コントロール パネル
windowsModule.settings=設定
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_mr_IN.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock ची एक प्रत आधीपासून चालू आहे. तुमचा डेस्कटॉप तपासा.
settings.window.title=सेटिंग्ज
settings.page.title=Dock सेटिंग्ज
settings.page.subtitle=आधुनिक प्रतिसादक्षम मांडणी, आधुनिक नियंत्रण आणि टॅबवर आधारित रचना.
settings.language.label=भाषा
settings.tab.icons=आयकॉन्स
settings.tab.iconsCustomization=आयकॉन सानुकूलन
settings.tab.dockCustomization=Dock सानुकूलन
settings.tab.dockPositioning=Dock स्थान
settings.tab.general=सामान्य
settings.icons.items.title=Dock आयटम
settings.icons.items.helper=सध्याचे आयकॉन्स पुन्हा लावा आणि प्रोग्राम किंवा Windows मॉड्यूल एकाच ठिकाणी व्यवस्थापित करा.
settings.icons.actions.title=क्रिया
settings.icons.actions.helper=कस्टम executable, Windows मॉड्यूल जोडा किंवा निवडलेला आयटम काढा.
settings.icons.moveUp=आयटम वर न्या
settings.icons.moveDown=आयटम खाली न्या
settings.icons.addProgram=प्रोग्राम जोडा
settings.icons.addFolder=फोल्डर जोडा
settings.icons.addWindowsModule=Windows मॉड्यूल जोडा
settings.icons.removeSelected=निवडलेला आयटम काढा
settings.iconsCustomization.size.title=आयकॉन आकार
settings.iconsCustomization.size.helper=Dock स्वच्छ ठेवत प्रत्येक आयकॉनचा आकार समायोजित करा.
settings.iconsCustomization.spacing.title=आयकॉन्समधील अंतर
settings.iconsCustomization.spacing.helper=आयटम क्रम न बदलता Dock अधिक घट्ट किंवा सैल करा.
settings.dockCustomization.transparency.title=Dock पारदर्शकता
settings.dockCustomization.transparency.helper=डेस्कटॉपच्या पार्श्वभूमीवर Dock ची उपस्थिती आणि सौम्यता संतुलित करा.
settings.dockCustomization.rounding.title=बॉर्डर गोलाई
settings.dockCustomization.rounding.helper=फ्लॅट शैली राखून कोपरे तीक्ष्ण किंवा सौम्य करा.
settings.dockCustomization.background.title=Dock पार्श्वभूमी रंग
settings.dockCustomization.background.helper=Dock आयकॉन्सखाली दिसणारा मूळ रंग निवडा.
settings.positioning.mode.title=स्थान मोड
settings.positioning.mode.helper=स्थिर स्क्रीन अँकर किंवा मुक्तपणे हलवता येणारा Dock निवडा.
settings.positioning.mode.static=स्थिर स्थान
settings.positioning.mode.dynamic=गतिशील स्थान
settings.positioning.alignment.title=संरेखन
settings.positioning.alignment.vertical=उभे
settings.positioning.alignment.horizontal=आडवे
settings.positioning.spacing.title=स्क्रीन अंतर
settings.positioning.spacing.top=वर
settings.positioning.spacing.left=डावे
settings.positioning.spacing.right=उजवे
settings.positioning.spacing.down=खाली
settings.positioning.dynamic.title=गतिशील स्थान
settings.positioning.dynamic.helper=Dock ला स्क्रीनवर कुठेही ड्रॅग करून हवा तिथे ठेवा.
settings.positioning.choice.top=वर
settings.positioning.choice.middle=मध्य
settings.positioning.choice.down=खाली
settings.positioning.choice.left=डावे
settings.positioning.choice.right=उजवे
settings.general.version=आवृत्ती fx1.1 - 03/2026
settings.general.repository=रिपॉझिटरी: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=संपर्क: github.com/arthurdeka
settings.general.openSource=मोफत आणि मुक्त स्रोत सॉफ्टवेअर
settings.general.acknowledgements=कृतज्ञता
dialog.fileChooser.executableTitle=.exe निवडा
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=फोल्डर निवडा
windowsModule.modal.title=Windows मॉड्यूल जोडा
windowsModule.modal.subtitle=Dock मध्ये जोडण्यासाठी मूळ Windows गंतव्य निवडा.
windowsModule.modal.available.title=उपलब्ध मॉड्यूल
windowsModule.modal.available.helper=ही नोंदी Windows च्या अंगभूत भागांसाठी Dock शॉर्टकट तयार करतात.
windowsModule.modal.addSelected=निवडलेले मॉड्यूल जोडा
acknowledgements.window.title=कृतज्ञता
acknowledgements.title=कृतज्ञता
acknowledgements.subtitle=Cedro Modern Dock मध्ये वापरलेली लायब्ररी आणि फ्रेमवर्क.
acknowledgements.sectionTitle=लायब्ररी आणि फ्रेमवर्क
dockItem.settings=सेटिंग्ज
windowsModule.myComputer=माझा संगणक
windowsModule.recycleBin=रिसायकल बिन
windowsModule.controlPanel=कंट्रोल पॅनल
windowsModule.settings=सेटिंग्ज
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_pcm_NG.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock don already dey run. Check your desktop.
settings.window.title=Settings
settings.page.title=Dock Settings
settings.page.subtitle=Modern responsive layout, modern controls, and tab-based arrangement.
settings.language.label=Language
settings.tab.icons=Icons
settings.tab.iconsCustomization=Icon Customization
settings.tab.dockCustomization=Dock Customization
settings.tab.dockPositioning=Dock Position
settings.tab.general=General
settings.icons.items.title=Dock items
settings.icons.items.helper=Rearrange the current icons and manage programs or Windows modules for one place.
settings.icons.actions.title=Actions
settings.icons.actions.helper=Add custom executable files, native Windows modules, or remove the selected item.
settings.icons.moveUp=Move item up
settings.icons.moveDown=Move item down
settings.icons.addProgram=Add program
settings.icons.addFolder=Add folder
settings.icons.addWindowsModule=Add Windows module
settings.icons.removeSelected=Remove selected item
settings.iconsCustomization.size.title=Icon size
settings.iconsCustomization.size.helper=Adjust how each icon look while keeping the Dock clean.
settings.iconsCustomization.spacing.title=Space between icons
settings.iconsCustomization.spacing.helper=Make the Dock tighter or wider without changing item order.
settings.dockCustomization.transparency.title=Dock transparency
settings.dockCustomization.transparency.helper=Balance how visible or subtle the Dock shows on top of your desktop background.
settings.dockCustomization.rounding.title=Border rounding
settings.dockCustomization.rounding.helper=Keep the shell sharp and modern or make the corners softer while still keeping the flat style.
settings.dockCustomization.background.title=Dock background color
settings.dockCustomization.background.helper=Choose the main color wey dey under the Dock icons.
settings.positioning.mode.title=Position mode
settings.positioning.mode.helper=Choose fixed screen anchor or Dock wey you fit drag anyhow.
settings.positioning.mode.static=Static position
settings.positioning.mode.dynamic=Dynamic position
settings.positioning.alignment.title=Alignment
settings.positioning.alignment.vertical=Vertical
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Screen spacing
settings.positioning.spacing.top=Top
settings.positioning.spacing.left=Left
settings.positioning.spacing.right=Right
settings.positioning.spacing.down=Bottom
settings.positioning.dynamic.title=Dynamic position
settings.positioning.dynamic.helper=Drag the Dock freely for screen put am anywhere you want.
settings.positioning.choice.top=Top
settings.positioning.choice.middle=Middle
settings.positioning.choice.down=Bottom
settings.positioning.choice.left=Left
settings.positioning.choice.right=Right
settings.general.version=Version fx1.1 - 03/2026
settings.general.repository=Repository: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Contact: github.com/arthurdeka
settings.general.openSource=Free and open-source software
settings.general.acknowledgements=Acknowledgements
dialog.fileChooser.executableTitle=Choose .exe
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=Choose folder
windowsModule.modal.title=Add Windows module
windowsModule.modal.subtitle=Pick native Windows place to add to the Dock.
windowsModule.modal.available.title=Available modules
windowsModule.modal.available.helper=These entries create Dock shortcuts for built-in Windows surfaces.
windowsModule.modal.addSelected=Add selected module
acknowledgements.window.title=Acknowledgements
acknowledgements.title=Acknowledgements
acknowledgements.subtitle=Libraries and frameworks wey Cedro Modern Dock dey use.
acknowledgements.sectionTitle=Libraries and frameworks
dockItem.settings=Settings
windowsModule.myComputer=My Computer
windowsModule.recycleBin=Recycle Bin
windowsModule.controlPanel=Control Panel
windowsModule.settings=Settings
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_pt_BR.properties
================================================
language.english=Inglês
language.portugueseBrazil=Português (Brasil)
dialog.singleInstance.message=Já existe uma instância do Cedro Modern Dock em execução. Verifique sua área de trabalho.
settings.window.title=Configurações
settings.page.title=Configurações do Dock
settings.page.subtitle=Redesenho escuro e plano com layout responsivo, controles modernos e organização por abas.
settings.language.label=Idioma
settings.tab.icons=Ícones
settings.tab.iconsCustomization=Personalização dos Ícones
settings.tab.dockCustomization=Personalização do Dock
settings.tab.dockPositioning=Posicionamento do Dock
settings.tab.general=Geral
settings.icons.items.title=Itens do dock
settings.icons.items.helper=Reordene os ícones atuais e gerencie programas ou módulos do Windows em um só lugar.
settings.icons.actions.title=Ações
settings.icons.actions.helper=Adicione executáveis personalizados, inclua módulos nativos do Windows ou remova o item selecionado.
settings.icons.moveUp=Mover Item Para Cima
settings.icons.moveDown=Mover Item Para Baixo
settings.icons.addProgram=Adicionar Programa
settings.icons.addFolder=Adicionar Pasta
settings.icons.addWindowsModule=Adicionar Módulo do Windows
settings.icons.removeSelected=Remover Item Selecionado
settings.iconsCustomization.size.title=Tamanho dos Ícones
settings.iconsCustomization.size.helper=Ajuste o destaque visual de cada ícone preservando uma silhueta limpa e plana do dock.
settings.iconsCustomization.spacing.title=Espaçamento Entre Ícones
settings.iconsCustomization.spacing.helper=Controle o quanto o dock fica compacto ou arejado sem alterar a ordem dos itens.
settings.dockCustomization.transparency.title=Transparência do Dock
settings.dockCustomization.transparency.helper=Equilibre presença e sutileza da superfície do dock em relação ao papel de parede.
settings.dockCustomization.rounding.title=Arredondamento da Borda
settings.dockCustomization.rounding.helper=Mantenha a estrutura nítida e moderna ou suavize os cantos sem sair do estilo plano.
settings.dockCustomization.background.title=Cor de Fundo do Dock
settings.dockCustomization.background.helper=Escolha o tom base que fica abaixo dos ícones do dock.
settings.positioning.mode.title=Modo de Posicionamento
settings.positioning.mode.helper=Escolha entre um encaixe fixo na tela ou um dock livremente arrastável.
settings.positioning.mode.static=Posicionamento estático
settings.positioning.mode.dynamic=Posicionamento dinâmico
settings.positioning.alignment.title=Alinhamento
settings.positioning.alignment.vertical=Vertical
settings.positioning.alignment.horizontal=Horizontal
settings.positioning.spacing.title=Espaçamento da Tela
settings.positioning.spacing.top=Superior
settings.positioning.spacing.left=Esquerda
settings.positioning.spacing.right=Direita
settings.positioning.spacing.down=Inferior
settings.positioning.dynamic.title=Posicionamento Dinâmico
settings.positioning.dynamic.helper=Arraste o dock livremente pela tela para posicioná-lo onde quiser.
settings.positioning.choice.top=Superior
settings.positioning.choice.middle=Centro
settings.positioning.choice.down=Inferior
settings.positioning.choice.left=Esquerda
settings.positioning.choice.right=Direita
settings.general.version=Versão fx1.1 - 03/2026
settings.general.repository=Repositório: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Contato: github.com/arthurdeka
settings.general.openSource=Software Livre e de Código Aberto
settings.general.acknowledgements=Agradecimentos
dialog.fileChooser.executableTitle=Escolha um .exe
dialog.fileChooser.executableFilter=Executável
dialog.directoryChooser.title=Escolha uma pasta
windowsModule.modal.title=Adicionar Módulo do Windows
windowsModule.modal.subtitle=Escolha um destino nativo do Windows para adicionar ao dock.
windowsModule.modal.available.title=Módulos disponíveis
windowsModule.modal.available.helper=Essas entradas criam atalhos do dock para superfícies nativas do Windows.
windowsModule.modal.addSelected=Adicionar Módulo Selecionado
acknowledgements.window.title=Agradecimentos
acknowledgements.title=Agradecimentos
acknowledgements.subtitle=Bibliotecas e frameworks usados pelo Cedro Modern Dock.
acknowledgements.sectionTitle=Bibliotecas e Frameworks
dockItem.settings=Configurações
windowsModule.myComputer=Meu Computador
windowsModule.recycleBin=Lixeira
windowsModule.controlPanel=Painel de Controle
windowsModule.settings=Configurações
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ru_RU.properties
================================================
dialog.singleInstance.message=Экземпляр Cedro Modern Dock уже запущен. Проверьте рабочий стол.
settings.window.title=Настройки
settings.page.title=Настройки Dock
settings.page.subtitle=Современная адаптивная компоновка, современные элементы управления и организация по вкладкам.
settings.language.label=Язык
settings.tab.icons=Значки
settings.tab.iconsCustomization=Настройка значков
settings.tab.dockCustomization=Настройка Dock
settings.tab.dockPositioning=Положение Dock
settings.tab.general=Общие
settings.icons.items.title=Элементы Dock
settings.icons.items.helper=Меняйте порядок текущих значков и управляйте программами или модулями Windows в одном месте.
settings.icons.actions.title=Действия
settings.icons.actions.helper=Добавляйте свои исполняемые файлы, модули Windows или удаляйте выбранный элемент.
settings.icons.moveUp=Переместить вверх
settings.icons.moveDown=Переместить вниз
settings.icons.addProgram=Добавить программу
settings.icons.addFolder=Добавить папку
settings.icons.addWindowsModule=Добавить модуль Windows
settings.icons.removeSelected=Удалить выбранный элемент
settings.iconsCustomization.size.title=Размер значков
settings.iconsCustomization.size.helper=Настройте размер каждого значка, сохраняя аккуратный вид Dock.
settings.iconsCustomization.spacing.title=Расстояние между значками
settings.iconsCustomization.spacing.helper=Сделайте Dock более компактным или свободным, не меняя порядок элементов.
settings.dockCustomization.transparency.title=Прозрачность Dock
settings.dockCustomization.transparency.helper=Сбалансируйте заметность и ненавязчивость Dock на фоне рабочего стола.
settings.dockCustomization.rounding.title=Скругление границ
settings.dockCustomization.rounding.helper=Сохраняйте резкий современный вид или слегка смягчите углы, не уходя от плоского стиля.
settings.dockCustomization.background.title=Цвет фона Dock
settings.dockCustomization.background.helper=Выберите основной цвет под значками Dock.
settings.positioning.mode.title=Режим позиционирования
settings.positioning.mode.helper=Выберите фиксированную привязку к экрану или свободно перетаскиваемый Dock.
settings.positioning.mode.static=Статическое положение
settings.positioning.mode.dynamic=Динамическое положение
settings.positioning.alignment.title=Выравнивание
settings.positioning.alignment.vertical=Вертикаль
settings.positioning.alignment.horizontal=Горизонталь
settings.positioning.spacing.title=Отступы от экрана
settings.positioning.spacing.top=Сверху
settings.positioning.spacing.left=Слева
settings.positioning.spacing.right=Справа
settings.positioning.spacing.down=Снизу
settings.positioning.dynamic.title=Динамическое положение
settings.positioning.dynamic.helper=Свободно перетаскивайте Dock по экрану и ставьте его куда угодно.
settings.positioning.choice.top=Сверху
settings.positioning.choice.middle=По центру
settings.positioning.choice.down=Снизу
settings.positioning.choice.left=Слева
settings.positioning.choice.right=Справа
settings.general.version=Версия fx1.1 - 03/2026
settings.general.repository=Репозиторий: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Контакт: github.com/arthurdeka
settings.general.openSource=Бесплатное программное обеспечение с открытым исходным кодом
settings.general.acknowledgements=Благодарности
dialog.fileChooser.executableTitle=Выберите .exe
dialog.fileChooser.executableFilter=Исполняемый файл
dialog.directoryChooser.title=Выберите папку
windowsModule.modal.title=Добавить модуль Windows
windowsModule.modal.subtitle=Выберите встроенный объект Windows для добавления в Dock.
windowsModule.modal.available.title=Доступные модули
windowsModule.modal.available.helper=Эти записи создают ярлыки Dock для встроенных компонентов Windows.
windowsModule.modal.addSelected=Добавить выбранный модуль
acknowledgements.window.title=Благодарности
acknowledgements.title=Благодарности
acknowledgements.subtitle=Библиотеки и фреймворки, используемые Cedro Modern Dock.
acknowledgements.sectionTitle=Библиотеки и фреймворки
dockItem.settings=Настройки
windowsModule.myComputer=Мой компьютер
windowsModule.recycleBin=Корзина
windowsModule.controlPanel=Панель управления
windowsModule.settings=Настройки
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ta_IN.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock ஏற்கனவே இயங்கிக்கொண்டிருக்கிறது. உங்கள் டெஸ்க்டாப்பைச் சரிபார்க்கவும்.
settings.window.title=அமைப்புகள்
settings.page.title=Dock அமைப்புகள்
settings.page.subtitle=நவீன பதிலளிக்கும் அமைப்பு, நவீன கட்டுப்பாடுகள் மற்றும் தாவல் அடிப்படையிலான ஒழுங்கமைப்பு.
settings.language.label=மொழி
settings.tab.icons=சின்னங்கள்
settings.tab.iconsCustomization=சின்னத் தனிப்பயனாக்கம்
settings.tab.dockCustomization=Dock தனிப்பயனாக்கம்
settings.tab.dockPositioning=Dock இடம்
settings.tab.general=பொது
settings.icons.items.title=Dock உருப்படிகள்
settings.icons.items.helper=தற்போதைய சின்னங்களை மறுவரிசைப்படுத்தி, நிரல்கள் அல்லது Windows தொகுதிகளை ஒரே இடத்தில் நிர்வகிக்கவும்.
settings.icons.actions.title=செயல்கள்
settings.icons.actions.helper=தனிப்பயன் executable-கள், Windows தொகுதிகள் சேர்க்கவும் அல்லது தேர்ந்தெடுத்த உருப்படியை அகற்றவும்.
settings.icons.moveUp=உருப்படியை மேலே நகர்த்து
settings.icons.moveDown=உருப்படியை கீழே நகர்த்து
settings.icons.addProgram=நிரலைச் சேர்
settings.icons.addFolder=கோப்புறையைச் சேர்
settings.icons.addWindowsModule=Windows தொகுதியைச் சேர்
settings.icons.removeSelected=தேர்ந்தெடுத்த உருப்படியை அகற்று
settings.iconsCustomization.size.title=சின்ன அளவு
settings.iconsCustomization.size.helper=Dock-இன் சீரான தோற்றத்தைப் பாதுகாத்து ஒவ்வொரு சின்னத்தின் அளவையும் மாற்றவும்.
settings.iconsCustomization.spacing.title=சின்னங்களுக்கு இடையிலான இடைவெளி
settings.iconsCustomization.spacing.helper=உருப்படிகளின் வரிசையை மாற்றாமல் Dock-ஐ நெருக்கமாக அல்லது விசாலமாக மாற்றவும்.
settings.dockCustomization.transparency.title=Dock வெளிப்படைத்தன்மை
settings.dockCustomization.transparency.helper=டெஸ்க்டாப்பின் பின்னணியில் Dock-இன் தெளிவையும் மென்மையையும் சமநிலைப்படுத்தவும்.
settings.dockCustomization.rounding.title=எல்லை வட்டமாதல்
settings.dockCustomization.rounding.helper=பிளாட் பாணியைத் தக்கவைத்து மூலைகளைத் தீட்சண்யமாகவோ மென்மையாகவோ மாற்றவும்.
settings.dockCustomization.background.title=Dock பின்னணி நிறம்
settings.dockCustomization.background.helper=Dock சின்னங்களின் கீழ் காணப்படும் அடிப்படை நிறத்தைத் தேர்வு செய்யவும்.
settings.positioning.mode.title=இடமுறை
settings.positioning.mode.helper=நிலையான திரை நங்கூரம் அல்லது சுதந்திரமாக இழுக்கக்கூடிய Dock-ஐ தேர்வு செய்யவும்.
settings.positioning.mode.static=நிலையான இடம்
settings.positioning.mode.dynamic=இயங்கும் இடம்
settings.positioning.alignment.title=சீரமைப்பு
settings.positioning.alignment.vertical=செங்குத்து
settings.positioning.alignment.horizontal=கிடைமட்டம்
settings.positioning.spacing.title=திரை இடைவெளி
settings.positioning.spacing.top=மேல்
settings.positioning.spacing.left=இடது
settings.positioning.spacing.right=வலது
settings.positioning.spacing.down=கீழ்
settings.positioning.dynamic.title=இயங்கும் இடம்
settings.positioning.dynamic.helper=Dock-ஐ திரையில் எங்கே வேண்டுமானாலும் இழுத்து வைத்துக்கொள்ளலாம்.
settings.positioning.choice.top=மேல்
settings.positioning.choice.middle=நடு
settings.positioning.choice.down=கீழ்
settings.positioning.choice.left=இடது
settings.positioning.choice.right=வலது
settings.general.version=பதிப்பு fx1.1 - 03/2026
settings.general.repository=களஞ்சியம்: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=தொடர்பு: github.com/arthurdeka
settings.general.openSource=இலவச மற்றும் திறந்த மூல மென்பொருள்
settings.general.acknowledgements=நன்றியுரை
dialog.fileChooser.executableTitle=.exe தேர்ந்தெடுக்கவும்
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=கோப்புறையைத் தேர்ந்தெடுக்கவும்
windowsModule.modal.title=Windows தொகுதியைச் சேர்
windowsModule.modal.subtitle=Dock-இல் சேர்க்க ஒரு சொந்த Windows இடத்தைத் தேர்ந்தெடுக்கவும்.
windowsModule.modal.available.title=கிடைக்கும் தொகுதிகள்
windowsModule.modal.available.helper=இவை Windows உட்புற பகுதிகளுக்கான Dock குறுக்குவழிகளை உருவாக்கும்.
windowsModule.modal.addSelected=தேர்ந்தெடுத்த தொகுதியைச் சேர்
acknowledgements.window.title=நன்றியுரை
acknowledgements.title=நன்றியுரை
acknowledgements.subtitle=Cedro Modern Dock பயன்படுத்தும் நூலகங்கள் மற்றும் கட்டமைப்புகள்.
acknowledgements.sectionTitle=நூலகங்கள் மற்றும் கட்டமைப்புகள்
dockItem.settings=அமைப்புகள்
windowsModule.myComputer=என் கணினி
windowsModule.recycleBin=மறுசுழற்சி தொட்டி
windowsModule.controlPanel=கட்டுப்பாட்டு பலகம்
windowsModule.settings=அமைப்புகள்
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_te_IN.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock ఇప్పటికే నడుస్తోంది. మీ డెస్క్టాప్ను తనిఖీ చేయండి.
settings.window.title=సెట్టింగ్లు
settings.page.title=Dock సెట్టింగ్లు
settings.page.subtitle=ఆధునిక స్పందనాత్మక అమరిక, ఆధునిక నియంత్రణలు మరియు ట్యాబ్ ఆధారిత వ్యవస్థ.
settings.language.label=భాష
settings.tab.icons=చిహ్నాలు
settings.tab.iconsCustomization=చిహ్నాల అనుకూలీకరణ
settings.tab.dockCustomization=Dock అనుకూలీకరణ
settings.tab.dockPositioning=Dock స్థానం
settings.tab.general=సాధారణం
settings.icons.items.title=Dock అంశాలు
settings.icons.items.helper=ప్రస్తుత చిహ్నాలను క్రమబద్ధీకరించి, ప్రోగ్రామ్లు లేదా Windows మాడ్యూల్లను ఒకే చోట నిర్వహించండి.
settings.icons.actions.title=చర్యలు
settings.icons.actions.helper=కస్టమ్ executableలు, Windows మాడ్యూల్లు జోడించండి లేదా ఎంచుకున్న అంశాన్ని తొలగించండి.
settings.icons.moveUp=అంశాన్ని పైకి తరలించు
settings.icons.moveDown=అంశాన్ని కిందికి తరలించు
settings.icons.addProgram=ప్రోగ్రామ్ను జోడించు
settings.icons.addFolder=ఫోల్డర్ను జోడించు
settings.icons.addWindowsModule=Windows మాడ్యూల్ను జోడించు
settings.icons.removeSelected=ఎంచుకున్న అంశాన్ని తొలగించు
settings.iconsCustomization.size.title=చిహ్నం పరిమాణం
settings.iconsCustomization.size.helper=Dock రూపాన్ని శుభ్రంగా ఉంచుతూ ప్రతి చిహ్నం పరిమాణాన్ని సర్దుబాటు చేయండి.
settings.iconsCustomization.spacing.title=చిహ్నాల మధ్య దూరం
settings.iconsCustomization.spacing.helper=అంశాల క్రమాన్ని మార్చకుండా Dockను గట్టిగా లేదా వెసులుబాటుగా చేయండి.
settings.dockCustomization.transparency.title=Dock పారదర్శకత
settings.dockCustomization.transparency.helper=డెస్క్టాప్ నేపథ్యంపై Dock యొక్క ఉనికి మరియు సున్నితత్వాన్ని సమతుల్యం చేయండి.
settings.dockCustomization.rounding.title=అంచుల వంపు
settings.dockCustomization.rounding.helper=ఫ్లాట్ శైలిని ఉంచుతూ మూలలను పదునుగా లేదా మృదువుగా చేయండి.
settings.dockCustomization.background.title=Dock నేపథ్య రంగు
settings.dockCustomization.background.helper=Dock చిహ్నాల కింద కనిపించే ప్రాథమిక రంగును ఎంచుకోండి.
settings.positioning.mode.title=స్థాన విధానం
settings.positioning.mode.helper=స్థిర స్క్రీన్ యాంకర్ లేదా స్వేచ్ఛగా లాగగలిగే Dockను ఎంచుకోండి.
settings.positioning.mode.static=స్థిర స్థానం
settings.positioning.mode.dynamic=చలనం గల స్థానం
settings.positioning.alignment.title=అలైన్మెంట్
settings.positioning.alignment.vertical=నిలువు
settings.positioning.alignment.horizontal=అడ్డం
settings.positioning.spacing.title=స్క్రీన్ దూరం
settings.positioning.spacing.top=పై
settings.positioning.spacing.left=ఎడమ
settings.positioning.spacing.right=కుడి
settings.positioning.spacing.down=కింద
settings.positioning.dynamic.title=చలనం గల స్థానం
settings.positioning.dynamic.helper=Dockను స్క్రీన్పై ఎక్కడైనా లాగి మీకు నచ్చిన చోట ఉంచండి.
settings.positioning.choice.top=పై
settings.positioning.choice.middle=మధ్య
settings.positioning.choice.down=కింద
settings.positioning.choice.left=ఎడమ
settings.positioning.choice.right=కుడి
settings.general.version=వెర్షన్ fx1.1 - 03/2026
settings.general.repository=రిపోజిటరీ: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=సంప్రదింపు: github.com/arthurdeka
settings.general.openSource=ఉచిత మరియు ఓపెన్ సోర్స్ సాఫ్ట్వేర్
settings.general.acknowledgements=కృతజ్ఞతలు
dialog.fileChooser.executableTitle=.exe ఎంచుకోండి
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=ఫోల్డర్ను ఎంచుకోండి
windowsModule.modal.title=Windows మాడ్యూల్ను జోడించు
windowsModule.modal.subtitle=Dockకు జోడించడానికి ఒక స్థానిక Windows గమ్యాన్ని ఎంచుకోండి.
windowsModule.modal.available.title=అందుబాటులో ఉన్న మాడ్యూల్లు
windowsModule.modal.available.helper=ఈ ఎంట్రీలు Windows అంతర్నిర్మిత భాగాల కోసం Dock షార్ట్కట్లు సృష్టిస్తాయి.
windowsModule.modal.addSelected=ఎంచుకున్న మాడ్యూల్ను జోడించు
acknowledgements.window.title=కృతజ్ఞతలు
acknowledgements.title=కృతజ్ఞతలు
acknowledgements.subtitle=Cedro Modern Dock ఉపయోగించే లైబ్రరీలు మరియు ఫ్రేమ్వర్క్లు.
acknowledgements.sectionTitle=లైబ్రరీలు మరియు ఫ్రేమ్వర్క్లు
dockItem.settings=సెట్టింగ్లు
windowsModule.myComputer=నా కంప్యూటర్
windowsModule.recycleBin=రీసైకిల్ బిన్
windowsModule.controlPanel=కంట్రోల్ ప్యానెల్
windowsModule.settings=సెట్టింగ్లు
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_tr_TR.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock zaten çalışıyor. Lütfen masaüstünü kontrol et.
settings.window.title=Ayarlar
settings.page.title=Dock Ayarları
settings.page.subtitle=Modern duyarlı düzen, modern kontroller ve sekme tabanlı organizasyon.
settings.language.label=Dil
settings.tab.icons=Simgeler
settings.tab.iconsCustomization=Simge Özelleştirme
settings.tab.dockCustomization=Dock Özelleştirme
settings.tab.dockPositioning=Dock Konumu
settings.tab.general=Genel
settings.icons.items.title=Dock öğeleri
settings.icons.items.helper=Geçerli simgeleri yeniden sırala ve programları veya Windows modüllerini tek yerden yönet.
settings.icons.actions.title=Eylemler
settings.icons.actions.helper=Özel çalıştırılabilir dosyalar, Windows modülleri ekle veya seçili öğeyi kaldır.
settings.icons.moveUp=Öğeyi yukarı taşı
settings.icons.moveDown=Öğeyi aşağı taşı
settings.icons.addProgram=Program ekle
settings.icons.addFolder=Klasör ekle
settings.icons.addWindowsModule=Windows modülü ekle
settings.icons.removeSelected=Seçili öğeyi kaldır
settings.iconsCustomization.size.title=Simge boyutu
settings.iconsCustomization.size.helper=Dock görünümünü temiz tutarken her simgenin boyutunu ayarla.
settings.iconsCustomization.spacing.title=Simgeler arası boşluk
settings.iconsCustomization.spacing.helper=Öğe sırasını bozmadan Dock'u daha sıkı veya daha ferah yap.
settings.dockCustomization.transparency.title=Dock saydamlığı
settings.dockCustomization.transparency.helper=Masaüstü arka planında Dock'un belirginliği ile inceliğini dengele.
settings.dockCustomization.rounding.title=Kenar yuvarlaklığı
settings.dockCustomization.rounding.helper=Düz stilden çıkmadan köşeleri daha keskin ya da daha yumuşak yap.
settings.dockCustomization.background.title=Dock arka plan rengi
settings.dockCustomization.background.helper=Dock simgelerinin altında görünen temel tonu seç.
settings.positioning.mode.title=Konum modu
settings.positioning.mode.helper=Sabit ekran bağlantısı veya serbestçe sürüklenebilen Dock arasında seçim yap.
settings.positioning.mode.static=Sabit konum
settings.positioning.mode.dynamic=Dinamik konum
settings.positioning.alignment.title=Hizalama
settings.positioning.alignment.vertical=Dikey
settings.positioning.alignment.horizontal=Yatay
settings.positioning.spacing.title=Ekran boşluğu
settings.positioning.spacing.top=Üst
settings.positioning.spacing.left=Sol
settings.positioning.spacing.right=Sağ
settings.positioning.spacing.down=Alt
settings.positioning.dynamic.title=Dinamik konum
settings.positioning.dynamic.helper=Dock'u ekranda serbestçe sürükleyip istediğin yere yerleştir.
settings.positioning.choice.top=Üst
settings.positioning.choice.middle=Orta
settings.positioning.choice.down=Alt
settings.positioning.choice.left=Sol
settings.positioning.choice.right=Sağ
settings.general.version=Sürüm fx1.1 - 03/2026
settings.general.repository=Depo: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=İletişim: github.com/arthurdeka
settings.general.openSource=Ücretsiz ve açık kaynaklı yazılım
settings.general.acknowledgements=Teşekkürler
dialog.fileChooser.executableTitle=.exe seç
dialog.fileChooser.executableFilter=Çalıştırılabilir
dialog.directoryChooser.title=Klasör seç
windowsModule.modal.title=Windows modülü ekle
windowsModule.modal.subtitle=Dock'a eklemek için yerel bir Windows hedefi seç.
windowsModule.modal.available.title=Kullanılabilir modüller
windowsModule.modal.available.helper=Bu girdiler, yerleşik Windows yüzeyleri için Dock kısayolları oluşturur.
windowsModule.modal.addSelected=Seçili modülü ekle
acknowledgements.window.title=Teşekkürler
acknowledgements.title=Teşekkürler
acknowledgements.subtitle=Cedro Modern Dock tarafından kullanılan kütüphaneler ve çerçeveler.
acknowledgements.sectionTitle=Kütüphaneler ve çerçeveler
dockItem.settings=Ayarlar
windowsModule.myComputer=Bilgisayarım
windowsModule.recycleBin=Geri Dönüşüm Kutusu
windowsModule.controlPanel=Denetim Masası
windowsModule.settings=Ayarlar
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_ur_PK.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock پہلے ہی چل رہا ہے۔ اپنا ڈیسک ٹاپ چیک کریں۔
settings.window.title=ترتیبات
settings.page.title=Dock ترتیبات
settings.page.subtitle=جدید رسپانسیو لے آؤٹ، جدید کنٹرولز اور ٹیب پر مبنی ترتیب۔
settings.language.label=زبان
settings.tab.icons=آئیکنز
settings.tab.iconsCustomization=آئیکن حسبِ منشا
settings.tab.dockCustomization=Dock حسبِ منشا
settings.tab.dockPositioning=Dock کی جگہ
settings.tab.general=عمومی
settings.icons.items.title=Dock آئٹمز
settings.icons.items.helper=موجودہ آئیکنز کی ترتیب بدلیں اور پروگرام یا Windows ماڈیول ایک ہی جگہ سے سنبھالیں۔
settings.icons.actions.title=کارروائیاں
settings.icons.actions.helper=اپنی executable فائلیں یا Windows ماڈیول شامل کریں، یا منتخب آئٹم ہٹائیں۔
settings.icons.moveUp=آئٹم اوپر کریں
settings.icons.moveDown=آئٹم نیچے کریں
settings.icons.addProgram=پروگرام شامل کریں
settings.icons.addFolder=فولڈر شامل کریں
settings.icons.addWindowsModule=Windows ماڈیول شامل کریں
settings.icons.removeSelected=منتخب آئٹم ہٹائیں
settings.iconsCustomization.size.title=آئیکن کا سائز
settings.iconsCustomization.size.helper=Dock کی صاف شکل برقرار رکھتے ہوئے ہر آئیکن کا سائز بدلیے۔
settings.iconsCustomization.spacing.title=آئیکنز کے درمیان فاصلہ
settings.iconsCustomization.spacing.helper=آئٹمز کی ترتیب بدلے بغیر Dock کو زیادہ گھنا یا کشادہ بنائیں۔
settings.dockCustomization.transparency.title=Dock شفافیت
settings.dockCustomization.transparency.helper=ڈیسک ٹاپ کے پس منظر کے مقابلے میں Dock کی موجودگی اور نرمی کا توازن رکھیں۔
settings.dockCustomization.rounding.title=کناروں کی گولائی
settings.dockCustomization.rounding.helper=فلیٹ انداز برقرار رکھتے ہوئے کناروں کو تیز یا نرم کریں۔
settings.dockCustomization.background.title=Dock پس منظر کا رنگ
settings.dockCustomization.background.helper=وہ بنیادی رنگ منتخب کریں جو Dock آئیکنز کے نیچے نظر آئے گا۔
settings.positioning.mode.title=جگہ کا موڈ
settings.positioning.mode.helper=مقررہ اسکرین اینکر یا آزادانہ طور پر گھسیٹے جانے والے Dock میں سے انتخاب کریں۔
settings.positioning.mode.static=جامد جگہ
settings.positioning.mode.dynamic=متحرک جگہ
settings.positioning.alignment.title=سیدھ
settings.positioning.alignment.vertical=عمودی
settings.positioning.alignment.horizontal=افقی
settings.positioning.spacing.title=اسکرین کا فاصلہ
settings.positioning.spacing.top=اوپر
settings.positioning.spacing.left=بائیں
settings.positioning.spacing.right=دائیں
settings.positioning.spacing.down=نیچے
settings.positioning.dynamic.title=متحرک جگہ
settings.positioning.dynamic.helper=Dock کو اسکرین پر آزادانہ طور پر گھسیٹ کر جہاں چاہیں رکھیں۔
settings.positioning.choice.top=اوپر
settings.positioning.choice.middle=درمیان
settings.positioning.choice.down=نیچے
settings.positioning.choice.left=بائیں
settings.positioning.choice.right=دائیں
settings.general.version=ورژن fx1.1 - 03/2026
settings.general.repository=ریپوزٹری: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=رابطہ: github.com/arthurdeka
settings.general.openSource=مفت اور اوپن سورس سافٹ ویئر
settings.general.acknowledgements=تشکرات
dialog.fileChooser.executableTitle=.exe منتخب کریں
dialog.fileChooser.executableFilter=Executable
dialog.directoryChooser.title=فولڈر منتخب کریں
windowsModule.modal.title=Windows ماڈیول شامل کریں
windowsModule.modal.subtitle=Dock میں شامل کرنے کے لیے ایک مقامی Windows مقام منتخب کریں۔
windowsModule.modal.available.title=دستیاب ماڈیول
windowsModule.modal.available.helper=یہ اندراجات Windows کے اندرونی حصوں کے لیے Dock شارٹ کٹس بناتے ہیں۔
windowsModule.modal.addSelected=منتخب ماڈیول شامل کریں
acknowledgements.window.title=تشکرات
acknowledgements.title=تشکرات
acknowledgements.subtitle=Cedro Modern Dock میں استعمال ہونے والی لائبریریاں اور فریم ورک۔
acknowledgements.sectionTitle=لائبریریاں اور فریم ورک
dockItem.settings=ترتیبات
windowsModule.myComputer=میرا کمپیوٹر
windowsModule.recycleBin=ری سائیکل بن
windowsModule.controlPanel=کنٹرول پینل
windowsModule.settings=ترتیبات
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_vi_VN.properties
================================================
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.
settings.window.title=Cài đặt
settings.page.title=Cài đặt Dock
settings.page.subtitle=Bố cục hiện đại, thích ứng, điều khiển hiện đại và tổ chức theo thẻ.
settings.language.label=Ngôn ngữ
settings.tab.icons=Biểu tượng
settings.tab.iconsCustomization=Tùy chỉnh biểu tượng
settings.tab.dockCustomization=Tùy chỉnh Dock
settings.tab.dockPositioning=Vị trí Dock
settings.tab.general=Chung
settings.icons.items.title=Mục trên Dock
settings.icons.items.helper=Sắp xếp lại các biểu tượng hiện tại và quản lý chương trình hoặc mô-đun Windows ở một nơi.
settings.icons.actions.title=Thao tác
settings.icons.actions.helper=Thêm tệp thực thi tùy chỉnh, mô-đun Windows gốc hoặc xóa mục đã chọn.
settings.icons.moveUp=Di chuyển mục lên
settings.icons.moveDown=Di chuyển mục xuống
settings.icons.addProgram=Thêm chương trình
settings.icons.addFolder=Thêm thư mục
settings.icons.addWindowsModule=Thêm mô-đun Windows
settings.icons.removeSelected=Xóa mục đã chọn
settings.iconsCustomization.size.title=Kích thước biểu tượng
settings.iconsCustomization.size.helper=Điều chỉnh độ nổi bật của từng biểu tượng nhưng vẫn giữ Dock gọn gàng.
settings.iconsCustomization.spacing.title=Khoảng cách giữa các biểu tượng
settings.iconsCustomization.spacing.helper=Điều chỉnh Dock chặt hay thoáng mà không làm thay đổi thứ tự mục.
settings.dockCustomization.transparency.title=Độ trong suốt của Dock
settings.dockCustomization.transparency.helper=Cân bằng độ nổi bật và sự tinh tế của Dock trên nền màn hình.
settings.dockCustomization.rounding.title=Bo tròn viền
settings.dockCustomization.rounding.helper=Giữ giao diện sắc nét hiện đại hoặc làm mềm góc mà vẫn giữ phong cách phẳng.
settings.dockCustomization.background.title=Màu nền Dock
settings.dockCustomization.background.helper=Chọn màu nền cơ bản nằm dưới các biểu tượng trên Dock.
settings.positioning.mode.title=Chế độ vị trí
settings.positioning.mode.helper=Chọn neo cố định trên màn hình hoặc Dock có thể kéo tự do.
settings.positioning.mode.static=Tĩnh
settings.positioning.mode.dynamic=Động
settings.positioning.alignment.title=Căn chỉnh
settings.positioning.alignment.vertical=Dọc
settings.positioning.alignment.horizontal=Ngang
settings.positioning.spacing.title=Khoảng cách màn hình
settings.positioning.spacing.top=Trên
settings.positioning.spacing.left=Trái
settings.positioning.spacing.right=Phải
settings.positioning.spacing.down=Dưới
settings.positioning.dynamic.title=Vị trí động
settings.positioning.dynamic.helper=Kéo Dock tự do trên màn hình để đặt ở bất cứ đâu bạn muốn.
settings.positioning.choice.top=Trên
settings.positioning.choice.middle=Giữa
settings.positioning.choice.down=Dưới
settings.positioning.choice.left=Trái
settings.positioning.choice.right=Phải
settings.general.version=Phiên bản fx1.1 - 03/2026
settings.general.repository=Kho mã: github.com/arthurdeka/cedro-modern-dock
settings.general.contact=Liên hệ: github.com/arthurdeka
settings.general.openSource=Phần mềm miễn phí và mã nguồn mở
settings.general.acknowledgements=Lời cảm ơn
dialog.fileChooser.executableTitle=Chọn .exe
dialog.fileChooser.executableFilter=Tệp thực thi
dialog.directoryChooser.title=Chọn thư mục
windowsModule.modal.title=Thêm mô-đun Windows
windowsModule.modal.subtitle=Chọn một đích Windows gốc để thêm vào Dock.
windowsModule.modal.available.title=Mô-đun có sẵn
windowsModule.modal.available.helper=Những mục này tạo lối tắt Dock cho các bề mặt tích hợp của Windows.
windowsModule.modal.addSelected=Thêm mô-đun đã chọn
acknowledgements.window.title=Lời cảm ơn
acknowledgements.title=Lời cảm ơn
acknowledgements.subtitle=Các thư viện và framework được dùng bởi Cedro Modern Dock.
acknowledgements.sectionTitle=Thư viện & Framework
dockItem.settings=Cài đặt
windowsModule.myComputer=Máy tính của tôi
windowsModule.recycleBin=Thùng rác
windowsModule.controlPanel=Bảng điều khiển
windowsModule.settings=Cài đặt
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_yue_HK.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock 已經喺度運行緊。請檢查你嘅桌面。
settings.window.title=設定
settings.page.title=Dock 設定
settings.page.subtitle=現代化響應式版面、現代控制項,同埋用分頁整理內容。
settings.language.label=語言
settings.tab.icons=圖示
settings.tab.iconsCustomization=圖示自訂
settings.tab.dockCustomization=Dock 自訂
settings.tab.dockPositioning=Dock 位置
settings.tab.general=一般
settings.icons.items.title=Dock 項目
settings.icons.items.helper=重新排列而家嘅圖示,亦可以集中管理程式或者 Windows 模組。
settings.icons.actions.title=操作
settings.icons.actions.helper=加入自訂執行檔、Windows 原生模組,或者移除所選項目。
settings.icons.moveUp=項目上移
settings.icons.moveDown=項目下移
settings.icons.addProgram=加入程式
settings.icons.addFolder=加入資料夾
settings.icons.addWindowsModule=加入 Windows 模組
settings.icons.removeSelected=移除所選項目
settings.iconsCustomization.size.title=圖示大小
settings.iconsCustomization.size.helper=調整每個圖示嘅視覺大小,同時保持 Dock 外觀簡潔。
settings.iconsCustomization.spacing.title=圖示間距
settings.iconsCustomization.spacing.helper=控制 Dock 有幾緊密或者寬鬆,而唔會打亂項目順序。
settings.dockCustomization.transparency.title=Dock 透明度
settings.dockCustomization.transparency.helper=平衡 Dock 喺桌面背景上嘅存在感同低調感。
settings.dockCustomization.rounding.title=邊框圓角
settings.dockCustomization.rounding.helper=保持銳利現代感,或者喺唔離開扁平風格下令邊角更柔和。
settings.dockCustomization.background.title=Dock 背景色
settings.dockCustomization.background.helper=揀一個喺 Dock 圖示底下顯示嘅基礎色調。
settings.positioning.mode.title=定位模式
settings.positioning.mode.helper=揀固定喺螢幕某個位置,或者可以自由拖動嘅 Dock。
settings.positioning.mode.static=靜態定位
settings.positioning.mode.dynamic=動態定位
settings.positioning.alignment.title=對齊
settings.positioning.alignment.vertical=垂直
settings.positioning.alignment.horizontal=水平
settings.positioning.spacing.title=螢幕間距
settings.positioning.spacing.top=上
settings.positioning.spacing.left=左
settings.positioning.spacing.right=右
settings.positioning.spacing.down=下
settings.positioning.dynamic.title=動態定位
settings.positioning.dynamic.helper=你可以喺畫面上自由拖動 Dock,擺去你想要嘅位置。
settings.positioning.choice.top=上
settings.positioning.choice.middle=中
settings.positioning.choice.down=下
settings.positioning.choice.left=左
settings.positioning.choice.right=右
settings.general.version=版本 fx1.1 - 03/2026
settings.general.repository=儲存庫:github.com/arthurdeka/cedro-modern-dock
settings.general.contact=聯絡:github.com/arthurdeka
settings.general.openSource=免費開源軟件
settings.general.acknowledgements=鳴謝
dialog.fileChooser.executableTitle=揀 .exe
dialog.fileChooser.executableFilter=可執行檔
dialog.directoryChooser.title=揀資料夾
windowsModule.modal.title=加入 Windows 模組
windowsModule.modal.subtitle=揀一個 Windows 原生目的地加入 Dock。
windowsModule.modal.available.title=可用模組
windowsModule.modal.available.helper=呢啲項目會幫 Windows 內建介面建立 Dock 捷徑。
windowsModule.modal.addSelected=加入所選模組
acknowledgements.window.title=鳴謝
acknowledgements.title=鳴謝
acknowledgements.subtitle=Cedro Modern Dock 使用嘅函式庫同框架。
acknowledgements.sectionTitle=函式庫同框架
dockItem.settings=設定
windowsModule.myComputer=我的電腦
windowsModule.recycleBin=回收桶
windowsModule.controlPanel=控制台
windowsModule.settings=設定
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_zh_CN.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock 已在运行。请检查你的桌面。
settings.window.title=设置
settings.page.title=Dock 设置
settings.page.subtitle=现代响应式布局、现代控件和基于标签页的组织方式。
settings.language.label=语言
settings.tab.icons=图标
settings.tab.iconsCustomization=图标自定义
settings.tab.dockCustomization=Dock 自定义
settings.tab.dockPositioning=Dock 位置
settings.tab.general=常规
settings.icons.items.title=Dock 项目
settings.icons.items.helper=重新排序当前图标,并在一个地方管理程序或 Windows 模块。
settings.icons.actions.title=操作
settings.icons.actions.helper=添加自定义可执行文件、原生 Windows 模块,或移除所选项目。
settings.icons.moveUp=上移项目
settings.icons.moveDown=下移项目
settings.icons.addProgram=添加程序
settings.icons.addFolder=添加文件夹
settings.icons.addWindowsModule=添加 Windows 模块
settings.icons.removeSelected=移除所选项目
settings.iconsCustomization.size.title=图标大小
settings.iconsCustomization.size.helper=调整每个图标的视觉大小,同时保持 Dock 轮廓简洁。
settings.iconsCustomization.spacing.title=图标间距
settings.iconsCustomization.spacing.helper=控制 Dock 的紧凑或宽松程度,而不改变项目顺序。
settings.dockCustomization.transparency.title=Dock 透明度
settings.dockCustomization.transparency.helper=在桌面背景上平衡 Dock 的存在感与低调感。
settings.dockCustomization.rounding.title=边框圆角
settings.dockCustomization.rounding.helper=保持外观锐利现代,或在不偏离扁平风格的前提下柔化边角。
settings.dockCustomization.background.title=Dock 背景颜色
settings.dockCustomization.background.helper=选择 Dock 图标下方的基础色调。
settings.positioning.mode.title=定位模式
settings.positioning.mode.helper=选择固定屏幕锚点或可自由拖动的 Dock。
settings.positioning.mode.static=静态定位
settings.positioning.mode.dynamic=动态定位
settings.positioning.alignment.title=对齐
settings.positioning.alignment.vertical=垂直
settings.positioning.alignment.horizontal=水平
settings.positioning.spacing.title=屏幕边距
settings.positioning.spacing.top=上
settings.positioning.spacing.left=左
settings.positioning.spacing.right=右
settings.positioning.spacing.down=下
settings.positioning.dynamic.title=动态定位
settings.positioning.dynamic.helper=在屏幕上自由拖动 Dock,把它放到你想要的位置。
settings.positioning.choice.top=上
settings.positioning.choice.middle=中
settings.positioning.choice.down=下
settings.positioning.choice.left=左
settings.positioning.choice.right=右
settings.general.version=版本 fx1.1 - 03/2026
settings.general.repository=仓库:github.com/arthurdeka/cedro-modern-dock
settings.general.contact=联系:github.com/arthurdeka
settings.general.openSource=免费开源软件
settings.general.acknowledgements=致谢
dialog.fileChooser.executableTitle=选择 .exe
dialog.fileChooser.executableFilter=可执行文件
dialog.directoryChooser.title=选择文件夹
windowsModule.modal.title=添加 Windows 模块
windowsModule.modal.subtitle=选择一个原生 Windows 目标添加到 Dock。
windowsModule.modal.available.title=可用模块
windowsModule.modal.available.helper=这些项目会为内置 Windows 界面创建 Dock 快捷方式。
windowsModule.modal.addSelected=添加所选模块
acknowledgements.window.title=致谢
acknowledgements.title=致谢
acknowledgements.subtitle=Cedro Modern Dock 使用的库和框架。
acknowledgements.sectionTitle=库和框架
dockItem.settings=设置
windowsModule.myComputer=此电脑
windowsModule.recycleBin=回收站
windowsModule.controlPanel=控制面板
windowsModule.settings=设置
================================================
FILE: src/main/resources/com/github/arthurdeka/cedromoderndock/i18n/messages_zh_TW.properties
================================================
dialog.singleInstance.message=Cedro Modern Dock 已在執行中。請檢查你的桌面。
settings.window.title=設定
settings.page.title=Dock 設定
settings.page.subtitle=現代化響應式版面、現代控制項與分頁式組織。
settings.language.label=語言
settings.tab.icons=圖示
settings.tab.iconsCustomization=圖示自訂
settings.tab.dockCustomization=Dock 自訂
settings.tab.dockPositioning=Dock 位置
settings.tab.general=一般
settings.icons.items.title=Dock 項目
settings.icons.items.helper=重新排序目前圖示,並在同一處管理程式或 Windows 模組。
settings.icons.actions.title=操作
settings.icons.actions.helper=新增自訂執行檔、原生 Windows 模組,或移除選取的項目。
settings.icons.moveUp=項目上移
settings.icons.moveDown=項目下移
settings.icons.addProgram=新增程式
settings.icons.addFolder=新增資料夾
settings.icons.addWindowsModule=新增 Windows 模組
settings.icons.removeSelected=移除選取項目
settings.iconsCustomization.size.title=圖示大小
settings.iconsCustomization.size.helper=調整每個圖示的視覺大小,同時保持 Dock 外觀俐落。
settings.iconsCustomization.spacing.title=圖示間距
settings.iconsCustomization.spacing.helper=控制 Dock 的緊湊或寬鬆程度,而不影響項目順序。
settings.dockCustomization.transparency.title=Dock 透明度
settings.dockCustomization.transparency.helper=在桌面背景上平衡 Dock 的存在感與低調感。
settings.dockCustomization.rounding.title=邊框圓角
settings.dockCustomization.rounding.helper=保持外觀銳利現代,或在不偏離扁平風格的情況下柔化角落。
settings.dockCustomization.background.title=Dock 背景色
settings.dockCustomization.background.helper=選擇 Dock 圖示下方的基底色調。
settings.positioning.mode.title=定位模式
settings.positioning.mode.helper=選擇固定螢幕錨點或可自由拖曳的 Dock。
settings.positioning.mode.static=靜態定位
settings.positioning.mode.dynamic=動態定位
settings.positioning.alignment.title=對齊
settings.positioning.alignment.vertical=垂直
settings.positioning.alignment.horizontal=水平
settings.positioning.spacing.title=螢幕間距
settings.positioning.spacing.top=上
settings.positioning.spacing.left=左
settings.positioning.spacing.right=右
settings.positioning.spacing.down=下
settings.positioning.dynamic.title=動態定位
settings.positioning.dynamic.helper=在畫面上自由拖曳 Dock,將它放到你想要的位置。
settings.positioning.choice.top=上
settings.positioning.choice.middle=中
settings.positioning.choice.down=下
settings.positioning.choice.left=左
settings.positioning.choice.right=右
settings.general.version=版本 fx1.1 - 03/2026
settings.general.repository=儲存庫:github.com/arthurdeka/cedro-modern-dock
settings.general.contact=聯絡方式:github.com/arthurdeka
settings.general.openSource=免費且開源的軟體
settings.general.acknowledgements=致謝
dialog.fileChooser.executableTitle=選擇 .exe
dialog.fileChooser.executableFilter=執行檔
dialog.directoryChooser.title=選擇資料夾
windowsModule.modal.title=新增 Windows 模組
windowsModule.modal.subtitle=選擇一個原生 Windows 目的地加入 Dock。
windowsModule.modal.available.title=可用模組
windowsModule.modal.available.helper=這些項目會為內建 Windows 介面建立 Dock 捷徑。
windowsModule.modal.addSelected=新增選取的模組
acknowledgements.window.title=致謝
acknowledgements.title=致謝
acknowledgements.subtitle=Cedro Modern Dock 使用的程式庫與框架。
acknowledgements.sectionTitle=程式庫與框架
dockItem.settings=設定
windowsModule.myComputer=此電腦
windowsModule.recycleBin=資源回收筒
windowsModule.controlPanel=控制台
windowsModule.settings=設定
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/DockItemActionServiceTest.java
================================================
package com.github.arthurdeka.cedromoderndock.application;
import com.github.arthurdeka.cedromoderndock.model.DockFolderItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockSettingsItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class DockItemActionServiceTest {
@Test
void executesProgramItemsThroughProgramLauncher() {
InvocationCapture capture = new InvocationCapture();
DockItemActionService service = new DockItemActionService(
(path, label) -> capture.record("program", path, label),
(path, label) -> capture.record("folder", path, label),
(module, label) -> capture.record("module", module, label)
);
service.execute(new DockProgramItemModel("Editor", "C:\\tools\\editor.exe"), capture::openSettings);
assertEquals("program", capture.kind);
assertEquals("C:\\tools\\editor.exe", capture.value);
assertEquals("Editor", capture.label);
}
@Test
void executesFolderItemsThroughFolderLauncher() {
InvocationCapture capture = new InvocationCapture();
DockItemActionService service = new DockItemActionService(
(path, label) -> capture.record("program", path, label),
(path, label) -> capture.record("folder", path, label),
(module, label) -> capture.record("module", module, label)
);
service.execute(new DockFolderItemModel("Projects", "C:\\Users\\Arthur Rodrigues\\Projects"), capture::openSettings);
assertEquals("folder", capture.kind);
assertEquals("C:\\Users\\Arthur Rodrigues\\Projects", capture.value);
assertEquals("Projects", capture.label);
}
@Test
void executesWindowsModuleItemsThroughWindowsModuleLauncher() {
InvocationCapture capture = new InvocationCapture();
DockItemActionService service = new DockItemActionService(
(path, label) -> capture.record("program", path, label),
(path, label) -> capture.record("folder", path, label),
(module, label) -> capture.record("module", module, label)
);
service.execute(new DockWindowsModuleItemModel("Control Panel", "ctrlpnl"), capture::openSettings);
assertEquals("module", capture.kind);
assertEquals("ctrlpnl", capture.value);
assertEquals("Control Panel", capture.label);
}
@Test
void executesSettingsItemsThroughSettingsAction() {
InvocationCapture capture = new InvocationCapture();
DockItemActionService service = new DockItemActionService(
(path, label) -> capture.record("program", path, label),
(path, label) -> capture.record("folder", path, label),
(module, label) -> capture.record("module", module, label)
);
service.execute(new DockSettingsItemModel(), capture::openSettings);
assertEquals("settings", capture.kind);
}
private static final class InvocationCapture {
private String kind = "";
private String value = "";
private String label = "";
private void record(String kind, String value, String label) {
this.kind = kind;
this.value = value;
this.label = label;
}
private void openSettings() {
this.kind = "settings";
}
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/DockServiceTest.java
================================================
package com.github.arthurdeka.cedromoderndock.application;
import com.github.arthurdeka.cedromoderndock.domain.DockRepository;
import com.github.arthurdeka.cedromoderndock.model.DockModel;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
class DockServiceTest {
@Test
void snapsSavedDockCoordinatesToWholePixels() {
InMemoryDockRepository repository = new InMemoryDockRepository();
DockService service = new DockService(repository);
service.setDockPosition(718.5, 28.2);
DockModel savedDock = repository.savedModel;
assertEquals(719.0, savedDock.getDockPositionX());
assertEquals(28.0, savedDock.getDockPositionY());
}
private static final class InMemoryDockRepository implements DockRepository {
private final DockModel model = new DockModel();
private DockModel savedModel = model;
@Override
public void save(DockModel model) {
savedModel = model;
}
@Override
public DockModel load() {
return model;
}
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/LocalizationServiceTest.java
================================================
package com.github.arthurdeka.cedromoderndock.application;
import com.github.arthurdeka.cedromoderndock.domain.DockRepository;
import com.github.arthurdeka.cedromoderndock.model.DockModel;
import com.github.arthurdeka.cedromoderndock.model.DockProgramItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockSettingsItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockWindowsModuleItemModel;
import org.junit.jupiter.api.Test;
import java.util.concurrent.atomic.AtomicInteger;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
class LocalizationServiceTest {
@Test
void localizesBuiltInItemsButKeepsProgramLabelsUntouched() {
InMemoryDockRepository repository = new InMemoryDockRepository();
DockService dockService = new DockService(repository);
LocalizationService localizationService = new LocalizationService(dockService);
assertEquals("Settings", localizationService.dockItemLabel(new DockSettingsItemModel()));
assertEquals("Control Panel", localizationService.dockItemLabel(new DockWindowsModuleItemModel("Control Panel", "ctrlpnl")));
assertEquals("Discord", localizationService.dockItemLabel(new DockProgramItemModel("Discord", "C:\\Discord.exe")));
localizationService.setLanguage(SupportedLanguage.PT_BR);
assertEquals("Configurações", localizationService.dockItemLabel(new DockSettingsItemModel()));
assertEquals("Painel de Controle", localizationService.dockItemLabel(new DockWindowsModuleItemModel("Control Panel", "ctrlpnl")));
assertEquals("Discord", localizationService.dockItemLabel(new DockProgramItemModel("Discord", "C:\\Discord.exe")));
}
@Test
void persistsLanguageAndNotifiesListeners() {
InMemoryDockRepository repository = new InMemoryDockRepository();
DockService dockService = new DockService(repository);
LocalizationService localizationService = new LocalizationService(dockService);
AtomicInteger notificationCount = new AtomicInteger();
localizationService.addListener(notificationCount::incrementAndGet);
localizationService.setLanguage(SupportedLanguage.PT_BR);
assertEquals(SupportedLanguage.PT_BR, repository.savedModel.getLanguage());
assertEquals(1, notificationCount.get());
}
@Test
void languageSelectorUsesNativeLanguageNames() {
InMemoryDockRepository repository = new InMemoryDockRepository();
DockService dockService = new DockService(repository);
LocalizationService localizationService = new LocalizationService(dockService);
assertEquals("English", localizationService.languageDisplayName(SupportedLanguage.EN_US));
assertEquals("Portugu\u00EAs (Brasil)", localizationService.languageDisplayName(SupportedLanguage.PT_BR));
}
@Test
void everySupportedLanguageHasATranslationBundle() {
for (SupportedLanguage language : SupportedLanguage.values()) {
String windowTitle = LocalizationService.bootstrapText(language, "settings.window.title");
String moduleTitle = LocalizationService.bootstrapText(language, "windowsModule.modal.title");
assertFalse(windowTitle.isBlank(), "Missing settings.window.title for " + language);
assertFalse(moduleTitle.isBlank(), "Missing windowsModule.modal.title for " + language);
assertFalse("settings.window.title".equals(windowTitle), "Bundle fallback failed for " + language);
assertFalse("windowsModule.modal.title".equals(moduleTitle), "Bundle fallback failed for " + language);
}
}
private static final class InMemoryDockRepository implements DockRepository {
private DockModel savedModel = new DockModel();
@Override
public DockModel load() {
return savedModel;
}
@Override
public void save(DockModel model) {
savedModel = model;
}
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/application/ProgramSelectionResolverTest.java
================================================
package com.github.arthurdeka.cedromoderndock.application;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.assertEquals;
class ProgramSelectionResolverTest {
@TempDir
Path tempDir;
@Test
void keepsRegularExecutablesUntouched() throws IOException {
Path executable = Files.createFile(tempDir.resolve("Editor.exe"));
ProgramSelectionResolver.ResolvedProgramSelection selection = ProgramSelectionResolver.resolve(executable);
assertEquals(executable.toString(), selection.executablePath());
assertEquals("Editor", selection.label());
}
@Test
void resolvesSquirrelUpdaterToRealApplicationExecutable() throws IOException {
Path installDir = Files.createDirectories(tempDir.resolve("Discord"));
Files.createFile(installDir.resolve("Update.exe"));
Path appDirectory = Files.createDirectories(installDir.resolve("app-1.0.0"));
Path discordExecutable = Files.createFile(appDirectory.resolve("Discord.exe"));
ProgramSelectionResolver.ResolvedProgramSelection selection =
ProgramSelectionResolver.resolve(installDir.resolve("Update.exe"));
assertEquals(discordExecutable.toString(), selection.executablePath());
assertEquals("Discord", selection.label());
}
@Test
void fallsBackToFirstExecutableWhenFolderNameDoesNotMatch() throws IOException {
Path installDir = Files.createDirectories(tempDir.resolve("SomeWrapper"));
Files.createFile(installDir.resolve("Update.exe"));
Path appDirectory = Files.createDirectories(installDir.resolve("app-2.0.0"));
Path realExecutable = Files.createFile(appDirectory.resolve("RealApp.exe"));
ProgramSelectionResolver.ResolvedProgramSelection selection =
ProgramSelectionResolver.resolve(installDir.resolve("Update.exe"));
assertEquals(realExecutable.toString(), selection.executablePath());
assertEquals("RealApp", selection.label());
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/persistence/JsonDockRepositoryTest.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.persistence;
import com.github.arthurdeka.cedromoderndock.application.SupportedLanguage;
import com.github.arthurdeka.cedromoderndock.model.DockFolderItemModel;
import com.github.arthurdeka.cedromoderndock.model.DockItem;
import com.github.arthurdeka.cedromoderndock.model.DockItemType;
import com.github.arthurdeka.cedromoderndock.model.DockModel;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
class JsonDockRepositoryTest {
@TempDir
Path tempDir;
@Test
void savesAndLoadsFolderItems() {
Path configPath = tempDir.resolve("config.json");
JsonDockRepository repository = new JsonDockRepository(configPath);
DockModel model = new DockModel();
model.addItem(new DockFolderItemModel("Projects", "C:\\Users\\Arthur Rodrigues\\Projects"));
repository.save(model);
DockModel loadedModel = repository.load();
assertEquals(1, loadedModel.getItems().size());
DockItem loadedItem = loadedModel.getItems().getFirst();
DockFolderItemModel folderItem = assertInstanceOf(DockFolderItemModel.class, loadedItem);
assertEquals(DockItemType.FOLDER, folderItem.getType());
assertEquals("Projects", folderItem.getLabel());
assertEquals("C:\\Users\\Arthur Rodrigues\\Projects", folderItem.getFolderPath());
}
@Test
void savesAndLoadsSelectedLanguage() {
Path configPath = tempDir.resolve("config.json");
JsonDockRepository repository = new JsonDockRepository(configPath);
DockModel model = new DockModel();
model.setLanguage(SupportedLanguage.PT_BR);
repository.save(model);
DockModel loadedModel = repository.load();
assertEquals(SupportedLanguage.PT_BR, loadedModel.getLanguage());
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/infrastructure/system/DefaultProgramLauncherTest.java
================================================
package com.github.arthurdeka.cedromoderndock.infrastructure.system;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
class DefaultProgramLauncherTest {
@TempDir
Path tempDir;
@Test
void launchesRegularProgramsDirectly() throws IOException {
Path executable = Files.createFile(tempDir.resolve("Editor.exe"));
DefaultProgramLauncher.LaunchCommand command =
DefaultProgramLauncher.resolveLaunchCommand(executable.toString());
assertEquals(executable.toString(), command.executablePath());
assertEquals(List.of(), command.arguments());
}
@Test
void launchesDiscordThroughUpdateExecutable() throws IOException {
Path installDir = Files.createDirectories(tempDir.resolve("Discord"));
Path updateExecutable = Files.createFile(installDir.resolve("Update.exe"));
Path versionDirectory = Files.createDirectories(installDir.resolve("app-1.0.9230"));
Path discordExecutable = Files.createFile(versionDirectory.resolve("Discord.exe"));
DefaultProgramLauncher.LaunchCommand command =
DefaultProgramLauncher.resolveLaunchCommand(discordExecutable.toString());
assertEquals(updateExecutable.toString(), command.executablePath());
assertEquals(List.of("--processStart", "Discord.exe"), command.arguments());
}
}
================================================
FILE: src/test/java/com/github/arthurdeka/cedromoderndock/util/SingleInstanceGuardTest.java
================================================
package com.github.arthurdeka.cedromoderndock.util;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import java.nio.file.Path;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
class SingleInstanceGuardTest {
@TempDir
Path tempDir;
@Test
void blocksSecondGuardWhileFirstIsHoldingLock() {
Path lockFile = tempDir.resolve("app.lock");
SingleInstanceGuard firstGuard = new SingleInstanceGuard(lockFile);
SingleInstanceGuard secondGuard = new SingleInstanceGuard(lockFile);
try {
assertTrue(firstGuard.tryAcquire());
assertFalse(secondGuard.tryAcquire());
} finally {
firstGuard.close();
secondGuard.close();
}
}
@Test
void allowsAcquireAgainAfterFirstGuardReleasesLock() {
Path lockFile = tempDir.resolve("app.lock");
SingleInstanceGuard firstGuard = new SingleInstanceGuard(lockFile);
SingleInstanceGuard secondGuard = new SingleInstanceGuard(lockFile);
try {
assertTrue(firstGuard.tryAcquire());
firstGuard.close();
assertTrue(secondGuard.tryAcquire());
} finally {
firstGuard.close();
secondGuard.close();
}
}
}