refactors help.sh and functions.sh for improved logo display and adds trash notification; updates help.txt for clarity
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||
|
||||
# Print logo
|
||||
echo "Menno's Dotfiles" | figlet | lolcat
|
||||
logo
|
||||
|
||||
# Print help
|
||||
cat $HOME/dotfiles/bin/resources/help.txt
|
||||
|
@ -17,9 +17,13 @@ is_wsl() {
|
||||
logo() {
|
||||
echo "Menno's Dotfiles" | figlet | lolcat
|
||||
|
||||
if [[ $(trash-list | wc -l) -gt 0 ]]; then
|
||||
printfe "%s" "yellow" "[!] $(trash-list | wc -l | tr -d ' ') file(s) in trash - "
|
||||
fi
|
||||
|
||||
# Print if repo is dirty and the count of untracked files, modified files and staged files
|
||||
if [[ $(git -C ~/dotfiles status --porcelain) ]]; then
|
||||
printfe "%s" "yellow" "dotfiles repo is dirty "
|
||||
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 "
|
||||
@ -29,6 +33,7 @@ logo() {
|
||||
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"
|
||||
fi
|
||||
|
||||
println "" "normal"
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
|
||||
All [] are optional parameters. And all <> are required parameters.
|
||||
Usage: dotf [options] [optional parameters]
|
||||
Usage: dotf [OPTIONS] [ARGS]
|
||||
|
||||
update: Pull latest changes, and update symlinks and configurations.
|
||||
status: Show the status of the dotfiles repository.
|
||||
secrets: Encrypt and decrypt secrets.
|
||||
auto-start: Runs various programs for easy startup in case GNOME doesn't properly auto-start them.
|
||||
term: Shows the welcome message for the terminal and the current dotfiles git status.
|
||||
auto-start: Start a set of pre-defined applications.
|
||||
term: Shows the welcome message for the terminal.
|
||||
help: Shows this help message
|
||||
|
Reference in New Issue
Block a user