Yazi : Add config.

This commit is contained in:
Dmitry Voronin 2024-06-22 23:34:03 +03:00
parent 2890c81cef
commit a4c027fbb3
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
43 changed files with 219 additions and 99 deletions

View file

@ -1,4 +1,4 @@
{ lib, container, ... }: let
{ pkgs, container, ... }: let
iconTheme = "fa-solid";
mkGroup = name: icon: items: {
@ -15,7 +15,6 @@
config = {
title = "Dashboard";
subtitle = "Home";
header = false;
footer = false;
connectivityCheck = false;
@ -97,5 +96,5 @@
];
};
in {
text = lib.generators.toYAML {} config;
text = (pkgs.formats.yaml {}).generate "HomerConfig" config;
}

View file

@ -18,6 +18,7 @@ in {
services.gnome.gnome-keyring.enable = lib.mkForce false;
environment = {
systemPackages = with pkgs; [
fuzzel # Application launcher.
grim slurp # Screenshot.
mako # Notification system.
networkmanagerapplet # Internet configuration.

View file

@ -2,7 +2,7 @@
config = {
credential.helper = "store";
gpg.format = secret.crypto.sign.git.format;
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
gpg.ssh.allowedSignersFile = toString secret.crypto.sign.git.allowed;
init.defaultBranch = "main";
pull.rebase = true;
push.autoSetupRemote = true;

View file

@ -8,7 +8,7 @@
push.autoSetupRemote = true;
rebase.autoStash = true;
user.signingkey = builtins.readFile secret.crypto.sign.git.key;
gpg.ssh.allowedSignersFile = toString(secret.crypto.sign.git.allowed);
gpg.ssh.allowedSignersFile = toString secret.crypto.sign.git.allowed;
gpg.format = secret.crypto.sign.git.format;
};
};

View file

@ -22,12 +22,12 @@
experimental-features = nix-command flakes
keep-derivations = true
keep-outputs = true
min-free = ${toString(50 * 1000 * 1000 * 1000)}
min-free = ${toString 50 * 1000 * 1000 * 1000}
'';
# NOTE: Currently I run GC completely, but this setting (put above near min-free)
# can stop GC when you hit 101 GB of free space available.
# max-free = ${toString(101 * 1024 * 1024 * 1024)}
# max-free = ${toString 101 * 1024 * 1024 * 1024}
# NOTE: Enable this if you want to run GC on schedule. I instead use `min-free`.
# nix.gc = {

View file

@ -8,6 +8,7 @@
curl # CLI http client.
ddrescue testdisk # Apps to recover data from drives.
dnsutils # Dns utilities like host.
exiftool # Image info.
fastfetch # Systeminfo summary.
ffmpeg # Video/audio converter.
file # Get general info about a file.

View file

@ -8,7 +8,8 @@
# Current dir by default.
# Usage: l [DIRS]
function l() {
ls -lhv --si --group-directories-first --color=auto -- "$@"
# ls -lhv --si --group-directories-first --color=auto -- "$@"
ccd
}
# List last modified files first.

View file

@ -3,9 +3,9 @@
vim.opt.autoindent = true
vim.opt.expandtab = false
-- vim.opt.smartindent = true
vim.opt.shiftwidth = ${toString(setting.nvim.editor.indent.default)}
vim.opt.softtabstop = ${toString(setting.nvim.editor.indent.default)}
vim.opt.tabstop = ${toString(setting.nvim.editor.indent.default)}
vim.opt.shiftwidth = ${toString setting.nvim.editor.indent.default}
vim.opt.softtabstop = ${toString setting.nvim.editor.indent.default}
vim.opt.tabstop = ${toString setting.nvim.editor.indent.default}
-- Disable Markdown forced formatting.
vim.g.markdown_recommended_style = 0

View file

@ -19,10 +19,10 @@
rekey_normal("<Leader>${key.action.hide}", "<C-w>q") -- Close split.
-- Resize splits.
rekey_normal("<Leader>${key.action.resize.left}", "${toString(setting.tmux.resize.step.horizontal)}<C-w><")
rekey_normal("<Leader>${key.action.resize.right}", "${toString(setting.tmux.resize.step.horizontal)}<C-w>>")
rekey_normal("<Leader>${key.action.resize.down}", "${toString(setting.tmux.resize.step.vertical)}<C-w>+")
rekey_normal("<Leader>${key.action.resize.up}", "${toString(setting.tmux.resize.step.vertical)}<C-w>-")
rekey_normal("<Leader>${key.action.resize.left}", "${toString setting.tmux.resize.step.horizontal}<C-w><")
rekey_normal("<Leader>${key.action.resize.right}", "${toString setting.tmux.resize.step.horizontal}<C-w>>")
rekey_normal("<Leader>${key.action.resize.down}", "${toString setting.tmux.resize.step.vertical}<C-w>+")
rekey_normal("<Leader>${key.action.resize.up}", "${toString setting.tmux.resize.step.vertical}<C-w>-")
-- Move splits.
rekey_normal("<Leader>${key.navigation.move.left}", "<C-w>A")

View file

@ -9,10 +9,10 @@ in {
bind -n ${mod}-${key.action.split.vertical} split-window -h -c "#{pane_current_path}"
bind -n ${mod}-${key.action.split.horizontal} split-window -v -c "#{pane_current_path}"
bind -n ${mod}-${key.action.resize.equalize} select-layout tiled
bind -n ${mod}-${key.action.resize.up} resize-pane -U ${toString(setting.tmux.resize.step.vertical)}
bind -n ${mod}-${key.action.resize.down} resize-pane -D ${toString(setting.tmux.resize.step.vertical)}
bind -n ${mod}-${key.action.resize.left} resize-pane -L ${toString(setting.tmux.resize.step.horizontal)}
bind -n ${mod}-${key.action.resize.right} resize-pane -R ${toString(setting.tmux.resize.step.horizontal)}
bind -n ${mod}-${key.action.resize.up} resize-pane -U ${toString setting.tmux.resize.step.vertical}
bind -n ${mod}-${key.action.resize.down} resize-pane -D ${toString setting.tmux.resize.step.vertical}
bind -n ${mod}-${key.action.resize.left} resize-pane -L ${toString setting.tmux.resize.step.horizontal}
bind -n ${mod}-${key.action.resize.right} resize-pane -R ${toString setting.tmux.resize.step.horizontal}
bind -n ${mod}-${key.navigation.move.left} swap-pane -U
bind -n ${mod}-${key.navigation.move.right} swap-pane -D
unbind '"'

View file

@ -7,13 +7,13 @@
in {
text = ''
bind-key -n ${mod}-${key.tmux.status.toggle} set-option -g status;
set -g status-interval ${toString(setting.tmux.status.interval)}
set -g status-interval ${toString setting.tmux.status.interval}
set -g status-position bottom
set -g status-justify left
set -g status-style "fg=#${fg}"
set -g status-left "#[bold] #H-#S "
set -g status-left-length ${toString(setting.tmux.status.length)}
set -g status-left-length ${toString setting.tmux.status.length}
set -g status-right ""
set-window-option -g window-status-separator ""

View file

@ -7,9 +7,9 @@
// Fonts.
pref("browser.display.use_document_fonts", 0);
lockPref("font.minimum-size.x-cyrillic", ${toString(style.font.size.application)});
lockPref("font.minimum-size.x-unicode", ${toString(style.font.size.application)});
lockPref("font.minimum-size.x-western", ${toString(style.font.size.application)});
lockPref("font.minimum-size.x-cyrillic", ${toString style.font.size.application});
lockPref("font.minimum-size.x-unicode", ${toString style.font.size.application});
lockPref("font.minimum-size.x-western", ${toString style.font.size.application});
lockPref("font.name.monospace.x-cyrillic", "${style.font.monospace.name}");
lockPref("font.name.monospace.x-unicode", "${style.font.monospace.name}");
lockPref("font.name.monospace.x-western", "${style.font.monospace.name}");

View file

@ -1,5 +1,5 @@
{ setting, ... }: let
step = toString(setting.brightness.step);
step = toString setting.brightness.step;
in {
text = ''
bindsym XF86MonBrightnessDown exec light -U ${step}

View file

@ -38,6 +38,6 @@
}
# Hide mouse cursor after a period of inactivity.
seat seat0 hide_cursor ${toString(setting.popup.timeout.ms)}
seat seat0 hide_cursor ${toString setting.popup.timeout.ms}
'';
}

View file

@ -1,6 +1,6 @@
{ style, key, ... }: let
fontName = style.font.serif.name;
fontSize = toString(style.font.size.desktop);
fontSize = toString style.font.size.desktop;
accent = style.color.accent;
bg = style.color.bg.dark;

View file

@ -1,8 +1,8 @@
{ key, setting, ... }: {
text = ''
bindsym $mod+${key.action.resize.down} resize grow height ${toString(setting.sway.resize.step.vertical)}px
bindsym $mod+${key.action.resize.up} resize shrink height ${toString(setting.sway.resize.step.vertical)}px
bindsym $mod+${key.action.resize.left} resize shrink width ${toString(setting.sway.resize.step.horizontal)}px
bindsym $mod+${key.action.resize.right} resize grow width ${toString(setting.sway.resize.step.horizontal)}px
bindsym $mod+${key.action.resize.down} resize grow height ${toString setting.sway.resize.step.vertical}px
bindsym $mod+${key.action.resize.up} resize shrink height ${toString setting.sway.resize.step.vertical}px
bindsym $mod+${key.action.resize.left} resize shrink width ${toString setting.sway.resize.step.horizontal}px
bindsym $mod+${key.action.resize.right} resize grow width ${toString setting.sway.resize.step.horizontal}px
'';
}

View file

@ -1,5 +1,5 @@
{ key, style, ... }: let
lock = "swaylock -f -F -c 000000 -k --font \"${style.font.serif.name}\" --font-size ${toString(style.font.size.desktop)}";
lock = "swaylock -f -F -c 000000 -k --font \"${style.font.serif.name}\" --font-size ${toString style.font.size.desktop}";
in {
text = ''
bindsym $mod+${key.action.wait} exec '_twice 1 ${lock}'

View file

@ -1,6 +1,6 @@
{ setting, ... }: let
step_volume = toString(setting.volume.step);
step_music = toString(setting.media.step);
step_volume = toString setting.volume.step;
step_music = toString setting.media.step;
in {
text = ''
bindsym XF86AudioRaiseVolume exec 'pactl set-sink-volume @DEFAULT_SINK@ +${step_volume}%'

View file

@ -30,7 +30,7 @@
bindsym $mod+${key.action.close} kill
# Add gaps.
gaps inner ${toString(style.window.gap)}
gaps inner ${toString style.window.gap}
# Launch everything tiled.
# for_window [all] floating disable

View file

@ -1,5 +1,5 @@
{ style, ... }: let
borderSize = toString(style.window.border);
borderSize = toString style.window.border;
in {
text = ''
# Disable title bar.

View file

@ -8,9 +8,9 @@ in {
"position": "top",
"height": 30,
"spacing": 4,
"margin-top": ${toString(style.window.gap)},
"margin-left": ${toString(style.window.gap)},
"margin-right": ${toString(style.window.gap)},
"margin-top": ${toString style.window.gap},
"margin-left": ${toString style.window.gap},
"margin-right": ${toString style.window.gap},
"mode": "dock",
// "exclusive": false,
"start_hidden": false,
@ -68,15 +68,15 @@ in {
"format-alt": "{time} {icon}",
"format-icons": ["󰂎", "󱊡", "󱊢", "󱊣", "󱊣"],
"on-click-right": "powerlimit toggle",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
},
"custom/powerlimit": {
"exec": "powerlimit waybar",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
"on-click-right": "powerlimit toggle"
},
"pulseaudio": {
"scroll-step": ${toString(setting.volume.step)},
"scroll-step": ${toString setting.volume.step},
"format": "{volume}% {icon}",
"format-muted": "󰸈",
"format-icons": {
@ -105,29 +105,29 @@ in {
"tooltip": false,
"on-click": "foot -e bash -c btop",
"on-click-right": "powersave toggle",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
},
"memory": {
"format": "{percentage}%",
"on-click": "foot -e bash -c btop",
"on-click-right": "powersave toggle",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
},
"temperature": {
"format": "{temperatureC}°C",
"on-click": "foot -e bash -c btop",
"on-click-right": "powersave toggle",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
},
"custom/powersave": {
"exec": "powersave waybar",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
"on-click": "foot -e bash -c btop",
"on-click-right": "powersave toggle"
},
"custom/display": {
"exec": "swayscript monbar",
"interval": ${toString(refreshInterval)},
"interval": ${toString refreshInterval},
"return-type": "json",
"on-click": "sleep 0.1 && swayscript montoggle", // FIXME: remove sleep when resolved: https://github.com/Alexays/Waybar/issues/2166
"on-click-right": "sleep 0.1 && swayscript vrrtoggle"

View file

@ -2,7 +2,7 @@
text = ''
* {
font-family: "${style.font.serif.name}", "Terminess Nerd Font Propo";
font-size: ${toString(style.font.size.desktop)}px;
font-size: ${toString style.font.size.desktop}px;
color: #${style.color.fg.light};
}
'';

View file

@ -17,8 +17,8 @@ in {
#scratchpad,
#language {
padding: ${paddingV} ${paddingH};
border-top: ${toString(style.window.border)}px solid transparent;
border-bottom: ${toString(style.window.border)}px solid transparent;
border-top: ${toString style.window.border}px solid transparent;
border-bottom: ${toString style.window.border}px solid transparent;
}
#cpu {
@ -58,24 +58,24 @@ in {
#tray:hover,
#scratchpad:hover,
#workspaces button:hover {
background-color: rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString(style.opacity.desktop)});
background-color: rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString style.opacity.desktop});
}
#pulseaudio.muted,
#battery.critical,
#tray.needs-attention,
#custom-display.modified {
border-top: ${toString(style.window.border)}px solid #${style.color.accent};
border-top: ${toString style.window.border}px solid #${style.color.accent};
}
#workspaces button {
padding: ${paddingV} 4px;
border-top: ${toString(style.window.border)}px solid transparent;
border-top: ${toString style.window.border}px solid transparent;
border-radius: 0;
}
#workspaces button.focused {
border-top: ${toString(style.window.border)}px solid #${style.color.accent};
border-top: ${toString style.window.border}px solid #${style.color.accent};
}
'';
}

View file

@ -1,16 +1,16 @@
{ style, ... }: {
text = ''
window#waybar {
background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString(style.opacity.desktop)});
border: ${toString(style.window.border)}px solid rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString(style.opacity.desktop)});
background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString style.opacity.desktop});
border: ${toString style.window.border}px solid rgba(${style.color.border-r},${style.color.border-g},${style.color.border-b},${toString style.opacity.desktop});
}
.modules-left > widget:first-child > #workspaces {
margin-left: ${toString(style.window.border)}px;
margin-left: ${toString style.window.border}px;
}
.modules-right > widget:last-child > #workspaces {
margin-right: ${toString(style.window.border)}px;
margin-right: ${toString style.window.border}px;
}
'';
}

