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