1. Moritz Wilhelmy
  2. uiv

Wiki

Clone wiki

uiv / uivrc

uivrc

Examples for what can be done using ~/.uivrc

You want to remove images while browsing through them? (be careful with this if you don't want to lose any valuable data...)
Add this snippet to ~/.uivrc:

set keys {
...
  <R>     {
    set _cur_file [lindex $::files $::current]
    exec rm $_cur_file
    puts "removed $_cur_file"
    # remove file from list:
    set ::files [lreplace $::files $::current $::current]
    # load the next file in the list
    display $::current
  }
}

Then, simply press "R" (Shift + r) to remove an image you don't like.

Evaluating Tcl

set keys {
...
  <z>   { puts -nonewline >; flush stdout; eval [gets stdin]; }
}

This does not have any form of line editing whatsoever (use rlwrap if you must), but can be useful for debugging purposes.

Slideshow

set ::slideshow_msec 2000
proc slideshow {} {
	after $::slideshow_msec {display next; slideshow}
}
slideshow

This loads a new image every 2 seconds.

Updated