setup: add cht.sh

Also drop termite config
This commit is contained in:
Hoang Nguyen 2021-05-08 22:42:09 +03:00
parent 7af335cfb7
commit f35ff9461c
No known key found for this signature in database
GPG Key ID: 813CF484F4993419
11 changed files with 20 additions and 127 deletions

View File

@ -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/

View File

@ -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

View File

@ -0,0 +1,3 @@
CHTSH_QUERY_OPTIONS="style=rrt"
CHTSH_URL=https://cht.sh
# CHTSH_CURL_OPTIONS="-A curl"

1
home/.config/cht.sh/mode Normal file
View File

@ -0,0 +1 @@
auto

View File

@ -0,0 +1 @@
$HOME/.local/share/cheat.sh

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,3 +0,0 @@
#!/bin/sh
curl "https://cheat.sh/$1"

View File

@ -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