From 2e94edf2d294e227122c94daa3db472c3a940b39 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Sun, 5 May 2024 09:53:02 -0400 Subject: [PATCH] Add `sudo` to system76-power calls ins script - Updated sudoers to allow running sudo system76-power without passwd --- .config/dwm-flexipatch | 2 +- .scripts/cpu-gpu.sh | 18 +++++++++--------- README.org | 18 +++++++++--------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.config/dwm-flexipatch b/.config/dwm-flexipatch index f925b6c..f0c6bd2 160000 --- a/.config/dwm-flexipatch +++ b/.config/dwm-flexipatch @@ -1 +1 @@ -Subproject commit f925b6c896a0f1ad778525d957362f557557f2f1 +Subproject commit f0c6bd28a0388c7c658aa36926c31b186e42723a diff --git a/.scripts/cpu-gpu.sh b/.scripts/cpu-gpu.sh index cf92cfc..4265dd0 100755 --- a/.scripts/cpu-gpu.sh +++ b/.scripts/cpu-gpu.sh @@ -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) diff --git a/README.org b/README.org index 3fcb6e1..ecca489 100644 --- a/README.org +++ b/README.org @@ -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)