From 9f387a2e163e531e71a330279df8be30879feef2 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L. de Mello" Date: Tue, 9 Apr 2024 13:06:28 -0300 Subject: [PATCH] feat: lg as lazygit alias --- modules/home-manager/profiles/gterminal.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/home-manager/profiles/gterminal.nix b/modules/home-manager/profiles/gterminal.nix index 908caf2..87749bd 100644 --- a/modules/home-manager/profiles/gterminal.nix +++ b/modules/home-manager/profiles/gterminal.nix @@ -33,16 +33,17 @@ in { lf.commands = { dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"''; editor-open = ''$$EDITOR $f''; - mkfile = '' ''${{ - printf "Dirname: " - read DIR + mkfile = '' + ''${{ + printf "Dirname: " + read DIR - if [[ $DIR = */ ]]; then - mkdir $DIR - else - touch $DIR - fi - }}''; + if [[ $DIR = */ ]]; then + mkdir $DIR + else + touch $DIR + fi + }}''; }; lf.extraConfig = let previewer = pkgs.writeShellScriptBin "pv.sh" '' @@ -159,6 +160,7 @@ in { export GPG_TTY=$(tty) alias tmux="tmux -f ${config.xdg.configHome}/tmux/tmux.conf"; + alias lg="${pkgs.lazygit}/bin/lazygit"; ''; }; };