No description
Find a file
Felipe Torresini ddd68d4842 changed version
2020-09-23 15:34:19 -03:00
src added try statement to getpaths 2020-09-23 15:33:42 -03:00
tests fixed import 2020-09-23 14:55:28 -03:00
LICENSE Initial commit 2020-09-23 13:00:42 -03:00
nimchromepath.nimble changed version 2020-09-23 15:34:19 -03:00
README.md fixed example 2020-09-23 14:56:06 -03:00

NimChromePath

Gets the chrome paths on Windows and *Nix Systems

nimble

License

MIT

Installation

nimble install nimchromepath

Documentation (available procs)

Get paths only to Windows Systems

proc getWinPaths(): seq[string]

Get paths only to *Nix Systems

proc getNixPaths(): seq[string]

Get paths on Windows or on *Nix Systems

proc getpaths(): seq[string]

Example:

Open Google Chrome in app mode

import osproc
import nimchromepath

proc openURLLikeApp(url : string) : void =
  var paths = getpaths()
  if paths.len > 0 :
    var path = paths[0]
    path =  path & " --app=" & url
    echo path
    discard  osproc.execCmd(path)

openURLLikeApp("https://github.com/felipetesc/NimChromePath")