#!/bin/bash # Show a list of available key bindings dlbinds() { if checkinternet; then curl -s 'https://raw.githubusercontent.com/instantOS/instantos.github.io/master/youtube/hotkeys.md' | sed 's/^\([^|#]\)/ \1/g' | sed 's/^##*[ ]*/ /g' >~/.cache/instantos/hotkeys.md else cp /usr/share/instantutils/keybinds .cache/instantos/hotkeys.md fi } if ! [ -e ~/.cache/instantos/hotkeys.md ]; then mkdir -p ~/.cache/instantos dlbinds fi cat ~/.cache/instantos/hotkeys.md >/tmp/hotkeys # allow user to add to the list if [ -e ~/.config/instantos/hotkeys ]; then echo "user generated notes: " >>/tmp/hotkeys cat ~/.config/instantos/hotkeys >>/tmp/hotkeys fi dlbinds & # optional GUI mode if [ -z "$1" ]; then less --mouse --wheel-lines=3 /tmp/hotkeys else sed 's/^/>/g'