phillipberndt / pqiv

Powerful image viewer with minimal UI
http://www.pberndt.com/Programme/Linux/pqiv/index.html
GNU General Public License v3.0
301 stars 45 forks source link

how to setting no info window at startup etc. #234

Open wan2355 opened 5 months ago

wan2355 commented 5 months ago

Thank you for creating pqiv ! I have found pqiv a few days ago, and I find that it is one of most poweful tool like feh, sxiv.

I have some questions & request.

Q1. I do not need "infomation window" at startup.

I do not need "Yellow window" at startup, but I sometimes need it. I think it is better to type "i" , when need " info-window ".

How do I write this into .pqivrc? Following not work.

#toggle_info_box(0)
info_box=0

Q2. How do I disable some keys , which I do not need; l, h, v, cont-a etc.

I soemtimes mistype these keys, and that causes trouble.

Q3. How do I have file name at command mode, using with "|"

"Command-mode" of pqiv is very unique and powerful.

I think "$1" is filename at command mode. But when I use "|" , "$1" does not work.

How do I have filename, when I use "|" like follows. Moreover, I like to have other image info like window size etc.

Following is a example.

command-9=|convert - ${1%.*}_$(date +%H%M).png    ##  $1 not work...

Q4. Is it possible to have same output, using "idetify" in a terminal ?

When I run type "7", output becomes just one line. There are no line breaks, so it's hard to read...

command-7=> echo -e $(identify -verbose $1 | sed -n '7,23p'| grep -A1 -B4 Channel) 

Here is output.

Geometry: 1280x268+0+0 Units: Undefined Colorspace: sRGB Type: Palette Base type: TrueColor Endianness: Undefined Depth: 8-bit Channels: 3.0 Channel depth: Red: 8-bit Green: 8-bit Blue: 8-bit Channel statistics: Pixels: 343040 Red: min: 44 (0.172549) max: 255 (1)

Q5. Can I use "a~z" as custom command key?

It means I like to create more than 9 custom-commands... But pqiv's custom-command keys semms to be 9; 1~9. I need more key.

Q6. Do we have to keep "the order of sections" , writing .pqivrc ?

I have found that yesterday. It seems that I have to keep the following order. When I change the order, .pqivrc not work. Is it bug?

[options]

command

[keybindings]

Here is sample from my .pqivrc.

[options]
sort=1     
slideshow-interval=0.4

## command
command-1=|convert - histogram:- | display - 

[keybidings]
<equal>  { set_scale_level_relative(1.1) }

Q7. Request.

Could you create a deafult function, showing histogram? I made it like follows, but I do not want to consume "custom command".

command-1=|convert - histogram:- | display - ## show histogram. must use "display".

I need keeping window size & image fit-window function.

Here is my .pqivrc.

[options]
#fullscreen=1       #  fullscreen
sort=1   
#slideshow-interval=1
slideshow-interval=0.4
##
window-position=off

## disable info window at startup. not work...
#toggle_info_box(0)
#info_box=0

## auto scaling at start up.
# --auto-montage-mode

#///////////////////////////////////////////////
## *** unique comand ; key 1~9 ***
##  https://qiita.com/yoya/items/1da8e8e04881bab67015
## sample
##  command-1=|convert - -blur 20 - ## key as make img blur.
#///////////////////////////////////////////////
## $1 : filename
command-1=|convert - histogram:- | display - ## show histogram. must use "display".

## contrast & brightness
command-2=|convert - -normalize - 
command-3=|convert - -clahe 25x25%+128+3 -     ## clahe.
command-4=|convert - -level 0%,70% - 
command-5=|convert - -contrast-stretch 0%,50% - 

## save img
#command-9=|convert - ${1%.*}_$(date +%H%M).png   ##  using "-", $1 not work...

#command-9=| convert - zz.png && cwebp -q 75 -o `date +%H%M_%S`.webp zz.png && rm -f zz.png ## webp
command-9=|convert - yy_$(date +%H%M).png 

## median
command-8=|convert - -median 2 -

## img info
command-7=> echo -e $(identify -verbose $1 | sed -n '7,23p'| grep -A1 -B4 Channel)  
#command-7=> echo -e $(identify -verbose $1 | sed -n '7,23p')  ## output something...

#-----------------------------------------------------------------------------------------------
## keybindings setting after command. if not, pqiv does *not* recognize this setting.
#---------------------------------------------------------------------------------------------
[keybindings]
## remap arror & p, n.
p { goto_file_relative(-1); }
<Right> { goto_file_relative(-1); }
n { goto_file_relative(1); }
<Left> { goto_file_relative(1); }

## x type 1,2,3...times : zoom cycle through 100%>75>50>100>125>150>100%...rotate
x { send_keys(#1); }
<numbersign>1 { set_scale_level_absolute(1.); bind_key(x { send_keys(#2\); }); }
<numbersign>2 { set_scale_level_absolute(.75); bind_key(x { send_keys(#3\); }); }
<numbersign>3 { set_scale_level_absolute(.5); bind_key(x { send_keys(#4\); }); }
#<numbersign>3 { set_scale_level_absolute(0.25); bind_key(x { send_keys(#1\); }); }
<numbersign>4 { set_scale_level_absolute(1.); bind_key(x { send_keys(#5\); }); }
<numbersign>5 { set_scale_level_absolute(1.25); bind_key(x { send_keys(#6\); }); }
<numbersign>6 { set_scale_level_absolute(1.5); bind_key(x { send_keys(#1\); }); }

## magnify img.
<equal>  { set_scale_level_relative(1.1) } 

<Down> { set_slideshow_interval_relative(-1) } 
<Up> { set_slideshow_interval_relative(1) } 
user12xxxxxx commented 4 months ago

Q1 hide-info-box=true put this line in option section

wan2355 commented 4 months ago

Q1 hide-info-box=true put this line in option section

Thank you. It works.