Commit Graph

19 Commits

Author SHA1 Message Date
Tim Ledbetter
3b446fba34 LibDesktop: Pass an optional arguments list to AppFile::spawn() 2023-02-11 19:32:24 +00:00
Timothy Flynn
3d6b0e60ca LibDesktop+Taskbar: Add an option to exclude apps from the system menu
We currently hard-code excluding Settings apps from the system menu.
This adds an "ExcludeFromSystemMenu" option to the AppFile configuration
to selectively exclude these apps, which all Settings app now set.

This is to allow selectively excluding a few Demo apps in a future
commit.
2023-01-03 17:56:55 +01:00
Linus Groh
6e19ab2bbc AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null
state), and while it's going to use UTF-8, the name UTF8String is a
mouthful - so let's free up the String name by renaming the existing
class.
Making the old one have an annoying name will hopefully also help with
quick adoption :^)
2022-12-06 08:54:33 +01:00
cflip
05e7b338ad LibDesktop+Taskbar: Add 'WorkingDirectory' property to app files 2022-10-17 01:37:58 +02:00
ne0ndrag0n
7fc22896ee LibDesktop: Add support for RequiresRoot option to AppFile 2022-10-14 11:23:06 +02:00
demostanis
48766449e5 LaunchServer+LibDesktop: Open from mime type
Before, LaunchServer would only open files based on their extension.
This wouldn't work if the file had the wrong one.
2022-07-27 17:11:25 +01:00
sin-ack
3f3f45580a Everywhere: Add sv suffix to strings relying on StringView(char const*)
Each of these strings would previously rely on StringView's char const*
constructor overload, which would call __builtin_strlen on the string.
Since we now have operator ""sv, we can replace these with much simpler
versions. This opens the door to being able to remove
StringView(char const*).

No functional changes.
2022-07-12 23:11:35 +02:00
Idan Horowitz
086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Lenny Maiorani
983716cbeb Libraries: Use default constructors/destructors in LibDesktop
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-10 18:04:26 -08:00
Lenny Maiorani
59b7e6a213 Libraries: Use default constructors/destructors in LibCpp
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-10 18:04:26 -08:00
Andreas Kling
8b1108e485 Everywhere: Pass AK::StringView by value 2021-11-11 01:27:46 +01:00
Jelle Raaijmakers
1a4b1ecd04 LibDesktop: Add support for IconPath in AppFile
With `IconPath`, you can override the icon used for the application
shortcut. This currently only supports resolving the icon through
`GUI::FileIconProvider`, the implementation for pointing to actual
image files is left as an exercise for the reader.
2021-08-04 13:54:08 +01:00
Andreas Kling
89ab55b44b LibDesktop: Add an optional "Description" field to .af files 2021-07-26 00:39:10 +02:00
Linus Groh
4983a972b0 LibDesktop: Add a RunInTerminal boolean field to app files
This is common enough to warrant its own setting by now - but it's also
partially a workaround. Since app files currently only support a single
executable path with no arguments, we resort to generating wrapper
scripts for port launchers with arguments - and then the executable is
that shell script. We also moved from manually specifying icon files to
embedding them in executables. As shell scripts can't have icons
embedded in them, a different solution is needed - this one solves the
common case of running a CLI program in a terminal, and still allows
embedding of icons in the executable itself as no shell script is
needed, meaning it will be shown in the taskbar and system menu.

The second use case of actually passing arguments to the executable
itself (and not just "Terminal -e ...") is not covered by this and still
requires an external script (meaning no icon for now), but I think that
can easily be solved by adding something like an "Arguments" field to
app files. :^)
2021-07-20 00:58:26 +01:00
Spencer Dixon
ae20c178b9 LibDesktop: Add spawn() to AppFiles
This adds a convenience utility to AppFiles for quickly launching the
apps backed by the AppFile.
2021-06-28 16:29:02 +02:00
Andreas Kling
7ae7170d61 Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
Linus Groh
ebdeed087c Everywhere: Use linusg@serenityos.org for my copyright headers 2021-04-22 22:51:19 +02:00
Brian Gianforcaro
1682f0b760 Everything: Move to SPDX license identifiers in all files.
SPDX License Identifiers are a more compact / standardized
way of representing file license information.

See: https://spdx.dev/resources/use/#identifiers

This was done with the `ambr` search and replace tool.

 ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00