Skip to content

Commit 0f69dc5

Browse files
authored
Merge pull request #692 from fastfetch-cli/dev
Release 2.6.1
2 parents d0d9831 + 6af57ff commit 0f69dc5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1006
-400
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# 2.6.1
2+
3+
Features:
4+
* Improve xonsh shell detection (Shell)
5+
* Support colored percentage values (Bluetooth / Gamepad / Sound)
6+
* Add `--<module>-percent-[green|yellow]` options to specify threshold of percentage colors
7+
* eg. `--disk-percent-green 20 --disk-percent-yellow 50` will show green if disk usage is less than 20%, yellow if disk usage is less then 50%, and red otherwise.
8+
* Add `--percent-color-[green|yellow|red]` options to specify color of different percent value states.
9+
* eg. `--percent-color-green blue` will show blue color if percent value falls in green state.
10+
* Improve Intel macbook support (macOS)
11+
12+
Bugfixes:
13+
* Fix segfault in CPU module when running in aarch64 machine without `lscpu` installed (CPU, Linux)
14+
* Don't use `login` as terminal process (Terminal, Linux)
15+
* Silence warnings when building in 32bit machines.
16+
* Create sub folders when writing config file (#690)
17+
* Improve user specific locale detection; fix locale detection in Windows 7 (Locale)
18+
* Fix GPU type detection (GPU, macOS)
19+
120
# 2.6.0
221

322
Changes:

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.6.0
4+
VERSION 2.6.1
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -265,7 +265,7 @@ file(GENERATE OUTPUT logo_builtin.h CONTENT "${LOGO_BUILTIN_H}")
265265
#######################
266266

267267
set(LIBFASTFETCH_SRC
268-
src/common/bar.c
268+
src/common/percent.c
269269
src/common/commandoption.c
270270
src/common/font.c
271271
src/common/format.c

doc/json_schema.json

Lines changed: 129 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@
2626
"format": {
2727
"description": "Output format of the module",
2828
"type": "string"
29+
},
30+
"percent": {
31+
"description": "Threshold of percentage colors",
32+
"type": "object",
33+
"properties": {
34+
"green": {
35+
"type": "integer",
36+
"minimum": 0,
37+
"maximum": 100,
38+
"description": "Value less then green will be shown in green"
39+
},
40+
"yellow": {
41+
"type": "integer",
42+
"minimum": 0,
43+
"maximum": 100,
44+
"description": "Value greater than green and less then yellow will be shown in yellow.\nValue greater than yellow will be shown in red"
45+
}
46+
}
2947
}
3048
},
3149
"type": "object",
@@ -439,6 +457,24 @@
439457
"minimum": 0,
440458
"maximum": 9,
441459
"default": 0
460+
},
461+
"color": {
462+
"type": "object",
463+
"description": "Set color used in different states of percentage bars and numbers",
464+
"properties": {
465+
"green": {
466+
"description": "Color used in green state",
467+
"$ref": "#/$defs/colors"
468+
},
469+
"yellow": {
470+
"description": "Color used in yellow state",
471+
"$ref": "#/$defs/colors"
472+
},
473+
"red": {
474+
"description": "Color used in red state",
475+
"$ref": "#/$defs/colors"
476+
}
477+
}
442478
}
443479
}
444480
},
@@ -672,10 +708,6 @@
672708
"const": "font",
673709
"description": "Print system font name"
674710
},
675-
{
676-
"const": "gamepad",
677-
"description": "List connected gamepads"
678-
},
679711
{
680712
"const": "host",
681713
"description": "Print product name of your computer"
@@ -700,10 +732,6 @@
700732
"const": "media",
701733
"description": "Print playing song name"
702734
},
703-
{
704-
"const": "memory",
705-
"description": "Print system memory usage info"
706-
},
707735
{
708736
"const": "monitor",
709737
"description": "Print connected physical monitor information"
@@ -732,10 +760,6 @@
732760
"const": "shell",
733761
"description": "Print current shell name and version"
734762
},
735-
{
736-
"const": "swap",
737-
"description": "Print swap (paging file) space usage"
738-
},
739763
{
740764
"const": "terminal",
741765
"description": "Print current terminal name and version"
@@ -814,6 +838,9 @@
814838
"type": "boolean",
815839
"default": false
816840
},
841+
"percent": {
842+
"$ref": "#/$defs/percent"
843+
},
817844
"key": {
818845
"$ref": "#/$defs/key"
819846
},
@@ -841,6 +868,9 @@
841868
"type": "boolean",
842869
"default": false
843870
},
871+
"percent": {
872+
"$ref": "#/$defs/percent"
873+
},
844874
"key": {
845875
"$ref": "#/$defs/key"
846876
},
@@ -863,6 +893,9 @@
863893
"const": "brightness",
864894
"description": "Print current brightness level of your monitors"
865895
},
896+
"percent": {
897+
"$ref": "#/$defs/percent"
898+
},
866899
"ddcciSleep": {
867900
"type": "integer",
868901
"description": "Set the sleep times (in ms) when sending DDC/CI requests.\nSee <https://www.ddcutil.com/performance_options/#option-sleep-multiplier> for detail",
@@ -934,6 +967,9 @@
934967
"const": "cpuusage",
935968
"description": "Print CPU usage. Costs some time to collect data"
936969
},
970+
"percent": {
971+
"$ref": "#/$defs/percent"
972+
},
937973
"separate": {
938974
"type": "boolean",
939975
"description": "Display CPU usage per CPU logical core, instead of an average result",
@@ -1103,6 +1139,9 @@
11031139
"description": "Use f_bavail (lpFreeBytesAvailableToCaller for Windows) instead of f_bfree to calculate used bytes",
11041140
"default": false
11051141
},
1142+
"percent": {
1143+
"$ref": "#/$defs/percent"
1144+
},
11061145
"key": {
11071146
"$ref": "#/$defs/key"
11081147
},
@@ -1170,6 +1209,31 @@
11701209
}
11711210
}
11721211
},
1212+
{
1213+
"title": "Gamepad",
1214+
"properties": {
1215+
"type": {
1216+
"const": "gamepad",
1217+
"description": "List connected gamepads"
1218+
},
1219+
"percent": {
1220+
"$ref": "#/$defs/percent"
1221+
},
1222+
"key": {
1223+
"$ref": "#/$defs/key"
1224+
},
1225+
"keyColor": {
1226+
"$ref": "#/$defs/keyColor"
1227+
},
1228+
"keyWidth": {
1229+
"$ref": "#/$defs/keyWidth"
1230+
},
1231+
"format": {
1232+
"$ref": "#/$defs/format"
1233+
}
1234+
},
1235+
"additionalProperties": false
1236+
},
11731237
{
11741238
"title": "GPU",
11751239
"properties": {
@@ -1272,6 +1336,31 @@
12721336
},
12731337
"additionalProperties": false
12741338
},
1339+
{
1340+
"title": "Memory",
1341+
"properties": {
1342+
"type": {
1343+
"const": "memory",
1344+
"description": "Print system memory usage info"
1345+
},
1346+
"percent": {
1347+
"$ref": "#/$defs/percent"
1348+
},
1349+
"key": {
1350+
"$ref": "#/$defs/key"
1351+
},
1352+
"keyColor": {
1353+
"$ref": "#/$defs/keyColor"
1354+
},
1355+
"keyWidth": {
1356+
"$ref": "#/$defs/keyWidth"
1357+
},
1358+
"format": {
1359+
"$ref": "#/$defs/format"
1360+
}
1361+
},
1362+
"additionalProperties": false
1363+
},
12751364
{
12761365
"title": "NetIO",
12771366
"properties": {
@@ -1458,6 +1547,34 @@
14581547
],
14591548
"default": "main"
14601549
},
1550+
"percent": {
1551+
"$ref": "#/$defs/percent"
1552+
},
1553+
"key": {
1554+
"$ref": "#/$defs/key"
1555+
},
1556+
"keyColor": {
1557+
"$ref": "#/$defs/keyColor"
1558+
},
1559+
"keyWidth": {
1560+
"$ref": "#/$defs/keyWidth"
1561+
},
1562+
"format": {
1563+
"$ref": "#/$defs/format"
1564+
}
1565+
},
1566+
"additionalProperties": false
1567+
},
1568+
{
1569+
"title": "Swap",
1570+
"properties": {
1571+
"type": {
1572+
"const": "swap",
1573+
"description": "Print swap (paging file) space usage"
1574+
},
1575+
"percent": {
1576+
"$ref": "#/$defs/percent"
1577+
},
14611578
"key": {
14621579
"$ref": "#/$defs/key"
14631580
},

src/common/bar.c

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/common/bar.h

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)