Skip to content

chore(colors): embed colors.sh and adjust sourcing for runtime scripts #463

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/modules/Browser/Extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

# Useful Extensions for Chromium or Firefox based browsers.

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
BOLD='\033[1m'
NC='\033[0m'
clear

source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Desktop/Dunst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

# Configures Dunst, a lightweight and customizable notification daemon, with optimized settings for a sleek and unobtrusive experience.

BLUE="\e[34m"
RESET="\e[0m"
RED="\e[31m"
GREEN="\e[32m"
YELLOW='\033[33m'
CYAN='\033[36m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
6 changes: 1 addition & 5 deletions src/modules/Desktop/Dwm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

RC='\033[0m'
RED='\033[31m'
YELLOW='\033[33m'
CYAN='\033[36m'
GREEN='\033[32m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

print_message() {
local color="$1"
Expand Down
9 changes: 3 additions & 6 deletions src/modules/Desktop/Hyprland.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

# Installs the Hyprland compositor along with pre-configured dotfiles for a streamlined setup.

BLUE='\033[0;34m'
YELLOW='\033[0;33m'
RED='\033[0;31m'
RESET='\033[0m'
YELLOW='\033[33m'
CYAN='\033[36m'
clear

source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

if ! command -v fzf &> /dev/null; then
echo -e "${RED}${BOLD}Error: fzf is not installed${NC}"
Expand Down
8 changes: 2 additions & 6 deletions src/modules/Desktop/Picom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,9 @@

clear

source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

aur_helper=""
GREEN="\e[32m"
RED="\e[31m"
BLUE="\e[34m"
YELLOW="\e[33m"
CYAN='\033[36m'
ENDCOLOR="\e[0m"

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Desktop/Rofi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN='\033[0;32m'
CYAN='\033[0;36m'
NC='\033[0m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

if ! command -v fzf &> /dev/null; then
echo -e "${RED}${BOLD}Error: fzf is not installed${NC}"
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Desktop/SwayWM.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\033[1;32m"
RED="\033[1;31m"
YELLOW="\033[1;33m"
BLUE="\033[1;34m"
CYAN="\033[1;36m"
NC="\033[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

print_message() {
echo -e "${1}${2}${NC}"
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Desktop/Themes-Icons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN='\033[0;32m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
YELLOW='\033[0;33m'
RED='\033[31m'
RESET='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
6 changes: 1 addition & 5 deletions src/modules/Desktop/Wallpapers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

GREEN='\033[0;32m'
RED="\e[31m"
YELLOW='\033[33m'
CYAN='\033[0;36m'
NC='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
8 changes: 1 addition & 7 deletions src/modules/Desktop/i3wm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@

clear

GREEN="\e[32m"
RED="\e[31m"
YELLOW="\e[33m"
BLUE="\e[34m"
CYAN="\e[36m"
ENDCOLOR="\e[0m"
RESET="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

BACKUP_DIR="$HOME/.i3wmdotfiles/backup"
DOTFILES_REPO="https://github.com/harilvfs/i3wmdotfiles"
Expand Down
6 changes: 1 addition & 5 deletions src/modules/Development/Bun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[36m'
RESET='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
6 changes: 1 addition & 5 deletions src/modules/Development/Helix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

RED="\033[1;31m"
YELLOW='\033[33m'
GREEN="\033[1;32m"
CYAN="\033[1;36m"
RESET="\033[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Development/Neovim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\e[32m"
RED="\e[31m"
BLUE="\e[34m"
YELLOW="\e[33m"
CYAN='\033[36m'
RESET="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

if ! command -v fzf &> /dev/null; then
echo -e "${RED}${BOLD}Error: fzf is not installed${NC}"
Expand Down
7 changes: 1 addition & 6 deletions src/modules/Development/Npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

RED="\e[31m"
GREEN="\e[32m"
YELLOW="\e[33m"
BLUE="\e[34m"
CYAN='\033[36m'
RESET="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

if ! command -v fzf &> /dev/null; then
echo -e "${RED}${BOLD}Error: fzf is not installed${NC}"
Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/Audio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\e[32m"
YELLOW='\033[33m'
BLUE="\e[34m"
RED="\e[31m"
CYAN="\e[36m"
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
8 changes: 2 additions & 6 deletions src/modules/System/Aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
NC='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

detect_distro() {
if command -v pacman &> /dev/null; then
Expand Down Expand Up @@ -40,7 +36,7 @@ if ! command -v fzf &> /dev/null || ! command -v git &> /dev/null || ! command -
if ! command -v make &> /dev/null; then
echo -e "${YELLOW}- make is not installed.${NC}"
echo -e "${CYAN} • Fedora: ${NC}sudo dnf install make"
echo -e "${CYAN} • Arch Linux: ${NC}sudo pacman -S base-devel"
echo -e "${CYAN} • Arch Linux: ${NC}sudo pacman -S base-devel make"
fi

if ! command -v less &> /dev/null; then
Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/Bluetooth.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\e[32m"
YELLOW='\033[33m'
BLUE="\e[34m"
RED="\e[31m"
CYAN="\e[36m"
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
9 changes: 2 additions & 7 deletions src/modules/System/Brightness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@

# Script to set the brightness level to your preference using brightnessctl.

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'

clear

source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

check_brightnessctl() {
if ! command -v brightnessctl &> /dev/null; then
echo -e "${RED}brightnessctl is not installed!${NC}"
Expand Down
5 changes: 1 addition & 4 deletions src/modules/System/Chaotic-Aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

clear

GREEN="\e[32m"
RED="\e[31m"
MAGENTA="\e[35m"
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

info() { echo -e "${MAGENTA}$1${ENDCOLOR}"; }
success() { echo -e "${GREEN}$1${ENDCOLOR}"; }
Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/Fastfetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN='\033[0;32m'
RED='\033[0;31m'
CYAN='\033[0;36m'
NC='\033[0m'
BLUE="\e[34m"
YELLOW="\e[33m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

if ! command -v fzf &> /dev/null; then
echo -e "${RED}${BOLD}Error: fzf is not installed${NC}"
Expand Down
6 changes: 1 addition & 5 deletions src/modules/System/Fonts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

GREEN='\033[0;32m'
RED='\033[0;31m'
CYAN='\033[0;36m'
NC='\033[0m'
YELLOW="\e[33m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FONTS_DIR="$HOME/.fonts"

Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/Grub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\e[32m"
BLUE="\e[34m"
YELLOW='\033[33m'
CYAN='\033[36m'
RED="\e[31m"
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

GRUB_THEME_DIR="$HOME/.local/share/Top-5-Bootloader-Themes"

Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/LTS-Kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

GREEN="\e[32m"
YELLOW='\033[33m'
RED="\e[31m"
BLUE="\e[34m"
CYAN="\e[36m"
ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
6 changes: 1 addition & 5 deletions src/modules/System/Packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

# Installs a curated selection of essential packages to establish a fully functional environment.

RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
CYAN='\033[36m'
RESET='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
7 changes: 1 addition & 6 deletions src/modules/System/Sddm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@

clear

export RED="\e[31m"
export GREEN="\e[32m"
export YELLOW="\033[33m"
export BLUE="\e[34m"
export CYAN="\033[36m"
export ENDCOLOR="\e[0m"
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
6 changes: 1 addition & 5 deletions src/modules/Terminal/Alacritty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@

clear

GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
CYAN='\033[0;36m'
RESET='\033[0m'
source "$(dirname "$0")/../colors.sh" >/dev/null 2>&1

FZF_COMMON="--layout=reverse \
--border=bold \
Expand Down
Loading