-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9e94f6
commit f09f956
Showing
20 changed files
with
69 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function auto-ls-custom_function() { | ||
echo -e "\nauto-ls-custom_function:\n" | ||
exa -GxFa --icons --group-directories-first --no-filesize --no-user | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,6 @@ function caller() { | |
fi | ||
done | ||
|
||
printf "${_stack}${_reset_color}" | ||
printf " ${_stack}${_reset_color}" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function chmod_reset() { | ||
[ -z "$1" ] && echo "path is required" && \ | ||
return 1 || \ | ||
log start "resetting permissions on '$1'... " | ||
# shell_debug_relay=$SHELL_DEBUG | ||
# SHELL_DEBUG=true | ||
|
||
/usr/bin/sudo chown -R "$USER:$USER" "$1" | ||
/usr/bin/sudo chmod -R 644 "$1" | ||
/usr/bin/sudo find "$1" -type d -exec chmod +x {} \; | ||
$SHELL_DEBUG && set -x | ||
|
||
sudo chmod -cR 600 $1 | ||
sudo chmod -R u+X $1 | ||
sudo chown -cR $USER:$USER $1 | ||
|
||
patterns=( | ||
"*.AppImage" | ||
"*.py" | ||
"*.sh" | ||
"setup" | ||
"start" | ||
"install" | ||
"pre-install" | ||
"/bin/" | ||
"install-pristine" | ||
"install" | ||
"post-install" | ||
"post-setup" | ||
"pre-install" | ||
"pre-setup" | ||
"setup" | ||
"start" | ||
) | ||
for p in "${patterns[@]}"; do | ||
find "$1" -name "$p" -exec chmod +x {} \; | ||
sudo find "$1" -name "$p" -exec sudo chmod u+x {} \; | ||
done | ||
|
||
echo "done" | ||
# SHELL_DEBUG=$shell_debug_relay | ||
$SHELL_DEBUG && set +x | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function emoji_random () { | ||
function emoji_random() { | ||
local SELECTED_EMOJIS=( | ||
💩 | ||
🐦 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
#!/usr/bin/env zsh | ||
|
||
# shellcheck source=/dev/null | ||
. "${DOTFILES}/zsh/init/20_colors.zsh" | ||
|
||
function log() { | ||
level=$1 | ||
|
||
silenced_levels=("debug" "start" "finish") | ||
|
||
if ! $SHELL_DEBUG; then | ||
if [[ ${silenced_levels[@]} =~ $level ]]; then | ||
return | ||
fi | ||
fi | ||
|
||
shift | ||
. "${DOTFILES}/zsh/functions/log_debug" | ||
. "${DOTFILES}/zsh/functions/log_echo" | ||
. "${DOTFILES}/zsh/functions/log_error" | ||
. "${DOTFILES}/zsh/functions/log_finish" | ||
. "${DOTFILES}/zsh/functions/log_info" | ||
. "${DOTFILES}/zsh/functions/log_is_command_success" | ||
. "${DOTFILES}/zsh/functions/log_start" | ||
. "${DOTFILES}/zsh/functions/log_warn" | ||
|
||
. "${DOTFILES}/zsh/functions/caller" | ||
|
||
eval "log_$level '$@'" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_debug() { | ||
log_echo "🐞" "${GREY}" "$@" | ||
log_echo "🐞 ${GREY} $@ ${NC}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_error() { | ||
log_echo "💣" "$RED" "$@" | ||
log_echo "💣 ${RED} $@ ${NC}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_finish() { | ||
log_echo "🛑" "$PURPLE" "$@" "was finished ⏱️ $(date +"%H:%M:%S.%3N")" | ||
log_echo "🛑 $@ was finished at $(date +"%H:%M:%S.%3N") ⏱️ " | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_info() { | ||
log_echo "💬" "$CYAN" "$@" | ||
log_echo "💬 ${CYAN} $@ ${NC}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_start() { | ||
log_echo "🚦" "$PURPLE" "starting $@... ⏱️ $(date +"%H:%M:%S.%3N")" | ||
log_echo " 🚦 starting $@ at $(date +"%H:%M:%S.%3N") ⏱️ " | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function log_warn() { | ||
log_echo "🚧" "$YELLOW" "$@" | ||
log_echo "🚧 ${YELLOW} $@ ${NC}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
#!/usr/bin/env zsh | ||
|
||
function zsh_plugins_load() { | ||
echo "zsh_plugins_load is DEPRECATED, using zplug" | ||
return | ||
|
||
log start "zsh_plugins_load()" | ||
|
||
plugins_path="${ZSH_CUSTOM}/plugins" | ||
|
||
find "$plugins_path" -mindepth 3 -maxdepth 3 -name "*.plugin.zsh" | while read -r item; do | ||
log_debug $item | ||
log debug $item | ||
. "$item" | ||
done | ||
} |