addet notification

This commit is contained in:
pika 2024-05-29 00:02:33 +02:00
parent ff58249281
commit 3f6854977f

View file

@ -1,9 +1,6 @@
# ╭────────────────────────────────────╮
# │ FUNCTION: packagemanager detection │
# ╰────────────────────────────────────╯
# ─────────────< Check for packagemanager and alias everything for easy use :) >───────────
function upin
# ─< check for sudo/root >──────────────────────────────────────────────────────────────────
if [ $USER = "root" ]
set su ""
@ -14,6 +11,7 @@ function upin
end
# ─────────────────────────< START | distro/packagemanger detection >─────────────────────────
# ─< DNF - Fedora >─────────────────────────────────────────────────────
if command -v dnf
set pkg "$su dnf"
@ -22,7 +20,6 @@ function upin
set search "$pkg search"
set remove "$pkg remove"
set unattendet "$pkg install -y"
set -a ALIASES "-- You're using DNF aliases!! --"
end
# ─< APT/NALA - Debian >────────────────────────────────────────────────
@ -33,7 +30,6 @@ function upin
set search "$pkg search"
set remove "$pkg remove"
set unattendet "$pkg install --assume-yes"
set ALIASES "-- You're using NALA aliases!! --"
else
if command -v apt-get >/dev/null 2>&1
set pkg "$su apt-get"
@ -42,7 +38,6 @@ function upin
set search "$pkg search"
set remove "$pkg remove"
set unattendet "$pkg install --assume-yes"
set ALIASES "-- You're using APT aliases!! --"
end
end
@ -54,7 +49,6 @@ function upin
set search "$pkg -Ss"
set remove "$pkg -R"
set unattendet "$pkg install --noconfirm"
set ALIASES "-- You're using Arch!! - installed helper: paru --"
else
if command -v yay >/dev/null 2>&1
set pkg "yay"
@ -63,7 +57,6 @@ function upin
set search "$pkg -Ss"
set remove "$pkg -R"
set unattendet "$pkg install --noconfirm"
set ALIASES "-- You're using Arch!! - installed helper: yay --"
else
if command -v pacman >/dev/null 2>&1
set pkg "$su pacman"
@ -72,7 +65,6 @@ function upin
set search "$pkg -Ss"
set remove "$pkg -R"
set unattendet "$pkg install --noconfirm"
set ALIASES "-- by the PACMAN - You're using Arch!! --"
end
end
end
@ -83,10 +75,9 @@ function upin
set install "$pkg in"
set update "$pkg dup"
set search "$pkg se"
set remove "$pkg rm"
set remove "$pkg rm"
alias lock="$pkg al"
set ALIASES "-- I see.. you're using OpenSUSE. i like <3 --
-- ZYPPER -- "
set unattendet "$pkg install --non-interactive"
end
# ─< APK - Alpine >─────────────────────────────────────────────────────────────────────────
@ -95,7 +86,6 @@ function upin
set install "$pkg add"
set update "$pkg update"
set search "$pkg search"
set ALIASES "-- Alpine.. right, this fast os is evolving.. --"
end
if set -q unattendet
set -U FISH_INSTALL $unattendet
@ -115,6 +105,7 @@ end
# ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮
# │ FUNCTION: Define function gsa (to ask the user which submodule to clone to which path and which name │
# ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
function gsa
set dir $PWD
echo "-- these are the current submodules --"
@ -163,16 +154,26 @@ end
# ╭───────────────────────────────────────────────────╮
# │ FUNCTION: set tmux command to always work with ta │
# ╰───────────────────────────────────────────────────╯
if command -v tmux >/dev/null 2>&1
set tmux_y "tmux-session active!"
set tmux_n "No tmux-session found!"
function ta
command tmux list-sessions >/dev/null 2>&1
switch $status
case 0
echo "Tmux session found. Entering it now! --"
if command -v notify-send >/dev/null 2>&1
notify-send "$tmux_y"
end
echo "$tmux_y"
sleep 0.5
tmux a
case '*'
if command -v notify-send >/dev/null 2>&1
notify-send "$tmux_n"
end
echo "No Tmux session found. Creating one now! --"
sleep 0.5
tmux
end
end
@ -181,6 +182,7 @@ end
# ╭────────────────────────────────────────────╮
# │ FUNCTION: check fisher plugin dependencies │
# ╰────────────────────────────────────────────╯
function dep_fisher
# ─< Define dependencies for the plugins used by fisher >───────────────────────────────────
set dependencies "fzf" "btop" "fastfetch" "curl" "wget" "cmatrix"