Hyprland-dotfiles/scripts/figlet.sh

33 lines
740 B
Bash
Raw Normal View History

2023-03-19 12:58:09 -04:00
#!/bin/bash
2023-11-10 16:12:15 -05:00
cat <<"EOF"
_____ _ _ _
| ___(_) __ _| | ___| |_
| |_ | |/ _` | |/ _ \ __|
| _| | | (_| | | __/ |_
|_| |_|\__, |_|\___|\__|
|___/
EOF
2023-03-19 12:58:09 -04:00
# -----------------------------------------------------
# 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
2023-11-10 16:12:15 -05:00
if [ -f ~/figlet.txt ]; then
touch ~/figlet.txt
fi
echo "cat <<\"EOF\"" > ~/figlet.txt
figlet "$mytext" >> ~/figlet.txt
2023-03-19 12:58:09 -04:00
echo "" >> ~/figlet.txt
2023-11-10 16:12:15 -05:00
echo "EOF" >> ~/figlet.txt
2023-10-02 04:17:11 -04:00
lines=$( cat ~/figlet.txt )
wl-copy "$lines"
2023-03-19 12:58:09 -04:00
xclip -sel clip ~/figlet.txt
echo "Text copied to clipboard!"