Add sudo to system76-power calls ins script

- Updated sudoers to allow running sudo system76-power without passwd
This commit is contained in:
Sravan Balaji
2024-05-05 09:53:02 -04:00
parent 3570cc347d
commit 2e94edf2d2
3 changed files with 19 additions and 19 deletions

View File

@@ -102,46 +102,46 @@ main() {
rofi_graphics_menu
;;
--graphics-query)
current_graphics=$(system76-power graphics)
current_graphics=$(sudo system76-power graphics)
notify-send "System76-Power Graphics" "$current_graphics"
;;
--graphics-compute)
notify-send "System76-Power Graphics" "Switching to Compute Graphics..."
system76-power graphics compute
sudo system76-power graphics compute
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-hybrid)
notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..."
system76-power graphics hybrid
sudo system76-power graphics hybrid
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-integrated)
notify-send "System76-Power Graphics" "Switching to Integrated Graphics..."
system76-power graphics integrated
sudo system76-power graphics integrated
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-nvidia)
notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..."
system76-power graphics nvidia
sudo system76-power graphics nvidia
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--rofi-cpu-profile)
rofi_cpu_profile_menu
;;
--cpu-profile-query)
current_profile=$(system76-power profile)
current_profile=$(sudo system76-power profile)
notify-send "System76-Power CPU Profile" "$current_profile"
;;
--cpu-profile-battery)
system76-power profile battery
sudo system76-power profile battery
notify-send "System76-Power CPU Profile" "Switched to Battery Profile"
;;
--cpu-profile-balanced)
system76-power profile balanced
sudo system76-power profile balanced
notify-send "System76-Power CPU Profile" "Switched to Balanced Profile"
;;
--cpu-profile-performance)
system76-power profile performance
sudo system76-power profile performance
notify-send "System76-Power CPU Profile" "Switched to Performance Profile"
;;
--rofi-gpu-profile)

View File

@@ -10019,46 +10019,46 @@ main() {
rofi_graphics_menu
;;
--graphics-query)
current_graphics=$(system76-power graphics)
current_graphics=$(sudo system76-power graphics)
notify-send "System76-Power Graphics" "$current_graphics"
;;
--graphics-compute)
notify-send "System76-Power Graphics" "Switching to Compute Graphics..."
system76-power graphics compute
sudo system76-power graphics compute
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-hybrid)
notify-send "System76-Power Graphics" "Switching to Hybrid Graphics..."
system76-power graphics hybrid
sudo system76-power graphics hybrid
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-integrated)
notify-send "System76-Power Graphics" "Switching to Integrated Graphics..."
system76-power graphics integrated
sudo system76-power graphics integrated
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--graphics-nvidia)
notify-send "System76-Power Graphics" "Switching to Nvidia Graphics..."
system76-power graphics nvidia
sudo system76-power graphics nvidia
notify-send -u critical -t 0 "System76-Power Graphics" "Please reboot computer to switch graphics"
;;
--rofi-cpu-profile)
rofi_cpu_profile_menu
;;
--cpu-profile-query)
current_profile=$(system76-power profile)
current_profile=$(sudo system76-power profile)
notify-send "System76-Power CPU Profile" "$current_profile"
;;
--cpu-profile-battery)
system76-power profile battery
sudo system76-power profile battery
notify-send "System76-Power CPU Profile" "Switched to Battery Profile"
;;
--cpu-profile-balanced)
system76-power profile balanced
sudo system76-power profile balanced
notify-send "System76-Power CPU Profile" "Switched to Balanced Profile"
;;
--cpu-profile-performance)
system76-power profile performance
sudo system76-power profile performance
notify-send "System76-Power CPU Profile" "Switched to Performance Profile"
;;
--rofi-gpu-profile)