From 5675c7e38859af223a66d317ee69cf6b1c2cdca2 Mon Sep 17 00:00:00 2001 From: Szymon P Date: Wed, 6 May 2026 18:22:09 +0200 Subject: [PATCH] update yazi --- flake.nix | 5 ++++ modules/cli/yazi.nix | 60 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index a3036d7..0e16d11 100644 --- a/flake.nix +++ b/flake.nix @@ -73,6 +73,11 @@ wallpaper = "Obrazy/tapety/catppuccin"; screenshot = "Obrazy/zrzuty/"; obsidian = "Dokumenty/obsidian"; + projects = "Kodowanie"; + documents = "Dokumenty"; + pictures = "Obrazy"; + downloads = "Pobrane"; + video = "Video"; }; isNixOS = true; diff --git a/modules/cli/yazi.nix b/modules/cli/yazi.nix index 5afc0e4..4478953 100644 --- a/modules/cli/yazi.nix +++ b/modules/cli/yazi.nix @@ -1,4 +1,4 @@ -{ ... }: +{ userConfig, ... }: { programs.yazi = { @@ -37,6 +37,64 @@ "yank" ]; } + { + on = [ + "g" + "p" + ]; + run = "cd ${userConfig.pathConfig.downloads}"; + } + { + on = [ + "g" + "d" + ]; + run = "cd ${userConfig.pathConfig.documents}"; + } + { + on = [ + "g" + "v" + ]; + run = "cd ${userConfig.pathConfig.video}"; + } + { + on = [ + "g" + "o" + ]; + run = "cd ${userConfig.pathConfig.pictures}"; + } + { + on = [ + "g" + "k" + ]; + run = "cd ${userConfig.pathConfig.projects}"; + } + ]; + + theme.icon.prepend_dirs = [ + { + name = userConfig.pathConfig.downloads; + text = "󰉍"; + } + { + name = userConfig.pathConfig.documents; + text = ""; + } + { + name = userConfig.pathConfig.video; + text = "󰕧"; + } + { + name = userConfig.pathConfig.pictures; + text = "󰋩"; + } + { + name = userConfig.pathConfig.projects; + text = ""; + } ]; }; }