Skip to content

Commit

Permalink
new: sensors view (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
lollipopkit committed Feb 23, 2024
1 parent fad3f41 commit 1f586a2
Show file tree
Hide file tree
Showing 23 changed files with 348 additions and 34 deletions.
6 changes: 6 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,12 @@ abstract class S {
/// **'s'**
String get second;

/// No description provided for @sensors.
///
/// In en, this message translates to:
/// **'Sensor'**
String get sensors;

/// No description provided for @sequence.
///
/// In en, this message translates to:
Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ class SDe extends S {
@override
String get second => 's';

@override
String get sensors => 'Sensor';

@override
String get sequence => 'Sequenz';

Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ class SEn extends S {
@override
String get second => 's';

@override
String get sensors => 'Sensor';

@override
String get sequence => 'Sequence';

Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_fr.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ class SFr extends S {
@override
String get second => 's';

@override
String get sensors => 'Capteur';

@override
String get sequence => 'Séquence';

Expand Down
3 changes: 3 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_id.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ class SId extends S {
@override
String get second => 'S';

@override
String get sensors => 'Sensor';

@override
String get sequence => 'Urutan';

Expand Down
6 changes: 6 additions & 0 deletions .dart_tool/flutter_gen/gen_l10n/l10n_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ class SZh extends S {
@override
String get second => '秒';

@override
String get sensors => '传感器';

@override
String get sequence => '顺序';

Expand Down Expand Up @@ -1505,6 +1508,9 @@ class SZhTw extends SZh {
@override
String get second => '秒';

@override
String get sensors => '传感器';

@override
String get sequence => '順序';

Expand Down
36 changes: 18 additions & 18 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -596,7 +596,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand Down Expand Up @@ -720,7 +720,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -730,7 +730,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -748,7 +748,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = "Runner/Info-$(CONFIGURATION).plist";
Expand All @@ -758,7 +758,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
Expand All @@ -779,7 +779,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -792,7 +792,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
Expand All @@ -818,7 +818,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -831,7 +831,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -854,7 +854,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_TEAM = BA88US33G6;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -867,7 +867,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.StatusWidget;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -890,7 +890,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -902,7 +902,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
Expand Down Expand Up @@ -931,7 +931,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -943,7 +943,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
Expand All @@ -969,7 +969,7 @@
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 771;
CURRENT_PROJECT_VERSION = 775;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = BA88US33G6;
ENABLE_PREVIEWS = YES;
Expand All @@ -981,7 +981,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.771;
MARKETING_VERSION = 1.0.775;
MTL_FAST_MATH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.lollipopkit.toolbox.WatchEnd;
PRODUCT_NAME = ServerBox;
Expand Down
8 changes: 7 additions & 1 deletion lib/core/persistant_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -258,5 +258,11 @@ class PropertyListenable<T> extends ValueListenable<T> {
}

@override
T get value => box.get(key, defaultValue: defaultValue);
T get value {
final val = box.get(key, defaultValue: defaultValue);
if (val == null || val is! T) {
return defaultValue!;
}
return val;
}
}
2 changes: 2 additions & 0 deletions lib/data/model/app/shell_func.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ enum StatusCmdType {
diskio,
battery,
nvidia,
sensors,
;
}

Expand All @@ -220,6 +221,7 @@ const _statusCmds = [
'cat /proc/diskstats',
'for f in /sys/class/power_supply/*/uevent; do cat "\$f"; echo; done',
'nvidia-smi -q -x',
'sensors -j',
];

enum BSDStatusCmdType {
Expand Down
Loading

0 comments on commit 1f586a2

Please sign in to comment.