Add Pamac support (#953)

This commit is contained in:
Amrit Rathie
2022-06-18 04:22:23 -07:00
committed by GitHub
parent 4e6f48caef
commit d864199c67
3 changed files with 54 additions and 1 deletions

View File

@@ -202,6 +202,7 @@ pub enum ArchPackageManager {
Yay,
Pacman,
Pikaur,
Pamac,
}
#[derive(Deserialize, Default, Debug)]
@@ -212,6 +213,7 @@ pub struct Linux {
show_arch_news: Option<bool>,
trizen_arguments: Option<String>,
pikaur_arguments: Option<String>,
pamac_arguments: Option<String>,
dnf_arguments: Option<String>,
apt_arguments: Option<String>,
enable_tlmgr: Option<bool>,
@@ -696,6 +698,15 @@ impl Config {
.unwrap_or("")
}
/// Extra Pamac arguments
pub fn pamac_arguments(&self) -> &str {
self.config_file
.linux
.as_ref()
.and_then(|s| s.pamac_arguments.as_deref())
.unwrap_or("")
}
/// Show news on Arch Linux
pub fn show_arch_news(&self) -> bool {
self.config_file