Skip to content

Commit

Permalink
Teach ManageConky to use MCNormalise(). I don't know why I wasn't nor…
Browse files Browse the repository at this point in the history
…malising for Themes.
  • Loading branch information
npyl committed Aug 8, 2018
1 parent d7814a3 commit 29f1067
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Binary file not shown.
14 changes: 5 additions & 9 deletions Manage Conky/MCObjects/MCObjects.m
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,9 @@ - (void)kill
- (void)enable
{
/*
* itemPath must have the spaces replaced by '\'
* Because bash is - well... bash! - and it won't
* parse them correctly. Also fix the '(' and ')'.
* Custom-Normalise for our needs
*/
NSString *correctedItemPath = [_itemPath stringByReplacingOccurrencesOfString:@" "
withString:@"\\ "];
correctedItemPath = [correctedItemPath stringByReplacingOccurrencesOfString:@"(" withString:@"\\("];
correctedItemPath = [correctedItemPath stringByReplacingOccurrencesOfString:@")" withString:@"\\)"];
NSString *correctedItemPath = MCNormalise(_itemPath);

/*
* IF conky is set to run at startup we must do LaunchAgent housekeeping...
Expand Down Expand Up @@ -349,7 +344,6 @@ + (instancetype)themeRepresentationForThemeRC:(NSString *)themeRC
/*
* Doing it the conky-manager way...
*/

NSString *themeRoot = [themeRC stringByDeletingLastPathComponent];

NSError *error = nil;
Expand Down Expand Up @@ -522,8 +516,10 @@ - (void)enable
const BOOL keepAlive = YES;
NSError *error = nil;

NSString *correctedConfig = MCNormalise(config);

createLaunchAgent(label,
@[CONKY_SYMLINK, @"-c", config],
@[CONKY_SYMLINK, @"-c", correctedConfig],
keepAlive,
_startupDelay,
workingDirectory,
Expand Down

0 comments on commit 29f1067

Please sign in to comment.