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
|
source $HOME/dotfiles/bin/helpers/functions.sh
|
||||||
|
|
||||||
# Print logo
|
# Print logo
|
||||||
echo "Menno's Dotfiles" | figlet | lolcat
|
logo
|
||||||
|
|
||||||
# Print help
|
# Print help
|
||||||
cat $HOME/dotfiles/bin/resources/help.txt
|
cat $HOME/dotfiles/bin/resources/help.txt
|
||||||
|
@ -17,9 +17,13 @@ is_wsl() {
|
|||||||
logo() {
|
logo() {
|
||||||
echo "Menno's Dotfiles" | figlet | lolcat
|
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
|
# 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 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" "red" "[$(git -C ~/dotfiles status --porcelain | grep -c '^??')] untracked "
|
||||||
printfe "%s" "yellow" "[$(git -C ~/dotfiles status --porcelain | grep -c '^ M')] modified "
|
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" "green" "[$(git -C ~/dotfiles status --porcelain | grep -c '^M ')] staged "
|
||||||
@ -29,6 +33,7 @@ logo() {
|
|||||||
if [[ $(git -C ~/dotfiles log origin/master..HEAD) ]]; then
|
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" "yellow" "[!] You have $(git -C ~/dotfiles log origin/master..HEAD --oneline | wc -l | tr -d ' ') commit(s) to push"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
println "" "normal"
|
println "" "normal"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,9 @@
|
|||||||
|
|
||||||
All [] are optional parameters. And all <> are required parameters.
|
Usage: dotf [OPTIONS] [ARGS]
|
||||||
Usage: dotf [options] [optional parameters]
|
|
||||||
|
|
||||||
update: Pull latest changes, and update symlinks and configurations.
|
update: Pull latest changes, and update symlinks and configurations.
|
||||||
status: Show the status of the dotfiles repository.
|
|
||||||
secrets: Encrypt and decrypt secrets.
|
secrets: Encrypt and decrypt secrets.
|
||||||
auto-start: Runs various programs for easy startup in case GNOME doesn't properly auto-start them.
|
auto-start: Start a set of pre-defined applications.
|
||||||
term: Shows the welcome message for the terminal and the current dotfiles git status.
|
term: Shows the welcome message for the terminal.
|
||||||
help: Shows this help message
|
help: Shows this help message
|
||||||
|
|
Reference in New Issue
Block a user