Add pikaur support (#898)

This commit is contained in:
GPery
2022-04-22 23:28:01 +03:00
committed by GitHub
parent 7e9b2dca39
commit 1a18174693
3 changed files with 58 additions and 6 deletions

View File

@@ -199,6 +199,7 @@ pub enum ArchPackageManager {
Paru,
Yay,
Pacman,
Pikaur,
}
#[derive(Deserialize, Default, Debug)]
@@ -208,6 +209,7 @@ pub struct Linux {
arch_package_manager: Option<ArchPackageManager>,
show_arch_news: Option<bool>,
trizen_arguments: Option<String>,
pikaur_arguments: Option<String>,
dnf_arguments: Option<String>,
apt_arguments: Option<String>,
enable_tlmgr: Option<bool>,
@@ -677,6 +679,16 @@ impl Config {
.unwrap_or("")
}
/// Extra Pikaur arguments
#[allow(dead_code)]
pub fn pikaur_arguments(&self) -> &str {
self.config_file
.linux
.as_ref()
.and_then(|s| s.pikaur_arguments.as_deref())
.unwrap_or("")
}
/// Show news on Arch Linux
#[allow(dead_code)]
pub fn show_arch_news(&self) -> bool {