You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
41 lines
1.0 KiB
6 years ago
|
#!/usr/bin/env sh
|
||
|
|
||
|
function format0to9 {
|
||
|
cat - |
|
||
|
sed -E '/\$mod(\+Shift)?\+[1-9]/d' |\
|
||
|
#sed -nE '/\$mod(\+Shift)?\+0/p' |\
|
||
|
sed -E '/\$mod(\+Shift)?\+0/ { s/0/[1-9,0]/; s/10/[1-10]/g}'
|
||
|
}
|
||
|
|
||
6 years ago
|
function formatLine {
|
||
6 years ago
|
while read line; do
|
||
|
if echo "$line" | grep -q "exec"; then
|
||
6 years ago
|
echo "$line" |\
|
||
|
awk '{print "# "$1 "\n"; $1=$2=""; print " Runs the shell command: \n\n```bash\n" $0 "\n```\n" }'
|
||
6 years ago
|
else
|
||
6 years ago
|
echo "$line" | awk '{print "# "$1 "\n"; $1=""; print $0 "\n" }'
|
||
6 years ago
|
fi
|
||
|
done;
|
||
|
}
|
||
|
|
||
|
cat $HOME/.dotfiles/i3/configWork |\
|
||
|
#Gets lines that start with bindsym
|
||
|
sed -e "/^#/d" -ne "/^bindsym/p" | \
|
||
|
#Remove things we dont want to show
|
||
|
sed 's/\(bindsym \|--whole-window \|--no-startup-id \|--release \)//g' | \
|
||
|
#Hopefully self explanitory
|
||
|
sort |\
|
||
|
#Makes Formats [0-9]
|
||
|
format0to9 |\
|
||
6 years ago
|
#Goes through each line and turns it into simple markdown
|
||
|
formatLine |\
|
||
6 years ago
|
#Converts markdown to groff ms
|
||
6 years ago
|
#pandoc -f markdown -t ms |\
|
||
|
pandoc -f markdown -t latex -o ~/test.pdf
|
||
6 years ago
|
#Converts groff to pdf
|
||
6 years ago
|
#groff -ms - -T pdf > ~/test.pdf
|
||
|
#groff -ms - -T pdf |\
|
||
6 years ago
|
#Opens PDF
|
||
6 years ago
|
#zathura -
|
||
6 years ago
|
|