From 248babab249c88f3470a7c4bf0d30de4388eab7a Mon Sep 17 00:00:00 2001 From: prescientmoon Date: Mon, 26 Feb 2024 12:56:54 +0100 Subject: [PATCH] Lazygit --- home/features/cli/catgirl.nix | 3 ++- home/features/cli/lazygit.nix | 9 +++++++++ home/features/neovim/config/ftplugin/lua.lua | 7 ++++++- home/features/neovim/default.nix | 7 ++++++- home/tethys.nix | 3 +-- 5 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 home/features/cli/lazygit.nix diff --git a/home/features/cli/catgirl.nix b/home/features/cli/catgirl.nix index effdcb6..e12c40a 100644 --- a/home/features/cli/catgirl.nix +++ b/home/features/cli/catgirl.nix @@ -16,5 +16,6 @@ in { home.packages = [ ircgay pkgs.catgirl ]; xdg.configFile."catgirl/tilde".text = mkCatgirlNetwork "tilde"; - satellite.persistence.at.state.apps.catgirl.directories = [ "${config.xdg.dataHome}/catgirl" ]; + satellite.persistence.at.state.apps.catgirl.directories = + [ "${config.xdg.dataHome}/catgirl" ]; } diff --git a/home/features/cli/lazygit.nix b/home/features/cli/lazygit.nix new file mode 100644 index 0000000..108ad29 --- /dev/null +++ b/home/features/cli/lazygit.nix @@ -0,0 +1,9 @@ +{ config, ... }: { + programs.lazygit = { + enable = true; + settings.promptToReturnFromSubprocess = false; + }; + + satellite.persistence.at.state.apps.lazygit.directories = + [ "${config.xdg.configHome}/lazygit" ]; +} diff --git a/home/features/neovim/config/ftplugin/lua.lua b/home/features/neovim/config/ftplugin/lua.lua index 463918b..d41d664 100644 --- a/home/features/neovim/config/ftplugin/lua.lua +++ b/home/features/neovim/config/ftplugin/lua.lua @@ -24,7 +24,12 @@ local function runLocal(functionName) end end -vim.keymap.set("n", "lf", ":source %", opts("Run [l]ua [f]ile ")) +vim.keymap.set( + "n", + "lf", + "source %", + opts("Run [l]ua [f]ile ") +) vim.keymap.set( "n", "ls", diff --git a/home/features/neovim/default.nix b/home/features/neovim/default.nix index ef91b7d..26c96ac 100644 --- a/home/features/neovim/default.nix +++ b/home/features/neovim/default.nix @@ -106,7 +106,12 @@ let # Use global clipboard using *cp* (keymap "nv" "" ''"+'' "Use global clipboard") # Save using *ji* - (nmap "" "silent write" "Save current file") + (nmap "" + (thunk '' + -- If we don't do this, the statusbar will flash for a second... + vim.cmd([[silent! write]]) + vim.opt.stl = vim.opt.stl + '') "Save current file") # }}} # {{{ Newline without comments { diff --git a/home/tethys.nix b/home/tethys.nix index c782195..65dbc40 100644 --- a/home/tethys.nix +++ b/home/tethys.nix @@ -10,6 +10,7 @@ ./features/cli/pass.nix ./features/cli/nix-index.nix ./features/cli/catgirl.nix + ./features/cli/lazygit.nix ./features/wayland/hyprland ./features/neovim ]; @@ -52,8 +53,6 @@ # }}} ]; - programs.lazygit.enable = true; - home.sessionVariables.QT_SCREEN_SCALE_FACTORS = 1.4; # Bigger text in qt apps satellite = {