First commit adding files
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
# .bashrc
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
# User specific environment
|
||||
if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then
|
||||
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
|
||||
fi
|
||||
export PATH
|
||||
|
||||
# User specific aliases and functions
|
||||
if [ -d ~/.bashrc.d ]; then
|
||||
for rc in ~/.bashrc.d/*; do
|
||||
if [ -f "$rc" ]; then
|
||||
. "$rc"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
unset rc
|
||||
alias HandBrakeCLI='flatpak run --command=HandBrakeCLI fr.handbrake.ghb'
|
||||
|
||||
export SSH_AUTH_SOCK=$HOME/.bitwarden-ssh-agent.sock
|
||||
|
||||
alias update="sudo dnf update"
|
||||
alias cleanup="sudo dnf autoremove"
|
||||
alias ..="z .."
|
||||
alias ...="z ../.."
|
||||
alias cd="z"
|
||||
alias ll="lsd -1"
|
||||
alias llt="lsd --tree"
|
||||
alias myapps="sudo -v && ~/.bash/fedora-apps.sh"
|
||||
alias phoneapps="~/.bash/phone-apps.sh"
|
||||
alias reload="source ~/.bashrc"
|
||||
alias rip='abcde -c ~/.abcde.conf'
|
||||
alias size="du -shc"
|
||||
alias nano="micro"
|
||||
alias dup="docker compose up -d"
|
||||
alias ddown="docker compose down"
|
||||
alias dupdate="docker compose down && docker compose pull && docker compose up -d"
|
||||
alias drestart="docker compose restart"
|
||||
alias dlog="docker compose logs"
|
||||
alias star-update="sudo -v && cd ~/.bash && git pull https://git.marlow.quest/ash/Starship.git && chmod +x install-fedora.sh && ./install-fedora.sh && source ~/.bashrc"
|
||||
alias star-edit="nano ~/.config/starship.toml"
|
||||
alias ssh="kitty +kitten ssh"
|
||||
alias pack="tar -cvJf" # pack compressed.tar.xz /folder/file1.txt /folder/folder2
|
||||
alias unpack="tar -xvf"
|
||||
|
||||
|
||||
export GSK_RENDERER=cairo
|
||||
eval "$(starship init bash)"
|
||||
eval "$(fzf --bash)"
|
||||
eval "$(zoxide init bash)"
|
||||
fastfetch
|
||||
cd
|
||||
@@ -1,3 +1,13 @@
|
||||
# Starship
|
||||
# bash
|
||||
|
||||
Starship and bash setup scripts
|
||||
# Linux Install
|
||||
One Line Install
|
||||
|
||||
## Fedora
|
||||
```
|
||||
git clone https://git.marlow.quest/ash/Starship.git ~/.bash && cd ~/.bash && chmod +x install-fedora.sh && ./install-fedora.sh
|
||||
```
|
||||
## Debian
|
||||
```
|
||||
git clone https://git.marlow.quest/ash/Starship.git ~/.bash && cd ~/.bash && chmod +x install-debian.sh && ./install-debian.sh
|
||||
```
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "small"
|
||||
},
|
||||
"modules": [
|
||||
"title",
|
||||
"os",
|
||||
"uptime",
|
||||
"packages",
|
||||
"display",
|
||||
"cpu",
|
||||
"gpu",
|
||||
"memory",
|
||||
"localip"
|
||||
]
|
||||
}
|
||||
Executable
+119
@@ -0,0 +1,119 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_TOOLS=("gum")
|
||||
|
||||
echo -n "📦 Checking and installing dependencies... "
|
||||
# OS Detection
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
else
|
||||
echo "Unsupported OS. Manual installation required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependancies
|
||||
install_tool() {
|
||||
local tool=$1
|
||||
echo "--- Tool '$tool' is missing. ---"
|
||||
read -p "Would you like to install $tool? (y/n): " confirm
|
||||
|
||||
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then
|
||||
case $OS in
|
||||
ubuntu|debian|kali|pop|mint|linuxmint|kubuntu|xubuntu|lubuntu|elementary|zorin)
|
||||
sudo apt update && sudo apt install -y "$tool"
|
||||
echo "'$tool' Installed"
|
||||
;;
|
||||
fedora|rhel|centos)
|
||||
sudo dnf install -y "$tool" > /dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
echo "Package manager for '$OS' not defined in this script."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Exiting: $tool is required for this script."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Confirm everything installed correctly
|
||||
for tool in "${REQUIRED_TOOLS[@]}"; do
|
||||
if ! command -v "$tool" &> /dev/null; then
|
||||
install_tool "$tool"
|
||||
fi
|
||||
done
|
||||
|
||||
declare -A INSTALL_CMDS
|
||||
declare -a MENU_OPTIONS
|
||||
|
||||
add_app() {
|
||||
local name="$1"
|
||||
local desc="$2"
|
||||
local cmd="$3"
|
||||
# Format: Grey for the description text
|
||||
local menu_item=$(printf "%-12s | %s" "$name" "$desc")
|
||||
MENU_OPTIONS+=("$menu_item")
|
||||
INSTALL_CMDS["$menu_item"]="$cmd"
|
||||
}
|
||||
|
||||
# --- YOUR APPS ---
|
||||
add_app "Gradia" "Modern screenshot annotation" "flatpak install -y flathub be.alexandervanhee.gradia"
|
||||
add_app "Obsidian" "Markdown knowledge base" "flatpak install -y flathub md.obsidian.Obsidian"
|
||||
add_app "Brave" "Privacy browser" "sudo dnf install -y brave-browser"
|
||||
add_app "Newsflash" "Desktop RSS reader" "flatpak install -y flathub io.gitlab.news_flash.NewsFlash"
|
||||
add_app "Plex Amp" "Play music from Plex server" "flatpak install -y flathub com.plexamp.Plexamp"
|
||||
add_app "RPi Imager" "Raspber Pi Imager" "sudo dnf install -y rpi-imager"
|
||||
add_app "Local Send" "Send Files over the network" "flatpak install -y flathub org.localsend.localsend_app"
|
||||
add_app "Planify" "To Do List" "flatpak install -y flathub io.github.alainm23.planify"
|
||||
add_app "Whatsapp" "Zap Zap Whatsapp client" "flatpak install -y flathub com.rtosta.zapzap"
|
||||
add_app "Celluloid" "Video PLayer" "sudo dnf install -y celluloid"
|
||||
# -----------------
|
||||
|
||||
clear
|
||||
|
||||
# Title: Orange text with a Grey border
|
||||
gum style \
|
||||
--border rounded \
|
||||
--margin "1" \
|
||||
--padding "1 2" \
|
||||
--border-foreground 244 \
|
||||
--foreground 208 \
|
||||
" Fedora App Selector"
|
||||
|
||||
# 1. Selection
|
||||
SELECTIONS=$(printf "%s\n" "${MENU_OPTIONS[@]}" | gum choose --no-limit \
|
||||
--header "Select apps (Space to mark, Enter to confirm)" \
|
||||
--header.foreground 244 \
|
||||
--cursor.foreground 208 \
|
||||
--selected.foreground 208)
|
||||
|
||||
if [ -z "$SELECTIONS" ]; then
|
||||
gum style --foreground 244 "No apps selected. Exiting."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 2. Confirmation (Orange theme)
|
||||
gum confirm --selected.background 208 "Ready to install?" || exit 0
|
||||
|
||||
# 3. Installation Loop
|
||||
echo "$SELECTIONS" | while IFS= read -r selection; do
|
||||
cmd="${INSTALL_CMDS[$selection]}"
|
||||
app_name=$(echo "$selection" | awk -F' \\| ' '{print $1}' | xargs)
|
||||
|
||||
# Spinner: Orange spinner with Grey text
|
||||
gum spin --spinner dot --title "Installing $app_name..." --title.foreground 244 --spinner.foreground 208 -- bash -c "$cmd > /dev/null 2>&1"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
gum style --foreground 208 " ✓ $app_name installed"
|
||||
else
|
||||
gum style --foreground 196 " ✗ Failed to install $app_name"
|
||||
fi
|
||||
done
|
||||
|
||||
# 4. Cleanup
|
||||
stty sane
|
||||
printf "\033[K"
|
||||
echo ""
|
||||
gum style --foreground 208 --bold " All tasks finished!"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,94 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- 0. Pre-installation Setup ---
|
||||
echo "🎨 Customize your Terminal Color Palette"
|
||||
echo "Select a primary color for your Starship prompt:"
|
||||
echo " 1) Vibrant Orange (#FF8C00) [Default]"
|
||||
echo " 2) Yellow (#E6D709)"
|
||||
echo " 3) Mint Green (#50FA7B)"
|
||||
echo " 4) Light Blue (#8BE9FD)"
|
||||
echo " 5) Pink (#FF79C6)"
|
||||
echo " 6) Red (#FF5555)"
|
||||
echo " 7) Purple (#BD93F9)"
|
||||
echo " 8) Cyan (#00FFFF)"
|
||||
echo " 9) Lime (#32CD32)"
|
||||
echo " 10) Blue (#007BFF)"
|
||||
|
||||
read -p "Enter the number of your choice [1]: " color_choice
|
||||
|
||||
case $color_choice in
|
||||
2) PRIMARY_COLOR="#E6D709" ;;
|
||||
3) PRIMARY_COLOR="#50FA7B" ;;
|
||||
4) PRIMARY_COLOR="#8BE9FD" ;;
|
||||
5) PRIMARY_COLOR="#FF79C6" ;;
|
||||
6) PRIMARY_COLOR="#FF5555" ;;
|
||||
7) PRIMARY_COLOR="#BD93F9" ;;
|
||||
8) PRIMARY_COLOR="#00FFFF" ;;
|
||||
9) PRIMARY_COLOR="#32CD32" ;;
|
||||
10) PRIMARY_COLOR="#007BFF" ;;
|
||||
*) PRIMARY_COLOR="#FF8C00" ;; # Default
|
||||
esac
|
||||
|
||||
echo -e "Selected hex color: $PRIMARY_COLOR\n"
|
||||
|
||||
# --- 1. Update and install dependencies ---
|
||||
echo -n "📦 Checking and installing dependencies... "
|
||||
if sudo apt install -y git curl fontconfig lsd micro zoxide fzf > /dev/null 2>&1; then
|
||||
echo "Done."
|
||||
else
|
||||
echo "Failed! Check your internet connection."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- 2. Setup Fonts ---
|
||||
echo -n "🔨 Syncing fonts... "
|
||||
mkdir -p ~/.local/share/fonts
|
||||
if [ -d "./fonts" ]; then
|
||||
# -u (update) only copies if the source is newer than the destination
|
||||
cp -uf ./fonts/*.ttf ~/.local/share/fonts/ > /dev/null 2>&1
|
||||
fc-cache -f > /dev/null 2>&1
|
||||
echo "Fonts updated successfully."
|
||||
else
|
||||
echo "No fonts folder found, skipping."
|
||||
fi
|
||||
|
||||
# --- 3. Install Starship ---
|
||||
echo -n " Installing/Updating Starship... "
|
||||
if curl -sS https://starship.rs/install.sh | sh -s -- -y > /dev/null 2>&1; then
|
||||
echo "Done."
|
||||
else
|
||||
echo "Failed to install Starship."
|
||||
fi
|
||||
|
||||
# --- 4. Setup Configs ---
|
||||
|
||||
# Starship
|
||||
echo -n " Configuring Starship... "
|
||||
mkdir -p ~/.config
|
||||
if [ -f "starship.toml" ]; then
|
||||
cp -f starship.toml ~/.config/starship.toml
|
||||
sed -i "s/{{PRIMARY_COLOR}}/${PRIMARY_COLOR}/g" ~/.config/starship.toml
|
||||
echo "Done."
|
||||
else
|
||||
echo "Failed (starship.toml not found)."
|
||||
fi
|
||||
|
||||
|
||||
# Bashrc
|
||||
echo -n " Applying .bashrc... "
|
||||
if [ -f ".bashrc" ]; then
|
||||
if [ ! -L ~/.bashrc ] && [ ! -f ~/.bashrc.bak ]; then
|
||||
cp ~/.bashrc ~/.bashrc.bak
|
||||
fi
|
||||
cp -f .bashrc ~/.bashrc && echo "Done."
|
||||
else
|
||||
echo "Skipped (.bashrc not found)."
|
||||
fi
|
||||
|
||||
# --- 5. Refresh Kitty ---
|
||||
|
||||
|
||||
echo "-----------------------------------------------"
|
||||
echo "✅ All set! Terminal Restarting."
|
||||
echo "-----------------------------------------------"
|
||||
source ~/.bashrc
|
||||
Executable
+162
@@ -0,0 +1,162 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_TOOLS=("git" "curl" "fastfetch" "lsd" "micro" "zoxide" "fzf" "kitty")
|
||||
|
||||
echo -n "📦 Checking and installing dependencies... "
|
||||
# OS Detection
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
else
|
||||
echo "Unsupported OS. Manual installation required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependancies
|
||||
install_tool() {
|
||||
local tool=$1
|
||||
echo "--- Tool '$tool' is missing. ---"
|
||||
read -p "Would you like to install $tool? (y/n): " confirm
|
||||
|
||||
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then
|
||||
case $OS in
|
||||
ubuntu|debian|kali|pop|mint|linuxmint|kubuntu|xubuntu|lubuntu|elementary|zorin)
|
||||
sudo apt update && sudo apt install -y "$tool"
|
||||
echo "'$tool' Installed"
|
||||
;;
|
||||
fedora|rhel|centos)
|
||||
sudo dnf install -y "$tool" > /dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
echo "Package manager for '$OS' not defined in this script."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Exiting: $tool is required for this script."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Confirm everything installed correctly
|
||||
for tool in "${REQUIRED_TOOLS[@]}"; do
|
||||
if ! command -v "$tool" &> /dev/null; then
|
||||
install_tool "$tool"
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
# --- 0. Pre-installation Setup ---
|
||||
echo "🎨 Customize your Terminal Color Palette"
|
||||
echo "Select a primary color for your Starship prompt:"
|
||||
echo " 1) Vibrant Orange (#FF8C00) [Default]"
|
||||
echo " 2) Yellow (#E6D709)"
|
||||
echo " 3) Mint Green (#50FA7B)"
|
||||
echo " 4) Light Blue (#8BE9FD)"
|
||||
echo " 5) Pink (#FF79C6)"
|
||||
echo " 6) Red (#FF5555)"
|
||||
echo " 7) Purple (#BD93F9)"
|
||||
echo " 8) Cyan (#00FFFF)"
|
||||
echo " 9) Lime (#32CD32)"
|
||||
echo " 10) Blue (#007BFF)"
|
||||
|
||||
read -p "Enter the number of your choice [1]: " color_choice
|
||||
|
||||
case $color_choice in
|
||||
2) PRIMARY_COLOR="#E6D709" ;;
|
||||
3) PRIMARY_COLOR="#50FA7B" ;;
|
||||
4) PRIMARY_COLOR="#8BE9FD" ;;
|
||||
5) PRIMARY_COLOR="#FF79C6" ;;
|
||||
6) PRIMARY_COLOR="#FF5555" ;;
|
||||
7) PRIMARY_COLOR="#BD93F9" ;;
|
||||
8) PRIMARY_COLOR="#00FFFF" ;;
|
||||
9) PRIMARY_COLOR="#32CD32" ;;
|
||||
10) PRIMARY_COLOR="#007BFF" ;;
|
||||
*) PRIMARY_COLOR="#FF8C00" ;; # Default
|
||||
esac
|
||||
|
||||
echo -e "Selected hex color: $PRIMARY_COLOR\n"
|
||||
|
||||
# --- 2. Setup Fonts ---
|
||||
echo -n "🔨 Syncing fonts... "
|
||||
mkdir -p ~/.local/share/fonts
|
||||
|
||||
if [ -d "./fonts" ]; then
|
||||
changed=false
|
||||
|
||||
for font in ./fonts/*.ttf; do
|
||||
dest="$HOME/.local/share/fonts/$(basename "$font")"
|
||||
if [ ! -f "$dest" ] || ! cmp -s "$font" "$dest"; then
|
||||
cp "$font" "$dest"
|
||||
changed=true
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$changed" = true ]; then
|
||||
fc-cache -f > /dev/null 2>&1
|
||||
echo "Fonts updated."
|
||||
else
|
||||
echo "No changes."
|
||||
fi
|
||||
else
|
||||
echo "No fonts folder found."
|
||||
fi
|
||||
|
||||
# --- 3. Install Starship ---
|
||||
echo -n " Installing/Updating Starship... "
|
||||
if curl -sS https://starship.rs/install.sh | sh -s -- -y > /dev/null 2>&1; then
|
||||
echo "Done."
|
||||
else
|
||||
echo "Failed to install Starship."
|
||||
fi
|
||||
|
||||
# --- 4. Setup Configs ---
|
||||
|
||||
# Fastfetch
|
||||
echo -n " Configuring Fastfetch... "
|
||||
mkdir -p ~/.config/fastfetch
|
||||
if [ -f "config.jsonc" ]; then
|
||||
cp -f config.jsonc ~/.config/fastfetch/config.jsonc && echo "Done."
|
||||
else
|
||||
echo "Skipped (config.jsonc not found)."
|
||||
fi
|
||||
|
||||
# Starship
|
||||
echo -n " Configuring Starship... "
|
||||
mkdir -p ~/.config
|
||||
if [ -f "starship.toml" ]; then
|
||||
cp -f starship.toml ~/.config/starship.toml
|
||||
sed -i "s/{{PRIMARY_COLOR}}/${PRIMARY_COLOR}/g" ~/.config/starship.toml
|
||||
echo "Done."
|
||||
else
|
||||
echo "Failed (starship.toml not found)."
|
||||
fi
|
||||
|
||||
# Configure Kitty
|
||||
echo -n " Configuring Kitty... "
|
||||
mkdir -p ~/.config/kitty
|
||||
if [ -f "kitty.conf" ]; then
|
||||
cp -f kitty.conf ~/.config/kitty/kitty.conf
|
||||
sed -i "s/{{PRIMARY_COLOR}}/${PRIMARY_COLOR}/g" ~/.config/kitty/kitty.conf
|
||||
echo "Done."
|
||||
fi
|
||||
|
||||
# Bashrc
|
||||
echo -n " Applying .bashrc... "
|
||||
if [ -f ".bashrc" ]; then
|
||||
if [ ! -L ~/.bashrc ] && [ ! -f ~/.bashrc.bak ]; then
|
||||
cp ~/.bashrc ~/.bashrc.bak
|
||||
fi
|
||||
cp -f .bashrc ~/.bashrc && echo "Done."
|
||||
else
|
||||
echo "Skipped (.bashrc not found)."
|
||||
fi
|
||||
|
||||
# --- 5. Refresh Kitty ---
|
||||
echo -n "🔄 Refreshing Kitty config... "
|
||||
pkill -USR1 kitty && echo "Done." || echo "Kitty not running."
|
||||
|
||||
echo "-----------------------------------------------"
|
||||
echo "✅ All set! Terminal Restarting."
|
||||
echo "-----------------------------------------------"
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
# --- Fonts ---
|
||||
font_family SpaceMono Nerd Font Mono
|
||||
bold_font auto
|
||||
italic_font auto
|
||||
bold_italic_font auto
|
||||
font_size 12.0
|
||||
disable_ligatures never
|
||||
|
||||
cursor_shape block
|
||||
cursor #00FF00
|
||||
cursor_text_color #111111
|
||||
cursor_blink_interval 0.5
|
||||
|
||||
# --- Window Layout ---
|
||||
window_padding_width 10
|
||||
confirm_os_window_close 0
|
||||
remember_window_size yes
|
||||
initial_width 1000
|
||||
initial_height 650
|
||||
window_border_width 1pt
|
||||
active_border_color #00ff00
|
||||
|
||||
# --- Tab Bar ---
|
||||
tab_bar_edge top
|
||||
tab_bar_style powerline
|
||||
tab_powerline_style slanted
|
||||
active_tab_font_style bold
|
||||
active_tab_foreground #000000
|
||||
active_tab_background #00FF00
|
||||
inactive_tab_foreground #E0E0E0
|
||||
inactive_tab_background #333333
|
||||
|
||||
map ctrl+shift+t new_tab
|
||||
map ctrl+shift+w close_tab
|
||||
map ctrl+shift+left prev_tab
|
||||
map ctrl+shift+right next_tab
|
||||
|
||||
# --- Performance & Mouse ---
|
||||
copy_on_select yes
|
||||
detect_urls yes
|
||||
|
||||
# --- Bell ---
|
||||
enable_audio_bell no
|
||||
@@ -0,0 +1,10 @@
|
||||
d8888 888
|
||||
d88888 888
|
||||
d88P888 888
|
||||
d88P 888 .d8888b 88888b.
|
||||
d88P 888 88K 888 "88b
|
||||
d88P 888 "Y8888b. 888 888
|
||||
d8888888888 X88 888 888
|
||||
d88P 888 88888P' 888 888
|
||||
|
||||
--- Ash's Docker LXC ---
|
||||
Executable
+328
@@ -0,0 +1,328 @@
|
||||
#!/bin/bash
|
||||
|
||||
REQUIRED_TOOLS=("android-tools" "ideviceinstaller" "usbmuxd" "gum" "idevice_id")
|
||||
|
||||
echo -n "📦 Checking and installing dependencies... "
|
||||
# OS Detection
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
OS=$ID
|
||||
else
|
||||
echo "Unsupported OS. Manual installation required."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Install dependancies
|
||||
install_tool() {
|
||||
local tool=$1
|
||||
echo "--- Tool '$tool' is missing. ---"
|
||||
read -p "Would you like to install $tool? (y/n): " confirm
|
||||
|
||||
if [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]]; then
|
||||
case $OS in
|
||||
ubuntu|debian|kali|pop|mint|linuxmint|kubuntu|xubuntu|lubuntu|elementary|zorin)
|
||||
sudo apt update && sudo apt install -y "$tool"
|
||||
echo "'$tool' Installed"
|
||||
;;
|
||||
fedora|rhel|centos)
|
||||
sudo dnf install -y "$tool" > /dev/null 2>&1
|
||||
;;
|
||||
*)
|
||||
echo "Package manager for '$OS' not defined in this script."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Exiting: $tool is required for this script."
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Confirm everything installed correctly
|
||||
for tool in "${REQUIRED_TOOLS[@]}"; do
|
||||
if ! command -v "$tool" &> /dev/null; then
|
||||
install_tool "$tool"
|
||||
fi
|
||||
done
|
||||
|
||||
ORANGE="#FFA500"
|
||||
GREY="#808080"
|
||||
|
||||
export GUM_STYLE_BORDER_FOREGROUND="$ORANGE"
|
||||
export GUM_STYLE_LABEL_FOREGROUND="$ORANGE"
|
||||
export GUM_STYLE_PROMPT_FOREGROUND="$ORANGE"
|
||||
export GUM_STYLE_CURSOR_FOREGROUND="$ORANGE"
|
||||
export GUM_STYLE_SELECTED_FOREGROUND="$ORANGE"
|
||||
export GUM_STYLE_FOREGROUND="$GREY"
|
||||
|
||||
IPA_DIR="$HOME/Documents/Mobile_Apps/IPA"
|
||||
APK_DIR="$HOME/Documents/Mobile_Apps/APK"
|
||||
|
||||
# Create folders if they don't exist
|
||||
mkdir -p "$IPA_DIR"
|
||||
mkdir -p "$APK_DIR"
|
||||
|
||||
clear
|
||||
|
||||
# Title
|
||||
gum style \
|
||||
--border double \
|
||||
--padding "1 4" \
|
||||
--margin "1 2" \
|
||||
--align center \
|
||||
--foreground "$ORANGE" \
|
||||
"📱 Linux Mobile App Installer"
|
||||
|
||||
|
||||
check_ios() {
|
||||
if ! idevice_id -l | grep -q .; then
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"❌ iPhone not found."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
check_android() {
|
||||
if ! adb devices | grep -w "device" | grep -v "List" >/dev/null; then
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"❌ Android device not found."
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
ios_view_apps() {
|
||||
check_ios || return
|
||||
|
||||
RAW=$(gum spin --spinner dot --title "Scanning apps..." -- \
|
||||
ideviceinstaller list 2>/dev/null)
|
||||
|
||||
APPS=$(echo "$RAW")
|
||||
|
||||
if [ -z "$APPS" ]; then
|
||||
gum style --foreground "$GREY" "No apps found."
|
||||
else
|
||||
echo "$APPS" | gum pager
|
||||
fi
|
||||
}
|
||||
|
||||
ios_install() {
|
||||
check_ios || return
|
||||
|
||||
METHOD=$(printf "From IPA folder\nBrowse files" | gum choose)
|
||||
|
||||
if [[ "$METHOD" == "From IPA folder" ]]; then
|
||||
FILE=$(ls "$IPA_DIR"/*.{ipa,tar.bz2} 2>/dev/null | gum choose)
|
||||
else
|
||||
FILE=$(gum file)
|
||||
fi
|
||||
|
||||
[ ! -f "$FILE" ] && gum style --foreground "$ORANGE" "❌ Invalid file." && return
|
||||
|
||||
TMP_DIR=""
|
||||
INSTALL_FILE="$FILE"
|
||||
|
||||
if [[ "$FILE" == *.tar.bz2 ]]; then
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
gum spin --spinner dot --title "Extracting File..." -- \
|
||||
bash -c "tar -xjf \"$FILE\" -C \"$TMP_DIR\" >/dev/null 2>&1"
|
||||
|
||||
INSTALL_FILE=$(find "$TMP_DIR" -name "*.ipa" | head -n 1)
|
||||
|
||||
[ -z "$INSTALL_FILE" ] && gum style --foreground "$ORANGE" "❌ No IPA found." && return
|
||||
fi
|
||||
|
||||
OUTPUT=$(mktemp)
|
||||
|
||||
gum spin --spinner dot --title "Installing app..." -- \
|
||||
bash -c "ideviceinstaller install \"$INSTALL_FILE\" > \"$OUTPUT\" 2>&1"
|
||||
|
||||
if grep -q "Install: Complete" "$OUTPUT"; then
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"✅ Installation successful!"
|
||||
else
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"⚠️ Installation may have failed.\n\n$(tail -n 5 "$OUTPUT")"
|
||||
fi
|
||||
|
||||
rm -f "$OUTPUT"
|
||||
[ -n "$TMP_DIR" ] && rm -rf "$TMP_DIR"
|
||||
}
|
||||
|
||||
ios_uninstall() {
|
||||
check_ios || return
|
||||
|
||||
RAW=$(gum spin --spinner dot --title "Loading apps..." -- \
|
||||
ideviceinstaller list 2>/dev/null)
|
||||
|
||||
APPS=$(echo "$RAW")
|
||||
|
||||
[ -z "$APPS" ] && gum style --foreground "$GREY" "No apps found." && return
|
||||
|
||||
SELECT=$(echo "$APPS" | gum choose)
|
||||
BUNDLE=$(echo "$SELECT" | cut -d',' -f1)
|
||||
|
||||
if gum confirm "Uninstall $BUNDLE?"; then
|
||||
OUT=$(mktemp)
|
||||
|
||||
gum spin --spinner dot --title "Uninstalling..." -- \
|
||||
bash -c "ideviceinstaller uninstall \"$BUNDLE\" > \"$OUT\" 2>&1"
|
||||
|
||||
if grep -q "Complete" "$OUT"; then
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"✅ Uninstall successful!"
|
||||
else
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"⚠️ Uninstall may have failed."
|
||||
fi
|
||||
|
||||
rm -f "$OUT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
android_view_apps() {
|
||||
check_android || return
|
||||
|
||||
APPS=$(gum spin --spinner dot --title "Scanning apps..." -- \
|
||||
adb shell pm list packages --user 0)
|
||||
|
||||
[ -z "$APPS" ] && gum style --foreground "$GREY" "No apps found." || echo "$APPS" | gum pager
|
||||
}
|
||||
|
||||
android_install() {
|
||||
check_android || return
|
||||
|
||||
METHOD=$(printf "From APK folder\nBrowse files" | gum choose)
|
||||
|
||||
if [[ "$METHOD" == "From APK folder" ]]; then
|
||||
FILE=$(ls "$APK_DIR"/*.{apk,tar.bz2} 2>/dev/null | gum choose)
|
||||
else
|
||||
FILE=$(gum file)
|
||||
fi
|
||||
|
||||
[ ! -f "$FILE" ] && gum style --foreground "$ORANGE" "❌ Invalid file." && return
|
||||
|
||||
TMP_DIR=""
|
||||
INSTALL_FILE="$FILE"
|
||||
|
||||
# Handle tar.bz2
|
||||
if [[ "$FILE" == *.tar.bz2 ]]; then
|
||||
TMP_DIR=$(mktemp -d)
|
||||
|
||||
gum spin --spinner dot --title "Extracting File..." -- \
|
||||
bash -c "tar -xjf \"$FILE\" -C \"$TMP_DIR\" >/dev/null 2>&1"
|
||||
|
||||
INSTALL_FILE=$(find "$TMP_DIR" -name "*.apk" | head -n 1)
|
||||
|
||||
if [ -z "$INSTALL_FILE" ]; then
|
||||
gum style --foreground "$ORANGE" "❌ No APK found in archive."
|
||||
rm -rf "$TMP_DIR"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
OUT=$(mktemp)
|
||||
|
||||
gum spin --spinner dot --title "Installing APK..." -- \
|
||||
bash -c "adb install \"$INSTALL_FILE\" > \"$OUT\" 2>&1"
|
||||
|
||||
if grep -q "Success" "$OUT"; then
|
||||
gum style \
|
||||
--foreground "$ORANGE" \
|
||||
--border rounded \
|
||||
--padding "1 2" \
|
||||
"✅ Installation successful!"
|
||||
else
|
||||
gum style \
|
||||
--foreground "$ORANGE" \
|
||||
--border rounded \
|
||||
--padding "1 2" \
|
||||
"⚠️ Install may have failed.\n\n$(tail -n 5 "$OUT")"
|
||||
fi
|
||||
|
||||
rm -f "$OUT"
|
||||
[ -n "$TMP_DIR" ] && rm -rf "$TMP_DIR"
|
||||
}
|
||||
|
||||
android_uninstall() {
|
||||
check_android || return
|
||||
|
||||
METHOD=$(printf "View all\nSearch" | gum choose)
|
||||
|
||||
if [[ "$METHOD" == "Search" ]]; then
|
||||
SEARCH_TERM=$(gum input --placeholder "Search app (e.g., netflix)")
|
||||
[ -z "$SEARCH_TERM" ] && return
|
||||
|
||||
APPS=$(adb shell pm list packages --user 0 | grep -i "$SEARCH_TERM")
|
||||
else
|
||||
APPS=$(adb shell pm list packages --user 0)
|
||||
fi
|
||||
|
||||
[ -z "$APPS" ] && gum style --foreground "$GREY" "No apps found." && return
|
||||
|
||||
SELECT=$(echo "$APPS" | gum choose)
|
||||
|
||||
[ -z "$SELECT" ] && return
|
||||
|
||||
PKG=$(echo "$SELECT" | sed 's/package://')
|
||||
PKG=$(echo "$PKG" | tr -d '\r')
|
||||
|
||||
if gum confirm "Uninstall $PKG?"; then
|
||||
OUT=$(mktemp)
|
||||
|
||||
gum spin --spinner dot --title "Uninstalling..." -- \
|
||||
bash -c "adb shell pm uninstall -k --user 0 \"$PKG\" > \"$OUT\" 2>&1"
|
||||
|
||||
if grep -q "Success" "$OUT"; then
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"✅ Uninstall successful!"
|
||||
else
|
||||
gum style --foreground "$ORANGE" --border rounded --padding "1 2" \
|
||||
"⚠️ Uninstall may have failed.\n\n$(cat "$OUT")"
|
||||
fi
|
||||
|
||||
rm -f "$OUT"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
ios_menu() {
|
||||
while true; do
|
||||
CHOICE=$(printf "View installed apps\nInstall IPA\nUninstall app\nBack" | gum choose)
|
||||
case "$CHOICE" in
|
||||
"View installed apps") ios_view_apps ;;
|
||||
"Install IPA") ios_install ;;
|
||||
"Uninstall app") ios_uninstall ;;
|
||||
"Back") return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
android_menu() {
|
||||
while true; do
|
||||
CHOICE=$(printf "View installed apps\nInstall APK\nUninstall app\nBack" | gum choose)
|
||||
case "$CHOICE" in
|
||||
"View installed apps") android_view_apps ;;
|
||||
"Install APK") android_install ;;
|
||||
"Uninstall app") android_uninstall ;;
|
||||
"Back") return ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
while true; do
|
||||
|
||||
CHOICE=$(printf "iPhone\nAndroid\nExit" | gum choose)
|
||||
|
||||
case "$CHOICE" in
|
||||
"iPhone") ios_menu ;;
|
||||
"Android") android_menu ;;
|
||||
"Exit") clear; exit 0 ;;
|
||||
esac
|
||||
|
||||
done
|
||||
+188
@@ -0,0 +1,188 @@
|
||||
"$schema" = 'https://starship.rs/config-schema.json'
|
||||
|
||||
format = """
|
||||
[](colour)\
|
||||
$os\
|
||||
$username\
|
||||
$hostname\
|
||||
[](bg:grey fg:colour)\
|
||||
$directory\
|
||||
[](bg:colour fg:grey)\
|
||||
$git_branch\
|
||||
$git_status\
|
||||
[](bg:grey fg:colour)\
|
||||
$c\
|
||||
$rust\
|
||||
$golang\
|
||||
$nodejs\
|
||||
$php\
|
||||
$java\
|
||||
$kotlin\
|
||||
$haskell\
|
||||
$python\
|
||||
$conda\
|
||||
$time\
|
||||
[ ](fg:grey)\
|
||||
$cmd_duration\
|
||||
$line_break\
|
||||
$character"""
|
||||
|
||||
palette = 'colour_grey'
|
||||
|
||||
[palettes.colour_grey]
|
||||
colour = "{{PRIMARY_COLOR}}"
|
||||
grey = "#333333" # Dark grey
|
||||
text_on_colour = "#1A1A1A"
|
||||
text_on_grey = "#E0E0E0"
|
||||
|
||||
[os]
|
||||
disabled = false
|
||||
style = "bg:colour fg:text_on_colour"
|
||||
format = "[$symbol ]($style)"
|
||||
|
||||
[os.symbols]
|
||||
Windows = ""
|
||||
Ubuntu = ""
|
||||
SUSE = ""
|
||||
Raspbian = ""
|
||||
Mint = ""
|
||||
Macos = ""
|
||||
Manjaro = ""
|
||||
Linux = ""
|
||||
Gentoo = ""
|
||||
Fedora = ""
|
||||
Alpine = ""
|
||||
Amazon = ""
|
||||
Android = ""
|
||||
AOSC = ""
|
||||
Arch = ""
|
||||
Artix = ""
|
||||
CentOS = ""
|
||||
Debian = ""
|
||||
Redhat = ""
|
||||
RedHatEnterprise = ""
|
||||
|
||||
[username]
|
||||
show_always = true
|
||||
disabled = true
|
||||
style_user = "bg:colour fg:text_on_colour"
|
||||
style_root = "bg:colour fg:text_on_colour"
|
||||
# Hardcoded to "Ash"
|
||||
format = '[Ash ]($style)'
|
||||
|
||||
[hostname]
|
||||
disabled = true
|
||||
ssh_only = false
|
||||
style = "bg:colour fg:text_on_colour"
|
||||
format = "[$hostname ]($style)"
|
||||
|
||||
[directory]
|
||||
style = "bg:grey fg:text_on_grey"
|
||||
format = "[ $path ]($style)"
|
||||
truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
# Swaps the ~ for a home icon
|
||||
home_symbol = " "
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
"Developer" = " "
|
||||
"docker" = " "
|
||||
"Gitea" = " "
|
||||
"Plex" = " "
|
||||
"Videos" = " "
|
||||
|
||||
[git_branch]
|
||||
symbol = ""
|
||||
style = "bg:colour"
|
||||
format = '[[ $symbol $branch ](fg:text_on_colour bg:colour)]($style)'
|
||||
|
||||
[git_status]
|
||||
style = "bg:colour"
|
||||
format = '[[($all_status$ahead_behind )](fg:text_on_colour bg:colour)]($style)'
|
||||
|
||||
[nodejs]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[c]
|
||||
symbol = " "
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[rust]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[golang]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[php]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[java]
|
||||
symbol = " "
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[kotlin]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[haskell]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[python]
|
||||
symbol = ""
|
||||
style = "bg:grey"
|
||||
format = '[[ $symbol( $version)(\(#$virtualenv\)) ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[docker_context]
|
||||
symbol = ""
|
||||
style = "bg:colour"
|
||||
format = '[[ $symbol( $context) ](fg:text_on_colour bg:colour)]($style)'
|
||||
|
||||
[conda]
|
||||
symbol = " "
|
||||
style = "fg:text_on_colour bg:colour"
|
||||
format = '[$symbol$environment ]($style)'
|
||||
ignore_base = false
|
||||
|
||||
[time]
|
||||
disabled = true
|
||||
time_format = "%R"
|
||||
style = "bg:grey"
|
||||
format = '[[ $time ](fg:text_on_grey bg:grey)]($style)'
|
||||
|
||||
[line_break]
|
||||
disabled = true
|
||||
|
||||
[character]
|
||||
disabled = false
|
||||
success_symbol = '[❯](bold fg:colour)'
|
||||
error_symbol = '[❯](bold fg:grey)'
|
||||
vimcmd_symbol = '[❮](bold fg:colour)'
|
||||
vimcmd_replace_one_symbol = '[❮](bold fg:grey)'
|
||||
vimcmd_replace_symbol = '[❮](bold fg:grey)'
|
||||
vimcmd_visual_symbol = '[❮](bold fg:colour)'
|
||||
|
||||
[cmd_duration]
|
||||
show_milliseconds = true
|
||||
format = " in $duration "
|
||||
# Removed background so it floats cleanly outside the powerline block
|
||||
style = "fg:colour"
|
||||
disabled = false
|
||||
show_notifications = true
|
||||
min_time_to_notify = 45000
|
||||
Reference in New Issue
Block a user