diff --git a/deploy.sh b/deploy.sh index 77b6e99..9c9fccf 100755 --- a/deploy.sh +++ b/deploy.sh @@ -98,6 +98,7 @@ cp -rfv ./home/.config/aria2/ ~/.config/aria2/ cp -rfv ./home/.config/bat/ ~/.config/bat/ cp -rfv ./home/.config/bottom/ ~/.config/bottom/ cp -rfv ./home/.config/cava/ ~/.config/cava/ +cp -rfv ./home/.config/cht.sh/ ~/.config/cht.sh/ cp -rfv ./home/.config/cointop/ ~/.config/cointop/ cp -rfv ./home/.config/doom/ ~/.config/doom/ cp -rfv ./home/.config/gallery-dl/ ~/.config/gallery-dl/ diff --git a/home/.bashrc-bloated b/home/.bashrc-bloated index ef070ad..407d110 100644 --- a/home/.bashrc-bloated +++ b/home/.bashrc-bloated @@ -93,6 +93,8 @@ export NODENV_ROOT="$HOME/.local/share/nodenv" export PYENV_ROOT="$HOME/.local/share/pyenv" # poetry export POETRY_HOME="$HOME/.local/share/poetry" +# cht.sh +export CHTSH="$XDG_CONFIG_HOME/cht.sh" # nnn if command -v nnn >/dev/null then diff --git a/home/.config/cht.sh/cht.sh.conf b/home/.config/cht.sh/cht.sh.conf new file mode 100644 index 0000000..6ec4eb0 --- /dev/null +++ b/home/.config/cht.sh/cht.sh.conf @@ -0,0 +1,3 @@ +CHTSH_QUERY_OPTIONS="style=rrt" +CHTSH_URL=https://cht.sh +# CHTSH_CURL_OPTIONS="-A curl" diff --git a/home/.config/cht.sh/mode b/home/.config/cht.sh/mode new file mode 100644 index 0000000..865faf1 --- /dev/null +++ b/home/.config/cht.sh/mode @@ -0,0 +1 @@ +auto diff --git a/home/.config/cht.sh/standalone b/home/.config/cht.sh/standalone new file mode 100644 index 0000000..a4c6beb --- /dev/null +++ b/home/.config/cht.sh/standalone @@ -0,0 +1 @@ +$HOME/.local/share/cheat.sh diff --git a/home/.config/fish/conf.d/env.fish b/home/.config/fish/conf.d/env.fish index befc6b7..865cde8 100644 --- a/home/.config/fish/conf.d/env.fish +++ b/home/.config/fish/conf.d/env.fish @@ -112,6 +112,8 @@ if test -n "$XDG_SESSION_TYPE" end end end +# cht.sh +set -gx CHTSH "$XDG_CONFIG_HOME/cht.sh" # nnn if command -v nnn >/dev/null set -gx TERMINAL alacritty diff --git a/home/.config/termite/config b/home/.config/termite/config deleted file mode 100644 index fcf3ed2..0000000 --- a/home/.config/termite/config +++ /dev/null @@ -1,117 +0,0 @@ -[options] -allow_bold = true -audible_bell = false -bold_is_bright = false -cell_height_scale = 1.0 -cell_width_scale = 1.0 -clickable_url = true -dynamic_title = true -font = Iosevka Nerd Font 12 -fullscreen = false -icon_name = terminal -mouse_autohide = true -scroll_on_output = false -scroll_on_keystroke = true -scrollback_lines = 10000 -search_wrap = true -urgent_on_bell = true -hyperlinks = true - -# $BROWSER is used by default if set, with xdg-open as a fallback -browser = qutebrowser - -# "system", "on" or "off" -cursor_blink = system - -# "block", "underline" or "ibeam" -cursor_shape = block - -# Hide links that are no longer valid in url select overlay mode -filter_unmatched_urls = true - -# Emit escape sequences for extra modified keys -modify_other_keys = false - -# set size hints for the window -size_hints = false - -# "off", "left" or "right" -scrollbar = off - -[colors] -# If both of these are unset, cursor falls back to the foreground color, -# and cursor_foreground falls back to the background color. -# --- Nord --- # -cursor = #d8dee9 -cursor_foreground = #2e3440 -# -- OneDark -- # -# cursor = #bbc2cf -# cursor_foreground = #282c34 - -# --- Nord --- # -foreground = #d8dee9 -foreground_bold = #d8dee9 -background = rgba(46, 52, 64, 0.95) -# -- OneDark -- # -# foreground = #abb2bf -# foreground_bold = #abb2bf -# background = rgba(40, 44, 52, 0.95) - -# If unset, will reverse foreground and background -# highlight = #2f2f2f - -# Colors from color0 to color254 can be set -# --- Nord --- # -color0 = #3b4252 -color1 = #bf616a -color2 = #a3be8c -color3 = #ebcb8b -color4 = #81a1c1 -color5 = #b48ead -color6 = #88c0d0 -color7 = #e5e9f0 -color8 = #4c566a -color9 = #bf616a -color10 = #a3be8c -color11 = #ebcb8b -color12 = #81a1c1 -color13 = #b48ead -color14 = #8fbcbb -color15 = #eceff4 -# -- OneDark -- # -# color0 = #282c34 -# color1 = #be5046 -# color2 = #98c379 -# color3 = #d19a66 -# color4 = #61afef -# color5 = #c678dd -# color6 = #56b6c2 -# color7 = #abb2bf -# color8 = #3e4452 -# color9 = #e06c75 -# color10 = #98c379 -# color11 = #e5c07b -# color12 = #61afef -# color13 = #c678dd -# color14 = #56b6c2 -# color15 = #bbc2cf - -[hints] -font = Iosevka Nerd Font 14 -border_width = 1.0 -roundness = 2.0 -padding = 2 -# --- Nord --- # -foreground = #d8dee9 -background = #2e3440 -active_foreground = #2e3440 -active_background = #81a1c1 -border = #ebcb8b -# -- OneDark -- # -# foreground = #abb2bf -# background = #282c34 -# active_foreground = #282c34 -# active_background = #61afef -# border = #e5c07b - -# vim: ft=dosini cms=#%s diff --git a/home/.config/zsh/.zshenv b/home/.config/zsh/.zshenv index b14ea6b..95c0f85 100644 --- a/home/.config/zsh/.zshenv +++ b/home/.config/zsh/.zshenv @@ -80,6 +80,8 @@ export _ZO_DATA_DIR="$HOME/.local/share/zoxide" export _ZO_ECHO=1 export _ZO_FZF_OPTS="$FZF_DEFAULT_OPTS --no-multi" export _ZO_RESOLVE_SYMLINKS=1 +# cht.sh +export CHTSH="$XDG_CONFIG_HOME/cht.sh" # nnn if command -v nnn >/dev/null then diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc index 2a1d88c..479c0a3 100644 --- a/home/.config/zsh/.zshrc +++ b/home/.config/zsh/.zshrc @@ -118,13 +118,6 @@ zinit snippet https://github.com/junegunn/fzf/blob/master/shell/key-bindings.zsh zinit snippet https://github.com/junegunn/fzf/blob/master/shell/completion.zsh export FZF_COMPLETION_OPTS='-x' -# https://cht.sh (cheatsheet) -zinit ice mv":cht.sh -> cht.sh" atclone"chmod +x cht.sh" as"program" -zinit snippet https://cht.sh/:cht.sh -# And its completion -zinit ice mv":zsh -> _cht" as"completion" -zinit snippet https://cheat.sh/:zsh - # Better way to pass colors than asci codes (need to be loaded before other plugins) zinit light zpm-zsh/colors diff --git a/home/.local/bin/cheat b/home/.local/bin/cheat deleted file mode 100755 index 0b5ff7a..0000000 --- a/home/.local/bin/cheat +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -curl "https://cheat.sh/$1" diff --git a/setup/scripts.sh b/setup/scripts.sh index 9eaa366..b93b799 100755 --- a/setup/scripts.sh +++ b/setup/scripts.sh @@ -20,3 +20,11 @@ chmod 755 $HOME/.local/bin/fzf/ytfzf curl -fL "https://github.com/dilshod/xlsx2csv/raw/master/xlsx2csv.py" -o $HOME/.local/bin/xlsx2csv.py chmod 755 $HOME/.local/bin/xlsx2csv.py + +curl -fL "https://cht.sh/:cht.sh" -o $HOME/.local/bin/cht.sh +chmod 755 $HOME/.local/bin/cht.sh +echo "Install standalone cht.sh (y/n): " | tr -d '\n' +read -r answer +if [ "${answer}" = "y" ]; then + $HOME/.local/bin/cht.sh --standalone-install $HOME/.local/share/cheat.sh +fi