Command Line Arguments#

When starting vimiv form the command line you have the ability to pass a number of different argument to vimiv.

Examples#

In the following we present a few use cases of command line arguments.

  • Start in library view with the thumbnail grid displayed:

    vimiv * --command "enter thumbnail" --command "enter library"
    
  • Start in read-only mode. This prevents accidental modification (renaming, moving, editing etc.) of any images:

    vimiv --set read_only true
    
  • Change WM_CLASS_INSTANCE to identify a vimiv instance:

    vimiv --qt-args "--name myVimivInstance"
    
  • Print the last selected image to STDOUT when quitting:

    vimiv --output "%"
    
  • Use vimiv as Rofi for Images to make a selection from candidate images:

    mySel=$(echo $myCand | vimiv --input --output "%m" --command "enter thumbnail")
    
  • Print debug logs of your amazing plugin you are writing and of the api._mark module which does not behave as you are expecting:

    vimiv --debug myAmazingPlugin api._mark
    
  • Grab image from the web and open it:

    curl https://i.imgur.com/somefile.png | vimiv -
    

Command Line Arguments#

The general calling structure is:

vimiv [PATH] [--help|-h] [--fullscreen|-f] [--version|-v] [--geometry
WIDTHxHEIGHT|-g WIDTHxHEIGHT] [--temp-basedir] [--config FILE] [--keyfile FILE]
[--set OPTION VALUE|-s OPTION VALUE] [--log-level LEVEL] [--command COMMAND]
[--basedir DIRECTORY|-b DIRECTORY] [--output TEXT|-o TEXT] [--input|-i] [-]
[--debug MODULE] [--qt-args ARGS]

The following is an exhaustive list of all available arguments:

Positional arguments#

Command

Description

PATH

Paths to open

Options#

Command

Description

--help, -h

show this help message and exit

--fullscreen, -f

Start fullscreen

--version, -v

Print version information and exit

--geometry WIDTHxHEIGHT, -g WIDTHxHEIGHT

Set the starting geometry

--temp-basedir

Use a temporary basedir

--config FILE

Use FILE as local configuration file

--keyfile FILE

Use FILE as keybinding file

--set OPTION VALUE, -s OPTION VALUE

Set a temporary setting

--log-level LEVEL

Set log level to LEVEL

--command COMMAND

Run COMMAND on startup, usable multiple times

--basedir DIRECTORY, -b DIRECTORY

Directory to use for all storage

--output TEXT, -o TEXT

Wildcard expanded string to print to standard output upon quit

--input, -i

Read paths to open from standard input

-

Read binary image to open from standard input

Development arguments#

Command

Description

--debug MODULE

Force showing debug log messages of MODULE

--qt-args ARGS

Arguments to pass to qt directly, use quotes to pass multiple arguments