Skip to content

Instantly share code, notes, and snippets.

@Constellation
Last active August 29, 2015 13:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Constellation/8982821 to your computer and use it in GitHub Desktop.
Save Constellation/8982821 to your computer and use it in GitHub Desktop.
PDF reader script
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Name=Preview
GenericName=Preview
Comment=Show preview of files
Exec=preview.sh %U
Terminal=false
Icon=AdobeReader9
Type=Application
MimeType=application/pdf;application/vnd.fdf;application/vnd.adobe.pdx;application/vnd.adobe.xdp+xml;application/vnd.adobe.xfdf;
StartupWMClass=Preview
#!/bin/bash
CHROME=google-chrome
FILE=$(readlink -f "$1")
SCHEME="file://$FILE"
nohup $CHROME --user-data-dir=$HOME/.config/pdf-reader --app="$SCHEME" > /dev/null 2> /dev/null &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment