Skip to content

Commit

Permalink
Cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
cbalx4life committed Jul 29, 2018
1 parent 262dd66 commit 8418b89
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions nvidia-prime.r.3s.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
#!/usr/bin/env bash
run_as_root="pkroot -d" # gksu; pkroot; gnomesu -c;

notify_switch="notify-send -h int:transient:2 \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"Switching graphics. Please reboot to finalize process! \\\" & "
notify_switch_and_reboot="notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"Switching graphics. System will reboot soon... \\\" & "
notify_reboot="notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"System will reboot! \\\" & "

activate_intel="\"\
notify-send -h int:transient:2 \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"Switching graphics. Please reboot to finalize process! \\\"; \
$notify_switch \
$run_as_root \\\"prime-select intel\\\" \
\""

activate_nvidia="\"\
notify-send -h int:transient:2 \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"Switching graphics. Please reboot to finalize process! \\\"; \
$notify_switch \
$run_as_root \\\"prime-select nvidia\\\" \
\""

activate_intel_and_reboot="\"\
notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"Switching graphics. System will reboot soon... \\\"; \
$notify_switch_and_reboot \
$run_as_root \\\"prime-select intel\\\"; \
notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"System will reboot! \\\"; \
$notify_reboot \
sleep 2; \
systemctl reboot \
\""

activate_nvidia_and_reboot="\"\
notify-send $notify_on_switch_and_reboot & \
$notify_switch_and_reboot \
$run_as_root \\\"prime-select nvidia\\\"; \
notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"System will reboot! \\\"; \
$notify_reboot \
sleep 2; \
systemctl reboot \
\""

reboot_cmd="\"\
notify-send -h int:transient:2 -i \\\"dialog-information-symbolic\\\" \\\"NVidia Prime Indicator\\\" \\\"System will reboot! \\\"; \
$notify_reboot \
sleep 2; \
systemctl reboot \
\""
Expand Down

0 comments on commit 8418b89

Please sign in to comment.