Commit graph

865 commits

Author SHA1 Message Date
Linus Groh bed240d4b3 LaunchServer+Base: Stop using Browser as default protocol handler
Browser supports very few protocols (http, https, gemini, file) at the
moment, so there's no point in using it as a catch-all and default
protocol handler. I added an explicit association for gemini to
/bin/Browser instead.

This stops Desktop::Launcher::open() from reporting success for any URL,
which really isn't the case (Browser shows an error page...).
2020-12-24 10:25:18 +01:00
Brendan Coles 39c92dad83 Userland: useradd: Add command line option to set user password 2020-12-21 09:57:26 +01:00
Alex McGrath f1d7d864ae LibVT+Terminal: Add the option to disable the bell 2020-12-21 00:17:12 +01:00
Lenny Maiorani 765936ebae
Everywhere: Switch from (void) to [[maybe_unused]] (#4473)
Problem:
- `(void)` simply casts the expression to void. This is understood to
  indicate that it is ignored, but this is really a compiler trick to
  get the compiler to not generate a warning.

Solution:
- Use the `[[maybe_unused]]` attribute to indicate the value is unused.

Note:
- Functions taking a `(void)` argument list have also been changed to
  `()` because this is not needed and shows up in the same grep
  command.
2020-12-21 00:09:48 +01:00
Brendan Coles 4d89c1885d MenuApplets: Add Network menu applet 2020-12-19 18:28:56 +01:00
Linus Groh 176fe1795d Base: Add app-libgfx-demo.png 32x32 icon
The 16x16 icon already looks great, so this is a larger version of it,
with the same shapes and colors.
2020-12-18 10:01:18 +01:00
Linus Groh 9dc4f8bc06 Base: Add app-fire.png 32x32 icon
This is an upscaled (no interpolation) version of the 16x16 icon, which
looks pretty neat given the pixelated appearance of the "Fire" demo
application. :^)
2020-12-18 10:01:18 +01:00
Linus Groh 13697ae108 Base: Add app-cube.png 32x32 icon 2020-12-18 10:01:18 +01:00
Linus Groh b9e3dbfbd1 Base: Tweak app-cube.png 16x16 icon 2020-12-18 10:01:18 +01:00
Brendan Coles 219d039639 Screensaver: Add app-screensaver.png 32x32 icon 2020-12-18 10:01:09 +01:00
Tom 07badd9530 WindowServer: Add the ability to animate cursors
This adds the ability to specify cursor attributes as part of their
file names, which allows us to remove hard coded values like the hot
spot from the code. The attributes can be specified between the last
two dots of the file name. Each attribute begins with a character,
followed by one or more digits that specify a uint value.

Supported attributes:
x: The x-coordinate of the cursor hotspot
y: The y-coordinate of the cursor hotspot
f: The number of animated frames horizontally in the image
t: The number of milliseconds per frame

For example, the filename wait.f14t100.png specifies that the image
contains 14 frames that should be cycled through at a rate of 100ms.
The hotspot is not specified, so it defaults to the center.
2020-12-17 19:40:05 +01:00
Brendan Coles 853664bd3c LibC: stdlib: Add clearenv() function 2020-12-17 19:39:56 +01:00
Brendan Coles b9d99849ad Userland: Add beep utility 2020-12-16 17:29:28 +01:00
Brendan Coles 3c9a3a9405 EchoServer: Add a simple echo server 2020-12-16 17:29:12 +01:00
Brendan Coles 9d4a0ec50a Games: Add Pong 2020-12-16 17:12:46 +01:00
Andreas Kling c44dbabda1 LibGUI: Generate nicer icons for symlinked files
Instead of symlinks showing up with the "filetype-symlink" icon, we now
generate a new icon by taking the target file's icon and slapping a
small arrow emblem on top of it.

This looks rather nice. :^)
2020-12-16 12:08:48 +01:00
Itamar 706a8c05fd CrashDaemon: Add service that acts on new coredumps
Currently we only print a backtrace. In the future, we could do something nice in the GUI.
2020-12-14 23:05:53 +01:00
Andreas Kling 2b8c7faee4 LibWeb: Use the margin box of floating elements for flowing around
Inline content flows around the entire margin box of floating elements,
not just the content box.
2020-12-12 19:59:24 +01:00
Andreas Kling c139b7fe78 Base: Remove *.hsp files
HackStudio no longer has dedicated project files, so let's get rid of
the *.hsp file concept. It'll eventually produce some files again,
but they won't be the same kind of "project" files.
2020-12-10 20:43:19 +01:00
asynts bbcc5a9332 LibWeb: Move editing stuff into EditEventHandler. 2020-12-09 21:05:06 +01:00
Andreas Kling af757a1659 LibWeb: Naively implement the CSS clear property
This is definitely not fully-featured, but basically we now handle
the clear property by forcing the cleared box below the bottom-most
floated box on the relevant side.
2020-12-06 01:45:51 +01:00
Andreas Kling 2e5e4be212 Base: Add a simple HTML test page for CSS floats 2020-12-05 22:51:03 +01:00
Daniel Lemos 4ae0de9a37
Browser: Add DuckDuckGo to bookmarks (#4288) 2020-12-05 13:39:30 +01:00
Andreas Kling c01070df1b Base: Add a hover color link to the links on the welcome page 2020-12-04 16:30:07 +01:00
Andreas Kling 017490aa7f Base: Add a little web test page for inline elements with CSS padding 2020-12-03 21:46:04 +01:00
AnotherTest 474453244b Spreadsheet: Implement infinit-scroll for columns
This naturally also implements multi-char columns, and also integrates
it into the js runtime (such columns can be named in ranges too).
2020-11-30 12:07:45 +01:00
devashish 8b194f41e9 JPGLoader: Remove JPEG fuzz files from the main repository
...and transfer them to SerenityOS/serenity-fuzz-corpora.
2020-11-30 11:38:59 +01:00
devashish 4d7ba50dc7 JPGLoader: Move bogus JPEGs to a different directory 2020-11-29 16:22:04 +01:00
Sergey Bugaev 952c0dc2a0 Userland: Implement find -name clause
Closes https://github.com/SerenityOS/serenity/issues/4191
2020-11-28 14:28:58 +01:00
Sergey Bugaev 098070b767 Kernel: Add unveil('b')
This is a new "browse" permission that lets you open (and subsequently list
contents of) directories underneath the path, but not regular files or any other
types of files.
2020-11-23 18:37:40 +01:00
Luke e68348298f LibWeb: Add a test for the new event dispatcher 2020-11-22 18:20:56 +01:00
Andreas Kling 00aac65af5 Base: Unbreak the "images" HTML test page 2020-11-22 13:48:43 +01:00
Linus Groh df9fe8fa7b Base: Add filetype-json icons 2020-11-15 16:49:40 +01:00
Linus Groh 6b9ff8d6e2 LibGUI/FileIconProvider: Add config file and use patterns
This moves file extension to icon mappings from compile time macros to an
INI config file (/etc/FileIconProvider.ini), so file icons can easily be
customized and extended :^)

