Skip to content

Commit

Permalink
use bat for all previews
Browse files Browse the repository at this point in the history
  • Loading branch information
kpa28-git committed Sep 10, 2022
1 parent 980461c commit 1d24bd4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 12 deletions.
1 change: 1 addition & 0 deletions .config/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Whitelist:
!/alacritty/**
!/bash/**
!/bat/**
!/bspwm/**
!/dunst/**
!/cargo/**
Expand Down
9 changes: 9 additions & 0 deletions .config/bat/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# __ __
# / / ___ _/ /_
# / _ \/ _ `/ __/
# /_.__/\_,_/\__/
# bat config file.

--style=default
--color=always
--theme=gruvbox-dark # `bat --list-themes` all available themes
5 changes: 2 additions & 3 deletions .config/pistol/pistol.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# pistol file previewer config

inode/directory ls -lah --color=auto --group-directories-first %pistol-filename%
text/plain textplainview %pistol-filename%
text/x-shellscript highlight -O ansi %pistol-filename%
text/* bat --terminal-width=100 --tabs=2 --paging=never %pistol-filename%
application/json bat --terminal-width=100 --tabs=2 --paging=never %pistol-filename%
application/csv column -s, -t %pistol-filename%
application/json highlight -O ansi %pistol-filename%
application/pdf pdftotext %pistol-filename% -
^(image|video)/* mediainfo %pistol-filename%
2 changes: 1 addition & 1 deletion .local/bin
Submodule bin updated from 0570f4 to 93da8d
18 changes: 10 additions & 8 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ export XDG_DATA_HOME="$HOME/.local/share"
export XDG_SCRIPT_HOME="$HOME/.local/bin"
export XDG_SRC_HOME="$HOME/.local/src"

# Add `$XDG_SCRIPT_HOME` and all subdirectories to $PATH
BLACKLIST='/.git' # Add more items to blacklist with <item1>\|<item2>\|<item3>...
export PATH="$PATH:$(du "$XDG_SCRIPT_HOME" | cut -f2 | grep -v "$BLACKLIST" | tr '\n' ':' | sed 's/:*$//')"
export PATH="$JAVA_HOME:$PATH:$HOME/.julia/conda/3/bin"
# Default programs/settings:
export TERMINFO='/usr/lib/terminfo'
export TERMINAL='/usr/bin/terminal'
export OPENER='xdg-open'
Expand All @@ -41,7 +38,7 @@ export RUST_TOOLCHAIN="$HOME/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu
#export REFER="$HOME/.referbib"
#export PIX="$HOME/.pix/"

# Clean up home
# Clean up home:
export LESSHISTFILE="-"
export BDOTDIR="$XDG_CONFIG_HOME/bash"
export INPUTRC="$BDOTDIR/inputrc"
Expand All @@ -55,11 +52,16 @@ export GRIPHOME="$XDG_CONFIG_HOME/grip"
export GNUPGHOME="$XDG_DATA_HOME/gnupg"
export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store"

# Global day/night times for theming
# Add `$XDG_SCRIPT_HOME/*`, java, go, julia to $PATH:
BLACKLIST='/.git' # Add more items to blacklist with <item1>\|<item2>\|<item3>...
export PATH="$PATH:$(du "$XDG_SCRIPT_HOME" | cut -f2 | grep -v "$BLACKLIST" | tr '\n' ':' | sed 's/:*$//')"
export PATH="$JAVA_HOME:$PATH:$GOPATH/bin:$HOME/.julia/conda/3/bin"

# Global day/night times for theming:
export TIMEDAY="07:00"
export TIMENIGHT="18:00"

# Set less/man colors
# Set less/man colors:
export LESS=-R
export LESS_TERMCAP_mb="$(printf '%b' '')"; a="${a%_}"
export LESS_TERMCAP_md="$(printf '%b' '')"; a="${a%_}"
Expand All @@ -72,7 +74,7 @@ export LESS_TERMCAP_ue="$(printf '%b' '')"; a="${a%_}"
# This is the list for lf icons:
export LF_ICONS="di=:fi=:tw=:ow=ﱮ:ln=:or=ﰸ:ex=:\
*.txt=:*.md=:*.csv=:*.log=📙:*.1=:*.nfo=:*.info=:\
*.jl=:*.py=:*.c=:*.cpp=:*.jar=:*.java=:\
*.sh=:*.jl=:*.py=:*.c=:*.cpp=:*.jar=:*.java=:\
*.json=ﬥ:*.toml=煉:*.html=爵:*.xml=:*.css=:*.tex=:*.bib=拾:*.ipynb=:\
*.out=:*.so=:*.gpg=:\
*.db=:*.arrow=:*.parquet=:*.feather=:\
Expand Down

0 comments on commit 1d24bd4

Please sign in to comment.