summaryrefslogtreecommitdiff
path: root/features/user/cli
diff options
context:
space:
mode:
authortriethyl <triethylammonium@pm.me>2025-09-02 10:48:21 -0400
committertriethyl <triethylammonium@pm.me>2025-09-02 10:48:21 -0400
commit31c316d19cd974bb81a5d6de62142ff24db1c78e (patch)
treecb941422c76cb8953830a8d58c8e14dca1a10319 /features/user/cli
parent1c21018347aa277caba74e554cb8d1b1e7fc6bed (diff)
reorganized directory structure
Diffstat (limited to 'features/user/cli')
-rw-r--r--features/user/cli/apps/btop.nix15
-rw-r--r--features/user/cli/apps/helix.nix71
-rw-r--r--features/user/cli/apps/lazygit.nix12
-rw-r--r--features/user/cli/apps/zellij.nix22
-rw-r--r--features/user/cli/bundles/go-env.nix14
-rw-r--r--features/user/cli/scripts/spiral/default.nix10
-rw-r--r--features/user/cli/scripts/spiral/plan.md47
-rwxr-xr-xfeatures/user/cli/scripts/spiral/spiral.nu329
-rw-r--r--features/user/cli/shells/nushell/completion.nu17
-rw-r--r--features/user/cli/shells/nushell/default.nix109
-rw-r--r--features/user/cli/shells/nushell/direnv-project-template/.envrc1
-rw-r--r--features/user/cli/shells/nushell/direnv-project-template/.gitignore1
-rw-r--r--features/user/cli/shells/nushell/direnv-project-template/flake.nix29
-rw-r--r--features/user/cli/shells/nushell/prompt.nu97
-rw-r--r--features/user/cli/utils/git.nix16
-rw-r--r--features/user/cli/utils/pandoc.nix13
-rw-r--r--features/user/cli/utils/ssh.nix20
17 files changed, 0 insertions, 823 deletions
diff --git a/features/user/cli/apps/btop.nix b/features/user/cli/apps/btop.nix
deleted file mode 100644
index 5bb2499..0000000
--- a/features/user/cli/apps/btop.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ config, lib, ... }: let
- cfg = config.features.cli.apps.btop;
-in {
- options.features.cli.apps.btop.enable = lib.mkEnableOption "btop";
- config = lib.mkIf cfg.enable {
- programs.btop = {
- enable = true;
- settings = {
- color_theme = "TTY";
- theme_background = false;
- update_ms = 500;
- };
- };
- };
-}
diff --git a/features/user/cli/apps/helix.nix b/features/user/cli/apps/helix.nix
deleted file mode 100644
index a267b23..0000000
--- a/features/user/cli/apps/helix.nix
+++ /dev/null
@@ -1,71 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: let
- cfg = config.features.cli.apps.helix;
-in {
- options.features.cli.apps.helix.enable = lib.mkEnableOption "helix";
- config = lib.mkIf cfg.enable {
- home.packages = with pkgs; [
- wl-clipboard
- ];
- programs.helix = {
- enable = true;
- extraPackages = with pkgs; [
- markdown-oxide
- python312Packages.black
- vscode-langservers-extracted
- nil
- ];
- settings = {
- editor = {
- color-modes = true;
- true-color = true;
- line-number = "relative";
- mouse = false;
- lsp.display-messages = true;
- statusline = {
- left = ["file-name" "file-modification-indicator"];
- center = [];
- right = [];
- mode = {
- normal = "NORMAL";
- insert = "INSERT";
- select = "SELECT";
- };
- };
- cursor-shape = {
- normal = "block";
- insert = "bar";
- select = "underline";
- };
- soft-wrap = {
- enable = true;
- wrap-indicator = "";
- };
- };
- keys = {
- normal = {
- esc = ["collapse_selection" "keep_primary_selection"];
- space = {
- v = "file_picker_in_current_buffer_directory";
- h = ":lsp-workspace-command";
- };
- };
- };
- };
- languages = {
- language = [
- {
- name = "nix";
- auto-format = true;
- formatter.command = "${pkgs.alejandra}/bin/alejandra";
- language-servers = ["nil"];
- }
- ];
- };
- };
- };
-}
diff --git a/features/user/cli/apps/lazygit.nix b/features/user/cli/apps/lazygit.nix
deleted file mode 100644
index 9d19a36..0000000
--- a/features/user/cli/apps/lazygit.nix
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- config,
- lib,
- ...
-}: let
- cfg = config.features.cli.apps.lazygit;
-in {
- options.features.cli.apps.lazygit.enable = lib.mkEnableOption "lazygit";
- config = lib.mkIf cfg.enable {
- programs.lazygit.enable = true;
- };
-}
diff --git a/features/user/cli/apps/zellij.nix b/features/user/cli/apps/zellij.nix
deleted file mode 100644
index 8942771..0000000
--- a/features/user/cli/apps/zellij.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ config, lib, ... }: let
- cfg = config.features.cli.apps.zellij;
-in {
- options.features.cli.apps.zellij.enable = lib.mkEnableOption "zellij";
- config = lib.mkIf cfg.enable {
- programs.zellij = {
- enable = true;
- settings = {
- pane_frames = true;
- ui.pane_frames.rounded_corners = true;
- simplified_ui = true;
- default_layout = "compact";
- hide_session_name = true;
-
- mouse_mode = false;
-
- on_force_close = "detach";
- session_serialization = true;
- };
- };
- };
-}
diff --git a/features/user/cli/bundles/go-env.nix b/features/user/cli/bundles/go-env.nix
deleted file mode 100644
index 6e103a3..0000000
--- a/features/user/cli/bundles/go-env.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, pkgs, lib, ... }: let
- cfg = config.features.cli.bundles.go-env;
-in {
- options.features.cli.bundles.go-env.enable = lib.mkEnableOption "go-env";
- config = lib.mkIf cfg.enable {
- home.sessionVariables = {
- GOPATH = "~/.go";
- };
- home.packages = with pkgs; [
- go
- gopls
- ];
- };
-}
diff --git a/features/user/cli/scripts/spiral/default.nix b/features/user/cli/scripts/spiral/default.nix
deleted file mode 100644
index 780c207..0000000
--- a/features/user/cli/scripts/spiral/default.nix
+++ /dev/null
@@ -1,10 +0,0 @@
-{ config, pkgs, lib, ... }: let
- cfg = config.features.cli.scripts.spiral;
-in {
- options.features.cli.scripts.spiral.enable = lib.mkEnableOption "spiral";
- config = lib.mkIf cfg.enable {
- home.packages = [
- (pkgs.writers.writeNuBin "sp" (builtins.readFile ./spiral.nu))
- ];
- };
-}
diff --git a/features/user/cli/scripts/spiral/plan.md b/features/user/cli/scripts/spiral/plan.md
deleted file mode 100644
index adbcba0..0000000
--- a/features/user/cli/scripts/spiral/plan.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# Spiral Plan
-
-## Main Functions
-
-Are ran by the user.
-
-- `main new (--no-frontmatter (-n)) (title: <string>)`
-- `main open (--by-title (-t)) (--by-contents (-c)) (title: <string>)`
-- `main tags (tag: <string>)`
-- `main remove (--by-title (-t)) (--by-contents (-c)) (title: <string>)`
-- `main list`
-- `main restore (--by-title (-t)) (--by-contents (-c)) (title: <string>)`
-- `main journal (date: <string>)`
-
-## Action Functions
-
-Accept parameters and perform an action.
-
-- `create_note (--no-frontmatter) --title <string>`
-- `create_journal_entry --title <string>`
-- `open_file_in_editor --dir <dir>`
-
-## Interface Functions
-
-Accept a prompt and other data and return a value from the user.
-
-- `get_confirmation --prompt <string> -> bool`
-- `get_string_input --prompt <string> -> string`
-- `get_choice_from_list --list <list> -> string`
-- `get_choice_from_dir --dir <dir> -> path`
-- `get_choice_from_dir_file_contents --dir <dir> -> path: line number`
-- `get_choice_from_note_titles --dir <dir> -> path`
-
-## String Manipulation Functions
-
-Accept, modify, and return strings.
-
-- `title_to_path title: <string> -> path`
-- `strip_line_number string: <string> -> string`
-- `generate_note_text (--no-frontmatter) --title <string> -> string`
-
-## File Manipulation Functions
-
-Read, write, or otherwise manipulate files.
-
-- `parse_note_frontmatter path: <path> -> record`
-- `list_notes -> table`
diff --git a/features/user/cli/scripts/spiral/spiral.nu b/features/user/cli/scripts/spiral/spiral.nu
deleted file mode 100755
index 399dace..0000000
--- a/features/user/cli/scripts/spiral/spiral.nu
+++ /dev/null
@@ -1,329 +0,0 @@
-#!/usr/bin/env nu
-
-# +---------------+
-# | Configuration |
-# +---------------+
-
-# Default config options.
-mut config = {
- notebook_dir: "~/Sync/notebook"
- journal_dir: "~/Sync/notebook/journal"
- trash_dir: "~/Sync/notebook/.trash"
-}
-
-# Read config options from environment variables.
-if ((try {$env.spiral_notebook_dir}) != null) {
- $config.notebook_dir = $env.spiral_notebook_dir
-}
-if ((try {$env.spiral_journal_dir}) != null) {
- $config.journal_dir = $env.spiral_journal_dir
-}
-if ((try {$env.spiral_trash_dir}) != null) {
- $config.trash_dir = $env.spiral_trash_dir
-}
-
-# Make config immutable.
-let config = $config
-
-# +-------------+
-# | Subcommands |
-# +-------------+
-
-# A commandline utility written in nushell to manage your markdown notebook!
-def "main" [] {}
-
-# Create a new note.
-def "main new" [
- title?: string # The title of the new note.
- --no-frontmatter (-n) # Don't add a frontmatter to the note.
-] {
- mut title = $title
- if ($title == null) {
- $title = get_string_input "Enter a title: "
- }
- if $no_frontmatter {
- create_note --no-frontmatter $title
- } else {
- create_note $title
- }
-}
-
-# Open a pre-existing note.
-def "main open" [
- --by-title (-t) # Filter notes by their title (disables preview)
- --by-contents (-c) # Search through the contents of the notebook.
- title?: string # The title of the note to open.
-] {
- if ($by_title and $by_contents) {
- error make {msg: "Only one flag can be used at a time."}
- }
- if ($title != null) {
- if ((title_to_path $title) | path exists) {
- return (title_to_path $title)
- } else {
- if (confirm $"The note ($title) does not exist. Would you like to create it? ") {
- create_note $title
- }
- }
- } else if $by_title {
- edit $"(get_choice_from_note_titles --dir $config.notebook_dir)"
- } else if $by_contents {
- edit (get_choice_from_dir_file_contents --dir $config.notebook_dir)
- } else {
- edit $"(get_choice_from_dir --dir $config.notebook_dir)"
- }
-}
-
-# Open a note based on the tag.
-def "main tags" [
- tag?: string # The tag to select a note from.
-] {
- # This section of code creates nested records with tags and notes and stores them in $tag_record.
- let note_table = list_notes --dir $config.notebook_dir
-
- let tag_list = $note_table
- | get tags
- | flatten
- | where (($it != null) and ($it != ""))
-
- mut tag_record = {}
-
- print $tag_list
- for tag in $tag_list {
- mut notes = {}
- for note_path in ($note_table | get path) {
- let note_tags = ($note_table | where path == $note_path | get tags | flatten)
- let note_title = ($note_table | where path == $note_path | get title | to text | str trim)
- if ($note_tags != []) {
- for note_tag in $note_tags {
- if ($note_tag == $tag) {
- $notes = $notes | insert $note_title { $note_path }
- }
- }
- }
- }
- let notes = $notes
- # $tag_record = $tag_record | insert $tag { $notes }
- }
-
- # Actual logic of the subcommand
- if ($tag == null) {
- let user_tag_choice = get_choice_from_list --list $tag_list
- if ($user_tag_choice != "") {
- let note_record = $tag_record | get $user_tag_choice
- let user_note_title_choice = get_choice_from_list --list ($note_record | columns)
- if ($user_note_title_choice != "") {
- edit ($note_record | get $user_note_title_choice)
- }
- }
- } else {
- if ($tag_list | any {|item| $item == $tag}) {
- let note_record = $tag_record | get $tag
- let user_note_title_choice = get_choice_from_list --list ($note_record | columns)
- if ($user_note_title_choice != "") {
- edit ($note_record | get $user_note_title_choice)
- }
- } else {
- print $"The tag '($tag)' does not exist."
- }
- }
-}
-
-# Get a table of notes and their properties.
-def "main list" [] {
- return (list_notes --dir $config.notebook_dir)
-}
-
-# Send a note to the trash.
-def "main remove" [
- --by-title (-t) # Filter notes by their title (disables preview)
- --by-contents (-c) # Search through the contents of the notebook.
- title?: string # The title of the note to send to the trash.
-] {
- if ($by_title and $by_contents) {
- error make {msg: "Only one flag can be used at a time."}
- }
- if ($title != null) {
- if ((title_to_path $title) | path exists) {
- return (title_to_path $title)
- } else {
- if (confirm $"The note ($title) does not exist. Would you like to create it? ") {
- create_note $title
- }
- }
- } else if $by_title {
- mv (select_note --by-title --dir $config.notebook_dir)
- } else if $by_contents {
- ^$env.editor (select_note --by-contents --dir $config.notebook_dir)
- } else {
- ^$env.editor (select_note --dir $config.notebook_dir)
- }
-}
-
-# Explains how to configural Spiral.
-def "main config" [] {
- print "The default options:"
- print $config
- print "These can be modified by editing the environment variables corresponding to each option. For example, to change the notebook directory, set $env.spiral_notebook_dir='~/custom-dir/notebook'."
-}
-
-# +------------------+
-# | Action Functions |
-# +------------------+
-
-def create_note [--no-frontmatter, title: string] {
- let note_path = title_to_path $title
- if ($note_path | path exists) {
- if (confirm "This note already exists. Would you like to open it?") {
- edit $note_path
- } else {exit}
- } else {
- if $no_frontmatter {
- generate_note_text --no-frontmatter --title $title | save $note_path
- } else {
- generate_note_text --title $title | save $note_path
- }
- edit $"($note_path):100:100"
- }
-}
-
-def create_journal_entry [
-
-] {
-
-}
-
-def edit [
- file_path: string
-] {
- if (($file_path | path type) == file) {
- ^$env.editor ($file_path | path expand)
- }
-}
-
-# +---------------------+
-# | Interface Functions |
-# +---------------------+
-
-def get_string_input [prompt: string] {
- print $prompt
- return (input)
-}
-
-def get_confirmation [prompt: string] {
- print $"($prompt) \(Y/n)"
- let confirmation = (input | str downcase)
- if ($confirmation == "n" ) {
- return false
- } else {return true}
-}
-
-def get_choice_from_list [ --list: list ] {
- return (($list | to text) | tv)
-} # -> string
-
-def get_choice_from_dir [ --dir: string ] {
- return $"($config.notebook_dir | path expand)/(tv files ($dir | path expand))"
-} # -> full path
-
-def get_choice_from_dir_file_contents [ --dir: string ] {
- return $"($config.notebook_dir | path expand)/(tv text ($dir | path expand))"
-} # -> full path: line number
-
-def get_choice_from_note_titles [ --dir: string ] {
- let note_table = list_notes --dir $config.notebook_dir
- let user_choice = get_choice_from_list --list ($note_table | get title)
- let user_choice_path = (
- $note_table
- | where title == $user_choice
- | get path
- | to text
- | str trim
- )
- if (($user_choice_path | path type) == file) {
- return $user_choice_path
- }
-} # -> full path
-
-# +-------------------------------+
-# | String Manipulation Functions |
-# +-------------------------------+
-
-def title_to_path [title: string] {
- return (
- $"($config.notebook_dir)/($title | str kebab-case).md"
- | path expand
- )
-} # -> full path
-
-def strip_line_number [string: string] {
- return (
- $string
- | split row ":"
- | select 0
- | to text
- | str trim
- )
-} # -> string
-
-def generate_note_text [
- --no-frontmatter
- --title: string
-] {
- if $no_frontmatter {
- return $"# ($title)\n"
- } else {
- let frontmatter_info = {
- title: $title
- date: (date now)
- lang: "en-US"
- tags: ['note']
- }
- return $"---\n($frontmatter_info | to yaml)---\n\n# ($title)"
- }
-} # -> string
-
-# +-----------------------------+
-# | File Manipulation Functions |
-# +-----------------------------+
-
-def list_notes [--dir: string] {
- return ((
- ls ($dir | path expand)
- | where type == file
- | get name
- ) | par-each {
- |note_path|
- let frontmatter = parse_frontmatter $note_path
- if ($frontmatter != null) {
- return {
- title: (try {$frontmatter.title})
- path: $note_path
- tags: (try {$frontmatter.tags})
- date: (try {$frontmatter.date})
- lang: (try {$frontmatter.lang})
- }
- }
- })
-} # -> table
-
-def parse_frontmatter [path: string] {
- let frontmatter = try {
- open ($path | path expand)
- | split row "---"
- | get 1
- | from yaml
- }
- if ($frontmatter == null) {
- let title = try {
- open ($path | path expand)
- | split row "#"
- | get 1
- | split row "\n"
- | get 0
- | str trim
- }
- return {title: $title}
- }
- return $frontmatter
-} # -> record
diff --git a/features/user/cli/shells/nushell/completion.nu b/features/user/cli/shells/nushell/completion.nu
deleted file mode 100644
index b25d387..0000000
--- a/features/user/cli/shells/nushell/completion.nu
+++ /dev/null
@@ -1,17 +0,0 @@
-# Carapace Autocomplete
-let carapace_completer = {|spans|
- carapace $spans.0 nushell ...$spans | from json
-}
-$env.config = {
- completions: {
- case_sensitive: false
- quick: true
- partial: true
- algorithm: fuzzy
- external: {
- enable: true
- max_results: 100
- completer: $carapace_completer
- }
- }
-}
diff --git a/features/user/cli/shells/nushell/default.nix b/features/user/cli/shells/nushell/default.nix
deleted file mode 100644
index 7561fb1..0000000
--- a/features/user/cli/shells/nushell/default.nix
+++ /dev/null
@@ -1,109 +0,0 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: let
- cfg = config.features.cli.shells.nushell;
-in {
- options.features.cli.shells.nushell.enable = lib.mkEnableOption "nushell";
- config = lib.mkIf cfg.enable {
- home.packages = with pkgs; [
- television
- gitprompt-rs
- ];
- programs.nushell = {
- enable = true;
- plugins = with pkgs.nushellPlugins; [
- gstat
- ];
- shellAliases = {
- "nix-shell" = "nix-shell --command 'SHELL=nu nu'";
- "cd" = "z";
- "ze" = "zellij";
- "lg" = "lazygit";
- "bk" = "cd $env.OLDPWD";
- "fg" = "job unfreeze";
- };
- configFile.text =
- /*
- nu
- */
- ''
- # Source modularized configs.
- source ${./prompt.nu}
- source ${./completion.nu}
-
- # General Config
- $env.config = {
- show_banner: false
- edit_mode: 'emacs'
-
- history: {
- isolation: true # Isolate the history of each nushell session
- file_format: sqlite # Required for isolation
- }
- }
- $env.editor = "hx"
-
- # go should use a hidden directory
- $env.gopath = "${config.home.homeDirectory}/.go"
-
- # Use direnv if present.
- { ||
- if (which direnv | is-empty) {
- return
- }
- direnv export json | from json | default {} | load-env
-
- }
-
- # define a function to initialize a direnv project
- def projinit [path?: string] { # this code sucks but I'm tired of working on it
- mut path = $path
- if ($path == null) {
- $path = "./"
- }
- let path = $path | path expand
- let template_path = "${./direnv-project-template}" | path expand
- let template_files = ls -a $template_path | get name
- $template_files | each {|item| cp $item $path}
- ls -a $path | get name | where {|name| $template_files | str contains ($name | path basename) | any {}} | each {|name| chmod +w $name}
- if (try {git rev-parse --is-inside-work-tree e> /dev/null}) != null {
- direnv allow
- } else {
- # git init
- direnv allow
- }
- # git add $"($path)/."
- # git commit -m "initialized"
- }
-
- # Quickly create a nix shell.
- def qs [...packages] {
- if $packages == [] {
- print "Please use a package name."
- return
- }
- let packages_string = $packages
- | each {|package| return $"nixpkgs#($package) "}
- | str join
- | str trim
- nu -c $"nix shell ($packages_string)"
- }
-
- # Quickly run a nix package.
- def qr --wrapped [package: string ...arguments] {
- nix run $"nixpkgs#($package)" -- ($arguments | str join " ")
- }
- '';
- };
- programs.zoxide.enable = true;
- programs.carapace.enable = true;
- programs.direnv = {
- enable = true;
- nix-direnv.enable = true;
- silent = true;
- };
- };
-}
diff --git a/features/user/cli/shells/nushell/direnv-project-template/.envrc b/features/user/cli/shells/nushell/direnv-project-template/.envrc
deleted file mode 100644
index 3550a30..0000000
--- a/features/user/cli/shells/nushell/direnv-project-template/.envrc
+++ /dev/null
@@ -1 +0,0 @@
-use flake
diff --git a/features/user/cli/shells/nushell/direnv-project-template/.gitignore b/features/user/cli/shells/nushell/direnv-project-template/.gitignore
deleted file mode 100644
index 92b2793..0000000
--- a/features/user/cli/shells/nushell/direnv-project-template/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.direnv
diff --git a/features/user/cli/shells/nushell/direnv-project-template/flake.nix b/features/user/cli/shells/nushell/direnv-project-template/flake.nix
deleted file mode 100644
index 4bab14a..0000000
--- a/features/user/cli/shells/nushell/direnv-project-template/flake.nix
+++ /dev/null
@@ -1,29 +0,0 @@
-{
- description = "Project flake";
-
- inputs = {
- nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
- systems.url = "github:nix-systems/default";
- flake-utils = {
- url = "github:numtide/flake-utils";
- inputs.systems.follows = "systems";
- };
- };
-
- outputs = {
- nixpkgs,
- flake-utils,
- ...
- }:
- flake-utils.lib.eachDefaultSystem (
- system: let
- pkgs = nixpkgs.legacyPackages.${system};
- in {
- devShells.default = pkgs.mkShell {
- packages = with pkgs; [
- hello
- ];
- };
- }
- );
-}
diff --git a/features/user/cli/shells/nushell/prompt.nu b/features/user/cli/shells/nushell/prompt.nu
deleted file mode 100644
index cfdd478..0000000
--- a/features/user/cli/shells/nushell/prompt.nu
+++ /dev/null
@@ -1,97 +0,0 @@
-# +---------------+
-# | Prompt Config |
-# +---------------+
-
-# define segmants
-def path_segment [] {
- let current_dir = pwd
- let truncated_current_dir = $current_dir
- return (pwd | str replace $env.home '~')
-}
-def git_segment [] {
- return (gitprompt-rs)
-}
-let do_newline = false # whether to do the newline thing
-$env.PROMPT_COMMAND = {||
- # add a newline at the beginning if it isn't the first prompt
- mut newline = ""
- if ($env.CMD_DURATION_MS != '0823') and $do_newline {
- $newline = "\n"
- }
- # define the prompt
- return $"($newline)(ansi white) ╭ (ansi green_bold)(path_segment)(ansi reset) (git_segment)\n "
-}
-
-# remove right prompt section
-$env.PROMPT_COMMAND_RIGHT = { "" }
-
-# set default prompt indicator
-$env.PROMPT_INDICATOR = $'(ansi white)╰ (ansi red_bold)> '
-# $env.TRANSIENT_PROMPT_INDICATOR = $' (ansi red_bold)> '
-$env.PROMPT_MULTILINE_INDICATOR = " : "
-
-# change prompt to a lambda if in a nix shell
-let in_nix_shell = $env.path | str contains "/nix/store" | any {|el| $el}
-if $in_nix_shell {
- $env.PROMPT_INDICATOR = $'(ansi white)╰ (ansi red_bold)λ '
-}
-
-# replace vi insert and normal mode prompt indicators with cursor changes
-$env.PROMPT_INDICATOR_VI_NORMAL = $env.PROMPT_INDICATOR
-$env.PROMPT_INDICATOR_VI_INSERT = $env.PROMPT_INDICATOR
-$env.config.cursor_shape.vi_insert = "line"
-$env.config.cursor_shape.vi_normal = "block"
-
-$env.config.cursor_shape.emacs = "line"
-
-# customize menus to match
-$env.config.menus = [
- {
- name: help_menu
- only_buffer_difference: true # Search is done on the text written after activating the menu
- marker: $env.PROMPT_INDICATOR # Indicator that appears with the menu is active
- type: {
- layout: description # Type of menu
- columns: 4 # Number of columns where the options are displayed
- col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
- col_padding: 2 # Padding between columns
- selection_rows: 4 # Number of rows allowed to display found options
- description_rows: 10 # Number of rows allowed to display command description
- }
- style: {
- text: green # Text style
- selected_text: green_reverse # Text style for selected option
- description_text: yellow # Text style for description
- }
- }
- {
- name: completion_menu
- only_buffer_difference: false # Search is done on the text written after activating the menu
- marker: $env.PROMPT_INDICATOR # Indicator that appears with the menu is active
- type: {
- layout: columnar # Type of menu
- columns: 4 # Number of columns where the options are displayed
- col_width: 20 # Optional value. If missing all the screen width is used to calculate column width
- col_padding: 2 # Padding between columns
- }
- style: {
- text: green # Text style
- selected_text: green_reverse # Text style for selected option
- description_text: yellow # Text style for description
- }
- }
- {
- name: history_menu
- only_buffer_difference: true # Search is done on the text written after activating the menu
- marker: $env.PROMPT_INDICATOR # Indicator that appears with the menu is active
- type: {
- layout: list # Type of menu
- page_size: 10 # Number of entries that will presented when activating the menu
- }
- style: {
- text: green # Text style
- selected_text: green_reverse # Text style for selected option
- description_text: yellow # Text style for description
- }
- }
-]
diff --git a/features/user/cli/utils/git.nix b/features/user/cli/utils/git.nix
deleted file mode 100644
index b827d7b..0000000
--- a/features/user/cli/utils/git.nix
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- config,
- lib,
- ...
-}: let
- cfg = config.features.cli.utils.git;
-in {
- options.features.cli.utils.git.enable = lib.mkEnableOption "git";
- config = lib.mkIf cfg.enable {
- programs.git = {
- enable = true;
- userEmail = "triethylammonium@pm.me";
- userName = "triethyl";
- };
- };
-}
diff --git a/features/user/cli/utils/pandoc.nix b/features/user/cli/utils/pandoc.nix
deleted file mode 100644
index 899bd4b..0000000
--- a/features/user/cli/utils/pandoc.nix
+++ /dev/null
@@ -1,13 +0,0 @@
-{ config, pkgs, lib, ... }: let
- cfg = config.features.cli.utils.pandoc;
-in {
- options.features.cli.utils.pandoc.enable = lib.mkEnableOption "pandoc";
- config = lib.mkIf cfg.enable {
- programs.pandoc = {
- enable = true;
- };
- home.packages = with pkgs; [
- texliveSmall
- ];
- };
-}
diff --git a/features/user/cli/utils/ssh.nix b/features/user/cli/utils/ssh.nix
deleted file mode 100644
index f10d0b2..0000000
--- a/features/user/cli/utils/ssh.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ config, lib, ... }: let
- cfg = config.features.cli.utils.ssh;
-in {
- options.features.cli.utils.ssh.enable = lib.mkEnableOption "ssh";
- config = lib.mkIf cfg.enable {
- programs.ssh = {
- enable = true;
- matchBlocks = {
- "culsans.site" = {
- hostname = "culsans.site";
- user = "server";
- port = 2200;
- };
- "git.culsans.site" = {
- hostname = "culsans.site";
- };
- };
- };
- };
-}