Skip to content

Commit 29f1067

Browse files
committed
Teach ManageConky to use MCNormalise(). I don't know why I wasn't normalising for Themes.
1 parent d7814a3 commit 29f1067

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed
Binary file not shown.

Manage Conky/MCObjects/MCObjects.m

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,9 @@ - (void)kill
136136
- (void)enable
137137
{
138138
/*
139-
* itemPath must have the spaces replaced by '\'
140-
* Because bash is - well... bash! - and it won't
141-
* parse them correctly. Also fix the '(' and ')'.
139+
* Custom-Normalise for our needs
142140
*/
143-
NSString *correctedItemPath = [_itemPath stringByReplacingOccurrencesOfString:@" "
144-
withString:@"\\ "];
145-
correctedItemPath = [correctedItemPath stringByReplacingOccurrencesOfString:@"(" withString:@"\\("];
146-
correctedItemPath = [correctedItemPath stringByReplacingOccurrencesOfString:@")" withString:@"\\)"];
141+
NSString *correctedItemPath = MCNormalise(_itemPath);
147142

148143
/*
149144
* IF conky is set to run at startup we must do LaunchAgent housekeeping...
@@ -349,7 +344,6 @@ + (instancetype)themeRepresentationForThemeRC:(NSString *)themeRC
349344
/*
350345
* Doing it the conky-manager way...
351346
*/
352-
353347
NSString *themeRoot = [themeRC stringByDeletingLastPathComponent];
354348

355349
NSError *error = nil;
@@ -522,8 +516,10 @@ - (void)enable
522516
const BOOL keepAlive = YES;
523517
NSError *error = nil;
524518

519+
NSString *correctedConfig = MCNormalise(config);
520+
525521
createLaunchAgent(label,
526-
@[CONKY_SYMLINK, @"-c", config],
522+
@[CONKY_SYMLINK, @"-c", correctedConfig],
527523
keepAlive,
528524
_startupDelay,
529525
workingDirectory,

0 commit comments

Comments
 (0)