diff --git a/.gitignore b/.gitignore index 85f1cfc..327b6e7 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,3 @@ cless.fish fzf_* man.fish .proxy_url -fish_variables diff --git a/aliases.fish b/aliases.fish deleted file mode 100644 index 5b700e0..0000000 --- a/aliases.fish +++ /dev/null @@ -1,229 +0,0 @@ -#!/bin/fish - - -# ─< t stands for trash(-cli) >─────────────────────────────────────────────────────────── -function _trash - if command -v trash >/dev/null 2>&1 - alias rm="trash" - else - if command -v trash-cli >/dev/null 2>&1 - alias rm="trash-cli" - else - red "You do not have trash or trash-cli installed! Your 'rm' will be permanent!" - end - end -end - -# ─< colorized ls >───────────────────────────────────────────────────────────────────────── -# ─< lsd >────────────────────────────────────────────────────────────────────────────────── -if command -v lsd >/dev/null 2>&1 - alias ls="lsd -l -1 -h1 --almost-all --git" - alias l="lsd -1" - alias ll="lsd -1 --almost-all" - alias tree="lsd --tree" -else - # ─< exa >────────────────────────────────────────────────────────────────────────────────── - if command -v exa >/dev/null 2>&1 - alias ls="exa --icons --long --git" - alias l="exa --icons -l" - alias ll="exa --icons -laa" - alias tree="exa --icons -l -tree" - else - # ─< eza >────────────────────────────────────────────────────────────────────────────────── - if command -v eza >/dev/null 2>&1 - alias ls="eza --icons --long --git" - alias l="eza --icons -l" - alias ll="eza --icons -laa" - alias tree="eza --icons -l -tree" - else - # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── - alias ls="ls --color=always -lAph" - alias l="ls --color=always -lph -w1" - alias ll="ls --color=always -lph" - end - end -end - -alias clearl="command clear && l" - -# ─< colored everything >─────────────────────────────────────────────────────────────────── -alias ip="ip --color=always" - -# ─< check for rg >───────────────────────────────────────────────────────────────────────── -if command -v rg >/dev/null 2>&1 - alias grep="rg --color=always" -else - alias grep="grep --color=always" -end - -# ─< weather >────────────────────────────────────────────────────────────────────────────── -alias www="curl wttr.in/Ulm" - -# ─< linutil >──────────────────────────────────────────────────────────────────────────── -alias linutil="curl -fsSL https://christitus.com/linux | sh" - -# ─< telnet (starwars) >──────────────────────────────────────────────────────────────────── -if command -v telnet >/dev/null 2>&1 - alias starwars="telnet -a telehack.com" -end - -# ─< rsync >──────────────────────────────────────────────────────────────────────────────── - -function _rsync - # Check if the 'find' command exists - if command -v find >/dev/null 2>&1 - # Initialize the number of files to 0 - set numbers 0 - # Loop through all arguments except the last one (which is the destination) - for source in $argv[1..-2] - # Count the number of files in the source directory - set numbers (math $numbers + (find $source -type f | wc -l)) - end - # Set the destination (last argument) - set destination $argv[-1] - - # Set the color to magenta - set_color magenta - - # Use rsync with pv for progress - rsync -avP --info=progress2 $argv[1..-2] $destination | pv -lpes $numbers - - # Reset the color to normal - set_color normal - else - # If 'find' is not installed, display a warning message - echo "We could not find 'find'. Please install 'find' to enable the progress bar. (hit 'CTRL + C' to exit now)" - sleep 5 - - # Run rsync without progress bar - rsync -avP --info=progress2 $argv - end -end - -if command -v rsync >/dev/null 2>&1 - alias cp="_rsync" - alias scp="rsync -avP" -end - -# ─< bat alias >──────────────────────────────────────────────────────────────────────────── -if command -v batcat >/dev/null 2>&1 - alias cat="batcat --color=always -p --paging=never" - alias less="batcat --paging always --color=always" - alias gd="batcat --diff" -end - -# ─< batcat alias >───────────────────────────────────────────────────────────────────────── -if command -v bat >/dev/null 2>&1 - alias cat="bat --color=always -p" - alias less="bat --paging always --color=always" - alias gd="bat --diff" -end - -# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── -if command -v fastfetch >/dev/null 2>&1 - alias ff="fastfetch" - alias clearff="command clear & fastfetch" - # ─< check for fastfetch module-existence >───────────────────────────────────────────────── - command fastfetch --config os >/dev/null 2>&1 - # ─< check the status >───────────────────────────────────────────────────────────────────── - switch $status - case 0 - alias f="fastfetch --config os" - # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── - case '*' - git clone https://git.k4li.de/mirrors/fastfetch.git $HOME/.local/share/fastfetch >/dev/null 2>&1 - # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── - exec fish - end - clear & f - alias clear="clear & f" -end -# ─< calling the trash function, which will warn you if you don't have trash installed >── -_trash - -# ─< set nmap-alias >─────────────────────────────────────────────────────────────────────── -if command -v nmap >/dev/null 2>&1 - alias scanvuln="sudo nmap --script vuln -vvv" - alias sv="scanvuln" - alias portscan="sudo nmap -sT" - alias ps="portscan" -end - -# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── -if command -v tmux >/dev/null 2>&1 - alias ts="tmux source $HOME/.tmux.conf" - alias t="tmux" -end - -# ─< d stands for docker >────────────────────────────────────────────────────────────────── -if command -v docker >/dev/null 2>&1 - alias up="docker compose up" - alias down="docker compose down" - alias pull="docker compose pull" - alias d="docker" - alias dr="docker run --rm -it" - alias ds="docker ps -a" - alias dc="docker compose" - alias appupdate="docker compose pull && docker compose up -d --force-recreate" -end - -# ─< g stands for GIT >───────────────────────────────────────────────────────────────────── -if command -v git >/dev/null 2>&1 - alias g="git" - alias gs="git status" - alias gm='git checkout main && git merge' - alias gc="git clone --recurse-submodule" - alias ga="git add" - alias gp="git pull --recurse-submodule" - alias gms='git maintenance start' - alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" - alias gcm="git commit -m" - alias gpu="git push --recurse-submodule=on-demand" - if command -v lazygit >/dev/null 2>&1 - alias lg="lazygit" - end -end - -# ╭────────╮ -# │ CODING │ -# ╰────────╯ - -# ─< h stands for HUGO >────────────────────────────────────────────────────────────────── -if command -v hugo >/dev/null 2>&1 - alias h='hugo' - alias hs='hugo server -D --noHTTPCache --disableFastRender' -end - - -# set IP (ip a | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d/ -f1 | head -n 1) -function get_ip - command ip a | command grep 'inet ' | command grep -v '127.0.0.1' | command awk '{print $2}' | command cut -d/ -f1 | head -n 1 -end -if command -v php >/dev/null 2>&1 - alias phprun="php artisan serve --host=(get_ip) --port=8000" -end -if command -v npm >/dev/null 2>&1 - alias npmrun="npm run dev -- --host=(get_ip) --port=8001" -end - -# ─< c stands for bin/cake >────────────────────────────────────────────────────────────── -alias cake='bin/cake' -alias c='cake' -alias cs='c server -p 1313 --host=(get_ip)' - -# ─< VSCodium >───────────────────────────────────────────────────────────────────────────── -if command -v codium >/dev/null 2>&1 - alias code="codium" - set -e EDITOR - set -p EDITOR codium -end - -# ─< neovide, the best frontend for any neovim-config >─────────────────────────────────── -if test -d $HOME/.local/share/neovide/ - if command -v neovide >/dev/null 2>&1 - alias nvim='neovide --fork' - else - set -p neovide (bash -c 'find $HOME/ -name *neovide*.appimage' >/dev/null 2>&1) || exit 1 - alias nvim="$neovide --fork" - end -end diff --git a/config.fish b/config.fish index bac184e..6fce20c 100644 --- a/config.fish +++ b/config.fish @@ -1,79 +1,165 @@ if status is-interactive # ─< Commands to run in interactive sessions can go here >────────────── - function _source - if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher - else - notify-send "no fish config.." - end - if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish - end - end end # ╭───────────────────────────────────────────────────╮ # │ FISH CONFIG BY PIKA │ # │ │ # │ If you have any questions, check the git page at: │ -# │ https://git.k4li.de/dotfiles/fish.git │ +# │ https://git.k4li.de/pika/fish.git │ # ╰───────────────────────────────────────────────────╯ # ────────────────────────────────────────< sources >────────────────────────────────────── -function _source - if test -d $HOME/.config/fish/init/ - source $HOME/.config/fish/init/setup.fish - # ────────────────────────────────────< setup some stuff >──────────────────────────────────── - upin - # dep_fisher - else - notify-send "no fish config.." - end - if test -e $HOME/.config/fish/aliases.fish - source $HOME/.config/fish/aliases.fish - end -end +# source $HOME/.config/fish/init/setup.fish # ─────────────────────────────────< Environment-Variables >─────────────────────────────── set -p EDITOR (which nvim) -# ────────────────────────────────────────< functions >───────────────────────────────────── - -# ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── -function _zox - if command -v zoxide >/dev/null 2>&1 - zoxide init fish | source +# ─< colorized ls >───────────────────────────────────────────────────────────────────────── +# ─< lsd >────────────────────────────────────────────────────────────────────────────────── +if command -v lsd >/dev/null 2>&1 + alias ls="lsd --long --git" + alias l="lsd -1 --almost-all" + alias ll="lsd -lA" + alias clearl="command clear && l" + alias tree="lsd --tree" +else + # ─< exa >────────────────────────────────────────────────────────────────────────────────── + if command -v exa >/dev/null 2>&1 + alias ls="exa --icons --long --git" + alias l="exa --icons -l" + alias ll="exa --icons -laa" + alias tree="exa --icons -l -tree" + else + # ─< eza >────────────────────────────────────────────────────────────────────────────────── + if command -v eza >/dev/null 2>&1 + alias ls="eza --icons --long --git" + alias l="eza --icons -l" + alias ll="eza --icons -laa" + alias tree="eza --icons -l -tree" + else + # ─< if nothing works -- plain old ls >───────────────────────────────────────────────────── + alias ls="ls --color=always -lph" + alias l="ls --color=always -lph" + alias ll="ls --color=always -lAph" + end end end +# ─< colored everything >─────────────────────────────────────────────────────────────────── +alias ip="ip --color=always" + +# ─< check for rg >───────────────────────────────────────────────────────────────────────── +if command -v rg >/dev/null 2>&1 + alias grep="rg --color=always" +else + alias grep="grep --color=always" +end + +# ─< weather >────────────────────────────────────────────────────────────────────────────── +alias www="curl wttr.in/Ulm" + +# ─< rsync >──────────────────────────────────────────────────────────────────────────────── +if command -v rsync >/dev/null 2>&1 + alias cp="rsync -avP" + alias scp="rsync -avP" +end + +# ─< bat alias >──────────────────────────────────────────────────────────────────────────── +if command -v batcat >/dev/null 2>&1 + alias cat="batcat --color=always -p --paging=never" + alias less="batcat --paging always --color=always" + alias gd="batcat --diff" +end + +# ─< batcat alias >───────────────────────────────────────────────────────────────────────── +if command -v bat >/dev/null 2>&1 + alias cat="bat --color=always -p" + alias less="bat --paging always --color=always" + alias gd="bat --diff" +end + +# ─< t stands for tmux >──────────────────────────────────────────────────────────────────── +if command -v tmux >/dev/null 2>&1 + alias ts="tmux source $HOME/.tmux.conf" + alias t="tmux" +end + +# ─< d stands for docker >────────────────────────────────────────────────────────────────── +if command -v docker >/dev/null 2>&1 + alias up="docker compose up" + alias down="docker compose down" + alias pull="docker compose pull" + alias d="docker" + alias dr="docker run --rm -it" + alias ds="docker ps -a" + alias dc="docker compose" + alias appupdate="docker compose pull && docker compose up -d --force-recreate" +end + +# ─< g stands for git >───────────────────────────────────────────────────────────────────── +if command -v git >/dev/null 2>&1 + alias g="git" + alias gs="git status" + alias gf="git fetch" + alias gf="git fetch && git merge" + alias gc="git clone --recurse-submodule" + alias ga="git add" + alias gp="git pull --recurse-submodule" + # alias gsu="git pull --recurse-submodule && git submodule foreach git pull && git add . && git commit -m ' updated 📌submodules' && echo '-- Committed changes, pushing now..' && sleep 1 && git push" + alias gcm="git commit -m" + alias gpu="git push --recurse-submodule=on-demand" +end + +# ─< fastfetch >──────────────────────────────────────────────────────────────────────────── +if command -v fastfetch >/dev/null 2>&1 + alias ff="fastfetch" + alias clearff="command clear & fastfetch" + # ─< check for fastfetch module-existence >───────────────────────────────────────────────── + command fastfetch --config os >/dev/null 2>&1 + # ─< check the status >───────────────────────────────────────────────────────────────────── + switch $status + case 0 + alias f="fastfetch --config os" + # ─< unsuccessful, cloning repo >────────────────────────────────────────────────────────── + case '*' + git clone https://git.k4li.de/mirrors/fastfetch $HOME/.local/share/fastfetch >/dev/null 2>&1 + # ─< execute fish to reinitialize aliases >──────────────────────────────────────────────── + exec fish + end + clear & f + alias clear="clear & f" +end + +# ─< set nmap-alias >─────────────────────────────────────────────────────────────────────── +if command -v nmap >/dev/null 2>&1 + alias scanvuln="sudo nmap --script vuln -vvv" + alias sv="scanvuln" + alias portscan="sudo nmap -sT" + alias ps="portscan" +end + +# ────────────────────────────────────────< functions >───────────────────────────────────── +# ─< z stands for Zoxide >────────────────────────────────────────────────────────────────── +if command -v zoxide >/dev/null 2>&1 + zoxide init fish | source +end + +# ─< starship >───────────────────────────────────────────────────────────────────────────── +if command -v starship >/dev/null 2>&1 + function starship_transient_prompt_func + starship module character + end + starship init fish | source + enable_transience +else + curl -sS https://starship.rs/install.sh | sh && exec fish +end + # ─< set colorscheme for bobthefish >─────────────────────────────────────────────────────── -function _bobfish - if test -d $HOME/.config/fish/functions/bobthefish/ - source $HOME/.config/fish/functions/bobthefish/*.fish - set -g theme_nerd_fonts yes - 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) - set -g theme_color_scheme catppuccin-mocha - end +if test -d $HOME/.config/fish/functions/ + set -g theme_nerd_fonts yes + 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) + set -g theme_color_scheme catppuccin-mocha end - -# ─< oh-my-posh >─────────────────────────────────────────────────────────────────────────── -if command -v oh-my-posh >/dev/null 2>&1 - # ─< tokyo-storm config >─────────────────────────────────────────────────────────────────── - oh-my-posh init fish --config ~/.config/fish/themes/tokyo_storm.toml | source - # ─< zen config >─────────────────────────────────────────────────────────────────────────── - # oh-my-posh init fish --config ~/.config/fish/themes/zen.toml | source -else - _bobfish - curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/ -end - -function main - _source - _zox -end - -main diff --git a/fish_variables b/fish_variables index e71b724..3ebd35b 100644 --- a/fish_variables +++ b/fish_variables @@ -1,11 +1,7 @@ # This file contains fish universal variable definitions. # VERSION: 3.0 -SETUVAR FISH_INSTALL:yay\x20install\x20\x2d\x2dnoconfirm +SETUVAR FISH_INSTALL:paru\x20install\x20\x2d\x2dnoconfirm SETUVAR __fish_initialized:3400 -SETUVAR _fisher_jorgebucaran_2F_autopair_2E_fish_files:\x7e/\x2econfig/fish/functions/_autopair_backspace\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_left\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_right\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_insert_same\x2efish\x1e\x7e/\x2econfig/fish/functions/_autopair_tab\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/autopair\x2efish -SETUVAR _fisher_jorgebucaran_2F_fisher_files:\x7e/\x2econfig/fish/functions/fisher\x2efish\x1e\x7e/\x2econfig/fish/completions/fisher\x2efish -SETUVAR _fisher_patrickf1_2F_colored__man__pages_2E_fish_files:\x7e/\x2econfig/fish/functions/cless\x2efish\x1e\x7e/\x2econfig/fish/functions/man\x2efish -SETUVAR _fisher_patrickf1_2F_fzf_2E_fish_files:\x7e/\x2econfig/fish/functions/_fzf_configure_bindings_help\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_extract_var_info\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_changed_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_preview_file\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_diff_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_report_file_type\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_directory\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_log\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_git_status\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_history\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_processes\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_search_variables\x2efish\x1e\x7e/\x2econfig/fish/functions/_fzf_wrapper\x2efish\x1e\x7e/\x2econfig/fish/functions/fzf_configure_bindings\x2efish\x1e\x7e/\x2econfig/fish/conf\x2ed/fzf\x2efish\x1e\x7e/\x2econfig/fish/completions/fzf_configure_bindings\x2efish SETUVAR _fisher_plugins:jorgebucaran/fisher\x1ejorgebucaran/autopair\x2efish\x1epatrickf1/fzf\x2efish\x1epatrickf1/colored_man_pages\x2efish SETUVAR _fisher_upgraded_to_4_4:\x1d SETUVAR fish_color_autosuggestion:555\x1ebrblack diff --git a/init/setup.fish b/init/setup.fish index 736c514..d60bae2 100644 --- a/init/setup.fish +++ b/init/setup.fish @@ -2,11 +2,11 @@ function upin # ─< check for sudo/root >────────────────────────────────────────────────────────────────── - if [ $USER = root ] + if [ $USER = "root" ] set su "" else if command -v sudo >/dev/null 2>&1 - set su sudo + set su "sudo" end end @@ -43,7 +43,7 @@ function upin # ─< Pacman - Arch >──────────────────────────────────────────────────── if command -v paru >/dev/null 2>&1 - set pkg paru + set pkg "paru" set install "$pkg -S" set update "$pkg -Syu" set search "$pkg -Ss" @@ -51,7 +51,7 @@ function upin set unattendet "$pkg install --noconfirm" else if command -v yay >/dev/null 2>&1 - set pkg yay + set pkg "yay" set install "$pkg -S" set update "$pkg -Syu" set search "$pkg -Ss" @@ -93,7 +93,7 @@ function upin set -U FISH_INSTALL $install end if test -n "$install" - set vars install update search remove + set vars "install" "update" "search" "remove" for env in $vars if not test -z "$env" alias "$env"="$$env" @@ -125,7 +125,7 @@ function gsa echo "-- enter the repository to add as a submodule --" echo "-- (type 'quit' to quit) --" read repo - if [ "$repo" = quit ] + if [ "$repo" = "quit" ] exit 1 end @@ -134,7 +134,7 @@ function gsa echo "-- enter the relative path, where the submodule will be cloned to. (!! do it like this: ./path/to/clone/to) --" echo "-- (type 'quit' to quit) --" read -S path - if [ "$path" = quit ] + if [ "$path" = "quit" ] exit 1 end @@ -142,14 +142,14 @@ function gsa echo "-- enter the branch to checkout (main/master..) --" echo "-- (type 'quit' to quit) --" read branch - if [ "$branch" = quit ] + if [ "$branch" = "quit" ] exit 1 end echo "-- enter a name for the submodule --" echo "-- (type 'quit' to quit) --" read -l name - if [ "$name" = quit ] + if [ "$name" = "quit" ] exit 1 end @@ -161,28 +161,22 @@ function gsa # ─< Switch statement to handle the user's confirmation input >───────────────────────────── switch $comm # ─< If the user inputs 'y' or 'Y', execute the git submodule add command >───────────────── - case y Y - git submodule add --branch $branch --name $name $repo $path - git submodule update --init --recursive - git add . - git commit -m "Addet $name as a submodule" - git push + case 'y' 'Y' + git submodule add --branch $branch --name $name $repo $path + git submodule update --init --recursive + git add . + git commit -m "Addet $name as a submodule" + git push - # ─< If the user inputs 'n' or 'N', notify them to try again >────────────────────────────── - case n N - echo "-- all right, just try again :) --" + # ─< If the user inputs 'n' or 'N', notify them to try again >────────────────────────────── + case 'n' 'N' + echo "-- all right, just try again :) --" end end -# ╭────────────────────────────────────╮ -# │ FUNCTION: ssh-agent initialisation │ -# ╰────────────────────────────────────╯ - -set -x SSH_AUTH_SOCK $XDG_RUNTIME_DIR/ssh-agent.socket - -# ╭───────────────────────────────────────────────────╮ -# │ 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 set tmux_y "tmux-session active!" @@ -190,20 +184,20 @@ if command -v tmux >/dev/null 2>&1 function ta command tmux list-sessions >/dev/null 2>&1 switch $status - case 0 - 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 + case 0 + 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 end @@ -214,7 +208,7 @@ end function dep_fisher # ─< Define dependencies for the plugins used by fisher >─────────────────────────────────── - set dependencies fzf btop fastfetch curl wget cmatrix + set dependencies "fzf" "btop" "fastfetch" "curl" "wget" "cmatrix" # ─< Check and install dependencies >─────────────────────────────────────────────────────── for dep in $dependencies if not command -v $dep >/dev/null 2>&1 @@ -234,13 +228,16 @@ end # ╰───────────────────────────────────────────────────────╯ function check_fishr - if command -v fisher >/dev/null 2>&1 + if test -e $HOME/.config/fish/.fishr.init fisher update else if test ! -e $HOME/.config/fish/functions/fisher.fish - curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher - else - fisher update + echo "you did it!!"> $HOME/.config/fish/.fishr.init && curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source & fisher install jorgebucaran/fisher end end -end \ No newline at end of file +end + +# ────────────────────────────────────< setup some stuff >──────────────────────────────────── +#upin +#dep_fisher +#check_fishr diff --git a/init/tools.fish b/init/tools.fish new file mode 100644 index 0000000..998c068 --- /dev/null +++ b/init/tools.fish @@ -0,0 +1,11 @@ +# ─< tools creation >─────────────────────────────────────────────────────────────────────── +set fish_greeting +set toolbox "The following tools are active: +" +set warnings "The following packages are NOT active: +" + +function tools + +end + diff --git a/themes/bubbles.toml b/themes/bubbles.toml deleted file mode 100644 index 00d1fb1..0000000 --- a/themes/bubbles.toml +++ /dev/null @@ -1,167 +0,0 @@ -"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" -final_space = true -version = 2 - -[[blocks]] -alignment = "right" -type = "prompt" - -[[blocks.segments]] -background = "#29315A" -foreground = "#E64747" -leading_diamond = "" -style = "diamond" -template = "{{ .UserName }}" -trailing_diamond = " " -type = "session" - -[[blocks.segments]] -background = "#29315A" -foreground = "#3EC669" -leading_diamond = "" -style = "diamond" -template = " {{ .Path }}" -trailing_diamond = "" -type = "path" - - [blocks.segments.properties] -style = "folder" - -[[blocks.segments]] -background = "#29315A" -foreground = "#43CCEA" -leading_diamond = " " -style = "diamond" -template = "{{ .HEAD }}" -trailing_diamond = "" -type = "git" - - [blocks.segments.properties] -branch_icon = "" - -[[blocks.segments]] -background = "#29315A" -foreground = "#E4F34A" -leading_diamond = " " -style = "diamond" -template = "{{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}" -trailing_diamond = "" -type = "python" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#7FD5EA" -leading_diamond = " " -style = "diamond" -template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" -trailing_diamond = "" -type = "go" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#42E66C" -leading_diamond = " " -style = "diamond" -template = "{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}" -trailing_diamond = "" -type = "node" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#E64747" -leading_diamond = " " -style = "diamond" -template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" -trailing_diamond = "" -type = "ruby" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#E64747" -leading_diamond = " " -style = "diamond" -template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }}" -trailing_diamond = "" -type = "java" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#9B6BDF" -leading_diamond = " " -style = "diamond" -template = "{{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} " -trailing_diamond = "" -type = "julia" - - [blocks.segments.properties] -fetch_version = false - -[[blocks.segments]] -background = "#29315A" -foreground = "#9B6BDF" -foreground_templates = [ - "{{if eq \"Charging\" .State.String}}#40c4ff{{end}}", - "{{if eq \"Discharging\" .State.String}}#ff5722{{end}}", - "{{if eq \"Full\" .State.String}}#4caf50{{end}}" -] -leading_diamond = " " -style = "diamond" -template = "{{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}" -trailing_diamond = "" -type = "battery" - - [blocks.segments.properties] -charged_icon = "• " -charging_icon = "⇡ " -discharging_icon = "⇣ " - -[[blocks]] -alignment = "left" -newline = true -type = "prompt" - -[[blocks.segments]] -background = "#29315A" -foreground = "#AEA4BF" -leading_diamond = "" -style = "diamond" -template = "{{ .FormattedMs }}" -trailing_diamond = " " -type = "executiontime" - - [blocks.segments.properties] -style = "austin" -threshold = 150 - -[[blocks.segments]] -background = "#29315A" -foreground = "#7FD5EA" -leading_diamond = "" -style = "diamond" -template = "❯" -trailing_diamond = "" -type = "text" - -[transient_prompt] -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", -] -background = 'transparent' -template = '❯ ' - diff --git a/themes/homelab.toml b/themes/homelab.toml deleted file mode 100644 index 1cebabb..0000000 --- a/themes/homelab.toml +++ /dev/null @@ -1,189 +0,0 @@ -"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" -console_title_template = " {{ .Folder }} :: {{if .Root}}Admin{{end}}" -final_space = true -version = 2 -terminal_background = "p:t-background" - -[palette] -main-bg = "transparent" -terminal-red = "#f7768e" -pistachio-green = "#9ece6a" -terminal-green = "#73daca" -terminal-yellow = "#e0af68" -terminal-blue = "#7aa2f7" -celeste-blue = "#b4f9f8" -light-sky-blue = "#7dcfff" -terminal-white = "#c0caf5" -white-blue = "#a9b1d6" -blue-bell = "#9aa5ce" -pastal-grey = "#cfc9c2" -terminal-magenta = "#bb9af7" -blue-black = "#565f89" -terminal-black = "#414868" -t-background = "p:main-bg" - -[[blocks]] -alignment = "left" -type = "prompt" - -[[blocks.segments]] -type = "text" -style = "plain" -background = "transparent" -foreground = "p:terminal-blue" -template = "➜ " - -[[blocks.segments]] -type = "username" -style = "plain" -foreground = "#090c0c" -background = "#dc2b4b" -template = " {{ .User }}" - -[[blocks.segments]] -type = "hostname" -style = "plain" -background = "#d9647a" -foreground = "#090c0c" -template = " {{ .Host }} 󰿘 󰣀 " - -[[blocks.segments]] -type = "path" -style = "plain" -foreground = "#f4b9e8" -background = "#9d2163" -template = "{{ .Path }} ⚡" - - [blocks.segments.properties] -style = "folder" -truncation_length = 3 -truncation_symbol = "󰇘/" - -[[blocks.segments]] -type = "git" -style = "plain" -foreground = "#f289c1" -background = "#6d274d" -template = " {{ .HEAD }}" - - [blocks.segments.properties] -fetch_status = true -branch_icon = " " - -[[blocks.segments]] -type = "git_status" -style = "plain" -foreground = "#AC53EE" -background = "#6d274d" -template = "[[$all_status$ahead_behind]]" - -[[blocks.segments]] -type = "php" -style = "plain" -foreground = "#769ff0" -background = "#212736" -template = " {{ .Full }}" - -[[blocks.segments]] -type = "custom" -style = "plain" -foreground = "#5972e3" -template = "" - [blocks.segments.properties] -command = "echo " -files = ["Dockerfile", "dockerfile", "docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"] - -[[blocks.segments]] -type = "custom" -style = "plain" -foreground = "#AC53EE" -background = "#6d274d" -template = "" - [blocks.segments.properties] -command = "echo " -files = [".gitignore", ".gitmodules", ".git/"] - -[[blocks.segments]] -type = "cmd_duration" -style = "plain" -foreground = "#AC53EE" -background = "#3a1424" -template = "took 󱦟 {{ .Duration }}" - - [blocks.segments.properties] -min_time = 50 - -[[blocks.segments]] -type = "time" -style = "plain" -foreground = "#ed4f91" -background = "#3a1424" -template = "since  {{ .Time }}" - - [blocks.segments.properties] -time_format = "%R" # Hour:Minute Format - -[[blocks.segments]] -type = "character" -style = "plain" -foreground = "#53e67a" -template = "󰒍" - - [blocks.segments.properties] -success_symbol = "󰒍 󰨃" -error_symbol = "󰒎 󱈸󰨂" -vimcmd_symbol = "" - -[[blocks]] -alignment = "right" -overflow = "hide" -type = "prompt" - -[[blocks.segments]] -type = "node" -style = "plain" -foreground = "p:pistachio-green" -template = " {{ .Full }} " - -[[blocks.segments]] -type = "rust" -style = "plain" -foreground = "p:769ff0" -template = " {{ .Full }} " - -[[blocks.segments]] -type = "go" -style = "plain" -foreground = "p:light-sky-blue" -template = " {{ .Full }}" - -[[blocks.segments]] -type = "command" -style = "plain" -foreground = "p:white-blue" - - [blocks.segments.properties] -command = "git log --pretty=format:%cr -1 || date +%H:%M:%S" -shell = "bash" - -[[blocks]] -alignment = "left" -newline = true -type = "prompt" - -[[blocks.segments]] -foreground = "p:pistachio-green" -style = "plain" -template = "" -type = "text" - -[secondary_prompt] -background = "transparent" -foreground = "p:terminal-blue" -template = " " - -[transient_prompt] -type = "status" -background = "transparent" -foreground = "p:terminal-blue" -template = "" diff --git a/themes/hul10.toml b/themes/hul10.toml deleted file mode 100644 index 7cb7778..0000000 --- a/themes/hul10.toml +++ /dev/null @@ -1,124 +0,0 @@ -"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" -console_title_template = "{{if .Root}}[root] {{end}}{{.Shell}} in <{{.Folder}}>" -final_space = true -version = 2 - -[palette] -white = "#f7f7f7" -black = "#111111" - -[transient_prompt] -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", -] -background = 'transparent' -template = '❯ ' - -[[blocks]] -type = "prompt" -alignment = "left" -newline = true - -[[blocks.segments]] -background = "transparent" -foreground = "p:white" -style = "plain" -template = "┌" -type = "text" - -[[blocks.segments]] -background = "#464646" -foreground = "p:white" -style = "plain" -template = " {{.Icon}}{{if .WSL}} (WSL){{end}}⠀" -type = "os" - - [blocks.segments.properties] -windows = "" -linux = "" -ubuntu = "" -macos = "" - -[[blocks.segments]] -background = "p:white" -foreground = "p:black" -style = "plain" -template = "  {{.Name}}⠀" -type = "shell" - -[[blocks.segments]] -background = "#ffe093" -foreground = "p:black" -style = "plain" -template = "  {{.HostName}}{{.UserName}}⠀" -type = "session" - -[[blocks.segments]] -background = "#ffffd6" -foreground = "p:black" -style = "plain" -template = "{{.HEAD}}⠀" -type = "git" - - [blocks.segments.properties] -branch_icon = "  " - -[[blocks]] -type = "prompt" -alignment = "right" - -[[blocks.segments]] -background = "transparent" -foreground = "#b3ffde" -style = "plain" -template = "{{.FormattedMs}}" -type = "executiontime" - - [blocks.segments.properties] -style = "austin" -threshold = 0 - -[[blocks.segments]] -background = "transparent" -foreground = "#b3ffde" -style = "plain" -template = " · {{.CurrentDate | date .Format}}" -type = "time" - - [blocks.segments.properties] -time_format = "02/01/06 15:04" - -[[blocks]] -type = "prompt" -alignment = "left" -newline = true - -[[blocks.segments]] -background = "transparent" -foreground = "p:white" -style = "plain" -template = "└<#93d0ff>[ {{.Path}} <#93d0ff>]" -type = "path" - - [blocks.segments.properties] -folder_icon = "" -folder_separator_template = "<#93d0ff> » " -home_icon = "" -style = "agnoster" - -[[blocks]] -type = "prompt" -alignment = "left" -newline = true - -[[blocks.segments]] -background = "transparent" -foreground = "#81ff91" -foreground_templates = [ "{{if gt .Code 0}}#ff3030{{end}}" ] -style = "plain" -template = "❯" -type = "status" - - [blocks.segments.properties] -always_enabled = true diff --git a/themes/tokyo_storm.toml b/themes/tokyo_storm.toml deleted file mode 100644 index c9e0f5e..0000000 --- a/themes/tokyo_storm.toml +++ /dev/null @@ -1,146 +0,0 @@ -"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json" -console_title_template = " {{ .Folder }} :: {{if .Root}}Admin{{end}}" -final_space = true -version = 2 -terminal_background = "p:t-background" - -[palette] -main-bg = "transparent" -terminal-red = "#f7768e" -pistachio-green = "#9ece6a" -terminal-green = "#73daca" -terminal-yellow = "#e0af68" -terminal-blue = "#7aa2f7" -celeste-blue = "#b4f9f8" -light-sky-blue = "#7dcfff" -terminal-white = "#c0caf5" -white-blue = "#a9b1d6" -blue-bell = "#9aa5ce" -pastal-grey = "#cfc9c2" -terminal-magenta = "#bb9af7" -blue-black = "#565f89" -terminal-black = "#414868" -t-background = "p:main-bg" - -[[blocks]] -alignment = "left" -type = "prompt" -newline = true - -[[blocks.segments]] -type = "text" -style = "plain" -background = "transparent" -foreground = "p:terminal-magenta" -template = "➜ " - -[[blocks.segments]] -type = "path" -style = "plain" -foreground = "p:terminal-magenta" -template = "{{ .Path }} ⚡" - - [blocks.segments.properties] -style = "folder" - -[[blocks.segments]] -type = "git" -style = "plain" -foreground = "p:light-sky-blue" -foreground_templates = [ - "{{ if or (.Working.Changed) (.Staging.Changed) }}p:terminal-red{{ end }}", - "{{ if and (gt .Ahead 0) (gt .Behind 0)}}p:light-sky-blue {{ end }}", - "{{ if gt .Ahead 0 }}p:terminal-blue{{ end }}", - "{{ if gt .Behind 0 }}p:celeste-blue{{ end }}" -] -template = "({{ .HEAD}})" - - [blocks.segments.properties] -fetch_status = true -branch_icon = " " - -[[blocks.segments]] -type = "status" -style = "plain" -foreground = "p:terminal-red" -template = " " - -[[blocks]] -alignment = "right" -overflow = "hide" -type = "prompt" - -[[blocks.segments]] -type = "node" -style = "plain" -foreground = "p:pistachio-green" -template = " {{ .Full }} " - -[[blocks.segments]] -type = "php" -style = "plain" -foreground = "p:terminal-blue" -template = " {{ .Full }} " - -[[blocks.segments]] -type = "python" -style = "plain" -foreground = "p:terminal-yellow" -template = " {{ .Full }}" - -[[blocks.segments]] -type = "julia" -style = "plain" -foreground = "p:terminal-magenta" -template = " {{ .Full }}" - -[[blocks.segments]] -type = "ruby" -style = "plain" -foreground = "p:terminal-red" -template = " {{ .Full}}" - -[[blocks.segments]] -type = "go" -style = "plain" -foreground = "p:light-sky-blue" -template = "ﳑ {{ .Full}}" - -[[blocks.segments]] -type = "command" -style = "plain" -foreground = "p:white-blue" - - [blocks.segments.properties] -command = "git log --pretty=format:%cr -1 || date +%H:%M:%S" -shell = "bash" - -[[blocks]] -alignment = "left" -newline = true -type = "prompt" - -[[blocks.segments]] -style = "plain" -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}green{{end}}", -] -template = "" -type = "text" -newline = true - -[secondary_prompt] -background = "transparent" -foreground = "p:terminal-blue" -template = " " - -[transient_prompt] -type = "status" -background = "transparent" -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}green{{end}}", -] -# foreground = "p:terminal-blue" -template = "" diff --git a/themes/zen.toml b/themes/zen.toml deleted file mode 100644 index 0800b9c..0000000 --- a/themes/zen.toml +++ /dev/null @@ -1,74 +0,0 @@ -#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json - -version = 2 -final_space = true -console_title_template = '{{ .Shell }} in {{ .Folder }}' - -[[blocks]] -type = 'prompt' -alignment = 'left' -newline = true - -[[blocks.segments]] -type = 'path' -style = 'plain' -background = 'transparent' -foreground = 'blue' -template = '{{ .Path }}' - - [blocks.segments.properties] -style = 'full' - -[[blocks.segments]] -type = 'git' -style = 'plain' -foreground = 'p:grey' -background = 'transparent' -template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} {{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}' - - [blocks.segments.properties] -branch_icon = '' -commit_icon = '@' -fetch_status = true - -[[blocks]] -type = 'rprompt' -overflow = 'hidden' - -[[blocks.segments]] -type = 'executiontime' -style = 'plain' -foreground = 'yellow' -background = 'transparent' -template = '{{ .FormattedMs }}' - - [blocks.segments.properties] -threshold = 5000 - -[[blocks]] -type = 'prompt' -alignment = 'left' -newline = true - -[[blocks.segments]] -type = 'text' -style = 'plain' -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", -] -background = 'transparent' -template = '❯' - -[transient_prompt] -foreground_templates = [ - "{{if gt .Code 0}}red{{end}}", - "{{if eq .Code 0}}magenta{{end}}", -] -background = 'transparent' -template = '❯ ' - -[secondary_prompt] -foreground = 'magenta' -background = 'transparent' -template = '❯❯ '