Yazi: Never enging theming.j
This commit is contained in:
parent
9a433f44dc
commit
b5a3bda4a0
|
@ -1,33 +1,43 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
mkKeymap = desc: on: run: { inherit desc on run; };
|
||||
in
|
||||
{
|
||||
# REF: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/keymap.toml
|
||||
file = (pkgs.formats.toml { }).generate "YaziKeymapConfig" {
|
||||
manager = {
|
||||
prepend_keymap = [
|
||||
{
|
||||
desc = "Dangerous life";
|
||||
on = "d";
|
||||
run = "remove --permanently";
|
||||
}
|
||||
{
|
||||
desc = "Dangerous life";
|
||||
on = "D";
|
||||
run = "remove --permanently --force";
|
||||
}
|
||||
{
|
||||
desc = "Spawn shell here";
|
||||
on = "<Enter>";
|
||||
run = ''shell "SHELL_NAME=yazi $SHELL" --block --confirm'';
|
||||
}
|
||||
{
|
||||
desc = "Open interactively";
|
||||
on = "o";
|
||||
run = "open --interactive";
|
||||
}
|
||||
{
|
||||
desc = "Open default";
|
||||
on = "O";
|
||||
run = "open";
|
||||
}
|
||||
(mkKeymap "Delete" "d" "remove --permanently")
|
||||
(mkKeymap "Delete no questions asked" "D" "remove --permanently --force")
|
||||
(mkKeymap "Spawn shell here" "<Enter>" ''shell "SHELL_NAME=yazi $SHELL" --block --confirm'')
|
||||
(mkKeymap "Open interactively" "o" "open --interactive")
|
||||
(mkKeymap "Open default" "O" "open")
|
||||
# I wanna die thanks to nixfmt.
|
||||
(mkKeymap "Go to storage" [
|
||||
"g"
|
||||
"s"
|
||||
] "cd /storage")
|
||||
(mkKeymap "Go to tmp" [
|
||||
"g"
|
||||
"t"
|
||||
] "cd ~/tmp")
|
||||
(mkKeymap "Go to system tmp" [
|
||||
"g"
|
||||
"T"
|
||||
] "cd /tmp")
|
||||
(mkKeymap "Go to projects" [
|
||||
"g"
|
||||
"p"
|
||||
] "cd ~/project")
|
||||
# Yazi devs are... special.
|
||||
(mkKeymap "Go to downloads" [
|
||||
"g"
|
||||
"d"
|
||||
] "cd $XDG_DOWNLOAD_DIR")
|
||||
(mkKeymap "Go to configs" [
|
||||
"g"
|
||||
"c"
|
||||
] "cd $XDG_CONFIG_HOME")
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
color = config.style.color;
|
||||
border = {
|
||||
fg = "#${config.style.color.border}";
|
||||
};
|
||||
|
@ -19,15 +20,30 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
# REF: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/theme.toml
|
||||
file = (pkgs.formats.toml { }).generate "YaziThemeConfig" {
|
||||
manager = {
|
||||
border_style = border;
|
||||
border_symbol = " ";
|
||||
cwd = text;
|
||||
hovered = hover;
|
||||
preview_hovered = hover;
|
||||
tab_active = hover;
|
||||
};
|
||||
manager =
|
||||
let
|
||||
mkMarker = color: {
|
||||
bg = "#${color}";
|
||||
fg = "#${color}";
|
||||
};
|
||||
in
|
||||
{
|
||||
border_style = border;
|
||||
border_symbol = " ";
|
||||
count_copied = hover;
|
||||
count_cut = hover;
|
||||
count_selected = hover;
|
||||
cwd = text;
|
||||
hovered = hover;
|
||||
marker_copied = mkMarker color.accent;
|
||||
marker_cut = mkMarker color.accent;
|
||||
marker_marked = mkMarker color.hl;
|
||||
marker_selected = mkMarker color.selection;
|
||||
preview_hovered = hover;
|
||||
tab_active = hover;
|
||||
};
|
||||
select = {
|
||||
border = borderLight;
|
||||
};
|
||||
|
@ -51,7 +67,10 @@ in
|
|||
separator = " - ";
|
||||
separator_style = text;
|
||||
};
|
||||
|
||||
confirm = {
|
||||
border = borderLight;
|
||||
title = borderLight;
|
||||
};
|
||||
status = {
|
||||
mode_normal = hover;
|
||||
mode_select = select;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
# REF: https://github.com/sxyazi/yazi/blob/main/yazi-config/preset/yazi.toml
|
||||
file = (pkgs.formats.toml { }).generate "YaziYaziConfig" {
|
||||
manager = {
|
||||
# linemode = "mtime";
|
||||
|
|
Loading…
Reference in a new issue