changed spacing
This commit is contained in:
parent
191c06b390
commit
a77e07b6e0
2 changed files with 170 additions and 170 deletions
70
config.fish
70
config.fish
|
@ -1,5 +1,5 @@
|
||||||
if status is-interactive
|
if status is-interactive
|
||||||
# ─< Commands to run in interactive sessions can go here >──────────────
|
# ─< Commands to run in interactive sessions can go here >──────────────
|
||||||
end
|
end
|
||||||
|
|
||||||
# ╭───────────────────────────────────────────────────╮
|
# ╭───────────────────────────────────────────────────╮
|
||||||
|
@ -29,23 +29,23 @@ if command -v lsd >/dev/null 2>&1
|
||||||
alias ll="lsd -lA"
|
alias ll="lsd -lA"
|
||||||
alias tree="lsd --tree"
|
alias tree="lsd --tree"
|
||||||
else
|
else
|
||||||
# ─< exa >──────────────────────────────────────────────────────────────────────────────────
|
# ─< exa >──────────────────────────────────────────────────────────────────────────────────
|
||||||
if command -v exa >/dev/null 2>&1
|
if command -v exa >/dev/null 2>&1
|
||||||
alias ls="exa --icons -l"
|
alias ls="exa --icons -l"
|
||||||
alias ll="exa --icons -laa"
|
alias ll="exa --icons -laa"
|
||||||
alias tree="exa --icons -l -tree"
|
alias tree="exa --icons -l -tree"
|
||||||
else
|
else
|
||||||
# ─< eza >──────────────────────────────────────────────────────────────────────────────────
|
# ─< eza >──────────────────────────────────────────────────────────────────────────────────
|
||||||
if command -v eza >/dev/null 2>&1
|
if command -v eza >/dev/null 2>&1
|
||||||
alias ls="eza --icons -l"
|
alias ls="eza --icons -l"
|
||||||
alias ll="eza --icons -laa"
|
alias ll="eza --icons -laa"
|
||||||
alias tree="eza --icons -l -tree"
|
alias tree="eza --icons -l -tree"
|
||||||
else
|
else
|
||||||
# ─< if nothing works -- plain old ls >─────────────────────────────────────────────────────
|
# ─< if nothing works -- plain old ls >─────────────────────────────────────────────────────
|
||||||
alias ls="ls --color=always -lph"
|
alias ls="ls --color=always -lph"
|
||||||
alias ll="ls --color=always -lAph"
|
alias ll="ls --color=always -lAph"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ─< colored everything >───────────────────────────────────────────────────────────────────
|
# ─< colored everything >───────────────────────────────────────────────────────────────────
|
||||||
|
@ -120,28 +120,28 @@ end
|
||||||
if command -v fastfetch >/dev/null 2>&1
|
if command -v fastfetch >/dev/null 2>&1
|
||||||
alias ff="fastfetch"
|
alias ff="fastfetch"
|
||||||
alias clearff="command clear & fastfetch"
|
alias clearff="command clear & fastfetch"
|
||||||
# ─< check for fastfetch module-existance >─────────────────────────────────────────────────
|
# ─< check for fastfetch module-existance >─────────────────────────────────────────────────
|
||||||
command fastfetch --config os >/dev/null 2>&1
|
command fastfetch --config os >/dev/null 2>&1
|
||||||
# ─< check the status >─────────────────────────────────────────────────────────────────────
|
# ─< check the status >─────────────────────────────────────────────────────────────────────
|
||||||
switch $status
|
switch $status
|
||||||
case 0
|
case 0
|
||||||
alias f="fastfetch --config os"
|
alias f="fastfetch --config os"
|
||||||
# ─< unsuccessfull, cloning repo >──────────────────────────────────────────────────────────
|
# ─< unsuccessfull, cloning repo >──────────────────────────────────────────────────────────
|
||||||
case '*'
|
case '*'
|
||||||
git clone https://git.k4li.de/mirror/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1
|
git clone https://git.k4li.de/mirror/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1
|
||||||
# ─< execute fish to reinitialize aliasses >────────────────────────────────────────────────
|
# ─< execute fish to reinitialize aliasses >────────────────────────────────────────────────
|
||||||
exec fish
|
exec fish
|
||||||
end
|
end
|
||||||
clear & f
|
clear & f
|
||||||
alias clear="clear & f"
|
alias clear="clear & f"
|
||||||
end
|
end
|
||||||
|
|
||||||
# ─< set nmap-alias >───────────────────────────────────────────────────────────────────────
|
# ─< set nmap-alias >───────────────────────────────────────────────────────────────────────
|
||||||
if command -v nmap >/dev/null 2>&1
|
if command -v nmap >/dev/null 2>&1
|
||||||
alias scanvuln="sudo nmap --script vuln -vvv"
|
alias scanvuln="sudo nmap --script vuln -vvv"
|
||||||
alias sv="scanvuln"
|
alias sv="scanvuln"
|
||||||
alias portscan="sudo nmap -sT"
|
alias portscan="sudo nmap -sT"
|
||||||
alias ps="portscan"
|
alias ps="portscan"
|
||||||
end
|
end
|
||||||
|
|
||||||
# ────────────────────────────────────────< functions >─────────────────────────────────────
|
# ────────────────────────────────────────< functions >─────────────────────────────────────
|
||||||
|
@ -152,9 +152,9 @@ end
|
||||||
|
|
||||||
# ─< starship >─────────────────────────────────────────────────────────────────────────────
|
# ─< starship >─────────────────────────────────────────────────────────────────────────────
|
||||||
if command -v starship >/dev/null 2>&1
|
if command -v starship >/dev/null 2>&1
|
||||||
function starship_transient_prompt_func
|
function starship_transient_prompt_func
|
||||||
starship module character
|
starship module character
|
||||||
end
|
end
|
||||||
starship init fish | source
|
starship init fish | source
|
||||||
enable_transience
|
enable_transience
|
||||||
else
|
else
|
||||||
|
@ -163,10 +163,10 @@ end
|
||||||
|
|
||||||
set colorscheme for bobthefish
|
set colorscheme for bobthefish
|
||||||
if test -d $HOME/.config/fish/functions/
|
if test -d $HOME/.config/fish/functions/
|
||||||
set -g theme_nerd_fonts yes
|
set -g theme_nerd_fonts yes
|
||||||
set -g defaults_user (echo $USER)
|
set -g defaults_user (echo $USER)
|
||||||
# available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha)
|
# available options: dark, light, solarized(-dark/-light), base16(-dark/-light), zenburn, gruvbox(-light), dracula, nord, catppuccin-(latte/frappe/macchiato/mocha)
|
||||||
set -g theme_color_scheme catppuccin-mocha
|
set -g theme_color_scheme catppuccin-mocha
|
||||||
end
|
end
|
||||||
|
|
||||||
set -a TOOLBOX "$warnings
|
set -a TOOLBOX "$warnings
|
||||||
|
|
|
@ -3,103 +3,103 @@
|
||||||
# ╰────────────────────────────────────╯
|
# ╰────────────────────────────────────╯
|
||||||
function upin
|
function upin
|
||||||
|
|
||||||
# ─< check for sudo/root >──────────────────────────────────────────────────────────────────
|
# ─< check for sudo/root >──────────────────────────────────────────────────────────────────
|
||||||
if [ $USER = "root" ]
|
if [ $USER = "root" ]
|
||||||
set sudo ""
|
set sudo ""
|
||||||
else
|
|
||||||
if command -v sudo >/dev/null 2>&1
|
|
||||||
set sudo "sudo"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# ─────────────────────────< START | distro/packagemanger detection >─────────────────────────
|
|
||||||
# ─< DNF - Fedora >─────────────────────────────────────────────────────
|
|
||||||
if command -v dnf
|
|
||||||
set pkg "$sudo dnf"
|
|
||||||
set install "$pkg install"
|
|
||||||
set update "$pkg update && $pkg upgrade"
|
|
||||||
set search "$pkg search"
|
|
||||||
set remove "$pkg remove"
|
|
||||||
set -a ALIASSES "-- You're using DNF aliases!! --"
|
|
||||||
end
|
|
||||||
|
|
||||||
# ─< APT/NALA - Debian >────────────────────────────────────────────────
|
|
||||||
if command -v nala >/dev/null 2>&1
|
|
||||||
set pkg "$sudo nala"
|
|
||||||
set install "$pkg update && $pkg install"
|
|
||||||
set update "$pkg update && $pkg upgrade"
|
|
||||||
set search "$pkg search"
|
|
||||||
set remove "$pkg remove"
|
|
||||||
set ALIASSES "-- You're using NALA aliases!! --"
|
|
||||||
else
|
else
|
||||||
if command -v apt-get >/dsudo ev/null 2>&1
|
if command -v sudo >/dev/null 2>&1
|
||||||
set pkg "$sudo apt-get"
|
set sudo "sudo"
|
||||||
set install "$pkg update && $pkg install"
|
end
|
||||||
set update "$pkg update && $pkg upgrade"
|
end
|
||||||
set search "$pkg search"
|
|
||||||
set remove "$pkg remove"
|
|
||||||
set ALIASSES "-- You're using APT aliases!! --"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# ─< Pacman - Arch >────────────────────────────────────────────────────
|
# ─────────────────────────< START | distro/packagemanger detection >─────────────────────────
|
||||||
if command -v paru >/dev/null 2>&1
|
# ─< DNF - Fedora >─────────────────────────────────────────────────────
|
||||||
set pkg "paru"
|
if command -v dnf
|
||||||
set install "$pkg -S"
|
set pkg "$sudo dnf"
|
||||||
set update "$pkg -Syu"
|
set install "$pkg install"
|
||||||
set search "$pkg -Ss"
|
set update "$pkg update && $pkg upgrade"
|
||||||
set remove "$pkg -R"
|
set search "$pkg search"
|
||||||
set ALIASSES "-- You're using Arch!! - installed helper: paru --"
|
set remove "$pkg remove"
|
||||||
else
|
set -a ALIASSES "-- You're using DNF aliases!! --"
|
||||||
if command -v yay >/dev/null 2>&1
|
end
|
||||||
set pkg "yay"
|
|
||||||
set install "$pkg -S"
|
|
||||||
set update "$pkg -Syu"
|
|
||||||
set search "$pkg -Ss"
|
|
||||||
set remove "$pkg -R"
|
|
||||||
set ALIASSES "-- You're using Arch!! - installed helper: yay --"
|
|
||||||
else
|
|
||||||
if command -v pacman >/dev/null 2>&1
|
|
||||||
set pkg "$sudo pacman"
|
|
||||||
set install "$pkg -S"
|
|
||||||
set update "$pkg -Syu"
|
|
||||||
set search "$pkg -Ss"
|
|
||||||
set remove "$pkg -R"
|
|
||||||
set ALIASSES "-- by the PACMAN - You're using Arch!! --"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# ─< Zypper - OpenSuse >────────────────────────────────────────────────────────────────────
|
# ─< APT/NALA - Debian >────────────────────────────────────────────────
|
||||||
if command -v zypper >/dev/null 2>&1
|
if command -v nala >/dev/null 2>&1
|
||||||
set pkg "$sudo zypper"
|
set pkg "$sudo nala"
|
||||||
set install "$pkg in"
|
set install "$pkg update && $pkg install"
|
||||||
set update "$pkg dup"
|
set update "$pkg update && $pkg upgrade"
|
||||||
set search "$pkg se"
|
set search "$pkg search"
|
||||||
set remove "$pkg rm"
|
set remove "$pkg remove"
|
||||||
alias lock="$pkg al"
|
set ALIASSES "-- You're using NALA aliases!! --"
|
||||||
set ALIASSES "-- I see.. you're using OpenSUSE. i like <3 --
|
else
|
||||||
-- ZYPPER -- "
|
if command -v apt-get >/dsudo ev/null 2>&1
|
||||||
end
|
set pkg "$sudo apt-get"
|
||||||
|
set install "$pkg update && $pkg install"
|
||||||
|
set update "$pkg update && $pkg upgrade"
|
||||||
|
set search "$pkg search"
|
||||||
|
set remove "$pkg remove"
|
||||||
|
set ALIASSES "-- You're using APT aliases!! --"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# ─< APK - Alpine >─────────────────────────────────────────────────────────────────────────
|
# ─< Pacman - Arch >────────────────────────────────────────────────────
|
||||||
if command -v apk >/dev/null 2>&1
|
if command -v paru >/dev/null 2>&1
|
||||||
set pkg "$sudo apk"
|
set pkg "paru"
|
||||||
set install "$pkg add"
|
set install "$pkg -S"
|
||||||
set update "$pkg update"
|
set update "$pkg -Syu"
|
||||||
set search "$pkg search"
|
set search "$pkg -Ss"
|
||||||
set ALIASSES "-- Alpine.. right, this fast os is evolving.. --"
|
set remove "$pkg -R"
|
||||||
end
|
set ALIASSES "-- You're using Arch!! - installed helper: paru --"
|
||||||
if test -n "$install"
|
else
|
||||||
set FISH_INSTALL "$install"
|
if command -v yay >/dev/null 2>&1
|
||||||
|
set pkg "yay"
|
||||||
|
set install "$pkg -S"
|
||||||
|
set update "$pkg -Syu"
|
||||||
|
set search "$pkg -Ss"
|
||||||
|
set remove "$pkg -R"
|
||||||
|
set ALIASSES "-- You're using Arch!! - installed helper: yay --"
|
||||||
|
else
|
||||||
|
if command -v pacman >/dev/null 2>&1
|
||||||
|
set pkg "$sudo pacman"
|
||||||
|
set install "$pkg -S"
|
||||||
|
set update "$pkg -Syu"
|
||||||
|
set search "$pkg -Ss"
|
||||||
|
set remove "$pkg -R"
|
||||||
|
set ALIASSES "-- by the PACMAN - You're using Arch!! --"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
set vars "install" "update" "search" "remove"
|
# ─< Zypper - OpenSuse >────────────────────────────────────────────────────────────────────
|
||||||
for env in $vars
|
if command -v zypper >/dev/null 2>&1
|
||||||
if not test -z "$env"
|
set pkg "$sudo zypper"
|
||||||
alias "$env"="$$env"
|
set install "$pkg in"
|
||||||
end
|
set update "$pkg dup"
|
||||||
end
|
set search "$pkg se"
|
||||||
end
|
set remove "$pkg rm"
|
||||||
|
alias lock="$pkg al"
|
||||||
|
set ALIASSES "-- I see.. you're using OpenSUSE. i like <3 --
|
||||||
|
-- ZYPPER -- "
|
||||||
|
end
|
||||||
|
|
||||||
|
# ─< APK - Alpine >─────────────────────────────────────────────────────────────────────────
|
||||||
|
if command -v apk >/dev/null 2>&1
|
||||||
|
set pkg "$sudo apk"
|
||||||
|
set install "$pkg add"
|
||||||
|
set update "$pkg update"
|
||||||
|
set search "$pkg search"
|
||||||
|
set ALIASSES "-- Alpine.. right, this fast os is evolving.. --"
|
||||||
|
end
|
||||||
|
if test -n "$install"
|
||||||
|
set FISH_INSTALL "$install"
|
||||||
|
|
||||||
|
set vars "install" "update" "search" "remove"
|
||||||
|
for env in $vars
|
||||||
|
if not test -z "$env"
|
||||||
|
alias "$env"="$$env"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -122,64 +122,64 @@ end
|
||||||
# │ FUNCTION: Define function gsa (to ask the user which submodule to clone to which path and which name │
|
# │ FUNCTION: Define function gsa (to ask the user which submodule to clone to which path and which name │
|
||||||
# ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
# ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯
|
||||||
function gsa
|
function gsa
|
||||||
set dir $PWD
|
set dir $PWD
|
||||||
echo "-- these are the current submodules --"
|
echo "-- these are the current submodules --"
|
||||||
if command -v rg >/dev/null 2>&1
|
if command -v rg >/dev/null 2>&1
|
||||||
echo "-- for $dir --"
|
echo "-- for $dir --"
|
||||||
rg -i submodule (echo $dir/.gitmodules)
|
rg -i submodule (echo $dir/.gitmodules)
|
||||||
end
|
end
|
||||||
|
|
||||||
# ─< Prompt the user to enter the repository URL to add as a submodule >────────────────────
|
# ─< Prompt the user to enter the repository URL to add as a submodule >────────────────────
|
||||||
echo "-- enter the repository to add as a submodule --"
|
echo "-- enter the repository to add as a submodule --"
|
||||||
read repo
|
read repo
|
||||||
|
|
||||||
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
|
# ─< Prompt the user to enter the branch to checkout (e.g., main, master) >─────────────────
|
||||||
echo "-- enter the branch to checkout (main/master..) --"
|
echo "-- enter the branch to checkout (main/master..) --"
|
||||||
read branch
|
read branch
|
||||||
|
|
||||||
# ─< Prompt the user to enter the relative path where the submodule will be cloned >────────
|
# ─< Prompt the user to enter the relative path where the submodule will be cloned >────────
|
||||||
# ─< Advise not to use the leading / or ./ >────────────────────────────────────────────────
|
# ─< Advise not to use the leading / or ./ >────────────────────────────────────────────────
|
||||||
echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --"
|
echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --"
|
||||||
read -S path
|
read -S path
|
||||||
|
|
||||||
echo "-- enter a name for the submodule --"
|
echo "-- enter a name for the submodule --"
|
||||||
read -l name
|
read -l name
|
||||||
|
|
||||||
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
# ─< Ask the user for confirmation if the constructed command looks correct >───────────────
|
||||||
echo "git submodule add --branch $branch $repo $path"
|
echo "git submodule add --branch $branch $repo $path"
|
||||||
echo "-- does this command look right to you? [y/n] --"
|
echo "-- does this command look right to you? [y/n] --"
|
||||||
read -l comm
|
read -l comm
|
||||||
|
|
||||||
# ─< Switch statement to handle the user's confirmation input >─────────────────────────────
|
# ─< Switch statement to handle the user's confirmation input >─────────────────────────────
|
||||||
switch $comm
|
switch $comm
|
||||||
# ─< If the user inputs 'y' or 'Y', execute the git submodule add command >─────────────────
|
# ─< If the user inputs 'y' or 'Y', execute the git submodule add command >─────────────────
|
||||||
case 'y' 'Y'
|
case 'y' 'Y'
|
||||||
git submodule add --branch $branch --name $name $repo $path
|
git submodule add --branch $branch --name $name $repo $path
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
git add .
|
git add .
|
||||||
git commit -m "Addet $name as a submodule"
|
git commit -m "Addet $name as a submodule"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
# ─< If the user inputs 'n' or 'N', notify them to try again >──────────────────────────────
|
# ─< If the user inputs 'n' or 'N', notify them to try again >──────────────────────────────
|
||||||
case 'n' 'N'
|
case 'n' 'N'
|
||||||
echo "-- all right, just try again :) --"
|
echo "-- all right, just try again :) --"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ╭───────────────────────────────────────────────────╮
|
# ╭───────────────────────────────────────────────────╮
|
||||||
# │ FUNCTION: set tmux command to always work with ta │
|
# │ FUNCTION: set tmux command to always work with ta │
|
||||||
# ╰───────────────────────────────────────────────────╯
|
# ╰───────────────────────────────────────────────────╯
|
||||||
if command -v tmux >/dev/null 2>&1
|
if command -v tmux >/dev/null 2>&1
|
||||||
function ta
|
function ta
|
||||||
if command tmux list-sessions >/dev/null 2>&1
|
if command tmux list-sessions >/dev/null 2>&1
|
||||||
echo "Tmux session found. Entering it now! --"
|
echo "Tmux session found. Entering it now! --"
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
tmux a
|
tmux a
|
||||||
else
|
else
|
||||||
echo "No Tmux session found. Creating one now! --"
|
echo "No Tmux session found. Creating one now! --"
|
||||||
tmux
|
tmux
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# ╭────────────────────────────────────────────╮
|
# ╭────────────────────────────────────────────╮
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue