Code cleanup and better MacOS support
This commit is contained in:
40
README.md
40
README.md
@@ -1,27 +1,39 @@
|
|||||||
# Trude's Dotfiles for GNOME
|
# Trude's Dotfiles for GNOME
|
||||||
|
|
||||||
**Run `./install.sh`.**
|
**Run `./linux.sh` or `./macos.sh`.**
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
- Gnome Console / Terminal (kgx; For some scripts only.)
|
|
||||||
- Gnome Desktop
|
### Linux
|
||||||
- Arch or Debian-based distro.
|
|
||||||
|
- Gnome Console / Terminal (kgx; For some scripts only.)
|
||||||
|
- Gnome Desktop
|
||||||
|
- Arch or Debian-based distro.
|
||||||
|
|
||||||
|
### MacOS
|
||||||
|
|
||||||
|
- None
|
||||||
|
|
||||||
## Scripts
|
## Scripts
|
||||||
|
|
||||||
### Custom bash commands
|
### Custom bash commands
|
||||||
- `p` - Cross-distro package manager wrapper.
|
|
||||||
- `m` - Cross-distro maintenance script.
|
- `p` - Cross-distro package manager wrapper.
|
||||||
|
- `m` - Cross-distro maintenance script.
|
||||||
|
|
||||||
### Custom scripts used by other programs
|
### Custom scripts used by other programs
|
||||||
- `p.sh` - For managing packages.
|
|
||||||
- `colors.sh` - To Add colors to other scripts.
|
- `p.sh` - For managing packages.
|
||||||
|
- `colors.sh` - To Add colors to other scripts.
|
||||||
|
|
||||||
### Scripts for the user
|
### Scripts for the user
|
||||||
- `ai-ollama-code.sh` - Ollama AI setup helper for code generation.
|
|
||||||
- `ai-jan-general.sh` - Install jan, a graphical llm runner.
|
- `ai-ollama-code.sh` - Ollama AI setup helper for code generation.
|
||||||
|
- `ai-jan-general.sh` - Install jan, a graphical llm runner.
|
||||||
|
|
||||||
## Todo
|
## Todo
|
||||||
- [ ] Automatically install extensions
|
|
||||||
- Vitals
|
- [ ] Automatically install extensions
|
||||||
- Dash to Dock
|
- Vitals
|
||||||
- AppIndicator Support
|
- Dash to Dock
|
||||||
|
- AppIndicator Support
|
||||||
|
|||||||
1
homeConfigs/.bash_profile
Normal file
1
homeConfigs/.bash_profile
Normal file
@@ -0,0 +1 @@
|
|||||||
|
PATH="/usr/local/bin:$PATH"
|
||||||
1
homeConfigs/.zprofile
Normal file
1
homeConfigs/.zprofile
Normal file
@@ -0,0 +1 @@
|
|||||||
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
4
homeConfigs/.zshrc
Normal file
4
homeConfigs/.zshrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
source ~/dotfiles/scripts/p.sh
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
36
macos.sh
Normal file → Executable file
36
macos.sh
Normal file → Executable file
@@ -1,12 +1,36 @@
|
|||||||
#! /bin/bash
|
#! /bin/zsh
|
||||||
|
|
||||||
|
source ./scripts/p.sh
|
||||||
|
source ./scripts/color.sh
|
||||||
|
|
||||||
|
dist=$(d)
|
||||||
|
|
||||||
|
if [ $dist != 3 ]; then
|
||||||
|
echo -e "${RED}[E] Run linux.sh for Linux instead.${ENDCOLOR}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ask Y/n
|
||||||
|
function ask() {
|
||||||
|
read -p "$1 (Y/n): " resp
|
||||||
|
if [ -z "$resp" ]; then
|
||||||
|
response_lc="y" # empty is Yes
|
||||||
|
else
|
||||||
|
response_lc=$(echo "$resp" | tr '[:upper:]' '[:lower:]') # case insensitive
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ "$response_lc" = "y" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copy configs
|
||||||
|
echo -e "${GREEN}[+] Configuring system...${ENDCOLOR}"
|
||||||
|
cp -rf homeConfigs/.* ~
|
||||||
|
|
||||||
# Install brew
|
# Install brew
|
||||||
|
echo -e "${GREEN}[+] Installing homebrew...${ENDCOLOR}"
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
# Add brew to path
|
# Enable brew
|
||||||
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') > /Users/trude/.zprofile
|
|
||||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||||
echo 'PATH="/usr/local/bin:$PATH"' > ~/.bash_profile
|
|
||||||
|
|
||||||
# Install VScode
|
echo -e "${GREEN}${BOLD}[i] All done.${ENDCOLOR}"
|
||||||
brew install visual-studio-code
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
source ./p.sh
|
|
||||||
if p c jan &>/dev/null; then
|
|
||||||
echo "Jan is installed. Launch it from the app menu."
|
|
||||||
else
|
|
||||||
p i jan
|
|
||||||
fi
|
|
||||||
Reference in New Issue
Block a user