李通洲
e13c88cea6
Global: support bar output for percentage value #294
2022-10-22 16:15:12 +08:00
Linus Dierheimer
b27453d275
Revert "Add Univalent GNU/Linux's logo"
2022-10-19 08:29:39 +02:00
Linus Dierheimer
aa0501b853
Merge pull request #306 from Jin-Asanami/dev
...
Add Univalent GNU/Linux's logo
2022-10-19 08:23:12 +02:00
Jin Asanami
596c776463
fix univalent's colours
2022-10-19 12:18:39 +09:00
Linus Dierheimer
eb1738b1c6
Merge pull request #309 from CarterLi/swap
...
Swap: split code out from memory detection
2022-10-18 20:34:03 +02:00
李通洲
581c6f547d
Swap: split code out from memory detection
...
1. Since swap module is disabled by default, swap detection is unnecessary in most cases.
2. On platform other than Linux, swap detection doesn't share code with memory.
3. Swap detection can be expensive. On Windows, it requires another WMI query which can lag heavily in some cases. Don't pay for you don't use.
2022-10-19 00:24:17 +08:00
李通洲
3d5ef186ba
Disk: don't convert NAN to integer; don't print 0B / 0B (0%)
...
fix ASAN warning: `runtime error: nan is outside the range of representable values of type 'unsigned char'`
2022-10-18 21:23:29 +08:00
李通洲
e3ea39afaa
Disk: add volume name detection
2022-10-18 21:23:29 +08:00
Jin Asanami
7f9269cff2
Update builtin.c
2022-10-18 11:30:48 +09:00
Jin Asanami
727a6988c2
Update builtin.c
2022-10-18 11:26:31 +09:00
Linus Dierheimer
7bbd2aee94
Merge pull request #305 from LinusDierheimer/work/disk_refactor
...
Work/disk refactor
2022-10-17 18:24:29 +02:00
Linus Dierheimer
b812f1dcb4
Disk: Fix build on windows
2022-10-17 17:52:43 +02:00
Linus Dierheimer
a03eaed4e2
Disk: add options#
2022-10-17 17:35:06 +02:00
Linus Dierheimer
c1fec9b411
Disk: Apple implementation working
2022-10-17 08:10:58 -07:00
Linus Dierheimer
19a9b18c69
Disk: Linux impl working
2022-10-17 13:19:48 +02:00
李通洲
38b3aae1e3
Windows: simplify WMI query code
...
by making C++ code more C++
2022-10-17 00:17:26 +08:00
李通洲
5d5663e2a7
Kernel: fix detection on Windows
...
According to MSDN, GetVersionExA is not reliable. We have to query WMI instead.
2022-10-17 00:17:19 +08:00
VitoFe
2499cbdab8
Add Garuda small variant
2022-10-15 18:05:21 +00:00
李通洲
a829e85ef5
LocalIP: support --localip-name-prefix on Windows
2022-10-16 01:34:26 +08:00
李通洲
a090bed6c0
Logo: try printing logo on Windows Server
...
Completely untested
2022-10-15 23:46:00 +08:00
李通洲
76684e49ca
TerminalShell: speed up PowerShell version detection by querying the version of pwsh.exe file
...
Also add cmd version detection
2022-10-15 22:45:30 +08:00
李通洲
c1fc6e2762
Processing: handle a possible error
2022-10-15 21:59:50 +08:00
李通洲
437431a821
TerminalShell: support Windows PowerShell version detection
2022-10-15 21:44:28 +08:00
李通洲
5749a8f7c1
TerminalShell: improve speed on Windows
...
[NtQueryInformationProcess](https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryinformationprocess ) is an internal NT syscall which may change in the future. However, unlike other NT syscalls NtQueryInformationProcess is well documented on MSDN, so I think it's safe to use.
Boost shell detection by 0.3s on my machine. Note querying PowerShell's version `pwsh --version` costs another 0.2s
2022-10-15 21:20:58 +08:00
李通洲
b042b90d9b
TerminalShell: improve shell detection on Windows
2022-10-15 11:36:24 +08:00
李通洲
4f0dd51761
TerminalShell: fix bash version detection on Windows
...
Currently we use `env -i /path/to/bash --norc --noprofile -c printf "%s" "$BASH_VERSION"` to detect bash version.
This is problematic on Windows because there is no `env` in $PATH ( there is env in $PATH of msys2 but not in $PATH of Windows )
With this modification the detection is also faster because 1 process is created only
2022-10-14 22:58:56 +08:00
李通洲
4f67ed2b77
TerminalShell: add some pretty names
2022-10-14 19:16:55 +08:00
李通洲
3f4926cbd5
TerminalShell: detect platform specific terminal on correct system only
2022-10-14 19:16:55 +08:00
李通洲
af93157a76
TerminalShell: handle nested shell
2022-10-14 19:16:55 +08:00
李通洲
220a7d24bc
TerminalShell: detect first shell we found only.
...
Previously we always detect login shell as current shell, which seems duplicate with userShell
2022-10-14 18:33:11 +08:00
李通洲
3b541d3670
Thread: fix compile errors
2022-10-14 18:33:11 +08:00
李通洲
4bd6f2da89
TerminalShell: add lock ( Windows )
2022-10-14 18:33:11 +08:00
李通洲
1b7a2c2ed5
MSYS2: remove support
...
MSYS2 version was built for smooth transition from POSIX api to Win32 api. It has almost identical output as Windows native version, except requiring msys runtime dll and being a bit slower.
2022-10-14 18:33:11 +08:00
李通洲
11ad7a8a3d
TerminalShell: unify shell version detection code
2022-10-14 18:33:11 +08:00
李通洲
622f84c971
Kernel: remove special handling for Windows
...
Since we have an implementation for it
2022-10-14 17:39:07 +08:00
李通洲
779a33349a
OS: don't print msys2 logo for native Windows
2022-10-14 17:39:07 +08:00
李通洲
135ca1eeba
Packages: don't rely on environment variables
2022-10-14 17:38:53 +08:00
Linus Dierheimer
1513b8c0db
Fix more build errors
2022-10-13 22:12:31 +02:00
Linus Dierheimer
693cc1e730
Fix build errors
2022-10-13 22:02:58 +02:00
Linus Dierheimer
cf048bc723
Refactor package detection code
2022-10-13 21:43:31 +02:00
李通洲
6f66b87262
Windows: support --list-presets
2022-10-13 23:49:09 +08:00
李通洲
79cfa96616
Processing: fix Windows impl
2022-10-13 23:49:09 +08:00
李通洲
3cc6611614
Windows: support native Windows
2022-10-13 23:49:09 +08:00
李通洲
457c2da67d
Packages: silence warnings
2022-10-13 23:49:08 +08:00
李通洲
13769e0e52
Disk: removes unnecessary #includes
2022-10-13 23:49:08 +08:00
李通洲
b33e042cd4
Library: support Windows
2022-10-13 23:49:08 +08:00
李通洲
2689a20889
Uptime: support Windows
2022-10-13 23:49:08 +08:00
Edward Piper
2c82c9a6dc
Fixed Alpine, EndeavourOS, Rocky, and Rosa logos
2022-10-12 10:26:38 -07:00
李通洲
06262c078d
TerminaFont: move windows specific code into its own file
2022-10-12 21:59:21 +08:00
李通洲
b64a234f8a
Networking: support Windows
2022-10-12 21:59:21 +08:00