I also switched the format from a static file extension (".foo") to
glob-like patterns ("*.foo", using StringUtils::matches()), which allows
us to assign icons to specific exactly matching file names, like many
IDEs do - e.g. "CMakeLists.txt" or ".prettierrc".
2020-11-15 16:49:40 +01:00
Brendan Coles f8c980a06b Userland: chroot: Add --userspec/-u flag to set uid/gid for chroot 2020-11-14 17:14:30 +01:00
Andreas Kling b413c7ae6a ls: Only append file type indicators when -F or --classify is specified 2020-11-11 20:46:06 +01:00
Brendan Coles 4dd104607d LaunchServer: Add hsp=/bin/HackStudio file association to config 2020-11-10 19:04:24 +01:00
Brendan Coles e62b604ec5 Base: remove unnecessary Game config files from /home/anon/.config/ 2020-11-10 19:03:59 +01:00
Nico Weber 5fcd34b810 Userland: Add an "adjtime" utility
It's a thin userland wrapper around adjtime(2). It can be used
to view current pending time adjustments, and root can use it to
smoothly adjust the system time.

As far as I can tell, other systems don't have a userland utility
for this, but it seems useful. Useful enough that I'm adding it to
the lagom build so I can use it on my linux box too :)
2020-11-10 19:03:08 +01:00
Nico Weber 323e727a4c Kernel+LibC: Add adjtime(2)
Most systems (Linux, OpenBSD) adjust 0.5 ms per second, or 0.5 us per
1 ms tick. That is, the clock is sped up or slowed down by at most
0.05%.  This means adjusting the clock by 1 s takes 2000 s, and the
clock an be adjusted by at most 1.8 s per hour.

FreeBSD adjusts 5 ms per second if the remaining time adjustment is
>= 1 s (0.5%) , else it adjusts by 0.5 ms as well. This allows adjusting
by (almost) 18 s per hour.

Since Serenity OS can lose more than 22 s per hour (#3429), this
picks an adjustment rate up to 1% for now. This allows us to
adjust up to 36s per hour, which should be sufficient to adjust
the clock fast enough to keep up with how much time the clock
currently loses. Once we have a fancier NTP implementation that can
adjust tick rate in addition to offset, we can think about reducing
this.

adjtime is a bit old-school and most current POSIX-y OSs instead
implement adjtimex/ntp_adjtime, but a) we have to start somewhere
b) ntp_adjtime() is a fairly gnarly API. OpenBSD's adjfreq looks
like it might provide similar functionality with a nicer API. But
before worrying about all this, it's probably a good idea to get
to a place where the kernel APIs are (barely) good enough so that
we can write an ntp service, and once we have that we should write
a way to automatically evaluate how well it keeps the time adjusted,
and only then should we add improvements ot the adjustment mechanism.
2020-11-10 19:03:08 +01:00
Brendan Coles 28abfd6290 Userland: ls: Add -d / --directory flag 2020-11-10 18:56:27 +01:00
Brendan Coles 7e0204fb41 Userland: ls: Add -o and -B / --ignore-backups flags
* `-B`, --ignore-backups`: Do not list implied entries ending with ~
* `-o`, In long format, do not show group information
2020-11-10 14:22:49 +01:00
Brendan Coles 0058d28a73 Base: Add ls man page documentation 2020-11-10 12:04:26 +01:00
bcoles 74d9616bec
Base: Add Breakout game to system menu (#4006) 2020-11-09 16:21:05 +01:00
Peter Nelson cd38fab63f LibGfx: add erroneous cases to GIF test suite 2020-11-08 21:40:47 +01:00
Andreas Kling eed78ffa5a Base: Tweak CXXFLAGS for the "little" test projects
Let's build with -std=c++2a since we're C++20 nowadays. :^)
2020-11-05 10:02:57 +01:00
Jesse Buhagiar 4713e6185f Chess: Add missing default config file in .config :^)
Following 9f8a8e07c2, let's add a default
`.ini` to prevent `unveil` from failing.
2020-11-04 19:36:54 +01:00
Brendan Coles e558f6b184 Minesweeper+Snake: load config file before calling unveil() 2020-11-04 19:36:27 +01:00
Brendan Coles fb5ea8a212 WindowServer+LibGfx: Add Gfx::StandardCursor::Hidden cursor 2020-11-02 20:58:07 +01:00
Brendan Coles 9f8a8e07c2 Games: Use pledge and unveil 2020-11-02 13:16:01 +01:00