OSDN Git Service

instanthotkeys markup
[instantos/instantOS.git] / programs / instanthotkeys
1 #!/bin/bash
2
3 # Show a list of available key bindings
4
5 dlbinds() {
6     curl -s 'https://raw.githubusercontent.com/instantOS/instantos.github.io/master/youtube/hotkeys.md' |
7         sed 's/^\([^|#]\)/    \1/g' |
8         sed 's/^##*[ ]*/ /g' >~/.cache/instantos/hotkeys.md &
9 }
10
11 if ! [ -e ~/.cache/instantos/hotkeys.md ]; then
12     mkdir -p ~/.cache/instantos &>/dev/null
13     dlbinds
14 fi
15
16 cat ~/.cache/instantos/hotkeys.md >/tmp/hotkeys
17 dlbinds &
18 less --mouse --wheel-lines=3 /tmp/hotkeys