Skip to content

Commit

Permalink
Added info command
Browse files Browse the repository at this point in the history
  • Loading branch information
besuper committed Mar 2, 2021
1 parent bca381b commit 7eb3bf1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ namespace MixerControllerF {

static class Global {
public static string DEFAULT_FOLDER = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\MixerController";
public static string SETTINGS = "config.txt";
public const string SETTINGS = "config.txt";
public static string DEFAULT_PATH = DEFAULT_FOLDER + "\\" + SETTINGS;
public static string COMPUTER_NAME = Environment.MachineName.ToString();
}

static class Program {
Expand Down Expand Up @@ -64,6 +65,12 @@ static void Main() {
ChangeState(message.Split(':')[1], message.Split(':')[0]);
}

if(message.StartsWith("INFO")) {
string to_send = "{\"info\":{\"computer\":\""+Global.COMPUTER_NAME+"\"}}";

socket.Send(to_send);
}

if (message.StartsWith("APPS")) {

RefreshApps();
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ You can use those commands:
|MUTE:app_name|Mute a specified app.|
|UNMUTE:app_name|Unmute a specified app.|
|APPS|Show all application available in volume mixer in JSON format. <br>Ex: {"apps":{"Spotify": "1", "Discord": "0,5"}}|
|INFO|Show informations about the computer. Return {"info":{"computer": "DESKTOP-AAAAAA"}}|

## Settings

Expand Down

0 comments on commit 7eb3bf1

Please sign in to comment.