add verbose

This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-06-29 22:48:30 +03:00
parent d143f5bfab
commit f452bc3c5f
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,10 @@
#! /bin/bash
UBUNTU_DRIVERS="$(ubuntu-drivers list | grep -vi -server)"
AMDGPU_DRIVERS="explosives"
DRIVERS="$(printf "$UBUNTU_DRIVERS\n$AMDGPU_DRIVERS")"
if [[ -z $DRIVERS ]]
then
DRIVERS=emScuM8rsa6kuhMePtR5bT8s4z9s
fi
echo $DRIVERS | tr " " "\n"

View File

@ -34,7 +34,7 @@ fn build_ui(app: &Application) {
println!("Checking HW paramter script for available drivers:\n");
let ubuntu_drivers_list_cli = Command::new("/usr/bin/echo")
.arg("test1\ntest2\ntest3\ntest4")
.arg("nvidia-driver-680\ntest2\ntest3\ntest4")
.output()
.expect("failed to execute process");
@ -146,9 +146,19 @@ fn driver_button_refresh(driver: &str, driver_button: &Button) {
.unwrap();
if driver_command.status.success() {
println!("Checking Driver Presence of {}: Success!", driver);
if driver.contains("nvidia") {
driver_button.set_tooltip_text(Some("This uninstall and revert to nouveau"));
} else {
driver_button.set_tooltip_text(Some("This uninstall the driver"));
}
driver_button.set_icon_name("user-trash-symbolic");
} else {
println!("Checking Driver Presence of {}: Failure! Driver isn't installed", driver);
if driver.contains("nvidia") {
driver_button.set_tooltip_text(Some("This will remove nouveau and install"));
} else {
driver_button.set_tooltip_text(Some("Install"));
}
driver_button.set_icon_name("go-down-symbolic");
}
}