Commit Graph

832 Commits

Author SHA1 Message Date
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
Brendan Coles
75dec15b43 LaunchServer: Add sheets=/bin/Spreadsheet file association to config 2020-11-01 10:33:20 +01:00
JetStarBlues
e5fc0f940c
Chess: Add the 'moderna' piece set (#3896) 2020-11-01 10:31:00 +01:00
AnotherTest
1bd3a2d09f Spreadsheet: Add support for example views and hyperlinks in the docs
Now the functions can actually be demonstrated by small examples,
embedded right inside the documentation via:
spreadsheet://example/<page>#<example_name>

Also allows pages to link to each other via the same scheme:
spreadsheet://doc/<page>
2020-10-31 15:40:13 +01:00
AnotherTest
37c089fb7b LibTLS: (Almost) verify certificate chain against root CA certificates
Also adds a very primitive systemwide ca_certs.ini file.
2020-10-30 23:42:03 +01:00
Uma Sankar Yedida
9ccae7a908 WindowServer+LibGfx: Added Crosshair cursor 2020-10-30 19:10:15 +01:00
AnotherTest
3fa0b887ed Shell: Document the new 'pattern as (list of names)' match syntax 2020-10-29 11:53:01 +01:00
AnotherTest
a935a31ecf Userland: Add an implementation of 'expr'
This implements all expressions except 'match', which errors out when executed.
Closes #1124?
2020-10-29 11:53:01 +01:00
Linus Groh
d412fbdcf3 Shell+LibLine: Support HISTCONTROL environment variable
This is implemented in Line::Editor meaning not only the Shell will
respect it, but also js, Debugger etc.

Possible values are "ignorespace", "ignoredups" and "ignoreboth", as
documented in Shell-vars(7), for now.

The default value for the anon user (set in .shellrc) is "ignoreboth".
2020-10-26 11:27:54 +01:00
Linus Groh
4a4b1b1131 Shell: Support HISTFILE environment variable
This allows changing the Shell's history file path.
2020-10-26 11:27:54 +01:00
Linus Groh
7eee39b850 LookupServer: Support multiple nameservers
The configuration key [DNS] Nameserver has been renamed to Nameservers
and accepts a comma-separated list of nameserver addresses, which will
be queried in the given order until a response has been received.

The new default value is still Cloudflare's 1.1.1.1 as well as their
secondary DNS server 1.0.0.1.
2020-10-25 18:52:20 +01:00
Linus Groh
664794b19e Themes: Update tooltip colors of dark themes
For themes with primarily light text colors and dark backgrounds the
current almost-white background/black text tooltips look a bit out of
place. I've changed them to what I believe are sensible colors but theme
authors are of course free to tweak further.
2020-10-25 13:26:20 +01:00
Andreas Kling
80b77cec38 LibGfx+FontEditor+Fonts: Add family, size and weight metadata to fonts
This makes finding fonts from the same family much less difficult. :^)
2020-10-25 10:12:03 +01:00
Andreas Kling
5abc03db0d Fonts: Rename font files consistently
Font files are now all named like this:

    <Family><Weight><Size>.font

This will make it much easier/sane to perform font lookup.
2020-10-25 10:12:03 +01:00
Andreas Kling
8961148cdf Fonts: Add 12px variants of Csilla and CsillaBold
These aren't perfect, but it's a start and we can tweak the glyphs
as we go and discover what might look nice. :^)
2020-10-25 10:12:03 +01:00
AnotherTest
d7577b0338 Base: Document the new brace expansions in Shell's manpage 2020-10-25 10:09:27 +01:00
Andreas Kling
950c999d3a Themes: Add "Desert" theme 2020-10-24 12:23:48 +02:00
Andreas Kling
f2584bc2eb Fonts: Add 12px variants of Katica and KaticaBold
I only drew the ASCII codepoints so far. We'll probably need to tweak
these here & there, but I feel like they turned out pretty good. :^)
2020-10-24 00:03:43 +02:00
Andreas Kling
3c5da01f94 LibGUI+LibGfx+Base: Make tooltips color theme aware :^)
Also tweak the default tooltip color to be more bright and yellow!
2020-10-23 12:01:14 +02:00
Andreas Kling
f406c2e07f Base: Remove ugly 'Xmas' theme
I added this while doing the original theming implementationa and it's
just not good.
2020-10-23 11:45:35 +02:00
AnotherTest
0341e3fde7 Base: Add a manpage for 'printf' 2020-10-22 17:49:03 +02:00
Tom
a823d2a962 LibGfx: Add colors for highlight-searching to palette and themes 2020-10-22 15:23:45 +02:00
Linus Groh
57e7b2f8e4 Base: Update test-js(1) man page 2020-10-19 11:29:55 +02:00
BenJilks
5f15fb17d9 PixelPaint: Basic brush tool
This patch adds a very basic implementation of the classic brush
tool. It features a wide brush with a falloff around the edges.
2020-10-14 20:36:40 +02:00
Luke
52c31bb743 LibGfx+FontEditor+Fonts: Add "mean line" value to all fonts
The main inspiration behind this was to have a correct ex CSS unit.
The mean line is based off what it shows in the CSS Values and Units
Level 4 specification, section 6.1.1.

https://www.w3.org/TR/css-values-4/#font-relative-lengths
2020-10-05 20:05:40 +02:00
AnotherTest
6b55b007dd HackStudio: Add a Shell language server 2020-10-04 23:12:28 +02:00
Linus Groh
bcfc6f0c57 Everywhere: Fix more typos 2020-10-03 12:36:49 +02:00
Linus Groh
91bcad7cce Base: Add missing options to the Shell(1) man page 2020-10-02 14:40:54 +02:00
utku
7e9cd8a860
Keymaps: Add Colemak keymap (#3658)
Leave CapsLock as is, as the Colemak Windows driver also does
(Colemak originally maps CapsLock as Backspace).
2020-10-02 13:44:16 +02:00
Andreas Kling
0245e0f03a DevTools: Remove VisualBuilder and FormCompiler
This functionality is being moved to HackStudio so let's not confuse
people by keeping the old stuff around.
2020-10-01 21:07:12 +02:00
Itamar
863f14788f HackStudio: Add C++ Language Server
The language server keeps track of the content of currently edited
files by receiving updates about edit actions.

Also, C++ autocompletion is no longer tied to HackStudio itself and
moved to be part of the language server.
2020-09-30 21:46:59 +02:00
Andreas Kling
279a49cdf4 Base: Show how long it took to load the welcome.html page :^) 2020-09-29 18:36:00 +02:00
AnotherTest
cfa5e6efe9 Spreadsheet: Add the 'lookup' and 'reflookup' functions 2020-09-28 17:41:48 +02:00
AnotherTest
9c1143fe13 Spreadsheet: Add a 'choose' function 2020-09-28 17:41:48 +02:00