Dev
This commit is contained in:
+19
-12
@@ -1,23 +1,30 @@
|
||||
#!/bin/bash
|
||||
# _____ _ _ _
|
||||
# | ___(_) __ _| | ___| |_
|
||||
# | |_ | |/ _` | |/ _ \ __|
|
||||
# | _| | | (_| | | __/ |_
|
||||
# |_| |_|\__, |_|\___|\__|
|
||||
# |___/
|
||||
#
|
||||
# by Stephan Raabe (2023)
|
||||
cat <<"EOF"
|
||||
_____ _ _ _
|
||||
| ___(_) __ _| | ___| |_
|
||||
| |_ | |/ _` | |/ _ \ __|
|
||||
| _| | | (_| | | __/ |_
|
||||
|_| |_|\__, |_|\___|\__|
|
||||
|___/
|
||||
|
||||
EOF
|
||||
|
||||
# -----------------------------------------------------
|
||||
# Script to create ascii font based header on user input
|
||||
# and copy the result to the clipboard
|
||||
# -----------------------------------------------------
|
||||
|
||||
read -p "Enter the text for ascii encoding: " mytext
|
||||
figlet "$mytext" > ~/figlet.txt
|
||||
|
||||
if [ -f ~/figlet.txt ]; then
|
||||
touch ~/figlet.txt
|
||||
fi
|
||||
|
||||
echo "cat <<\"EOF\"" > ~/figlet.txt
|
||||
figlet "$mytext" >> ~/figlet.txt
|
||||
echo "" >> ~/figlet.txt
|
||||
echo "by Stephan Raabe (2023)" >> ~/figlet.txt
|
||||
echo "-----------------------------------------------------" >> ~/figlet.txt
|
||||
sed -i 's/^/# /; s/$/ /' ~/figlet.txt
|
||||
echo "EOF" >> ~/figlet.txt
|
||||
|
||||
lines=$( cat ~/figlet.txt )
|
||||
wl-copy "$lines"
|
||||
xclip -sel clip ~/figlet.txt
|
||||
|
||||
Reference in New Issue
Block a user