View file

@ -63,4 +63,6 @@
};
ollama.primaryModel = "llama3";
browser = "firefox-esr";
}

View file

@ -16,6 +16,11 @@
acc + trimTabs ((import mod args).text)
) "" files;
# Concat all file paths by `file` key.
catFile = files: args: builtins.foldl' (acc: mod:
acc + trimTabs (builtins.readFile (import mod args).file)
) "" files;
# Concat all files as a set.
catSet = files: args: lib.mkMerge (map (file: import file args) files);

View file

@ -10,13 +10,14 @@
, util
, ... } @args: let
# Configuration modules.
btop = import ./top/btop args;
editorconfig = import ./editorconfig args;
foot = import ./foot args;
gtk3 = import ./gtk/3 args;
htop = import ./top/htop args;
keyd = import ./keyd args;
mako = import ./mako args;
btop = import ./top/btop args;
editor = import ./editorconfig args;
foot = import ./foot args;
gtk3 = import ./gtk/3 args;
htop = import ./top/htop args;
keyd = import ./keyd args;
mako = import ./mako args;
yazi = import ./yazi args;
in {
home-manager = {
# If file exists, rename it with a new extension.
@ -28,15 +29,18 @@ in {
homeDirectory = homeDir;
stateVersion = const.stateVersion;
file = {
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".text = foot.text;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.text;
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".text = mako.text;
".editorconfig".text = editorconfig.text;
".parallel/will-cite".text = "";
"media/template".source = ./template;
".config/btop/btop.conf".text = btop.text;
".config/foot/foot.ini".source = foot.file;
".config/gtk-3.0/bookmarks".text = gtk3.bookmarks;
".config/htop/htoprc".text = htop.text;
".config/keyd/app.conf".text = keyd.text;
".config/mako/config".source = mako.file;
".config/yazi/init.lua".source = yazi.init;
".config/yazi/keymap.toml".source = yazi.keymap;
".config/yazi/yazi.toml".source = yazi.yazi;
".editorconfig".source = editor.file;
".parallel/will-cite".text = "";
"media/template".source = ./template;
};
};

View file

@ -1,5 +1,5 @@
{ lib, ... }: {
text = lib.generators.toINIWithGlobalSection {} {
{ pkgs, ... }: {
file = (pkgs.formats.iniWithGlobalSection {}).generate "EditorconfigConfig" {
globalSection.root = true;
sections = {

View file

@ -1,12 +1,12 @@
{ style, setting, lib, ... }: let
{ style, setting, pkgs, ... }: let
dpiaware = if setting.foot.font.dpi then "yes" else "no";
in {
text = lib.generators.toINIWithGlobalSection {} {
file = (pkgs.formats.iniWithGlobalSection {}).generate "FootConfig" {
globalSection = {
font = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
# font-bold = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
font-italic = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
font-bold-italic = "${style.font.monospace.name}:size=${toString(style.font.size.terminal)}";
font = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
# font-bold = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
font-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
font-bold-italic = "${style.font.monospace.name}:size=${toString style.font.size.terminal}";
dpi-aware = dpiaware;
font-size-adjustment = setting.foot.font.step;
};

View file

@ -1,3 +1,3 @@
{ util, ... } @args: {
text = util.catText (util.ls ./module) args;
text = util.catFile (util.ls ./module) args;
}

View file

@ -1,5 +1,5 @@
{ setting, lib, ... }: {
text = lib.generators.toINI {} {
{ setting, pkgs, ... }: {
file = (pkgs.formats.ini {}).generate "KeydDrgConfig" {
steam-app-548430 = {
"alt.1" = "macro(enter 10ms L e t ' s space d o space t h i s space T e x a s space s t y l e ! enter)";
"alt.2" = "macro(enter 10ms H e c k space y e s ! enter)";
@ -26,7 +26,7 @@
"alt.w" = "macro(enter 10ms r enter)";
"alt.x" = "macro(enter 10ms > space H e r e space < enter)";
"alt.z" = "macro(enter 10ms < space L e f t enter)";
leftshift = "timeout(leftcontrol, ${toString(setting.keyd.timeout.ms)}, leftshift)";
leftshift = "timeout(leftcontrol, ${toString setting.keyd.timeout.ms}, leftshift)";
};
};
}

View file

@ -1,5 +1,5 @@
{ lib, ... }: {
text = lib.generators.toINI {} {
{ pkgs, ... }: {
file = (pkgs.formats.ini {}).generate "KeydFirefoxConfig" {
"firefox" = {
"alt.E" = "C-S-pagedown";
"alt.N" = "S-f3";

View file

@ -1,5 +1,5 @@
{ setting, lib, ... }: {
text = lib.generators.toINI {} {
{ setting, pkgs, ... }: {
file = (pkgs.formats.ini {}).generate "KeydJetbrainsConfig" {
"jetbrains-*" = {
"alt./" = "C-/";
"alt.=" = "C-A-l";
@ -16,7 +16,7 @@
"alt.q" = "A-left";
"alt.r" = "S-f10";
"alt.s" = "C-A-s";
"alt.tab" = "timeout(f8, ${toString(setting.keyd.timeout.ms)}, macro2(0, 0, f7))";
"alt.tab" = "timeout(f8, ${toString setting.keyd.timeout.ms}, macro2(0, 0, f7))";
"alt.v" = "C-q";
"alt.w" = "C-S-A-t";
"alt.x" = "C-f4";

View file

@ -1,13 +1,13 @@
{ style, lib, setting, ... }: let
{ style, pkgs, setting, ... }: let
alpha = style.opacity.hex;
in {
text = lib.generators.toINIWithGlobalSection {} {
file = (pkgs.formats.iniWithGlobalSection {}).generate "MakoConfig" {
globalSection = {
anchor = "top-center";
background-color = "#${style.color.bg.dark}${alpha}";
border-color = "#${style.color.bg.regular}${alpha}";
default-timeout = setting.popup.timeout.ms;
font = "${style.font.serif.name} ${toString(style.font.size.popup)}";
font = "${style.font.serif.name} ${toString style.font.size.popup}";
height = 120;
icons = 0;
margin = 32;

View file

@ -53,7 +53,7 @@
JAVA_HOME = "${jdk}";
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
ANDROID_SDK_ROOT = "${androidSdk}/libexec/android-sdk/";
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
};

View file

@ -15,7 +15,7 @@
nativeBuildInputs = with pkgs; [ ];
buildInputs = with pkgs; [ ];
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
};

View file

@ -47,7 +47,7 @@
tex
];
buildInputs = with pkgs; [ ];
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
};

View file

@ -32,7 +32,7 @@
xorg.libXi
];
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
SOURCE_DATE_EPOCH = "${toString(self.lastModified)}";
SOURCE_DATE_EPOCH = "${toString self.lastModified}";
};
};
}

View file

@ -55,7 +55,7 @@
shown_boxes = "cpu mem net proc"
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
update_ms = ${toString(setting.top.refresh.ms)}
update_ms = ${toString setting.top.refresh.ms}
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.

View file

@ -0,0 +1,5 @@
{ pkgs, setting, util, ... } @args: {
init = (import ./module/Init.nix args).file;
keymap = (import ./module/Keymap.nix args).file;
yazi = (import ./module/Yazi.nix args).file;
}

View file

@ -0,0 +1,10 @@
{ util, pkgs, ... }: {
file = pkgs.writeText "YaziInitConfig" (util.trimTabs ''
-- Hide Status Bar.
function Status:render() return {} end
local old_manager_render = Manager.render
function Manager:render(area)
return old_manager_render(self, ui.Rect { x = area.x, y = area.y, w = area.w, h = area.h + 1 })
end
'');
}

View file

@ -0,0 +1,3 @@
{ pkgs, ... }: {
file = (pkgs.formats.toml {}).generate "YaziKeymapConfig" {};
}

View file

@ -0,0 +1,89 @@
{ pkgs, setting, ... }: {
file = (pkgs.formats.toml {}).generate "YaziYaziConfig" {
manager = {
linemode = "mtime";
mouse_events = [];
ratio = [ 1 4 3 ];
scrolloff = 1;
show_hidden = false;
show_symlink = true;
sort_by = "natural";
sort_dir_first = true;
sort_sensitive = true;
sort_translit = true;
};
# preview = {
# # image_filter = "triangle";
# image_filter = "lanczos3";
# image_quality = 80;
# };
opener = let
openWith = app: "${app} \"$@\"";
in {
default = [{
orphan = true;
run = openWith "xdg-open";
}];
browser = [{
orphan = true;
run = openWith setting.browser;
}];
text = [{
block = true;
run = openWith "nvim";
}];
audio = [{
orphan = true;
run = openWith "mpv --no-video";
}];
video = [{
orphan = true;
run = openWith "mpv";
}];
document = [{
orphan = true;
run = openWith "onlyoffice";
}];
pdf = [{
orphan = true;
run = openWith "evince";
}];
image = [{
orphan = true;
run = openWith "loupe";
}];
};
open = {
rules = [
{
mime = "application/pdf";
use = "pdf";
} {
mime = "text/*";
use = "text";
} {
mime = "application/vnd.openxmlformats-officedocument.*";
use = "document";
} {
mime = "image/*";
use = "image";
} {
mime = "video/*";
use = "video";
} {
mime = "audio/*";
use = "audio";
} {
name = "*.json";
use = "text";
} {
name = "*.html";
use = [ "browser" "text" ];
}
];
};
};
}