refactor: update dotfiles paths and remove obsolete configurations
Some checks failed
Nix Format Check / check-format (push) Failing after 40s
Some checks failed
Nix Format Check / check-format (push) Failing after 40s
This commit is contained in:
@ -1,55 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
|
||||
ensure_flatpak_packages_installed() {
|
||||
flatpak_packages=($(ls $HOME/dotfiles/config/flatpaks/ | sed 's/.flatpakref//g'))
|
||||
|
||||
for package in "${flatpak_packages[@]}"; do
|
||||
if ! flatpak list | grep -q $package; then
|
||||
printfe "%s\n" "cyan" " - Installing $package..."
|
||||
flatpak install -y flathub $package
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
printfe "%s\n" "green" " - $package installed successfully"
|
||||
else
|
||||
printfe "%s\n" "red" " - $package failed to install"
|
||||
fi
|
||||
else
|
||||
printfe "%s\n" "green" " - $package is already installed"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
print_flatpak_status() {
|
||||
if is_wsl; then
|
||||
printfe "%s\n" "yellow" "Running in WSL, skipping Flatpak packages check."
|
||||
return
|
||||
fi
|
||||
|
||||
printfe "%s" "cyan" "Checking Flatpak packages..."
|
||||
clear_line
|
||||
|
||||
flatpak_packages=($(ls $HOME/dotfiles/config/flatpaks/ | sed 's/.flatpakref//g'))
|
||||
|
||||
count=$(echo $flatpak_packages | wc -w)
|
||||
installed=0
|
||||
|
||||
for package in "${flatpak_packages[@]}"; do
|
||||
if flatpak list | grep -q $package; then
|
||||
installed=$((installed + 1))
|
||||
else
|
||||
if [ "$verbose" = true ]; then
|
||||
printfe "%s\n" "red" "$package is not installed"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
printfe "%s" "cyan" "Flatpak"
|
||||
if [ $installed -eq $count ]; then
|
||||
printfe "%s" "green" " $installed/$count "
|
||||
else
|
||||
printfe "%s" "red" " $installed/$count "
|
||||
fi
|
||||
printfe "%s\n" "cyan" "packages installed"
|
||||
}
|
@ -22,16 +22,16 @@ logo() {
|
||||
fi
|
||||
|
||||
# Print if repo is dirty and the count of untracked files, modified files and staged files
|
||||
if [[ $(git -C ~/dotfiles status --porcelain) ]]; then
|
||||
if [[ $(git -C $DOTFILES_PATH status --porcelain) ]]; then
|
||||
printfe "%s" "yellow" "dotfiles is dirty "
|
||||
printfe "%s" "red" "[$(git -C ~/dotfiles status --porcelain | grep -c '^??')] untracked "
|
||||
printfe "%s" "yellow" "[$(git -C ~/dotfiles status --porcelain | grep -c '^ M')] modified "
|
||||
printfe "%s" "green" "[$(git -C ~/dotfiles status --porcelain | grep -c '^M ')] staged "
|
||||
printfe "%s" "red" "[$(git -C $DOTFILES_PATH status --porcelain | grep -c '^??')] untracked "
|
||||
printfe "%s" "yellow" "[$(git -C $DOTFILES_PATH status --porcelain | grep -c '^ M')] modified "
|
||||
printfe "%s" "green" "[$(git -C $DOTFILES_PATH status --porcelain | grep -c '^M ')] staged "
|
||||
fi
|
||||
|
||||
printfe "%s" "blue" "[$(git -C ~/dotfiles rev-parse --short HEAD)] "
|
||||
if [[ $(git -C ~/dotfiles log origin/master..HEAD) ]]; then
|
||||
printfe "%s" "yellow" "[!] You have $(git -C ~/dotfiles log origin/master..HEAD --oneline | wc -l | tr -d ' ') commit(s) to push"
|
||||
printfe "%s" "blue" "[$(git -C $DOTFILES_PATH rev-parse --short HEAD)] "
|
||||
if [[ $(git -C $DOTFILES_PATH log origin/master..HEAD) ]]; then
|
||||
printfe "%s" "yellow" "[!] You have $(git -C $DOTFILES_PATH log origin/master..HEAD --oneline | wc -l | tr -d ' ') commit(s) to push"
|
||||
fi
|
||||
|
||||
println "" "normal"
|
||||
|
Reference in New Issue
Block a user