summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-23 11:31:35 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-02-23 11:31:35 +0900
commit709c8bbbfae795f083b14e06c9674a6754ea404d (patch)
tree145c442d7bea65b7602271d5fa3265ff0a279afb
parent5328e20a7ee864dd28f68df0ced4c3ce3f0fd5c7 (diff)
modified lf/lfrc, modified lf/scope, modified shell/bm-dirs, modified shell/bm-files, created television/HEADmaster
-rw-r--r--ar/.config/lf/lfrc3
-rwxr-xr-xar/.config/lf/scope30
-rw-r--r--ar/.config/shell/bm-dirs1
-rw-r--r--ar/.config/shell/bm-files1
-rw-r--r--ar/.config/television/cable/man-pages.toml35
-rw-r--r--ar/.config/television/config.toml254
6 files changed, 319 insertions, 5 deletions
diff --git a/ar/.config/lf/lfrc b/ar/.config/lf/lfrc
index 9425ee2..99150ee 100644
--- a/ar/.config/lf/lfrc
+++ b/ar/.config/lf/lfrc
@@ -324,8 +324,7 @@ cmd open ${{
;;
application/epub*|application/pdf|application/postscript|application/vnd.djvu|image/vnd.djvu) setsid -f zathura $fx >/dev/null 2>&1 ;;
application/pgp-encrypted) $EDITOR $fx ;;
- application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database) setsid -f firefox $fx >/dev/null 2>&1 ;;
- application/x-hwp|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.openxmlformats-officedocument.wordprocessingml.document) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
+ application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template|application/vnd.oasis.opendocument.presentation-template|application/vnd.oasis.opendocument.presentation|application/vnd.ms-powerpoint|application/vnd.oasis.opendocument.graphics|application/vnd.oasis.opendocument.graphics-template|application/vnd.oasis.opendocument.formula|application/vnd.oasis.opendocument.database|application/x-hwp|application/vnd.openxmlformats-officedocument.presentationml.presentation|application/vnd.openxmlformats-officedocument.wordprocessingml.document) setsid -f libreoffice $fx >/dev/null 2>&1 ;;
audio/*|video/x-ms-asf) setsid -f mpv --volume=50 --x11-name=music --force-window=yes --audio-display=embedded-first --really-quiet -- "$f" </dev/null >/dev/null 2>&1 ; lf -remote "send $id redraw" ;;
image/x-xcf) setsid -f gimp $f >/dev/null 2>&1 ;;
image/svg+xml) display -- $f ;;
diff --git a/ar/.config/lf/scope b/ar/.config/lf/scope
index 9d2f876..73475a6 100755
--- a/ar/.config/lf/scope
+++ b/ar/.config/lf/scope
@@ -65,7 +65,8 @@ video/* | application/octet-stream | application/vnd.rn-realmedia)
;;
application/vnd.openxmlformats-officedocument.presentationml.presentation)
CACHE="$(thumb_cache "$1")"
- [ ! -f "$CACHE.jpg" ] && unoconv -f jpg -o "$CACHE.jpg" "$1"
+ [ ! -f "$CACHE.jpg" ] && libreoffice --headless --convert-to jpg --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \
+ && mv "$(dirname "$CACHE")/$(basename "${1%.*}").jpg" "$CACHE.jpg"
image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
;;
application/x-hwp)
@@ -81,12 +82,35 @@ application/x-hwp)
;;
applicationg/gzip) zcat -- "$1" ;;
application/*zip) atool --list -- "$1" ;;
+application/vnd.oasis.opendocument.text|application/vnd.oasis.opendocument.text-template)
+ CACHE="$(thumb_cache "$1")"
+ [ ! -f "$CACHE.md" ] && pandoc "$1" -t markdown -o "$CACHE.md"
+ bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.md"
+ ;;
+application/vnd.oasis.opendocument.spreadsheet|application/vnd.oasis.opendocument.spreadsheet-template)
+ CACHE="$(thumb_cache "$1")"
+ [ ! -f "$CACHE.csv" ] && libreoffice --headless --convert-to csv --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \
+ && mv "$(dirname "$CACHE")/$(basename "${1%.*}").csv" "$CACHE.csv"
+ bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.csv"
+ ;;
+application/vnd.oasis.opendocument.presentation|application/vnd.oasis.opendocument.presentation-template)
+ CACHE="$(thumb_cache "$1")"
+ [ ! -f "$CACHE.jpg" ] && libreoffice --headless --convert-to jpg --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \
+ && mv "$(dirname "$CACHE")/$(basename "${1%.*}").jpg" "$CACHE.jpg"
+ image "$CACHE.jpg" "$2" "$3" "$4" "$5" "$1"
+ ;;
*opendocument*) odt2txt "$1" ;;
application/pgp-encrypted) gpg -d -- "$1" ;;
application/vnd.openxmlformats-officedocument.wordprocessingml.document)
CACHE="$(thumb_cache "$1")"
- [ ! -f "$CACHE.txt" ] && pandoc "$1" -t plain -o "$CACHE.txt"
- bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.txt"
+ [ ! -f "$CACHE.md" ] && pandoc "$1" -t markdown -o "$CACHE.md"
+ bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.md"
+ ;;
+application/vnd.openxmlformats-officedocument.spreadsheetml.sheet|application/vnd.ms-excel)
+ CACHE="$(thumb_cache "$1")"
+ [ ! -f "$CACHE.csv" ] && libreoffice --headless --convert-to csv --outdir "$(dirname "$CACHE")" "$1" >/dev/null 2>&1 \
+ && mv "$(dirname "$CACHE")/$(basename "${1%.*}").csv" "$CACHE.csv"
+ bat -p --theme ansi --terminal-width "$(($4 - 2))" -f "$CACHE.csv"
;;
esac
exit 1
diff --git a/ar/.config/shell/bm-dirs b/ar/.config/shell/bm-dirs
index e375815..0b99df4 100644
--- a/ar/.config/shell/bm-dirs
+++ b/ar/.config/shell/bm-dirs
@@ -39,6 +39,7 @@ ctc ${XDG_CONFIG_HOME:-${HOME}/.config}/task
ctd ${XDG_CONFIG_HOME:-${HOME}/.config}/transmission-daemon
ctm ${XDG_CONFIG_HOME:-${HOME}/.config}/tmux
cts ${XDG_CONFIG_HOME:-${HOME}/.config}/TheSiahxyz
+ctv ${XDG_CONFIG_HOME:-${HOME}/.config}/television
cvc ${XDG_CONFIG_HOME:-${HOME}/.config}/vim
cvp ${XDG_CONFIG_HOME:-${HOME}/.config}/openvpn
cvw ${XDG_DATA_HOME:-${HOME}/.local/share}/vimwiki
diff --git a/ar/.config/shell/bm-files b/ar/.config/shell/bm-files
index 7ba1950..f110af5 100644
--- a/ar/.config/shell/bm-files
+++ b/ar/.config/shell/bm-files
@@ -44,6 +44,7 @@ vtc ${XDG_CONFIG_HOME:-${HOME}/.config}/task/taskrc
vtm ${XDG_CONFIG_HOME:-${HOME}/.config}/tmux/tmux.conf # Tmux config
vto ${XDG_CONFIG_HOME:-${HOME}/.config}/taskopen/taskopenrc # Taskopen config
vtt ${XDG_CONFIG_HOME:-${HOME}/.config}/transmission-daemon/settings.json # Transmission-daemon config
+vtv ${XDG_CONFIG_HOME:-${HOME}/.config}/television/config.toml # Television config
vur ${XDG_DATA_HOME:-${HOME}/.local/share}/thesiah/urls # Custom urls
vvc ${XDG_CONFIG_HOME:-${HOME}/.config}/vim/vimrc # Vim config
vvi ${XDG_CONFIG_HOME:-${HOME}/.config}/vim/init.vim # Vim init
diff --git a/ar/.config/television/cable/man-pages.toml b/ar/.config/television/cable/man-pages.toml
new file mode 100644
index 0000000..38c3e67
--- /dev/null
+++ b/ar/.config/television/cable/man-pages.toml
@@ -0,0 +1,35 @@
+[metadata]
+name = "man-pages"
+description = "Browse and preview system manual pages"
+requirements = ["man", "apropos", "col", "bat"]
+
+[source]
+command = "man -k ."
+
+[ui]
+layout = "landscape"
+
+[ui.preview_panel]
+header = "{0}"
+
+[keybindings]
+ctrl-b = "actions:bat"
+ctrl-v = "actions:nvim"
+
+[preview]
+command = "sh -c \"man $(echo {0} | sed -E 's/^([^ ]+) \\(([^)]+)\\).*/\\2 \\1/') | col -bx | bat -l man -p --color=always\""
+
+[preview.env]
+MANWIDTH = "80"
+MANPAGER = "cat"
+PAGER = "cat"
+
+[actions.bat]
+description = "View with bat"
+command = "echo '{0}' | sed -E 's/^([^ ]+) \\(([^)]+)\\).*/\\2 \\1/' | xargs -r man | col -bx | bat -l man -p"
+mode = "fork"
+
+[actions.nvim]
+description = "Open in Neovim"
+command = "echo '{0}' | sed -E 's/^([^ ]+) \\(([^)]+)\\).*/\\2 \\1/' | xargs -r man | nvim -"
+mode = "fork"
diff --git a/ar/.config/television/config.toml b/ar/.config/television/config.toml
new file mode 100644
index 0000000..0d4dc3a
--- /dev/null
+++ b/ar/.config/television/config.toml
@@ -0,0 +1,254 @@
+# CONFIGURATION FILE LOCATION ON YOUR SYSTEM:
+# -------------------------------------------
+# Defaults:
+# ---------
+# Linux: `$HOME/.config/television/config.toml`
+# macOS: `$HOME/.config/television/config.toml`
+# Windows: `%LocalAppData%\television\config.toml`
+#
+# XDG dirs:
+# ---------
+# You may use XDG_CONFIG_HOME if set on your system.
+# In that case, television will expect the configuration file to be in:
+# `$XDG_CONFIG_HOME/television/config.toml`
+#
+
+# General settings
+# ----------------------------------------------------------------------------
+tick_rate = 50
+default_channel = "files"
+# Shell settings
+# --------------
+# Default shell used for executing commands (source, preview, actions).
+# Options: bash, zsh, fish, powershell, cmd, nu
+# If not specified, the shell is detected from the environment ($SHELL on Unix).
+# Channel-specific shell settings override this global setting.
+# shell = "bash"
+# History settings
+# ---------------
+# Maximum number of entries to keep in the global history (default: 100)
+# The history tracks search queries across all channels and sessions
+# Set to 0 to disable history functionality entirely
+history_size = 200
+# Whether to use global history (default: false)
+# When true: history navigation shows entries from all channels
+# When false: history navigation is scoped to the current channel
+global_history = false
+
+[ui]
+# How much space to allocate for the UI (in percentage of the screen)
+# ┌─────────────────────────┐
+# │ Terminal screen │
+# │ ┌───────────────────┐ │
+# │ │ │ │
+# │ │ Television UI │ │
+# │ │ │ │
+# │ └───────────────────┘ │
+# │ │
+# └─────────────────────────┘
+ui_scale = 100
+# What orientation should tv be (landscape or portrait)
+orientation = "landscape"
+# The theme to use for the UI
+# A list of builtin themes can be found in the `themes` directory of the television
+# repository. You may also create your own theme by creating a new file in a `themes`
+# directory in your configuration directory (see the `config.toml` location above).
+theme = "default"
+
+# Feature-specific configurations
+# Each feature can have its own configuration section
+[ui.input_bar]
+# Where to place the input bar in the UI (top or bottom)
+position = "top"
+# The input prompt string (defaults to ">" if not specified)
+prompt = ">"
+# header = "{}"
+# padding = {"left": 0, "right": 0, "top": 0, "bottom": 0}
+border_type = "rounded" # https://docs.rs/ratatui/latest/ratatui/widgets/block/enum.BorderType.html#variants
+
+[ui.status_bar]
+# Status bar separators (bubble):
+#separator_open = ""
+#separator_close = ""
+# Status bar separators (box):
+separator_open = ""
+separator_close = ""
+hidden = false
+
+[ui.results_panel]
+border_type = "rounded"
+# padding = {"left": 0, "right": 0, "top": 0, "bottom": 0}
+
+[ui.preview_panel]
+# Preview panel size (percentage of screen width/height)
+size = 50
+#header = ""
+#footer = ""
+scrollbar = true
+border_type = "rounded"
+# padding = {"left": 0, "right": 0, "top": 0, "bottom": 0}
+hidden = false
+
+[ui.help_panel]
+# Whether to split the help panel by categories
+show_categories = true
+hidden = true
+
+[ui.remote_control]
+# Whether to show channel descriptions in remote control mode
+show_channel_descriptions = true
+# Whether to sort channels alphabetically
+sort_alphabetically = true
+# disabled = false
+
+# Theme color overrides
+# ---------------------
+# You can override specific colors from the selected theme by adding them here.
+# This allows you to customize the appearance without creating a full theme file.
+# Colors can be specified as ANSI color names (e.g., "red", "bright-blue") or
+# as hex values (e.g., "#ff0000", "#1e1e2e").
+#
+# Example overrides:
+# [ui.theme_overrides]
+# background = "#000000"
+# text_fg = "#ffffff"
+# selection_bg = "#444444"
+# match_fg = "#ff0000"
+
+# Keybindings and Events
+# ----------------------------------------------------------------------------
+#
+[keybindings]
+# Application control
+# ------------------
+esc = "quit"
+ctrl-c = "quit"
+
+# Navigation and selection
+# -----------------------
+down = "select_next_entry"
+ctrl-n = "select_next_entry"
+ctrl-j = "select_next_entry"
+up = "select_prev_entry"
+ctrl-p = "select_prev_entry"
+ctrl-k = "select_prev_entry"
+
+# History navigation
+# -----------------
+ctrl-up = "select_prev_history"
+ctrl-down = "select_next_history"
+
+# Multi-selection
+# --------------
+tab = "toggle_selection_down"
+backtab = "toggle_selection_up"
+enter = "confirm_selection"
+
+# Preview panel control
+# --------------------
+pagedown = "scroll_preview_half_page_down"
+pageup = "scroll_preview_half_page_up"
+ctrl-f = "cycle_previews"
+
+# Data operations
+# --------------
+ctrl-y = "copy_entry_to_clipboard"
+ctrl-r = "reload_source"
+ctrl-s = "cycle_sources"
+
+# UI Features
+# ----------
+ctrl-t = "toggle_remote_control"
+ctrl-x = "toggle_action_picker"
+ctrl-o = "toggle_preview"
+ctrl-h = "toggle_help"
+f12 = "toggle_status_bar"
+ctrl-l = "toggle_layout"
+
+# Input field actions
+# ----------------------------------------
+backspace = "delete_prev_char"
+ctrl-w = "delete_prev_word"
+ctrl-u = "delete_line"
+delete = "delete_next_char"
+left = "go_to_prev_char"
+right = "go_to_next_char"
+home = "go_to_input_start"
+ctrl-a = "go_to_input_start"
+end = "go_to_input_end"
+ctrl-e = "go_to_input_end"
+
+# Shell integration
+# ----------------------------------------------------------------------------
+#
+# The shell integration feature allows you to use television as a picker for
+# your shell commands (as well as your shell history with <CTRL-R>).
+# E.g. typing `git checkout <CTRL-T>` will open television with a list of
+# branches to choose from.
+
+[shell_integration]
+# This specifies the default fallback channel if no other channel is matched.
+fallback_channel = "files"
+
+[shell_integration.channel_triggers]
+# Add your channel triggers here. Each key is a channel that will be triggered
+# by the corresponding commands.
+# Example: say you want the following commands to trigger the following channels
+# when pressing <CTRL-T>:
+# `git checkout` should trigger the `git-branches` channel
+# `ls` should trigger the `dirs` channel
+# `cat` and `cp` should trigger the `files` channel
+#
+# You would add the following to your configuration file:
+# ```
+# [shell_integration.channel_triggers]
+# "git-branches" = ["git checkout"]
+# "dirs" = ["ls"]
+# "files" = ["cat", "cp"]
+# ```
+"alias" = ["alias", "unalias"]
+"env" = ["export", "unset"]
+"dirs" = ["cd", "ls", "rmdir", "z"]
+"files" = [
+ "cat",
+ "less",
+ "head",
+ "tail",
+ "vim",
+ "nano",
+ "bat",
+ "cp",
+ "mv",
+ "rm",
+ "touch",
+ "chmod",
+ "chown",
+ "ln",
+ "tar",
+ "zip",
+ "unzip",
+ "gzip",
+ "gunzip",
+ "xz",
+]
+"git-diff" = ["git add", "git restore"]
+"git-branch" = [
+ "git checkout",
+ "git branch",
+ "git merge",
+ "git rebase",
+ "git pull",
+ "git push",
+]
+"git-log" = ["git log", "git show"]
+"docker-images" = ["docker run"]
+"git-repos" = ["nvim", "code", "hx", "git clone"]
+
+
+[shell_integration.keybindings]
+# controls which key binding should trigger tv
+# for shell autocomplete
+"smart_autocomplete" = "ctrl-t"
+# controls which keybinding should trigger tv
+# for command history
+"command_history" = "ctrl-r"