# Swayimg configuration file.

# This file contains the default configuration.
# The viewer searches for the config file in the following locations:
# 1. $XDG_CONFIG_HOME/swayimg/config
# 2. $HOME/.config/swayimg/config
# 3. $XDG_CONFIG_DIRS/swayimg/config
# 4. /etc/xdg/swayimg/config

# Any of these options can be overridden using the --config argument
# on the command line, for instance:
# $ swayimg --config="general.scale=real"

################################################################################
# General options
################################################################################
[general]

# Initial scale (optimal/fit/width/height/fill/real)
scale = optimal

# Start in full screen mode (yes/no)
fullscreen = no

# Anti-aliasing (yes/no)
antialiasing = no

# Fix position of the image on the window surface (yes/no)
fixed = yes

# Background for transparent images (grid/RGB/RGBA, e.g. #112233)
transparency = grid

# Window position (parent or absolute coordinates, e.g. 100,200)
position = parent
# Window size (parent, image, or absolute size, e.g. 800,600)
size = parent
# Window background mode/color (RGB/RGBA, e.g. #11223344)
background = #00000000

# Run slideshow at startup (yes/no)
slideshow = no
# Slideshow image display time (seconds)
slideshow_time = 3

# Run in gallery mode at startup (yes/no)
gallery = no

################################################################################
# Gallery mode configuration
################################################################################
[gallery]
# Max size of the thumbnail in pixels
size = 200
# Use anti-aliasing for thumbnails (yes/no)
antialiasing = no
# Background color of the window (RGB/RGBA)
window = #00000000
# Background color of the tile (RGB/RGBA)
background = #202020
# Background color of the selected tile (RGB/RGBA)
select = #404040

################################################################################
# Image list configuration
################################################################################
[list]
# Default order (none/alpha/random)
order = alpha
# Looping list of images (yes/no)
loop = yes
# Read directories recursively (yes/no)
recursive = no
# Open all files in the start directory (yes/no)
all = yes
# Number of previously viewed images to store in cache
cache = 1
# Number of preloaded images (read ahead)
preload = 1

################################################################################
# Font configuration
################################################################################
[font]
# Font name
name = monospace
# Font size (in pt)
size = 14
# Font color (RGB or RGBA, e.g. #11223344)
color = #cccccc
# Shadow color (RGB or RGBA, disable: #00000000)
shadow = #000000a0

################################################################################
# Image meta info scheme (format, size, EXIF, etc)
################################################################################
[info]
# Mode on startup (off/brief/full)
mode = full
# Hide image information after a timeout (seconds or percent for slideshow mode)
timeout = 0
# Display scheme for the "full" mode: position = content
full.topleft = name,format,filesize,imagesize,exif
full.topright = index
full.bottomleft = scale,frame
full.bottomright = status
# Display scheme for the "brief" mode: position = content
brief.topleft = index
brief.topright = none
brief.bottomleft = none
brief.bottomright = status

################################################################################
# Key binding section: key = action [parameters]
# Key can be specified with modifiers, e.g "Ctrl+Alt+Shift+x"
# Use the `xkbcli` tool to get key name: `xkbcli interactive-wayland`
################################################################################
[keys]
F1 = help
Home = first_file
End = last_file
Prior = prev_file
Next = next_file
Space = next_file
Shift+d = prev_dir
d = next_dir
Shift+o = prev_frame
o = next_frame
c = skip_file
Shift+s = slideshow
s = animation
f = fullscreen
Return = mode
Left = step_left 10
Right = step_right 10
Up = step_up 10
Down = step_down 10
Equal = zoom +10
Plus = zoom +10
Minus = zoom -10
w = zoom width
Shift+w = zoom height
z = zoom fit
Shift+z = zoom fill
0 = zoom real
BackSpace = zoom optimal
bracketleft = rotate_left
bracketright = rotate_right
m = flip_vertical
Shift+m = flip_horizontal
a = antialiasing
r = reload
i = info
e = exec echo "Image: %"
Escape = exit
q = exit

################################################################################
# Mouse / touchpad configuration, same format as in [keys]
################################################################################
[mouse]
ScrollLeft = step_right 5
ScrollRight = step_left 5
ScrollUp = step_up 5
ScrollDown = step_down 5
Ctrl+ScrollUp = zoom +10
Ctrl+ScrollDown = zoom -10
Shift+ScrollUp = prev_file
Shift+ScrollDown = next_file
Alt+ScrollUp = prev_frame
Alt+ScrollDown = next_frame

# vim: filetype=dosini
