From cc8e05e3d5bb265a5761cfee8edc8c4afa3c9432 Mon Sep 17 00:00:00 2001 From: pika Date: Sun, 18 Aug 2024 15:27:31 +0200 Subject: [PATCH] addet qfc to bashrc --- .bashrc | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.bashrc b/.bashrc index 2e61754..71aa660 100644 --- a/.bashrc +++ b/.bashrc @@ -160,11 +160,28 @@ _defaults_() { fi } - _color_prompt_() { - # set a fancy prompt (non-color, unless we know we "want" color) - case "$TERM" in +plugins(){ + if ! command_exists has; then + $(git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install) + else + tools(){ + local pkgs="bash fish git curl make cmake gcc g++ rg docker composer node npm php jre python3 go cargo" + has $pkgs + } + fi +# ─< ble.sh -- https://github.com/akinomyoga/ble.sh >───────────────────────────────────── + [[ -f $HOME/.local/share/blesh/ble.sh ]] && . $HOME/.local/share/blesh/ble.sh + [[ ${BLE_VERSION-} ]] && ble-attach + +# ─< qfc -- https://github.com/pindexis/qfc >───────────────────────────────────────────── + [[ -s "$HOME/.qfc/bin/qfc.sh" ]] && source "$HOME/.qfc/bin/qfc.sh" +} + +_color_prompt_() { + # set a fancy prompt (non-color, unless we know we "want" color) + case "$TERM" in xterm-color | *-256color) color_prompt=yes ;; - esac + esac # uncomment for a colored prompt, if the terminal has the capability; turned # off by default to not distract the user: the focus in a terminal window @@ -189,10 +206,10 @@ _defaults_() { fi unset color_prompt force_color_prompt } -# ─< check if command exists >──────────────────────────────────────────────────────────── -command_exists() { - command -v "$1" >/dev/null 2>&1 -} + # ─< check if command exists >──────────────────────────────────────────────────────────── + command_exists() { + command -v "$1" >/dev/null 2>&1 + } # ─< Silent execution >───────────────────────────────────────────────────────────────── silentexec() { @@ -310,15 +327,6 @@ _cli_qol_() { curl -s https://ohmyposh.dev/install.sh | sudo bash -s -- -d /usr/bin/ fi - if ! command_exists has; then - $(git clone https://github.com/kdabir/has.git /tmp/has && cd /tmp/has && sudo make install) - else - tools(){ - local pkgs="bash fish git curl make cmake gcc g++ rg docker composer node npm php jre python3 go cargo" - has $pkgs - } - fi - [[ -f $HOME/.local/share/blesh/ble.sh ]] && . $HOME/.local/share/blesh/ble.sh } # ─< t stands for trash(-cli) >─────────────────────────────────────────────────────────────── @@ -575,6 +583,6 @@ main() { check_root get_packager get_alias + plugins } main -[[ ${BLE_VERSION-} ]] && ble-attach