### Install Joshuto with Custom Installation Path Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto to a custom directory by setting the INSTALL_PREFIX environment variable before running the installation script. Requires curl and openssl. ```bash ~$ INSTALL_PREFIX="$HOME" bash <(curl -s https://raw.githubusercontent.com/kamiyaa/joshuto/master/utils/install.sh) ``` -------------------------------- ### joshuto.toml - General Configuration Example Source: https://context7.com/kamiyaa/joshuto/llms.txt Example TOML configuration for joshuto, controlling global behavior like mouse support, trash handling, and file watching. Place this file at ~/.config/joshuto/joshuto.toml. ```toml # ~/.config/joshuto/joshuto.toml mouse_support = true scroll_offset = 6 xdg_open = true # fall back to xdg-open for unknown types xdg_open_fork = true # fork xdg-open so joshuto stays usable use_trash = true # send deleted files to system trash watch_files = true # auto-refresh on filesystem changes focus_on_create = true # cursor jumps to newly created file/dir max_preview_size = "2 MB" zoxide_update = false # update zoxide DB on every navigation ``` -------------------------------- ### Install Joshuto System Wide (Custom Path) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto system-wide to a specified path (e.g., /usr/local/bin) by setting the INSTALL_PREFIX environment variable before running the installation script. Requires curl and openssl. ```bash ~# INSTALL_PREFIX="/usr/local/bin" bash <(curl -s https://raw.githubusercontent.com/kamiyaa/joshuto/master/utils/install.sh) ``` -------------------------------- ### Install Joshuto for Single User (Local Path) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto for the current user by specifying the local path to the project. The --force flag overwrites existing installations. ```bash ~$ cargo install --path=. --force ``` -------------------------------- ### Delete Files Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example of a keybinding to delete selected files. Use --permanently to bypass trash and --noconfirm to avoid prompts. ```toml keymap = [ //.. {keys = [ "dd" ], command = "delete_files"}, {keys = [ "D" ], command = "delete_files --foreground=true --permanently"}, {keys = [ "d" ], command = "delete_files --noconfirm"} ] ``` -------------------------------- ### Install Joshuto Latest Release (Default Path) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install the latest release of joshuto using a provided script. This method installs to the default path ($HOME/.local/bin/) and requires curl and openssl. ```bash ~$ bash <(curl -s https://raw.githubusercontent.com/kamiyaa/joshuto/master/utils/install.sh) ``` -------------------------------- ### Launch joshuto in a specific directory Source: https://context7.com/kamiyaa/joshuto/llms.txt Start joshuto and have it open directly into a specified directory, such as ~/Downloads. ```bash joshuto ~/Downloads ``` -------------------------------- ### Example of Command Prompt Usage Source: https://github.com/kamiyaa/joshuto/wiki/keymap.toml Illustrates how to use the ':' command to open the command prompt with a pre-filled command, such as changing the directory. ```text :cd / ``` -------------------------------- ### Install joshuto via crates.io Source: https://context7.com/kamiyaa/joshuto/llms.txt Install joshuto using the cargo package manager. Requires Rust and Cargo to be installed. ```bash cargo install joshuto ``` -------------------------------- ### Install Joshuto System Wide Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto system-wide using cargo, specifying a custom root directory like /usr/local. The --force flag overwrites existing installations. ```bash ~# cargo install --path=. --force --root=/usr/local # /usr also works ``` -------------------------------- ### Deselect All Files Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example keybinding to deselect all visible files in the current directory. ```toml keymap = [ //.. {keys = [ "x" ], command = "select --all=true --deselect=true"} ] ``` -------------------------------- ### Install Joshuto for Single User (Cargo Git) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install the latest version of joshuto directly from its Git repository using cargo. The --force flag overwrites existing installations. ```bash ~$ cargo install --git https://github.com/kamiyaa/joshuto.git --force ``` -------------------------------- ### Touch File Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to create a new file or update the modified date of an existing file. ```toml keymap = [ //.. {keys = [ "t" ], command = "touch"} ] ``` -------------------------------- ### Select Files Keybinding Examples Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings for selecting files using various methods: toggling, deselecting, selecting all, by pattern, glob, regex, or fzf. ```toml keymap = [ //.. {keys = [ "s" ], command = "select"}, {keys = [ "S" ], command = "select --all=true"}, {keys = [ "p" ], command = "select_glob"}, {keys = [ "q" ], command = "select_regex"}, {keys = [ "f" ], command = "select_fzf"} ] ``` -------------------------------- ### Install Joshuto via Fedora COPR Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto on Fedora systems by enabling the COPR repository and then installing the package using dnf. ```bash sudo dnf copr enable atim/joshuto -y sudo dnf install joshuto ``` -------------------------------- ### Keymap for opening selected files with sxiv Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example TOML snippet for the keymap file, demonstrating how to bind keys to the 'spawn' command to open selected files with the sxiv image viewer. ```toml keymap = [ //.. { keys = [ "i" ], commands = ["spawn sxiv -t %s"] } ] ``` -------------------------------- ### Select Glob Pattern Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to select files matching a glob pattern. Quote patterns with spaces. ```toml keymap = [ //.. {keys = [ "p" ], command = "select_glob --toggle=false '*.png'"} ] ``` -------------------------------- ### Set File Mode Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to set read, write, and execute permissions for the current file. ```toml keymap = [ //.. {keys = [ "m" ], command = "set_mode"} ] ``` -------------------------------- ### Install Joshuto via Gentoo-zh Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto on Gentoo systems by enabling the gentoo-zh repository and then emerging the package. ```bash sudo eselect repository enable gentoo-zh sudo emerge -av app-misc/joshuto ``` -------------------------------- ### Configure Joshuto in NixOS Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Example NixOS configuration to enable joshuto overlay and include it in system packages. ```nix { description = "My configuration"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; joshuto.url = "github:kamiyaa/joshuto"; }; outputs = { nixpkgs, joshuto, ... }: { nixosConfigurations = { hostname = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ { nixpkgs.overlays = [ joshuto.overlays.default ]; environment.systemPackages = with pkgs;[ joshuto ]; } ]; }; }; }; } ``` -------------------------------- ### Install Joshuto via Arch AUR (Release) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install the release version of joshuto on Arch Linux using an AUR helper like yay or paru. ```bash [yay/paru] -S joshuto ``` -------------------------------- ### Install Joshuto via Homebrew Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto on macOS or Linux using the Homebrew package manager. ```bash brew install joshuto ``` -------------------------------- ### Example of Shell Command Execution Source: https://github.com/kamiyaa/joshuto/wiki/keymap.toml Demonstrates using the ':shell' command to execute a shell command directly from Joshuto, like creating a new file. ```text :shell touch file.txt ``` -------------------------------- ### Launch Joshuto Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Start the joshuto terminal file manager from the command line. ```bash ~ $ joshuto ``` -------------------------------- ### Install Specific Joshuto Release Version Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install a specific release version of joshuto by setting the RELEASE_VER environment variable before running the installation script. Requires curl and openssl. ```bash ~$ RELEASE_VER='v0.9.4' bash <(curl -s https://raw.githubusercontent.com/kamiyaa/joshuto/master/utils/install.sh) ``` -------------------------------- ### Keymap for setting wallpaper with swaymsg Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example TOML snippet for the keymap file, showing how to bind keys to the 'shell' command to set a wallpaper using swaymsg and the absolute path of an image. ```toml keymap = [ //.. { keys = ["m", "w"], commands = ["shell swaymsg output * bg %p fit"] } ] ``` -------------------------------- ### Example Custom Script: Ripgrep and FZF Integration Source: https://context7.com/kamiyaa/joshuto/llms.txt An example bash script for a custom joshuto command that uses ripgrep to search file contents and fzf for interactive selection. It prompts for search text and uses the selected directory. ```bash # ~/.config/joshuto/rgfzf — example custom command script # Usage inside joshuto: :rgfzf #!/usr/bin/env bash # $1 = search text (from %text prompt), $2 = directory (from %s) QUERY="$1" DIR="${2:-.}" RESULT=$(rg --files-with-matches --hidden "$QUERY" "$DIR" \ | fzf --preview "rg --color=always -n '$QUERY' {}") [ -n "$RESULT" ] && echo "$RESULT" ``` -------------------------------- ### Copy File Information Keybinding Examples Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings for copying file names, paths, and directory paths to the clipboard. Requires xsel, xclip, or wl-copy. ```toml keymap = [ //.. {keys = [ "c" ], command = "copy_filename"}, {keys = [ "C" ], command = "copy_filename_without_extension"}, {keys = [ "" ], command = "copy_filepath"}, {keys = [ "" ], command = "copy_dirpath"} ] ``` -------------------------------- ### Install Joshuto via Arch AUR (Git) Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install the latest git version of joshuto on Arch Linux using an AUR helper like yay or paru. ```bash [yay/paru] -S joshuto-git ``` -------------------------------- ### Navigate Search Results Keybinding Examples Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings to move to the next or previous search result. ```toml keymap = [ //.. {keys = [ "n" ], command = "search_next"}, {keys = [ "N" ], command = "search_prev"} ] ``` -------------------------------- ### Build Joshuto with Cargo Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Build the joshuto project using cargo. Ensure you have Rust and Cargo installed. ```bash ~$ cargo build ``` -------------------------------- ### Select Regex Pattern Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to select files matching a regex pattern. Quote patterns with spaces or backslashes. ```toml keymap = [ //.. {keys = [ "q" ], command = "select_regex --toggle=false '.+\.(jpg|png|gif)'"} ] ``` -------------------------------- ### Default Keymap Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example of setting up key mappings for the default view in keymap.toml. This allows users to define custom shortcuts for various commands. ```toml # keymapping for default view [default_view] keymap = [ { keys = [ "T" ], command = "new_tab" }, # ... ] # keymapping for task view [task_view] keymap = [ # ... ] # keymapping for help view [help_view] keymap = [ # ... ] ``` -------------------------------- ### Search Files Keybinding Examples Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings for searching files by string, glob pattern, or regular expression within the current directory. ```toml keymap = [ //.. {keys = [ "/" ], command = "search"}, {keys = [ "?" ], command = "search_glob"}, {keys = [ "=" ], command = "search_regex"} ] ``` -------------------------------- ### Install Joshuto via MacPorts Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Install joshuto on macOS using the MacPorts package manager. ```bash sudo port install joshuto ``` -------------------------------- ### Check joshuto version Source: https://context7.com/kamiyaa/joshuto/llms.txt Display the installed version of the joshuto file manager. ```bash joshuto --version ``` -------------------------------- ### Keymap for opening selected files with nvim Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example TOML snippet for the keymap file, demonstrating how to bind keys to the 'shell' command to open multiple selected files with nvim. ```toml keymap = [ //.. { keys = [ "e", "v" ], commands = ["shell nvim %s"] } ] ``` -------------------------------- ### Configure Default File and Directory Icons Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/icons.toml.md Set fallback icons for files and directories. Ensure Nerd Fonts are installed for correct display. ```toml [defaults] file = "" directory = "" ``` -------------------------------- ### Rename File Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings for renaming files with different cursor placements and extension handling. ```toml keymap = [ //.. {keys = [ "r" ], command = "rename"}, {keys = [ "R" ], command = "rename_append"}, {keys = [ "" ], command = "rename_append_base"}, {keys = [ "" ], command = "rename_prepend"}, {keys = [ "" ], command = "rename_keep_ext"} ] ``` -------------------------------- ### Filter Directory List Keybinding Examples Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybindings for filtering the directory list by string, glob pattern, or regex. ```toml keymap = [ //.. {keys = [ "g" ], command = "filter"}, {keys = [ "G" ], command = "filter_glob"}, {keys = [ "_" ], command = "filter_regex"} ] ``` -------------------------------- ### Run Joshuto Temporarily with Nix Source: https://github.com/kamiyaa/joshuto/blob/main/README.md Temporarily run the joshuto command using nix without installing it system-wide. ```sh nix run github:kamiyaa/joshuto ``` -------------------------------- ### Joshuto Keymap Configuration Source: https://context7.com/kamiyaa/joshuto/llms.txt Defines keybindings for Joshuto commands. This example shows how to bind the 'escape' key to the 'show_tasks' command. ```toml { keys = ["escape"], commands = ["show_tasks"] } ``` -------------------------------- ### Keymap for opening a new Alacritty terminal Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Example TOML snippet for the keymap file, showing how to bind keys to the 'spawn' command to open a new Alacritty terminal in the current directory. ```toml keymap = [ // .. { keys = [ "O" ], commands = ["spawn alacritty --working-directory %d"] } ] ``` -------------------------------- ### Invoking Custom Commands from Joshuto CLI Source: https://context7.com/kamiyaa/joshuto/llms.txt Demonstrates how to invoke custom commands like 'rgfzf' from the joshuto command line. This includes examples for interactive search and keeping the results list open for multi-select. ```bash # Invoke from joshuto command line: # :rgfzf # → prompts for text input, then launches fzf over ripgrep results # :custom_search_interactive rgfzf # → same, but keeps the results list open for multi-select ``` -------------------------------- ### Build joshuto from source Source: https://context7.com/kamiyaa/joshuto/llms.txt Build the joshuto file manager from its source code using Cargo. Ensure you have Rust version 1.90 or higher installed. ```bash git clone https://github.com/kamiyaa/joshuto.git cd joshuto cargo build --release ./target/release/joshuto ``` -------------------------------- ### Tab Switching Commands Source: https://github.com/kamiyaa/joshuto/wiki/keymap.toml Examples of how to switch between tabs in Joshuto using the 'tab_switch' command with positive or negative integers to navigate forward or backward. ```text tab_switch 1 ``` ```text tab_switch -1 ``` -------------------------------- ### Qutebrowser Integration for File Selection Source: https://context7.com/kamiyaa/joshuto/llms.txt Configure qutebrowser to use joshuto as an external file picker. This setup allows joshuto to return selected file paths to qutebrowser. ```python # ~/.config/qutebrowser/config.py c.fileselect.handler = 'external' c.fileselect.folder.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] c.fileselect.multiple_files.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] c.fileselect.single_file.command = ['kitty', '-e', 'joshuto', '--output-file', '{}'] ``` -------------------------------- ### Toggle Visual Mode Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to enable or disable visual mode. Disabling converts visual selection to normal selection. ```toml keymap = [ //.. {keys = [ "v" ], command = "toggle_visual"} ] ``` -------------------------------- ### Joshuto Wrapper Script for Überzug Integration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/image_previews/ueberzug.md This bash script acts as a wrapper for Joshuto, starting an Überzug server instance before launching Joshuto. It manages the Überzug process, sets up necessary environment variables and FIFOs, and defines functions to show and remove image previews. The script ensures Überzug is stopped when Joshuto terminates. ```bash #!/usr/bin/env bash if [ -n "$DISPLAY" ] && command -v ueberzug > /dev/null; then export joshuto_wrap_id="$$" export joshuto_wrap_tmp="$(mktemp -d -t joshuto-wrap-$joshuto_wrap_id-XXXXXX)" export joshuto_wrap_ueber_fifo="$joshuto_wrap_tmp/fifo" export joshuto_wrap_pid_file="$joshuto_wrap_tmp/pid" export joshuto_wrap_preview_meta="$joshuto_wrap_tmp/preview-meta" export joshuto_wrap_ueber_identifier="preview" function start_ueberzug { mkfifo "${joshuto_wrap_ueber_fifo}" tail --follow "$joshuto_wrap_ueber_fifo" | ueberzug layer --parser bash & echo "$!" > "$joshuto_wrap_pid_file" mkdir -p "$joshuto_wrap_preview_meta" } function stop_ueberzug { ueberzug_pid=`cat "$joshuto_wrap_pid_file"` kill "$ueberzug_pid" rm -rf "$joshuto_wrap_tmp" } function show_image { >"${joshuto_wrap_ueber_fifo}" declare -A -p cmd=( [action]=add [identifier]="${joshuto_wrap_ueber_identifier}" [x]="${2}" [y]="${3}" [width]="${4}" [height]="${5}" [path]="${1}") } function remove_image { >"${joshuto_wrap_ueber_fifo}" declare -A -p cmd=( [action]=remove [identifier]="${joshuto_wrap_ueber_identifier}") } function get_preview_meta_file { echo "$joshuto_wrap_preview_meta/$(echo "$1" | md5sum | sed 's/ //g')" } export -f get_preview_meta_file export -f show_image export -f remove_image trap stop_ueberzug EXIT QUIT INT TERM start_ueberzug echo "ueberzug started" fi joshuto "$@" exit $? ``` -------------------------------- ### Set Up Navigation Bookmarks with bookmarks.toml Source: https://context7.com/kamiyaa/joshuto/llms.txt Map single keys to directory paths for quick navigation using the :cd_bookmark command. ```toml # ~/.config/joshuto/bookmarks.toml # Press the bound key after invoking :cd_bookmark to jump instantly. bookmark = [ { key = "h", path = "~/") }, { key = "r", path = "/" }, { key = "e", path = "/etc" }, { key = "d", path = "~/Downloads" }, { key = "p", path = "~/Projects" }, { key = "c", path = "~/.config" }, { key = "m", path = "/mnt" }, ] ``` -------------------------------- ### Preview Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/joshuto.toml.md Set up preview options including maximum file size, script execution, and XDG thumbnail usage and size. ```toml # Configurations related to preview [preview] # Maximum preview file size in bytes max_preview_size = 2097152 # Executable script for previews preview_script = "~/.config/joshuto/preview_file.sh" # Use thumbnail images according to the freedesktop.org (XDG) standard. # (https://specifications.freedesktop.org/thumbnail-spec/thumbnail-spec-latest.html) # This only affects Joshuto's internal image-thumbnail feature. # It does not affect the hook-script based previews. use_xdg_thumbs = true # The XDG thumb size used for the preview. # Allowed values are 'normal', 'large', 'xlarge', and 'xxlarge' with maximum edge lengths # of 128 px, 256 px, 512 px, and 1024 px respectively. xdg_thumb_size = "xlarge" ``` -------------------------------- ### Escape Visual Mode Keybinding Example Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/keymap.toml.md Keybinding to leave visual mode and withdraw the visual-mode-selection. ```toml keymap = [ //.. {keys = [ "" ], command = "escape"} ] ``` -------------------------------- ### General Configuration Options Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/joshuto.toml.md Configure core joshuto behaviors like mouse support, scrolling, file opening, trash usage, file watching, and preview limits. ```toml # Enables mouse support (true by default) mouse_support = true # This is for configuring how many items to reach before 'scrolling' the view scroll_offset = 6 # If joshuto does not know how to open the file, it can resort to opening it via xdg settings xdg_open = false # Fork xdg_open so you can continue using joshuto with application open xdg_open_fork = false # If true, all file extensions checks will be case sensitive. # Applies to `[extension]` in `mimetype.toml` and `[ext]` in `theme.toml` and `icons.toml` case_insensitive_ext = false # Use system trash can instead of permanently removing files use_trash = true # Watch for filesystem changes and update directory listings accordingly watch_files = true # If true the cursor will focus newly created files or directories with `:touch` or `:mkdir` # Even if true, the behavior can be avoided prefixing the new file/dir with "./" # E.g.: # - `:mkdir a` moves the cursor to the new directory `a` # - `:mkdir ./b` keeps the cursor where it was focus_on_create = true # The maximum file size to show a preview for, it can be "2 MB", "2 Mb" or "2097152" max_preview_size = "2 MB" # Update the zoxide database with every navigation type instead of only with the z command zoxide_update = false ``` -------------------------------- ### joshuto.toml Preview Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/file_previews.md Configure file preview settings in `joshuto.toml`. Set the maximum file size for previews and specify the paths for preview scripts and hooks. ```toml [preview] # This is the maximum size (in bytes) of a file to generate a preview for. # Any file greater than this amount will not have a preview generated. max_preview_size = 2097152 # 2MB # This is the script that will be ran whenever a preview needs to be generated preview_script = "~/.config/joshuto/preview_file.sh" preview_shown_hook_script = "~/.config/joshuto/on_preview_shown.sh" # This script is ran whenever the preview selection changes. # Usually used to cleanup the old preview. preview_removed_hook_script = "~/.config/joshuto/on_preview_removed.sh" ``` -------------------------------- ### Joshuto Configuration for Preview Hooks Source: https://github.com/kamiyaa/joshuto/blob/main/docs/image_previews/ueberzug.md Configure Joshuto's preview hooks in `joshuto.toml` to specify scripts that will be executed when a preview is shown or removed. ```toml [preview] ... preview_shown_hook_script = "~/.config/joshuto/on_preview_shown" preview_removed_hook_script = "~/.config/joshuto/on_preview_removed" ``` -------------------------------- ### Assign Icons with icons.toml Source: https://context7.com/kamiyaa/joshuto/llms.txt Assign Nerd Font glyphs to files by exact name, extension, or directory name. Requires a Nerd Font installation. ```toml # ~/.config/joshuto/icons.toml # Requires a Nerd Font — https://www.nerdfonts.com/ [defaults] file = "" directory = "" [directory_exact] ".git" = "" "node_modules" = "" ".config" = "" "Downloads" = "" "Documents" = "" "Pictures" = "" [file_exact] ".gitignore" = "" "Dockerfile" = "" "Makefile" = "" "LICENSE" = "" "Cargo.toml" = "" [ext] rs = "" py = "" js = "" ts = "" html = "" css = "" json = "" toml = "" md = "" pdf = "" png = "" jpg = "" mp4 = "" mp3 = "" zip = "" tar = "" gz = "" ``` -------------------------------- ### Configure Display Settings Source: https://github.com/kamiyaa/joshuto/wiki/joshuto.toml General display configurations for the file manager. ```toml [display] collapse_preview = true column_ratio = [1, 3, 4] show_borders = true show_hidden = false show_icons = true show_preview = true tilde_in_titlebar = true ``` -------------------------------- ### Define Keymap Commands in TOML Source: https://github.com/kamiyaa/joshuto/wiki/keymap.toml Configure keyboard shortcuts by mapping keys to commands in the keymap.toml file. Use the 'keys' array for key combinations and 'command' for the action. ```toml mapcommand = [ { keys = [ "T" ], command = "new_tab" }, # ... ] ``` -------------------------------- ### Configure File Opening with TOML Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/mimetype.toml.md This TOML configuration defines classes and application lists for handling different file extensions and mimetypes. It demonstrates inheritance and specific application assignments for image, video, and text files. ```toml [class] image_default = [ { command = "qimgv", fork = true, silent = true }, { command = "krita", fork = true, silent = true } ] [extension] # inherit from image_default class png.inherit = "image_default" # inherit from image_default class jpg.inherit = "image_default" # in addition, also add gimp for .jpg files only jpg.app_list = [ { command = "gimp", fork = true, silent = true } ] mkv.app_list = [ { command = "mpv", args = [ "--" ] , fork = true, silent = true }, { command = "mediainfo", confirm_exit = true }, { command = "mpv", args = [ "--mute", "on", "--" ], fork = true, silent = true } ] rs.app_list = [ { command = "micro" }, { command = "gedit", fork = true, silent = true }, { command = "bat", confirm_exit = true } ] [mimetype] # text/* [mimetype.text] inherit = "text_default" # application/octet-stream [mimetype.application.subtype.octet-stream] inherit = "video_default" ``` -------------------------------- ### Rounded Tabs with Arrow-like Scroll Tags Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/tabbar/README.md Example configuration for creating rounded tabs with arrow-like scroll tags, requiring a nerdfont. This includes detailed character and style settings for various tab elements. ```toml [tabs] [tabs.chars] divider = " " active_prefix = "" active_postfix = "" inactive_prefix = "" inactive_postfix = "" scroll_front_prefix = "" scroll_front_postfix = "" scroll_front_prestring = "" scroll_front_poststring = " " scroll_back_prefix = "" scroll_back_postfix = "" scroll_back_prestring = " " scroll_back_poststring = "" [tabs.styles] [tabs.styles.active] fg = "black" bg = "light_blue" bold = true [tabs.styles.active_prefix] fg = "light_blue" bg = "reset" [tabs.styles.inactive] fg = "black" bg = "gray" [tabs.styles.inactive_prefix] fg = "gray" bg = "reset" [tabs.styles.scroll_front] fg = "black" bg = "yellow" bold = true [tabs.styles.scroll_front_prefix] fg = "yellow" bg = "reset" [tabs.styles.scroll_front_postfix] invert = true [tabs.styles.scroll_back] fg = "black" bg = "yellow" bold = true [tabs.styles.scroll_back_prefix] fg = "yellow" bg = "reset" invert = true [tabs.styles.scroll_back_postfix] invert = false ``` -------------------------------- ### Preview Script Arguments Source: https://github.com/kamiyaa/joshuto/blob/main/docs/file_previews.md Understand the command-line arguments accepted by the `preview_script`. These control the path, dimensions, coordinates, and image preview settings. ```shell --path # this is the oath of the file # we want to generate a preview for --preview-width # the width of the preview # we want to generate --preview-height # the height of the preview # we want to generate --x-coord x # the x coordinate of the terminal # to preview will be shown --y-coord y # the y coordinate of the terminal # to preview will be shown --preview-images <1|0> # to enable image previews (1) or not (0) --image-cache # setup a image cache directory to be used for # storing previews to reduce computation ``` -------------------------------- ### Configure System File Type Themes Source: https://github.com/kamiyaa/joshuto/wiki/theme.toml Apply specific themes to different system file types such as selections, executables, directories, and links. ```toml # for selected files [selection] fg = "light_yellow" bold = true # for executable files [executable] fg = "light_green" bold = true # default theme [regular] fg = "white" # for directories [directory] fg = "light_blue" bold = true # for symlinks [link] fg = "cyan" bold = true # for invalid symlinks [link_invalid] fg = "red" bold = true # for sockets [socket] fg = "light_magenta" bold = true ``` -------------------------------- ### Joshuto Keymap Configuration for Qutebrowser Source: https://github.com/kamiyaa/joshuto/blob/main/docs/misc.md Configure Joshuto's keymap to output selected files using the 'quit --output-selected-files' command, typically bound to 'o'. ```toml [default_view] keymap = [ { keys = ["o"], command = "quit --output-selected-files" }, # other keybinds... ] ``` -------------------------------- ### Configure XDG Open Behavior Source: https://github.com/kamiyaa/joshuto/wiki/joshuto.toml Determines if joshuto should resort to using xdg-open settings when it cannot determine how to open a file. ```toml xdg_open = false ``` -------------------------------- ### Configure File Openers with mimetype.toml Source: https://context7.com/kamiyaa/joshuto/llms.txt Map file extensions and MIME types to application lists for opening files. Supports inheritance and specific application configurations. ```toml # ~/.config/joshuto/mimetype.toml # ── Reusable opener classes ─────────────────────────────────────────────── [class] image_default = [ { command = "qimgv", fork = true, silent = true }, { command = "krita", fork = true, silent = true }, ] video_default = [ { command = "mpv", args = ["--"], fork = true, silent = true }, { command = "mediainfo", confirm_exit = true }, ] text_default = [ { command = "nvim" }, { command = "micro" }, { command = "bat", args = ["--paging=always"], confirm_exit = true }, ] # ── Extension mappings ──────────────────────────────────────────────────── [extension] # Images — inherit shared class, add gimp for jpg only png.inherit = "image_default" jpg.inherit = "image_default" jpg.app_list = [{ command = "gimp", fork = true, silent = true }] # Video mkv.inherit = "video_default" mp4.inherit = "video_default" # Audio mp3.app_list = [ { command = "mpv", args = ["--"], fork = true, silent = true }, { command = "audacious", fork = true, silent = true }, ] # Documents pdf.app_list = [ { command = "zathura", fork = true, silent = true }, { command = "okular", fork = true, silent = true }, ] # Source code rs.inherit = "text_default" py.inherit = "text_default" toml.inherit = "text_default" # Spreadsheet xlsx.app_list = [{ command = "libreoffice", args = ["--calc"], fork = true, silent = true }] # ── MIME type fallbacks ─────────────────────────────────────────────────── [mimetype.text] inherit = "text_default" [mimetype.image] inherit = "image_default" [mimetype.video] inherit = "video_default" [mimetype.audio] inherit = "video_default" # application/octet-stream → try video player [mimetype.application.subtype.octet-stream] inherit = "video_default" ``` -------------------------------- ### Joshuto Wrapper Script for Überzug++ Source: https://github.com/kamiyaa/joshuto/blob/main/docs/image_previews/ueberzugpp.md This bash script acts as a wrapper for Joshuto, initializing Überzug++ and defining functions to show and remove image previews. It sets up necessary environment variables and traps signals for cleanup. ```bash #!/usr/bin/env bash # ## Example wrapper for using Überzug++ export joshuto_wrap_id="$$" export joshuto_wrap_tmp="$(mktemp -d -t joshuto-wrap-$joshuto_wrap_id-XXXXXX)" export joshuto_wrap_preview_meta="$joshuto_wrap_tmp/preview-meta" export ueberzug_pid_file="$joshuto_wrap_tmp/pid" export ueberzug_img_identifier="preview" export ueberzug_socket="" export ueberzug_pid="" function start_ueberzugpp { ## Adapt Überzug++ options here. For example, remove the '--no-opencv' or set another output method. ueberzugpp layer --no-stdin --pid-file "$ueberzug_pid_file" --no-opencv &>/dev/null export ueberzug_pid="$(cat "$ueberzug_pid_file")" export ueberzug_socket=/tmp/ueberzugpp-"$ueberzug_pid".socket mkdir -p "$joshuto_wrap_preview_meta" } function stop_ueberzugpp { remove_image ueberzugpp cmd -s "$ueberzug_socket" -a exit kill "$ueberzug_pid" rm -rf "$joshuto_wrap_tmp" } function show_image { ueberzugpp cmd -s "$ueberzug_socket" -a add -i "$ueberzug_img_identifier" -x "$2" -y "$3" --max-width "$4" --max-height "$5" -f "$1" &>/dev/null } function remove_image { ueberzugpp cmd -s "$ueberzug_socket" -a remove -i "$ueberzug_img_identifier" &>/dev/null } function get_preview_meta_file { echo "$joshuto_wrap_preview_meta/$(echo "$1" | md5sum | sed 's/ //g')" } export -f get_preview_meta_file export -f show_image export -f remove_image if [ -n "$DISPLAY" ] && command -v ueberzugpp > /dev/null; then trap stop_ueberzugpp EXIT quit INT TERM start_ueberzugpp fi joshuto "$@" exit $? ``` -------------------------------- ### Configure Theme for File Extensions Source: https://github.com/kamiyaa/joshuto/wiki/theme.toml Define custom themes for specific file extensions to override default or system file type settings. ```toml [ext] [ext.jpg] fg = "yellow" [ext.jpeg] fg = "yellow" [ext.png] fg = "yellow" ``` -------------------------------- ### Configure Exact File Icons Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/icons.toml.md Map specific file names to custom icons. This section is useful for configuration files or important project files. ```toml ".gitignore" = "" LICENSE = "" Makefile = "" Dockerfile = "" # ... ``` -------------------------------- ### Define File Opening Classes and Extensions in TOML Source: https://github.com/kamiyaa/joshuto/wiki/mimetype.toml Configure default applications for image classes and inherit them for specific file extensions like PNG and JPG. Add additional applications for specific file types. ```toml [class] image_default = [ { command = "qimgv", fork = true, silent = true }, { command = "krita", fork = true, silent = true } ] [extension] # inherit from image_default class png.inherit = "image_default" # inherit from image_default class jpg.inherit = "image_default" # in addition, also add gimp for .jpg files only jpg.app_list = [ { command = "gimp", fork = true, silent = true } ] mkv.app_list = [ { command = "mpv", args = [ "--" ] , fork = true, silent = true }, { command = "mediainfo", confirm_exit = true }, { command = "mpv", args = [ "--mute", "on", "--" ], fork = true, silent = true } ] rs.app_list = [ { command = "micro" }, { command = "gedit", fork = true, silent = true }, { command = "bat", confirm_exit = true } ] ``` -------------------------------- ### Tab Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/joshuto.toml.md Set the default home page for tabs, choosing between 'inherit', 'home', or 'root'. ```toml [tab] # inherit, home, root home_page = "home" ``` -------------------------------- ### Qutebrowser Keymap for Joshuto Selection Source: https://context7.com/kamiyaa/joshuto/llms.txt Define a key binding in qutebrowser's keymap to confirm selection in joshuto and return to qutebrowser. This uses the 'quit --output-selected-files' command. ```toml # In keymap.toml — bind a key to confirm selection and return to qutebrowser [default_view] keymap = [ { keys = ["o"], commands = ["quit --output-selected-files"] }, ] ``` -------------------------------- ### Display Sorting Configuration Source: https://github.com/kamiyaa/joshuto/blob/main/docs/configuration/joshuto.toml.md Configure file sorting methods, case sensitivity, directory prioritization, and sort order. ```toml # Configurations related to file sorting [display.sort] # Options include # - lexical (10.txt comes before 2.txt) # - natural (2.txt comes before 10.txt) # - mtime # - size # - ext sort_method = "natural" # case sensitive sorting case_sensitive = false # show directories first directories_first = true # sort in reverse reverse = false ```