diff --git a/README.org b/README.org index 6942d1a..5a344ad 100644 --- a/README.org +++ b/README.org @@ -30,21 +30,21 @@ On the first run, if it does not exist, PluralSync will create a configuration d Just fill it with PluralKit and SimplyPlural tokens associated to your account. ** Commands -*** Sync +- Sync Once the configuration is ready, you can start by calling the =sync= command, which will get the list of members of the system and place their data in a =system.json= file inside the configuration folder. Running commands like =set= or =add= without a present =system.json= will automatically fetch the data for you. *Remember to sync whenever you change the information of the system! i.e. adding a new member, rename...* -*** Set +- Set Takes multiple arguments. Sets the current front to the selected list of members. -*** Add +- Add Takes multiple arguments. Adds the selected members to an already existing front. -*** Get +- Get Displays the current front. The result is displayed in console but also stored in a plain text file named =.front= in the configuration directory, for use with other applications (Polybar, OBS...). -*** Memberlist +- Memberlist Writes the known list of members based on the =system.json= file. ** Modules diff --git a/src/main.rs b/src/main.rs index 712fa47..910eeb1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -286,7 +286,7 @@ fn get(config_path: String) -> Result<(), &'static str> { let f = get_fronters(&config.pk_key, &config.sp_key, &sys); let mut names = Vec::new(); - for m in &f.sp { + for m in &f.pk { names.push(String::from(&m.name)); } let fronters = names.join(" || "); @@ -559,8 +559,8 @@ fn get_fronters(pk_key: &str, sp_key: &str, sys: &System) -> Fronters { sp_get_fronters(sp_key, sys) ); -// if fronters["pk"] != fronters["sp"] { -// fronters.insert(String::from("pk"), fronters["sp"].clone()); +// if fronters.pk != fronters.sp { +// fronters.sp = fronters.pk.clone(); // } return fronters;