add build script
This commit is contained in:
commit
e9bdeae0b7
7 changed files with 141 additions and 15 deletions
7
rootfs/usr/share/parchlinux/zsh/functions/coin.zsh
Normal file
7
rootfs/usr/share/parchlinux/zsh/functions/coin.zsh
Normal file
|
@ -0,0 +1,7 @@
|
|||
function flip-coin() {
|
||||
if (( RANDOM % 2 == 0 )); then
|
||||
echo "🪙 Heads!"
|
||||
else
|
||||
echo "🪙 Tails!"
|
||||
fi
|
||||
}
|
5
rootfs/usr/share/parchlinux/zsh/functions/dice.zsh
Normal file
5
rootfs/usr/share/parchlinux/zsh/functions/dice.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
function dice() {
|
||||
local sides="${1:-6}" # Default to a 6-sided die
|
||||
echo "🎲 Rolling a ${sides}-sided die..."
|
||||
echo "You got: $((RANDOM % sides + 1))"
|
||||
}
|
8
rootfs/usr/share/parchlinux/zsh/functions/fireworks.zsh
Normal file
8
rootfs/usr/share/parchlinux/zsh/functions/fireworks.zsh
Normal file
|
@ -0,0 +1,8 @@
|
|||
function fireworks() {
|
||||
if ! command -v lolcat &>/dev/null || ! command -v pv &>/dev/null; then
|
||||
echo "Install 'lolcat' and 'pv' to use this function: sudo pacman -S lolcat pv"
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "🎆🎇 BOOM! 🎆🎇" | pv -qL 10 | lolcat
|
||||
}
|
4
rootfs/usr/share/parchlinux/zsh/functions/genpass.zsh
Normal file
4
rootfs/usr/share/parchlinux/zsh/functions/genpass.zsh
Normal file
|
@ -0,0 +1,4 @@
|
|||
function genpass() {
|
||||
local length="${1:-16}"
|
||||
tr -dc 'A-Za-z0-9!@#$%^&*()_+-=' </dev/urandom | head -c "$length" ; echo
|
||||
}
|
12
rootfs/usr/share/parchlinux/zsh/functions/typewriter.zsh
Normal file
12
rootfs/usr/share/parchlinux/zsh/functions/typewriter.zsh
Normal file
|
@ -0,0 +1,12 @@
|
|||
function typewriter() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: typewriter <text>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
for ((i=0; i<${#1}; i++)); do
|
||||
echo -n "${1:i:1}"
|
||||
sleep 0.05
|
||||
done
|
||||
echo
|
||||
}
|
18
rootfs/usr/share/parchlinux/zsh/functions/weather.zsh
Normal file
18
rootfs/usr/share/parchlinux/zsh/functions/weather.zsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
function weather() {
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: weather <city>"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local weather
|
||||
weather=$(curl -s "wttr.in/$1?format=%C")
|
||||
|
||||
case "$weather" in
|
||||
*Clear*) echo "☀️ It's sunny in $1!" ;;
|
||||
*Cloud*) echo "☁️ It's cloudy in $1!" ;;
|
||||
*Rain*) echo "🌧️ It's raining in $1!" ;;
|
||||
*Snow*) echo "❄️ It's snowing in $1!" ;;
|
||||
*Storm*) echo "⛈️ There's a storm in $1!" ;;
|
||||
*) echo "🌦️ The weather in $1 is: $weather" ;;
|
||||
esac
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue