💾 Archived View for gemini.thegonz.net › diohsc › diohscrc.sample captured on 2024-05-10 at 11:00:45.
⬅️ Previous capture (2023-07-10)
-=-=-=-=-=-=-
#### Sample diohsc configuration: # Copy this to ~/.diohsc/diohscrc and edit it appropriately. # Each line is a diohsc command which will be run at startup. ## Proxies # To allow diohsc to access gopher:// URIs: # run an Agena https://tildegit.org/solderpunk/agena instance locally # and uncomment the following option (you may want to change the port if # you're also running a gemini server locally). #set proxy gopher 127.0.0.1:1965 # To allow diohsc to access http:// and https:// URIs: # run a Duckling https://github.com/LukeEmmet/duckling-proxy instance locally # and uncomment the following options (you may want to change the port if # you're running a gemini server or agena instance) #set proxy http 127.0.0.1:1965 #set proxy https 127.0.0.1:1965 # By default, duckling-proxy automatically converts text/html using html2gmi; # you may prefer to use the --unfiltered option and set a geminator as below, # This gives you more control over the conversion, and lets you access the # html source in diohsc. ## Geminators # The following "geminator" options will allow display of various mimetypes; # install the corresponding software, and uncomment the corresponding line. # https://github.com/makeworld-the-better-one/md2gemini/ #set geminator text/markdown md2gemini -l paragraph # https://github.com/LukeEmmet/html2gmi #set geminator (text|application)/(html|xml|xhtml.*) html2gmi -me # These lines use jp2a and imagemagick, which are probably packages in your # distro, to produce nice ascii art previews of image files: #set geminator image/jpeg echo '```' && jp2a --colors - && echo '```' #set geminator image/.* echo '```' && convert - jpeg:- | jp2a --colors - && echo '```' ## Render filter # This will do a best effort translation of utf8 to ascii when rendering text: #set render_filter stdbuf -o0 uni2ascii -BPq ## Identification # You may want to configure certain cryptographic identities to always be used # for certain sites. e.g. if you've created an identity "astrobotany" for use # on astrobotany.mozz.us, you may want to uncomment the following line. #gemini://astrobotany.mozz.us identify astrobotany ## Aliases # You can set aliases as shorthands for commands. e.g.: #alias up .. #alias Search 'search query #alias QueueNew at *- add #alias Mpv |mpv --cache-secs 5 - #alias CS br screen -X register '%s' # copy URI to GNU screen buffer #alias CX br xsel -i <<< '%s' # copy URI to X selection buffer #alias GPGImport |gpg --import #alias Read ||- espeak -s 300 --stdin --stdout | aplay #alias BGRead ||- espeak -s 300 --stdin --stdout | aplay & # Uploading with the Titan protocol: # For use with gemini://gemini.thegonz.net/titan-upload.sh . # Invoke as "TARGET TU [FILE] [-t TOKEN]" where TARGET is a titan:// uri to # upload an existing file (or compose one), # or as "TARGET TE [-t TOKEN]" to edit a gemini TARGET and upload the changed # version via titan. #alias TU br titan-upload.sh %s #alias TE ! $EDITOR %s && titan-upload.sh titan://${URI#gemini://} %s # Paging with gmir: # For use with https://github.com/codesoap/gmir . # Requires perl with the URI library (which you probably have). # If you select a link in gmir, it will be added to the diohsc queue. #alias GMIR !rel="$(gmir "%s")"; [ -n "$rel" ] && echo "$(perl -e 'use URI; print URI->new_abs(shift, shift)')' "$rel" "$URI")" >> ~/.diohsc/queue