mirror of
https://github.imc.re/void-land/hyprland-void-dots
synced 2025-04-25 16:56:54 +02:00
refactor(speedtest): speedtest functions moved to functions folder
This commit is contained in:
parent
0e607bd9ec
commit
1db22fc6a6
5 changed files with 27 additions and 26 deletions
|
@ -4,7 +4,7 @@ alias gb="git branch"
|
||||||
alias gc="git checkout"
|
alias gc="git checkout"
|
||||||
alias gl="git log --oneline --decorate --color"
|
alias gl="git log --oneline --decorate --color"
|
||||||
alias amend="git add . && git commit --amend --no-edit"
|
alias amend="git add . && git commit --amend --no-edit"
|
||||||
alias commit="git add . && git commit -m"
|
alias ct="git add . && git commit -m"
|
||||||
alias diff="git diff"
|
alias diff="git diff"
|
||||||
alias force="git push --force"
|
alias force="git push --force"
|
||||||
alias nuke="git clean -df && git reset --hard"
|
alias nuke="git clean -df && git reset --hard"
|
||||||
|
@ -14,4 +14,4 @@ alias push="git push"
|
||||||
alias resolve="git add . && git commit --no-edit"
|
alias resolve="git add . && git commit --no-edit"
|
||||||
alias stash="git stash -u"
|
alias stash="git stash -u"
|
||||||
alias unstage="git restore --staged ."
|
alias unstage="git restore --staged ."
|
||||||
alias wip="commit wip"
|
alias wip="ct wip"
|
||||||
|
|
|
@ -1,26 +1,3 @@
|
||||||
wget_speed() {
|
|
||||||
check_command wget
|
|
||||||
|
|
||||||
log "Wget Speedtest"
|
|
||||||
|
|
||||||
wget -q --show-progress --progress=bar -O /dev/null $SPEEDTEST_DOWNLOAD_URL
|
|
||||||
}
|
|
||||||
|
|
||||||
curl_speed() {
|
|
||||||
check_command curl
|
|
||||||
|
|
||||||
log "Curl Speedtest"
|
|
||||||
|
|
||||||
curl $SPEEDTEST_DOWNLOAD_URL >/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
alias wp="wget_speed"
|
|
||||||
|
|
||||||
list_wifi_networks() {
|
|
||||||
echo "Available Wi-Fi Networks:"
|
|
||||||
nmcli dev wifi list
|
|
||||||
}
|
|
||||||
|
|
||||||
connect_to_wifi() {
|
connect_to_wifi() {
|
||||||
echo "Enter the name (SSID) of the Wi-Fi network you want to connect to:"
|
echo "Enter the name (SSID) of the Wi-Fi network you want to connect to:"
|
||||||
read ssid
|
read ssid
|
||||||
|
@ -31,5 +8,10 @@ connect_to_wifi() {
|
||||||
sudo nmcli dev wifi connect "$ssid" password "$password"
|
sudo nmcli dev wifi connect "$ssid" password "$password"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
list_wifi_networks() {
|
||||||
|
echo "Available Wi-Fi Networks:"
|
||||||
|
nmcli dev wifi list
|
||||||
|
}
|
||||||
|
|
||||||
alias wlist="list_wifi_networks"
|
alias wlist="list_wifi_networks"
|
||||||
alias wconnect="connect_to_wifi"
|
alias wconnect="connect_to_wifi"
|
||||||
|
|
|
@ -2,7 +2,7 @@ log() {
|
||||||
local timestamp=$(date +"%T")
|
local timestamp=$(date +"%T")
|
||||||
local message="======> $1 : $timestamp"
|
local message="======> $1 : $timestamp"
|
||||||
|
|
||||||
echo -e "\n$message\n"
|
echo -e "$message\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
params_required() {
|
params_required() {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
source ~/.zsh/functions/helpers/main.zsh
|
source ~/.zsh/functions/helpers/main.zsh
|
||||||
|
source ~/.zsh/functions/speed-test/main.zsh
|
||||||
|
|
||||||
convert_video_to_gif() {
|
convert_video_to_gif() {
|
||||||
local fps=60
|
local fps=60
|
||||||
|
|
18
configs/shell/zsh/.zsh/functions/speed-test/main.zsh
Normal file
18
configs/shell/zsh/.zsh/functions/speed-test/main.zsh
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
wget_speed() {
|
||||||
|
check_command wget
|
||||||
|
|
||||||
|
log "WGET Speedtest"
|
||||||
|
log "URL $SPEEDTEST_DOWNLOAD_URL"
|
||||||
|
|
||||||
|
wget -q --show-progress --progress=bar -O /dev/null $SPEEDTEST_DOWNLOAD_URL
|
||||||
|
}
|
||||||
|
|
||||||
|
curl_speed() {
|
||||||
|
check_command curl
|
||||||
|
|
||||||
|
log "Curl Speedtest"
|
||||||
|
|
||||||
|
curl $SPEEDTEST_DOWNLOAD_URL >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
alias wp="wget_speed"
|
Loading…
Add table
Reference in a new issue