Skip to content

gtmanfred/zurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NAME

zurl - url launcher

SYNOPSIS

Usage: zurl url

DESCRIPTION

zurl is a simple tool to configure urls being launched in different ways based on to what the url is pointing. Opening gifs, pictures, youtube videos, pastebins and things like these with other programs besides the browser is the main goal.

CONFIG FILES

The zurl config files start with what is in:

$XDG_CONFIG_HOME/zurl.config

falling back to:

$HOME/.zurlrc

end last following what is in:

/etc/zurlrc

if none of these files exist, it uses the defaults which originally were in /etc/zurlrc

CONFIGURATION

All configuration is done with environment variables and functions.

ZURLDIR

place to curl (download) the tmp files for easy access

Default -> ZURLDIR=/tmp

alters between opening pkgbuilds or comments. If you want comments, this must be set to comments.

Default -> AURLINKS=PKGBUILD

BROWSER

This is the fallback to open links in if no other cases were tripped

Default -> BROWSER=firefox

GIFPLAYER

This will be the default program to open gifs in

Default -> GIFPLAYER=mplayer

GIFARGS

These are the arguments to be used with GIFPLAYER

Default -> GIFARGS="-loop 0 -speed 1"

YOUTUBEPLAYER

This is the player to be used with youtube-viewer (if you have it)

Default -> YOUTUBEPLAYER=mplayer

YOUTUBEARGS

These are the args to be used with your YOUTUBEPLAYER for youtube-viewer

Default -> YOUTUBEARGS="-loop 0 -speed 1"

PASTEEDITOR

This is what you would like to open pastes in (default prefers gvim or vim compiled with server support)

Default -> PASTEEDITOR=vim

SERVERNAME

This is the name of the vim server

Default -> SERVERNAME=PASTIE

PASTEARGS

These are the args to be used with PASTEEDITOR (if you do not have vim compiled with server support you need to change this)

Default -> PASTEARGS="--servername $SERVERNAME"

OPENEDPASTEARGS

These are the args to use with PASTEEDITOR if you already have one paste open. It allows for opening multiple pastes in the same vim server.

Default -> OPENEDPASTEARGS="$PASTEARGS --remote-tab-silent"

MULTIPLEXER

This is where you set your multiplexer

Default -> MULTIPLEXER=tmux

MULTIARGS

This allows you to set the args to use with your multiplexer when opening pastes

Default -> MULTIARGS="neww -n $SERVERNAME"

testopen

this is a function to test if a paste is opened so the OPENPASTEARGS are used

Default ->

    testopen(){ if [[ -n ${(Mf)$(vim --serverlist)#PASTIE} ]];then return 1 else return 0 fi

    }

testmulti

this is a function to test if the multiplexer is opened/attached, if not use PASTETERMINAL

Default ->

    testmulti(){ if (( $+commands[tmux] )) && [[ -n ${(Mf)$(tmux list-session 2>&/dev/null|grep attached)} ]];then return 0 else return 1 fi

    }

PASTETERMINAL

If you don't have a multiplexer open, zurl will open pastes in a terminal

Default -> PASTETERMINAL=termite

PASTEEXEC

This is whatever flag your terminal uses to execute commands on launch

Default -> PASTEEXEC="-e"

IMAGEOPENER

This is what you want to open pictures in

Default -> IMAGEOPENER=feh

REMOVEFILE

1 if you don't want to remove file after they have been opened, 0 if you do

Default -> REMOVEFILE=1

AUTHOR

Daniel Wallace <danielwallace@gtmanfred.com>

About

zsh pastebins

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published