Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Run opendesktop.org-style *.desktop files (usually located under ~/.local/share/applications) from the command-line. This is only a bare-bones omplementation. Useful on a Mac. See http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html .

View run_desktop.pl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
#!/usr/bin/perl
 
use strict;
 
my $cmd;
my $path;
 
while (<>) {
if (/^Exec=(.*)/) {
$cmd = $1;
$cmd =~ s{\\\\}{\\}g;
$cmd =~ s{\\`}{`}g;
$cmd =~ s{\\\$}{\$}g;
}
if (/^Path=(.*)/) {
$path = $1;
}
}
 
if ($cmd) {
if ($path) {
chdir($path);
}
system($cmd);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.