diff --git a/assets/exclusion-config.json b/assets/exclusion-config.json index 72e4ee5..a21082a 100644 --- a/assets/exclusion-config.json +++ b/assets/exclusion-config.json @@ -1,20 +1,20 @@ { - "exclusions": [ - { - "name": "GitHub Token", - "pattern": "^[a-zA-Z0-9]{40}$" - }, - { - "name": "Gitlab Token", - "pattern": "^[a-zA-Z0-9_-]{20,}$" - }, - { - "name": "Git HTTPS Url", - "pattern": "^https:\\/\\/([^:]+):([^@]+)@([^\\/]+)\\/(.+\/[^.]+)\\.git$" - }, - { - "name": "SSH Key", - "pattern": "^ssh-rsa\\s+[A-Za-z0-9+/]+[=]{0,3}(\\s+[^\\s]+)?\\s*$" - } - ] + "exclusions": [ + { + "name": "GitHub Token", + "pattern": "^[a-zA-Z0-9]{40}$" + }, + { + "name": "Gitlab Token", + "pattern": "^[a-zA-Z0-9_-]{20,}$" + }, + { + "name": "Git HTTPS Url", + "pattern": "^https:\\/\\/([^:]+):([^@]+)@([^\\/]+)\\/(.+\/[^.]+)\\.git$" + }, + { + "name": "SSH Key", + "pattern": "^ssh-rsa\\s+[A-Za-z0-9+/]+[=]{0,3}(\\s+[^\\s]+)?\\s*$" + } + ] } diff --git a/lib/core/storage/storage.dart b/lib/core/storage/storage.dart index ca2bdff..fde47e9 100644 --- a/lib/core/storage/storage.dart +++ b/lib/core/storage/storage.dart @@ -16,7 +16,7 @@ class Storage { Storage._(); - static void initSpace() async { + static Future initSpace() async { mkdir(combineHomePath(['.config', 'cliptopia']), "Creating Cliptopia Storage Route ..."); mkdir(combineHomePath(['.config', 'cliptopia', 'bug-reports']), diff --git a/lib/main.dart b/lib/main.dart index 7dd77e9..44e72b4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -5,12 +5,12 @@ import 'package:bitsdojo_window/bitsdojo_window.dart'; import 'package:cliptopia/app/powermode/presentation/power_mode_app.dart'; import 'package:cliptopia/app/welcome/presentation/welcome_dialog.dart'; import 'package:cliptopia/config/themes/app_theme.dart'; -import 'package:cliptopia/core/powermode/power_utils.dart'; import 'package:cliptopia/constants/meta_info.dart'; import 'package:cliptopia/constants/usage.dart'; import 'package:cliptopia/core/app_bug_report.dart'; import 'package:cliptopia/core/argument_handler.dart'; import 'package:cliptopia/core/clipboard_engine.dart'; +import 'package:cliptopia/core/powermode/power_utils.dart'; import 'package:cliptopia/core/services/injector.dart'; import 'package:cliptopia/core/services/route_service.dart'; import 'package:cliptopia/core/storage/storage.dart'; @@ -22,7 +22,7 @@ const normalSize = Size(750, 650); var windowSize = normalSize; void main(List arguments) { - runZonedGuarded(() { + runZonedGuarded(() async { ArgumentHandler.init(arguments); if (!ArgumentHandler.validate()) { final unknownOptions = ArgumentHandler.getUnknownOptions(); @@ -52,7 +52,7 @@ void main(List arguments) { WidgetsFlutterBinding.ensureInitialized(); // Initializing App Storage - Storage.initSpace(); + await Storage.initSpace(); // Initializing Themes AppTheme.init(); diff --git a/linux/my_application.cc b/linux/my_application.cc index 9f788a8..1e57969 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -22,6 +22,7 @@ int readMonitorIndex() { const char *homeDir = getenv("HOME"); if (homeDir == NULL) { fprintf(stderr, "Error: HOME environment variable not set.\n"); + fprintf(stderr, "Please fix this or else power mode window will not open in the desired monitor.\n"); return 0; } @@ -32,7 +33,7 @@ int readMonitorIndex() { // Open the file for reading FILE *file = fopen(configFile, "r"); if (file == NULL) { - fprintf(stderr, "Error opening file: %s\n", configFile); + fprintf(stderr, "Couldn't open monitor-config file: Ignore this if this is not a multi-monitor setup\n"); return 0; }