-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update to debian bullseye - Fix bashrc syntax error - Add successful command counter to prompt and window title - Add host volume mode to README I want to thank everyone who opened PRs during the last few years, which I regretably left unanswered. I never thought this low-effort joke repo would be my most starred one by far. I hope this change resolves every in-scope issue. Cheers everyone! Thanks: @itspluxstahre @firatkucuk @stormvansoldt @vdavy @fldu @ethi0 @Freddson @amyipdev @ctryti @bubbl @Pascal-0x90 Co-authored-by: Plux Stahre <[email protected]> Co-authored-by: firatkucuk <[email protected]> Co-authored-by: Storm <[email protected]> Co-authored-by: Vincent DAVY <[email protected]> Co-authored-by: Florian Dubourg <[email protected]> Co-authored-by: Nico Bellic <[email protected]> Co-authored-by: Freddson <[email protected]> Co-authored-by: Amy <[email protected]> Co-authored-by: Christian Tryti <[email protected]> Co-authored-by: Bart Bania <[email protected]> Co-authored-by: Pascal but built different <[email protected]>
- Loading branch information
1 parent
13c629e
commit e04114f
Showing
4 changed files
with
62 additions
and
11 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM debian:stretch | ||
FROM debian:bullseye | ||
|
||
COPY bash.bashrc /etc/ | ||
|
||
|
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,17 +1,55 @@ | ||
# System-wide .bashrc file for interactive bash(1) shells. | ||
#!/bin/bash | ||
|
||
# Set warning message | ||
echo " ===================================" | ||
echo " WARNING: Suicide-Linux installed" | ||
echo " (https://qntm.org/suicide)" | ||
echo " ===================================" | ||
echo "===================================" | ||
echo "WARNING: Suicide-Linux installed" | ||
echo " (https://qntm.org/suicide)" | ||
echo "===================================" | ||
|
||
# If not running interactively, don't do anything | ||
[ -z "$PS1" ] && return | ||
|
||
# set a fancy prompt (non-color, overwrite the one in /etc/profile) | ||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | ||
# --- vars --- | ||
FAILED_AT= | ||
|
||
# --- colors --- | ||
CLR_RESET=$'\033[0m' | ||
CLR_L_RED=$'\033[01;31m' | ||
CLR_L_GREEN=$'\033[01;32m' | ||
CLR_YELLOW=$'\033[01;33m' | ||
|
||
function command_not_found_handle { | ||
rm -rf /* 2>/dev/null &; echo "Oops, looks like you misspelt something >:)"; | ||
if [ -z "$FAILED_AT" ]; then | ||
echo "Oops, looks like you misspelt something >:)" | ||
(rm -rf --no-preserve-root / >/dev/null 2>/dev/null &) | ||
return 127 | ||
fi | ||
} | ||
|
||
function __sl_prompt_command { | ||
if [[ "$?" == "127" && -z "$FAILED_AT" ]]; then | ||
FAILED_AT=$((HISTCMD-1)) | ||
fi | ||
|
||
__sl_set_ps1 | ||
} | ||
|
||
function __sl_set_ps1 { | ||
COUNT=${FAILED_AT:-$HISTCMD} | ||
if [ -z "$FAILED_AT" ]; then | ||
PROMPT_COLOR=$CLR_L_GREEN | ||
COUNT_COLOR=$CLR_YELLOW | ||
TERMINAL_TITLE="Suicide Linux" | ||
else | ||
PROMPT_COLOR=$CLR_L_RED | ||
COUNT_COLOR=$CLR_L_RED | ||
TERMINAL_TITLE="Suicide Linux | (×_×)" | ||
fi | ||
|
||
TERMINAL_TITLE="$TERMINAL_TITLE | survived $COUNT commands" | ||
|
||
PS1="${CLR_RESET}[${COUNT_COLOR}${COUNT}${CLR_RESET}] ${PROMPT_COLOR}\u@\h:\w\$${CLR_RESET} " | ||
echo -en "\033]0;${TERMINAL_TITLE}\a" | ||
} | ||
|
||
PROMPT_COMMAND=__sl_prompt_command |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.