From 021331f52ca44f7b191e3b2d3d63e5f784686692 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 15 Dec 2024 23:17:08 +0200 Subject: Added atuin, I still prefer fzf I think but might change my mind later --- .config/atuin/config.toml | 77 +++++++++++++++++++++++++++++++++++++++++++++ .zshrc | 5 +++ hosts/laptop-nixos/home.nix | 1 + 3 files changed, 83 insertions(+) create mode 100644 .config/atuin/config.toml diff --git a/.config/atuin/config.toml b/.config/atuin/config.toml new file mode 100644 index 0000000..7545827 --- /dev/null +++ b/.config/atuin/config.toml @@ -0,0 +1,77 @@ +# date format used, either "us" or "uk" +dialect = "uk" + +## default timezone to use when displaying time +## either "l", "local" to use the system's current local timezone, or an offset +## from UTC in the format of "<+|->H[H][:M[M][:S[S]]]" +## for example: "+9", "-05", "+03:30", "-01:23:45", etc. +# timezone = "local" + +# TODO: Once I have my own server setup then replace this +# address of the sync server +# sync_address = "https://api.atuin.sh" + +# which style to use, possible values: auto, full, compact +style = "compact" + +# the maximum number of lines the interface should take up +inline_height = 12 + +## enable or disable showing a preview of the selected command +show_preview = false + +## possible values: emacs, subl +# word_jump_mode = "emacs" + +## characters that count as a part of a word +# word_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +## number of context lines to show when scrolling by pages +# scroll_context_lines = 1 + +## use ctrl instead of alt as the shortcut modifier key for numerical UI shortcuts +## alt-0 .. alt-9 +ctrl_n_shortcuts = false + +# default history list format - can also be specified with the --format arg +history_format = "{time}\t{command}\t{duration}yooo" + +# prevent commands matching any of these regexes from being written to history. +history_filter = ["^cd", "^.*--secret=.+"] + +show_help = false + +# Don't run command on enter, allow editing it +enter_accept = false + +## "emacs", "vim-insert", "vim-normal" or "auto" to detect based on the shell +keymap_mode = "vim-insert" + +[stats] +# Set commands where we should consider the subcommand for statistics. Eg, kubectl get vs just kubectl +common_subcommands = [ + "cargo", + "docker", + "git", + "go", + "nix", + "npm", + "pnpm", + "tmux", +] + +## Set commands that should be totally stripped and ignored from stats +common_prefix = ["sudo"] + +# Set commands that will be completely ignored from stats +ignored_commands = ["cd", "ls"] + +[keys] +# Defaults to true. If disabled, using the up/down key won't exit the TUI when scrolled past the first/last entry. +scroll_exits = false + +[sync] +# Enable sync v2 by default +# This ensures that sync v2 is enabled for new installs only +# In a later release it will become the default across the board +records = true diff --git a/.zshrc b/.zshrc index d251f83..49900c9 100644 --- a/.zshrc +++ b/.zshrc @@ -35,6 +35,11 @@ eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)" zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' && zinit load zdharma-continuum/null +# Load Atuin (better ctrl+r) +# bindkey '"\C-r"' 'reverse-search-history' +eval "$(atuin init zsh)" +zinit load atuinsh/atuin + # # Keybindings bindkey -v # Vim Mode bindkey '^p' history-search-backward diff --git a/hosts/laptop-nixos/home.nix b/hosts/laptop-nixos/home.nix index 682b851..eeed818 100644 --- a/hosts/laptop-nixos/home.nix +++ b/hosts/laptop-nixos/home.nix @@ -76,6 +76,7 @@ kdePackages.korganizer kdePackages.kaddressbook gitleaks + atuin ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage -- cgit v1.3.1