mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
moved from dialog to dmenu since it makes more sense
This commit is contained in:
parent
63620fd238
commit
473f057ffc
8
.local/bin/dmenu_updatemirrors
Executable file
8
.local/bin/dmenu_updatemirrors
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
user_choice=$(printf "Yes\nNo" | dmenu -i -p "Refresh mirrors? (It might speed up package downloads): ")
|
||||||
|
case "$user_choice" in
|
||||||
|
"Yes") notify-send "Refreshing mirrors" && (reflector --verbose --latest 100 --sort rate --save /etc/pacman.d/mirrorlist >/dev/null 2>&1; notify-send "Mirrors refreshed") & ;;
|
||||||
|
"No") notify-send "Did not refresh mirrors" && return ;;
|
||||||
|
*) notify-send "No option selected" && return ;;
|
||||||
|
esac
|
||||||
@ -1,13 +0,0 @@
|
|||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
run_reflector(){
|
|
||||||
dialog --title "Refresh mirrors" --yesno "Run reflector? It might speed up package downloads." 7 60
|
|
||||||
response=$?
|
|
||||||
case $response in
|
|
||||||
0) (reflector --verbose --latest 100 --sort rate --save /etc/pacman.d/mirrorlist >/dev/null 2>&1; notify-send "Mirrors refreshed") & ;;
|
|
||||||
1) notify-send "Mirrors not refreshed" ;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
run_reflector
|
|
||||||
clear
|
|
||||||
exit 0
|
|
||||||
Loading…
x
Reference in New Issue
Block a user