mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-01-09 10:13:53 +00:00
170 lines
3.7 KiB
Nix
170 lines
3.7 KiB
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.module.programs.gui.swayimg;
|
|
in {
|
|
options = { module.programs.gui.swayimg = { enable = mkEnableOption ""; }; };
|
|
|
|
config = mkIf cfg.enable {
|
|
home.packages = with pkgs; [ swayimg ];
|
|
xdg.configFile = with config.lib.stylix.colors; {
|
|
"swayimg/config".text = ''
|
|
[general]
|
|
mode = viewer
|
|
position = parent
|
|
size = fullscreen
|
|
sigusr1 = reload
|
|
sigusr2 = next_file
|
|
app_id = swayimg
|
|
|
|
[viewer]
|
|
window = #000000ff
|
|
transparency = grid
|
|
scale = optimal
|
|
fixed = yes
|
|
antialiasing = no
|
|
slideshow = no
|
|
slideshow_time = 3
|
|
history = 1
|
|
preload = 1
|
|
|
|
[gallery]
|
|
size = 200
|
|
cache = 100
|
|
fill = yes
|
|
antialiasing = yes
|
|
window = #${base00}ff
|
|
background = #${base01}ff
|
|
select = #${base02}ff
|
|
border = #${base0E}ff
|
|
shadow = #${base00}a0
|
|
|
|
[list]
|
|
order = alpha
|
|
loop = yes
|
|
recursive = no
|
|
all = yes
|
|
|
|
[font]
|
|
name = JetBrainsMono NerdFont
|
|
size = 14
|
|
color = #${base06}ff
|
|
shadow = #${base00}a0
|
|
|
|
[info]
|
|
show = yes
|
|
info_timeout = 5
|
|
status_timeout = 3
|
|
|
|
[info.viewer]
|
|
top_left = none
|
|
top_right = index
|
|
bottom_left = none
|
|
bottom_right = none
|
|
|
|
[info.gallery]
|
|
top_left = none
|
|
top_right = index
|
|
bottom_left = none
|
|
bottom_right = none
|
|
|
|
[keys.viewer]
|
|
F1 = help
|
|
Home = first_file
|
|
g = first_file
|
|
End = last_file
|
|
Shift+g = last_file
|
|
Prior = prev_file
|
|
Next = next_file
|
|
h = zoom +10
|
|
j = next_file
|
|
k = prev_file
|
|
l = zoom -10
|
|
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
|
|
Shift+Delete = exec rm "%"; skip_file
|
|
Escape = exit
|
|
q = exit
|
|
# Mouse related
|
|
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
|
|
|
|
[keys.gallery]
|
|
F1 = help
|
|
|
|
Home = first_file
|
|
g = first_file
|
|
|
|
End = last_file
|
|
Shift+g = last_file
|
|
|
|
Left = step_left
|
|
Right = step_right
|
|
Up = step_up
|
|
Down = step_down
|
|
|
|
h = step_left
|
|
j = step_down
|
|
k = step_up
|
|
l = step_right
|
|
Prior = page_up
|
|
Next = page_down
|
|
|
|
c = skip_file
|
|
f = fullscreen
|
|
Return = mode
|
|
a = antialiasing
|
|
r = reload
|
|
|
|
i = info
|
|
Shift+Delete = exec rm "%"; skip_file
|
|
Escape = exit
|
|
q = exit
|
|
# Mouse related
|
|
ScrollLeft = step_right
|
|
ScrollRight = step_left
|
|
ScrollUp = step_up
|
|
ScrollDown = step_down
|
|
'';
|
|
};
|
|
};
|
|
}
|
|
|