mirror of
https://git.davidovski.xyz/dot.git
synced 2024-08-15 00:43:28 +00:00
initial commit
This commit is contained in:
commit
01ced0b7ce
184 changed files with 35358 additions and 0 deletions
17
scripts/centered
Executable file
17
scripts/centered
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
read title
|
||||
clear
|
||||
columns=$(tput cols)
|
||||
rows=$(tput lines)
|
||||
tput clear
|
||||
y=$((($columns-$(echo -n $title | head -1 | wc -c))/2))
|
||||
x=$((($rows-$(echo $title | wc -l))/2))
|
||||
|
||||
while read p; do
|
||||
tput cup $x $y
|
||||
echo "$p"
|
||||
x=$((x+1))
|
||||
|
||||
done <<< "$title";
|
||||
|
||||
tput cup $rows 0
|
Loading…
Add table
Add a link
Reference in a new issue