chore: new structure folder for zsh configs

This commit is contained in:
hesam-init 2024-03-31 20:47:58 +03:30
parent 8d052d4e26
commit cb796e6d18
11 changed files with 32 additions and 24 deletions

View file

@ -0,0 +1,4 @@
source ~/.zsh/aliases/global/main.zsh
source ~/.zsh/aliases/dir/main.zsh
source ~/.zsh/aliases/git/main.zsh
source ~/.zsh/aliases/net/main.zsh

View file

@ -1,7 +1,3 @@
source ~/.zsh/aliases/helpers/dir.zsh
source ~/.zsh/aliases/helpers/git.zsh
source ~/.zsh/aliases/helpers/nmcli.zsh
alias alist="alias"
alias fclean="flatpak uninstall --unused --delete-data"

View file

@ -1,4 +1,5 @@
SPEEDTEST_DOWNLOAD_URL="http://37.32.15.80/assets/12mb.png?_=1711896914991"
WIFI_IP="192.168.1.1"
wget_speed() {
check_command wget
@ -11,5 +12,11 @@ wget_speed() {
curl_speed() {
check_command curl
log "Curl Speedtest"
curl $SPEEDTEST_DOWNLOAD_URL >/dev/null
}
ping_wifi() {
ping $WIFI_IP
}

View file

@ -1,5 +1,5 @@
source ~/.zsh/functions/helpers/main.zsh
source ~/.zsh/functions/helpers/speedtest.zsh
source ~/.zsh/functions/helpers/net.zsh
convert_video_to_gif() {
local fps=60

View file

@ -0,0 +1,7 @@
if [[ "$OS" = void ]]; then
source ~/.zsh/os/void/main.zsh
elif [[ "$OS" = debian ]]; then
source ~/.zsh/os/debian/main.zsh
else
echo "Unsupported operating system: $OS"
fi

View file

@ -1,4 +1,4 @@
alias void-packages="cd $VOID_PACKAGES_PATH"
alias void-pkgs="cd $VOID_PACKAGES_PATH"
alias vshutdown="sudo shutdown -h now"
alias vreboot="sudo reboot"
alias vrepos="xbps-query -L"
@ -15,15 +15,6 @@ alias vunhold="sudo xbps-pkgdb -m unhold"
alias vmirror="sudo xmirror"
alias killall="pkill -f"
alias rmhyprland="vrm hyprland hyprland-protocols hyprlang xdg-desktop-portal-hyprland"
installhyprland() {
if [ -z "$1" ]; then
echo "Error: Please provide the path of packages"
return 1
fi
sudo xbps-install -R $1 hyprland hyprland-protocols hyprlang xdg-desktop-portal-hyprland
}
alias svservices="ls /etc/sv/"
alias svlist="ls -la /var/service/"
alias svreset="sudo sv restart"
@ -46,3 +37,13 @@ svdisable() {
fi
sudo rm -rf "/var/service/$1"
}
alias rmhyprland="vrm hyprland hyprland-protocols hyprlang xdg-desktop-portal-hyprland"
installhyprland() {
if [ -z "$1" ]; then
echo "Error: Please provide the path of packages"
return 1
fi
sudo xbps-install -R $1 hyprland hyprland-protocols hyprlang xdg-desktop-portal-hyprland
}

View file

@ -7,14 +7,7 @@ plugins=(zsh-syntax-highlighting zsh-autosuggestions git themes jsontools)
source $ZSH/oh-my-zsh.sh
source ~/.zsh/functions/main.zsh
source ~/.zsh/aliases/main.zsh
if [[ "$OS" = void ]]; then
source ~/.zsh/os/void.zsh
elif [[ "$OS" = debian ]]; then
source ~/.zsh/os/debian.zsh
else
echo "Unsupported operating system: $OS"
fi
source ~/.zsh/aliases/export.zsh
source ~/.zsh/os/export.zsh
eval "$(atuin init zsh)"