From f488dd3c159f651ee98a58f6ed7115fe6727060f Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sun, 25 Feb 2024 15:37:23 +0530 Subject: config sync --- config/bottom.toml | 2 +- config/nvim | 2 +- config/zsh/aliases/dev.zsh | 15 +++++++++++++++ config/zsh/aliases/system.zsh | 4 ++++ configuration.nix | 3 +++ 5 files changed, 24 insertions(+), 2 deletions(-) diff --git a/config/bottom.toml b/config/bottom.toml index 69f48f3..f257478 100644 --- a/config/bottom.toml +++ b/config/bottom.toml @@ -1,7 +1,7 @@ [flags] left_legend = true rate = 700 -current_usage = true +current_usage = false case_sensitive = false regex = false temperature_type = "celsius" diff --git a/config/nvim b/config/nvim index 24532c4..98c4b45 160000 --- a/config/nvim +++ b/config/nvim @@ -1 +1 @@ -Subproject commit 24532c4cf66ab42019c30c95f2e71960399b568c +Subproject commit 98c4b45bbf604061256e3800f964ba8a5f6e80e8 diff --git a/config/zsh/aliases/dev.zsh b/config/zsh/aliases/dev.zsh index 9dd4307..d0398ea 100644 --- a/config/zsh/aliases/dev.zsh +++ b/config/zsh/aliases/dev.zsh @@ -60,3 +60,18 @@ fix-interpreter() { nix-shell -p patchelf --run "patchelf --set-interpreter \$(patchelf --print-interpreter \$(which mkdir)) $@" } + +# Terminal through neovim +vt() { + nvim +term \ + +'norm i' \ + +"lua vim.fn.feedkeys([[$1]])" \ + +'set nonumber norelativenumber signcolumn=no' \ + +'autocmd TermClose * execute "qa"' \ + +'hi @_phenax.term-title guibg=#1a1824 guifg=#8e7ae3 gui=bold' \ + +'set winbar=%#@_phenax.term-title#%=nvim-term%='; +} + +p__nvim_virtual_terminal() { vt "$BUFFER"; } +zle -N p__nvim_virtual_terminal; +bindkey '^T' p__nvim_virtual_terminal; diff --git a/config/zsh/aliases/system.zsh b/config/zsh/aliases/system.zsh index 4123e19..e7a6635 100644 --- a/config/zsh/aliases/system.zsh +++ b/config/zsh/aliases/system.zsh @@ -50,3 +50,7 @@ setup_webcam_night() { --set-ctrl gain=64 } +limit_memory() { + local lim=${1:-100M}; shift 1; + systemd-run --user --scope -p MemoryHigh="$lim" -p MemorySwapMax="$lim" "$@"; +} diff --git a/configuration.nix b/configuration.nix index af53443..c6691ea 100644 --- a/configuration.nix +++ b/configuration.nix @@ -83,6 +83,9 @@ in }; lxd.enable = false; virtualbox.host.enable = false; + # qemu = { + # enable = true; + # } # anbox.enable = true; }; services.flatpak.enable = true; -- cgit v1.3.1