Skip to content

Commit

Permalink
implement notification for loading custom user preset
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamimgois committed Jul 28, 2024
1 parent b9ff983 commit b750d45
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions overlayunit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ procedure Tgoverlayform.usercustomBitBtnClick(Sender: TObject);
MANGOHUDCFGFILE := GetEnvironmentVariable('HOME') + '/.config/MangoHud/MangoHud.conf';




if not FileExists(CUSTOMCFGFILE) then
begin
ShowMessage('You need to save a custom preset first. Click on the hamburguer menu and click save as custom config.');
Expand All @@ -563,6 +565,21 @@ procedure Tgoverlayform.usercustomBitBtnClick(Sender: TObject);
end;
end;

// Change button color
fullBitbtn.Color:=clDefault;
basicBitbtn.Color:=clDefault;
basichorizontalBitbtn.Color:=clDefault;
fpsonlyBitbtn.Color:=clDefault;
usercustomBitbtn.Color:=$007F5500;

Process1 := TProcess.Create(nil);
Process1.Executable := 'sh';
Process1.Parameters.Add('-c');
Process1.Parameters.Add('notify-send -e -i /usr/share/icons/hicolor/128x128/apps/goverlay.png "MangoHud" "Reloading custom user preset"');
Process1.Options := [poUsePipes];
Process1.Execute;
Process1.WaitOnExit;
Process1.Free;

end;

Expand Down

0 comments on commit b750d45

Please sign in to comment.