Migrate more options to chezmoi
- Add boolPrompt for _hasGui_ to allow to run some scripts confitionally - Add script to setup catppuccin GTK theme
|
|
@ -5,3 +5,4 @@
|
||||||
|
|
||||||
[data]
|
[data]
|
||||||
osid = {{ $osid | quote }}
|
osid = {{ $osid | quote }}
|
||||||
|
hasGui = {{ promptBoolOnce . "hasGui" "Does this machine needs gui configs/apps?" }}
|
||||||
|
|
|
||||||
25
chezmoi/.chezmoiscripts/run_once_setup_gtk_theme.sh.tmpl
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
{{- if eq .hasGui true -}}
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# ╭──────────────────────────────────────────────────────────╮
|
||||||
|
# │ Setup Catppuccin GTK theme │
|
||||||
|
# ╰──────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
tmp_dir="$(mktemp -d)"
|
||||||
|
|
||||||
|
cd "$tmp_dir"
|
||||||
|
|
||||||
|
git clone --recurse-submodules git@github.com:catppuccin/gtk.git
|
||||||
|
cd gtk
|
||||||
|
python -m venv venv
|
||||||
|
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
python install.py macchiato --link -a teal -d ~/.themes --tweaks normal
|
||||||
|
|
||||||
|
rm -rf "$tmp_dir"
|
||||||
|
{{ end }}
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
[[ ! -e "$HOME/.config" ]] && mkdir -p "$HOME/.config/"
|
|
||||||
|
|
||||||
echo "Creating symlinks..."
|
|
||||||
for var in $SCRIPT_DIR/*; do
|
|
||||||
pkg=$(basename "$var")
|
|
||||||
|
|
||||||
# if exist and is not a symlink
|
|
||||||
if [[ -e "$HOME/.config/$pkg" && ! -h "$HOME/.config/$pkg" ]]; then
|
|
||||||
echo "Config for $pkg exist, creating backup ${pkg}.old"
|
|
||||||
mv "$HOME/.config/$pkg" "$HOME/.config/${pkg}.old"
|
|
||||||
|
|
||||||
elif [[ -e "$HOME/.config/$pkg" && -h "$HOME/.config/$pkg" ]]; then
|
|
||||||
unlink "$HOME/.config/$pkg"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ln -sf "$var" "$HOME/.config/"
|
|
||||||
done
|
|
||||||
|
|
@ -1,174 +0,0 @@
|
||||||
# vim:ft=dircolors
|
|
||||||
# (This is not a dircolors file but it helps to highlight colors and comments)
|
|
||||||
|
|
||||||
# default values from dircolors
|
|
||||||
# (entries with a leading # are not implemented in lf)
|
|
||||||
# #no 00 # NORMAL
|
|
||||||
# fi 00 # FILE
|
|
||||||
# #rs 0 # RESET
|
|
||||||
# di 01;34 # DIR
|
|
||||||
# ln 01;36 # LINK
|
|
||||||
# #mh 00 # MULTIHARDLINK
|
|
||||||
# pi 40;33 # FIFO
|
|
||||||
# so 01;35 # SOCK
|
|
||||||
# #do 01;35 # DOOR
|
|
||||||
# bd 40;33;01 # BLK
|
|
||||||
# cd 40;33;01 # CHR
|
|
||||||
# or 40;31;01 # ORPHAN
|
|
||||||
# #mi 00 # MISSING
|
|
||||||
# su 37;41 # SETUID
|
|
||||||
# sg 30;43 # SETGID
|
|
||||||
# #ca 30;41 # CAPABILITY
|
|
||||||
# tw 30;42 # STICKY_OTHER_WRITABLE
|
|
||||||
# ow 34;42 # OTHER_WRITABLE
|
|
||||||
# st 37;44 # STICKY
|
|
||||||
# ex 01;32 # EXEC
|
|
||||||
|
|
||||||
# default values from lf (with matching order)
|
|
||||||
# ln 01;36 # LINK
|
|
||||||
# or 31;01 # ORPHAN
|
|
||||||
# tw 01;34 # STICKY_OTHER_WRITABLE
|
|
||||||
# ow 01;34 # OTHER_WRITABLE
|
|
||||||
# st 01;34 # STICKY
|
|
||||||
# di 01;34 # DIR
|
|
||||||
# pi 33 # FIFO
|
|
||||||
# so 01;35 # SOCK
|
|
||||||
# bd 33;01 # BLK
|
|
||||||
# cd 33;01 # CHR
|
|
||||||
# su 01;32 # SETUID
|
|
||||||
# sg 01;32 # SETGID
|
|
||||||
# ex 01;32 # EXEC
|
|
||||||
# fi 00 # FILE
|
|
||||||
|
|
||||||
# file types (with matching order)
|
|
||||||
ln 01;36 # LINK
|
|
||||||
or 31;01 # ORPHAN
|
|
||||||
tw 34 # STICKY_OTHER_WRITABLE
|
|
||||||
ow 34 # OTHER_WRITABLE
|
|
||||||
st 01;34 # STICKY
|
|
||||||
di 01;34 # DIR
|
|
||||||
pi 33 # FIFO
|
|
||||||
so 01;35 # SOCK
|
|
||||||
bd 33;01 # BLK
|
|
||||||
cd 33;01 # CHR
|
|
||||||
su 01;32 # SETUID
|
|
||||||
sg 01;32 # SETGID
|
|
||||||
ex 01;32 # EXEC
|
|
||||||
fi 00 # FILE
|
|
||||||
|
|
||||||
# archives or compressed (dircolors defaults)
|
|
||||||
*.tar 01;31
|
|
||||||
*.tgz 01;31
|
|
||||||
*.arc 01;31
|
|
||||||
*.arj 01;31
|
|
||||||
*.taz 01;31
|
|
||||||
*.lha 01;31
|
|
||||||
*.lz4 01;31
|
|
||||||
*.lzh 01;31
|
|
||||||
*.lzma 01;31
|
|
||||||
*.tlz 01;31
|
|
||||||
*.txz 01;31
|
|
||||||
*.tzo 01;31
|
|
||||||
*.t7z 01;31
|
|
||||||
*.zip 01;31
|
|
||||||
*.z 01;31
|
|
||||||
*.dz 01;31
|
|
||||||
*.gz 01;31
|
|
||||||
*.lrz 01;31
|
|
||||||
*.lz 01;31
|
|
||||||
*.lzo 01;31
|
|
||||||
*.xz 01;31
|
|
||||||
*.zst 01;31
|
|
||||||
*.tzst 01;31
|
|
||||||
*.bz2 01;31
|
|
||||||
*.bz 01;31
|
|
||||||
*.tbz 01;31
|
|
||||||
*.tbz2 01;31
|
|
||||||
*.tz 01;31
|
|
||||||
*.deb 01;31
|
|
||||||
*.rpm 01;31
|
|
||||||
*.jar 01;31
|
|
||||||
*.war 01;31
|
|
||||||
*.ear 01;31
|
|
||||||
*.sar 01;31
|
|
||||||
*.rar 01;31
|
|
||||||
*.alz 01;31
|
|
||||||
*.ace 01;31
|
|
||||||
*.zoo 01;31
|
|
||||||
*.cpio 01;31
|
|
||||||
*.7z 01;31
|
|
||||||
*.rz 01;31
|
|
||||||
*.cab 01;31
|
|
||||||
*.wim 01;31
|
|
||||||
*.swm 01;31
|
|
||||||
*.dwm 01;31
|
|
||||||
*.esd 01;31
|
|
||||||
|
|
||||||
# image formats (dircolors defaults)
|
|
||||||
*.jpg 01;35
|
|
||||||
*.jpeg 01;35
|
|
||||||
*.mjpg 01;35
|
|
||||||
*.mjpeg 01;35
|
|
||||||
*.gif 01;35
|
|
||||||
*.bmp 01;35
|
|
||||||
*.pbm 01;35
|
|
||||||
*.pgm 01;35
|
|
||||||
*.ppm 01;35
|
|
||||||
*.tga 01;35
|
|
||||||
*.xbm 01;35
|
|
||||||
*.xpm 01;35
|
|
||||||
*.tif 01;35
|
|
||||||
*.tiff 01;35
|
|
||||||
*.png 01;35
|
|
||||||
*.svg 01;35
|
|
||||||
*.svgz 01;35
|
|
||||||
*.mng 01;35
|
|
||||||
*.pcx 01;35
|
|
||||||
*.mov 01;35
|
|
||||||
*.mpg 01;35
|
|
||||||
*.mpeg 01;35
|
|
||||||
*.m2v 01;35
|
|
||||||
*.mkv 01;35
|
|
||||||
*.webm 01;35
|
|
||||||
*.ogm 01;35
|
|
||||||
*.mp4 01;35
|
|
||||||
*.m4v 01;35
|
|
||||||
*.mp4v 01;35
|
|
||||||
*.vob 01;35
|
|
||||||
*.qt 01;35
|
|
||||||
*.nuv 01;35
|
|
||||||
*.wmv 01;35
|
|
||||||
*.asf 01;35
|
|
||||||
*.rm 01;35
|
|
||||||
*.rmvb 01;35
|
|
||||||
*.flc 01;35
|
|
||||||
*.avi 01;35
|
|
||||||
*.fli 01;35
|
|
||||||
*.flv 01;35
|
|
||||||
*.gl 01;35
|
|
||||||
*.dl 01;35
|
|
||||||
*.xcf 01;35
|
|
||||||
*.xwd 01;35
|
|
||||||
*.yuv 01;35
|
|
||||||
*.cgm 01;35
|
|
||||||
*.emf 01;35
|
|
||||||
*.ogv 01;35
|
|
||||||
*.ogx 01;35
|
|
||||||
|
|
||||||
# audio formats (dircolors defaults)
|
|
||||||
*.aac 00;36
|
|
||||||
*.au 00;36
|
|
||||||
*.flac 00;36
|
|
||||||
*.m4a 00;36
|
|
||||||
*.mid 00;36
|
|
||||||
*.midi 00;36
|
|
||||||
*.mka 00;36
|
|
||||||
*.mp3 00;36
|
|
||||||
*.mpc 00;36
|
|
||||||
*.ogg 00;36
|
|
||||||
*.ra 00;36
|
|
||||||
*.wav 00;36
|
|
||||||
*.oga 00;36
|
|
||||||
*.opus 00;36
|
|
||||||
*.spx 00;36
|
|
||||||
*.xspf 00;36
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
image() {
|
|
||||||
geometry="$(($2-2))x$3"
|
|
||||||
chafa "$1" -f sixel -s "$geometry" --animate false | fold -w 65535
|
|
||||||
}
|
|
||||||
|
|
||||||
batorcat() {
|
|
||||||
file="$1"
|
|
||||||
shift
|
|
||||||
if command -v bat > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
bat --color=always --style=plain --pager=never "$file" "$@"
|
|
||||||
else
|
|
||||||
cat "$file"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
glowormdcat() {
|
|
||||||
file="$1"
|
|
||||||
shift
|
|
||||||
if command -v glow > /dev/null 2>&1
|
|
||||||
then
|
|
||||||
glow "$file"
|
|
||||||
else
|
|
||||||
mdcat "$file"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))"
|
|
||||||
|
|
||||||
case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in
|
|
||||||
*.tgz|*.tar.gz) tar tzf "$1" ;;
|
|
||||||
*.tar.bz2|*.tbz2) tar tjf "$1" ;;
|
|
||||||
*.tar.txz|*.txz) xz --list "$1" ;;
|
|
||||||
*.tar) tar tf "$1" ;;
|
|
||||||
*.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;;
|
|
||||||
*.rar) unrar l "$1" ;;
|
|
||||||
*.md)
|
|
||||||
glowormdcat "$1";;
|
|
||||||
*.7z) 7z l "$1" ;;
|
|
||||||
*.[1-8]) man "$1" | col -b ;;
|
|
||||||
*.o) nm "$1";;
|
|
||||||
*.torrent) transmission-show "$1" ;;
|
|
||||||
*.iso) iso-info --no-header -l "$1" ;;
|
|
||||||
*.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;;
|
|
||||||
*.doc) catdoc "$1" ;;
|
|
||||||
*.docx) docx2txt "$1" ;;
|
|
||||||
*.xml|*.html) w3m -dump "$1";;
|
|
||||||
*.xls|*.xlsx)
|
|
||||||
ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv
|
|
||||||
;;
|
|
||||||
*.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka)
|
|
||||||
exiftool "$1"
|
|
||||||
;;
|
|
||||||
*.pdf)
|
|
||||||
[ ! -f "${CACHE}.jpg" ] && \
|
|
||||||
pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE"
|
|
||||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.epub)
|
|
||||||
[ ! -f "$CACHE" ] && \
|
|
||||||
epub-thumbnailer "$1" "$CACHE" 1024
|
|
||||||
image "$CACHE" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.cbz|*.cbr|*.cbt)
|
|
||||||
[ ! -f "$CACHE" ] && \
|
|
||||||
comicthumb "$1" "$CACHE" 1024
|
|
||||||
image "$CACHE" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx)
|
|
||||||
[ ! -f "${CACHE}.jpg" ] && \
|
|
||||||
ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5
|
|
||||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.tiff|*.gif|*.jfif|*.ico)
|
|
||||||
image "$1" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.svg)
|
|
||||||
[ ! -f "${CACHE}.jpg" ] && \
|
|
||||||
convert "$1" "${CACHE}.jpg"
|
|
||||||
image "${CACHE}.jpg" "$2" "$3" "$4" "$5"
|
|
||||||
;;
|
|
||||||
*.ino)
|
|
||||||
batorcat --language=cpp "$1"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
batorcat "$1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
exit 0
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Five arguments are passed to the file:
|
|
||||||
# (1) current file name
|
|
||||||
# (2) width
|
|
||||||
# (3) height
|
|
||||||
# (4) horizontal position
|
|
||||||
# (5) vertical position of preview pane
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
jpg | jpeg | png) vimiv "$1" ;;
|
|
||||||
*.tar*) tar tf "$1" ;;
|
|
||||||
*.zip) unzip -l "$1" ;;
|
|
||||||
*.rar) unrar l "$1" ;;
|
|
||||||
*.7z) 7z l "$1" ;;
|
|
||||||
*.pdf) pdftotext "$1" - ;;
|
|
||||||
*) bat --force-colorization --line-range ":$3" --pager never --terminal-width "$2" "$1" ;;
|
|
||||||
esac
|
|
||||||
|
|
@ -1,357 +0,0 @@
|
||||||
# vim:ft=conf
|
|
||||||
|
|
||||||
# These examples require Nerd Fonts or a compatible font to be used.
|
|
||||||
# See https://www.nerdfonts.com for more information.
|
|
||||||
|
|
||||||
# default values from lf (with matching order)
|
|
||||||
# ln l # LINK
|
|
||||||
# or l # ORPHAN
|
|
||||||
# tw t # STICKY_OTHER_WRITABLE
|
|
||||||
# ow d # OTHER_WRITABLE
|
|
||||||
# st t # STICKY
|
|
||||||
# di d # DIR
|
|
||||||
# pi p # FIFO
|
|
||||||
# so s # SOCK
|
|
||||||
# bd b # BLK
|
|
||||||
# cd c # CHR
|
|
||||||
# su u # SETUID
|
|
||||||
# sg g # SETGID
|
|
||||||
# ex x # EXEC
|
|
||||||
# fi - # FILE
|
|
||||||
|
|
||||||
# file types (with matching order)
|
|
||||||
ln # LINK
|
|
||||||
or # ORPHAN
|
|
||||||
tw t # STICKY_OTHER_WRITABLE
|
|
||||||
ow # OTHER_WRITABLE
|
|
||||||
st t # STICKY
|
|
||||||
di # DIR
|
|
||||||
pi p # FIFO
|
|
||||||
so s # SOCK
|
|
||||||
bd b # BLK
|
|
||||||
cd c # CHR
|
|
||||||
su u # SETUID
|
|
||||||
sg g # SETGID
|
|
||||||
ex # EXEC
|
|
||||||
fi # FILE
|
|
||||||
|
|
||||||
# file extensions (vim-devicons)
|
|
||||||
*.styl
|
|
||||||
*.sass
|
|
||||||
*.scss
|
|
||||||
*.htm
|
|
||||||
*.html
|
|
||||||
*.slim
|
|
||||||
*.haml
|
|
||||||
*.ejs
|
|
||||||
*.css
|
|
||||||
*.less
|
|
||||||
*.md
|
|
||||||
*.mdx
|
|
||||||
*.markdown
|
|
||||||
*.rmd
|
|
||||||
*.json
|
|
||||||
*.webmanifest
|
|
||||||
*.js
|
|
||||||
*.mjs
|
|
||||||
*.jsx
|
|
||||||
*.rb
|
|
||||||
*.gemspec
|
|
||||||
*.rake
|
|
||||||
*.php
|
|
||||||
*.py
|
|
||||||
*.pyc
|
|
||||||
*.pyo
|
|
||||||
*.pyd
|
|
||||||
*.coffee
|
|
||||||
*.mustache
|
|
||||||
*.hbs
|
|
||||||
*.conf
|
|
||||||
*.ini
|
|
||||||
*.yml
|
|
||||||
*.yaml
|
|
||||||
*.toml
|
|
||||||
*.bat
|
|
||||||
*.mk
|
|
||||||
*.jpg
|
|
||||||
*.jpeg
|
|
||||||
*.bmp
|
|
||||||
*.png
|
|
||||||
*.webp
|
|
||||||
*.gif
|
|
||||||
*.ico
|
|
||||||
*.twig
|
|
||||||
*.cpp
|
|
||||||
*.c++
|
|
||||||
*.cxx
|
|
||||||
*.cc
|
|
||||||
*.cp
|
|
||||||
*.c
|
|
||||||
*.cs
|
|
||||||
*.h
|
|
||||||
*.hh
|
|
||||||
*.hpp
|
|
||||||
*.hxx
|
|
||||||
*.hs
|
|
||||||
*.lhs
|
|
||||||
*.nix
|
|
||||||
*.lua
|
|
||||||
*.java
|
|
||||||
*.sh
|
|
||||||
*.fish
|
|
||||||
*.bash
|
|
||||||
*.zsh
|
|
||||||
*.ksh
|
|
||||||
*.csh
|
|
||||||
*.awk
|
|
||||||
*.ps1
|
|
||||||
*.ml λ
|
|
||||||
*.mli λ
|
|
||||||
*.diff
|
|
||||||
*.db
|
|
||||||
*.sql
|
|
||||||
*.dump
|
|
||||||
*.clj
|
|
||||||
*.cljc
|
|
||||||
*.cljs
|
|
||||||
*.edn
|
|
||||||
*.scala
|
|
||||||
*.go
|
|
||||||
*.dart
|
|
||||||
*.xul
|
|
||||||
*.sln
|
|
||||||
*.suo
|
|
||||||
*.pl
|
|
||||||
*.pm
|
|
||||||
*.t
|
|
||||||
*.rss
|
|
||||||
'*.f#'
|
|
||||||
*.fsscript
|
|
||||||
*.fsx
|
|
||||||
*.fs
|
|
||||||
*.fsi
|
|
||||||
*.rs
|
|
||||||
*.rlib
|
|
||||||
*.d
|
|
||||||
*.erl
|
|
||||||
*.hrl
|
|
||||||
*.ex
|
|
||||||
*.exs
|
|
||||||
*.eex
|
|
||||||
*.leex
|
|
||||||
*.heex
|
|
||||||
*.vim
|
|
||||||
*.ai
|
|
||||||
*.psd
|
|
||||||
*.psb
|
|
||||||
*.ts
|
|
||||||
*.tsx
|
|
||||||
*.jl
|
|
||||||
*.pp
|
|
||||||
*.vue
|
|
||||||
*.elm
|
|
||||||
*.swift
|
|
||||||
*.xcplayground
|
|
||||||
*.tex ﭨ
|
|
||||||
*.r ﳒ
|
|
||||||
*.rproj 鉶
|
|
||||||
*.sol ﲹ
|
|
||||||
*.pem
|
|
||||||
|
|
||||||
# file names (vim-devicons) (case-insensitive not supported in lf)
|
|
||||||
*gruntfile.coffee
|
|
||||||
*gruntfile.js
|
|
||||||
*gruntfile.ls
|
|
||||||
*gulpfile.coffee
|
|
||||||
*gulpfile.js
|
|
||||||
*gulpfile.ls
|
|
||||||
*mix.lock
|
|
||||||
*dropbox
|
|
||||||
*.ds_store
|
|
||||||
*.gitconfig
|
|
||||||
*.gitignore
|
|
||||||
*.gitattributes
|
|
||||||
*.gitlab-ci.yml
|
|
||||||
*.bashrc
|
|
||||||
*.zshrc
|
|
||||||
*.zshenv
|
|
||||||
*.zprofile
|
|
||||||
*.vimrc
|
|
||||||
*.gvimrc
|
|
||||||
*_vimrc
|
|
||||||
*_gvimrc
|
|
||||||
*.bashprofile
|
|
||||||
*favicon.ico
|
|
||||||
*license
|
|
||||||
*node_modules
|
|
||||||
*react.jsx
|
|
||||||
*procfile
|
|
||||||
*dockerfile
|
|
||||||
*docker-compose.yml
|
|
||||||
*rakefile
|
|
||||||
*config.ru
|
|
||||||
*gemfile
|
|
||||||
*makefile
|
|
||||||
*cmakelists.txt
|
|
||||||
*robots.txt ﮧ
|
|
||||||
|
|
||||||
# file names (case-sensitive adaptations)
|
|
||||||
*Gruntfile.coffee
|
|
||||||
*Gruntfile.js
|
|
||||||
*Gruntfile.ls
|
|
||||||
*Gulpfile.coffee
|
|
||||||
*Gulpfile.js
|
|
||||||
*Gulpfile.ls
|
|
||||||
*Dropbox
|
|
||||||
*.DS_Store
|
|
||||||
*LICENSE
|
|
||||||
*React.jsx
|
|
||||||
*Procfile
|
|
||||||
*Dockerfile
|
|
||||||
*Docker-compose.yml
|
|
||||||
*Rakefile
|
|
||||||
*Gemfile
|
|
||||||
*Makefile
|
|
||||||
*CMakeLists.txt
|
|
||||||
|
|
||||||
# file patterns (vim-devicons) (patterns not supported in lf)
|
|
||||||
# .*jquery.*\.js$
|
|
||||||
# .*angular.*\.js$
|
|
||||||
# .*backbone.*\.js$
|
|
||||||
# .*require.*\.js$
|
|
||||||
# .*materialize.*\.js$
|
|
||||||
# .*materialize.*\.css$
|
|
||||||
# .*mootools.*\.js$
|
|
||||||
# .*vimrc.*
|
|
||||||
# Vagrantfile$
|
|
||||||
|
|
||||||
# file patterns (file name adaptations)
|
|
||||||
*jquery.min.js
|
|
||||||
*angular.min.js
|
|
||||||
*backbone.min.js
|
|
||||||
*require.min.js
|
|
||||||
*materialize.min.js
|
|
||||||
*materialize.min.css
|
|
||||||
*mootools.min.js
|
|
||||||
*vimrc
|
|
||||||
Vagrantfile
|
|
||||||
|
|
||||||
# archives or compressed (extensions from dircolors defaults)
|
|
||||||
*.tar
|
|
||||||
*.tgz
|
|
||||||
*.arc
|
|
||||||
*.arj
|
|
||||||
*.taz
|
|
||||||
*.lha
|
|
||||||
*.lz4
|
|
||||||
*.lzh
|
|
||||||
*.lzma
|
|
||||||
*.tlz
|
|
||||||
*.txz
|
|
||||||
*.tzo
|
|
||||||
*.t7z
|
|
||||||
*.zip
|
|
||||||
*.z
|
|
||||||
*.dz
|
|
||||||
*.gz
|
|
||||||
*.lrz
|
|
||||||
*.lz
|
|
||||||
*.lzo
|
|
||||||
*.xz
|
|
||||||
*.zst
|
|
||||||
*.tzst
|
|
||||||
*.bz2
|
|
||||||
*.bz
|
|
||||||
*.tbz
|
|
||||||
*.tbz2
|
|
||||||
*.tz
|
|
||||||
*.deb
|
|
||||||
*.rpm
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.ear
|
|
||||||
*.sar
|
|
||||||
*.rar
|
|
||||||
*.alz
|
|
||||||
*.ace
|
|
||||||
*.zoo
|
|
||||||
*.cpio
|
|
||||||
*.7z
|
|
||||||
*.rz
|
|
||||||
*.cab
|
|
||||||
*.wim
|
|
||||||
*.swm
|
|
||||||
*.dwm
|
|
||||||
*.esd
|
|
||||||
|
|
||||||
# image formats (extensions from dircolors defaults)
|
|
||||||
*.jpg
|
|
||||||
*.jpeg
|
|
||||||
*.mjpg
|
|
||||||
*.mjpeg
|
|
||||||
*.gif
|
|
||||||
*.bmp
|
|
||||||
*.pbm
|
|
||||||
*.pgm
|
|
||||||
*.ppm
|
|
||||||
*.tga
|
|
||||||
*.xbm
|
|
||||||
*.xpm
|
|
||||||
*.tif
|
|
||||||
*.tiff
|
|
||||||
*.png
|
|
||||||
*.svg
|
|
||||||
*.svgz
|
|
||||||
*.mng
|
|
||||||
*.pcx
|
|
||||||
*.mov
|
|
||||||
*.mpg
|
|
||||||
*.mpeg
|
|
||||||
*.m2v
|
|
||||||
*.mkv
|
|
||||||
*.webm
|
|
||||||
*.ogm
|
|
||||||
*.mp4
|
|
||||||
*.m4v
|
|
||||||
*.mp4v
|
|
||||||
*.vob
|
|
||||||
*.qt
|
|
||||||
*.nuv
|
|
||||||
*.wmv
|
|
||||||
*.asf
|
|
||||||
*.rm
|
|
||||||
*.rmvb
|
|
||||||
*.flc
|
|
||||||
*.avi
|
|
||||||
*.fli
|
|
||||||
*.flv
|
|
||||||
*.gl
|
|
||||||
*.dl
|
|
||||||
*.xcf
|
|
||||||
*.xwd
|
|
||||||
*.yuv
|
|
||||||
*.cgm
|
|
||||||
*.emf
|
|
||||||
*.ogv
|
|
||||||
*.ogx
|
|
||||||
|
|
||||||
# audio formats (extensions from dircolors defaults)
|
|
||||||
*.aac
|
|
||||||
*.au
|
|
||||||
*.flac
|
|
||||||
*.m4a
|
|
||||||
*.mid
|
|
||||||
*.midi
|
|
||||||
*.mka
|
|
||||||
*.mp3
|
|
||||||
*.mpc
|
|
||||||
*.ogg
|
|
||||||
*.ra
|
|
||||||
*.wav
|
|
||||||
*.oga
|
|
||||||
*.opus
|
|
||||||
*.spx
|
|
||||||
*.xspf
|
|
||||||
|
|
||||||
# other formats
|
|
||||||
*.pdf
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
||||||
# interpreter for shell commands
|
|
||||||
set shell sh
|
|
||||||
|
|
||||||
# set '-eu' options for shell commands
|
|
||||||
# These options are used to have safer shell commands. Option '-e' is used to
|
|
||||||
# exit on error and option '-u' is used to give error for unset variables.
|
|
||||||
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
|
|
||||||
# $fx variables contain names with '*' or '?' characters. However, this option
|
|
||||||
# is used selectively within individual commands as it can be limiting at
|
|
||||||
# times.
|
|
||||||
set shellopts '-eu'
|
|
||||||
|
|
||||||
# set internal field separator (IFS) to "\n" for shell commands
|
|
||||||
# This is useful to automatically split file names in $fs and $fx properly
|
|
||||||
# since default file separator used in these variables (i.e. 'filesep' option)
|
|
||||||
# is newline. You need to consider the values of these options and create your
|
|
||||||
# commands accordingly.
|
|
||||||
set ifs "\n"
|
|
||||||
|
|
||||||
# leave some space at the top and the bottom of the screen
|
|
||||||
set scrolloff 15
|
|
||||||
|
|
||||||
# Previewer script
|
|
||||||
set previewer ~/.config/lf/preview.sh
|
|
||||||
|
|
||||||
# Use the `dim` attribute instead of underline for the cursor in the preview pane
|
|
||||||
set cursorpreviewfmt "\033[7;2m"
|
|
||||||
|
|
||||||
# Enable icons
|
|
||||||
set icons
|
|
||||||
|
|
||||||
# use enter for shell commands
|
|
||||||
map <enter> shell
|
|
||||||
|
|
||||||
# show the result of execution of previous commands
|
|
||||||
map ` !true
|
|
||||||
|
|
||||||
# execute current file (must be executable)
|
|
||||||
map x $$f
|
|
||||||
map X !$f
|
|
||||||
|
|
||||||
# dedicated keys for file opener actions
|
|
||||||
map o &mimeopen $f
|
|
||||||
map O $mimeopen --ask $f
|
|
||||||
|
|
||||||
# define a custom 'open' command
|
|
||||||
# This command is called when current file is not a directory. You may want to
|
|
||||||
# use either file extensions and/or mime types here. Below uses an editor for
|
|
||||||
# text files and a file opener for the rest.
|
|
||||||
cmd open &{{
|
|
||||||
case $(file --mime-type -Lb $f) in
|
|
||||||
text/*) lf -remote "send $id \$$EDITOR \$fx";;
|
|
||||||
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
|
|
||||||
esac
|
|
||||||
}}
|
|
||||||
|
|
||||||
# mkdir command. See wiki if you want it to select created dir
|
|
||||||
map a :push %mkdir -p<space>
|
|
||||||
|
|
||||||
# move current file or selected files to trash folder
|
|
||||||
# cmd trash %trash-put $fx
|
|
||||||
|
|
||||||
# move current file or selected files to trash folder, with prompt
|
|
||||||
cmd trash ${{
|
|
||||||
set -f
|
|
||||||
clear
|
|
||||||
printf "$fx\n"
|
|
||||||
printf "move selected files to trash? [y/N]"
|
|
||||||
read ans
|
|
||||||
[ "$ans" = "y" ] && trash-put $fx || printf ""
|
|
||||||
}}
|
|
||||||
|
|
||||||
# use '<delete>' key for either 'trash' or 'delete' command
|
|
||||||
map <delete> trash
|
|
||||||
# map <delete> delete
|
|
||||||
|
|
||||||
# extract the current file with the right command
|
|
||||||
# (xkcd link: https://xkcd.com/1168/)
|
|
||||||
cmd extract ${{
|
|
||||||
set -f
|
|
||||||
case $f in
|
|
||||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
|
||||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
|
||||||
*.tar.xz|*.txz) tar xJvf $f;;
|
|
||||||
*.zip) unzip $f;;
|
|
||||||
*.rar) unrar x $f;;
|
|
||||||
*.7z) 7z x $f;;
|
|
||||||
esac
|
|
||||||
}}
|
|
||||||
|
|
||||||
# compress current file or selected files with tar and gunzip
|
|
||||||
cmd tar ${{
|
|
||||||
set -f
|
|
||||||
mkdir $1
|
|
||||||
cp -r $fx $1
|
|
||||||
tar czf $1.tar.gz $1
|
|
||||||
rm -rf $1
|
|
||||||
}}
|
|
||||||
|
|
||||||
# compress current file or selected files with zip
|
|
||||||
cmd zip ${{
|
|
||||||
set -f
|
|
||||||
mkdir $1
|
|
||||||
cp -r $fx $1
|
|
||||||
zip -r $1.zip $1
|
|
||||||
rm -rf $1
|
|
||||||
}}
|
|
||||||
|
|
||||||
cmd mega-extract ${{
|
|
||||||
printf " Enter compresion type: "
|
|
||||||
read compression
|
|
||||||
|
|
||||||
printf " Enter link: "
|
|
||||||
read link
|
|
||||||
|
|
||||||
download-mega-extract "$compression" "$PWD" "$link"
|
|
||||||
}}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
session_name: shorthands
|
|
||||||
windows:
|
|
||||||
- window_name: main
|
|
||||||
layout: main-vertical
|
|
||||||
panes:
|
|
||||||
- shell_command: vi
|
|
||||||
- shell_command: pnpm dev
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
session_name: persona-page
|
|
||||||
windows:
|
|
||||||
layout: main-vertical
|
|
||||||
panes:
|
|
||||||
- shell_command:
|
|
||||||
- nvim
|
|
||||||
focus: true
|
|
||||||
- pnpm
|
|
||||||
|
|
@ -1,89 +0,0 @@
|
||||||
" You can edit this file by hand.
|
|
||||||
" The " character at the beginning of a line comments out the line.
|
|
||||||
" Blank lines are ignored.
|
|
||||||
|
|
||||||
" The Default color scheme is used for any directory that does not have
|
|
||||||
" a specified scheme and for parts of user interface like menus. A
|
|
||||||
" color scheme set for a base directory will also
|
|
||||||
" be used for the sub directories.
|
|
||||||
|
|
||||||
" The standard ncurses colors are:
|
|
||||||
" Default = -1 = None, can be used for transparency or default color
|
|
||||||
" Black = 0
|
|
||||||
" Red = 1
|
|
||||||
" Green = 2
|
|
||||||
" Yellow = 3
|
|
||||||
" Blue = 4
|
|
||||||
" Magenta = 5
|
|
||||||
" Cyan = 6
|
|
||||||
" White = 7
|
|
||||||
|
|
||||||
" Light versions of colors are also available (they set bold
|
|
||||||
" attribute in terminals with less than 16 colors):
|
|
||||||
" LightBlack
|
|
||||||
" LightRed
|
|
||||||
" LightGreen
|
|
||||||
" LightYellow
|
|
||||||
" LightBlue
|
|
||||||
" LightMagenta
|
|
||||||
" LightCyan
|
|
||||||
" LightWhite
|
|
||||||
|
|
||||||
" Available attributes (some of them can be combined):
|
|
||||||
" bold
|
|
||||||
" underline
|
|
||||||
" reverse or inverse
|
|
||||||
" standout
|
|
||||||
" italic (on unsupported systems becomes reverse)
|
|
||||||
" combine
|
|
||||||
" none
|
|
||||||
|
|
||||||
" Vifm supports 256 colors you can use color numbers 0-255
|
|
||||||
" (requires properly set up terminal: set your TERM environment variable
|
|
||||||
" (directly or using resources) to some color terminal name (e.g.
|
|
||||||
" xterm-256color) from /usr/lib/terminfo/; you can check current number
|
|
||||||
" of colors in your terminal with tput colors command)
|
|
||||||
|
|
||||||
" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color
|
|
||||||
|
|
||||||
highlight clear
|
|
||||||
|
|
||||||
highlight Win cterm=none ctermfg=white ctermbg=black
|
|
||||||
highlight Directory cterm=bold ctermfg=cyan ctermbg=default
|
|
||||||
highlight Link cterm=bold ctermfg=yellow ctermbg=default
|
|
||||||
highlight BrokenLink cterm=bold ctermfg=red ctermbg=default
|
|
||||||
highlight HardLink cterm=none ctermfg=yellow ctermbg=default
|
|
||||||
highlight Socket cterm=bold ctermfg=magenta ctermbg=default
|
|
||||||
highlight Device cterm=bold ctermfg=red ctermbg=default
|
|
||||||
highlight Fifo cterm=bold ctermfg=cyan ctermbg=default
|
|
||||||
highlight Executable cterm=bold ctermfg=green ctermbg=default
|
|
||||||
highlight Selected cterm=bold ctermfg=magenta ctermbg=default
|
|
||||||
highlight CurrLine cterm=bold,reverse ctermfg=default ctermbg=default
|
|
||||||
highlight TopLine cterm=none ctermfg=black ctermbg=white
|
|
||||||
highlight TopLineSel cterm=bold ctermfg=black ctermbg=default
|
|
||||||
highlight StatusLine cterm=bold ctermfg=black ctermbg=white
|
|
||||||
highlight WildMenu cterm=underline,reverse ctermfg=white ctermbg=black
|
|
||||||
highlight CmdLine cterm=none ctermfg=white ctermbg=black
|
|
||||||
highlight ErrorMsg cterm=none ctermfg=red ctermbg=black
|
|
||||||
highlight Border cterm=none ctermfg=black ctermbg=white
|
|
||||||
highlight OtherLine ctermfg=default ctermbg=default
|
|
||||||
highlight JobLine cterm=bold,reverse ctermfg=black ctermbg=white
|
|
||||||
highlight SuggestBox cterm=bold ctermfg=default ctermbg=default
|
|
||||||
highlight CmpMismatch cterm=bold ctermfg=white ctermbg=red
|
|
||||||
highlight CmpUnmatched cterm=bold ctermfg=white ctermbg=green
|
|
||||||
highlight CmpBlank ctermfg=default ctermbg=default
|
|
||||||
highlight AuxWin ctermfg=default ctermbg=default
|
|
||||||
highlight TabLine cterm=none ctermfg=white ctermbg=black
|
|
||||||
highlight TabLineSel cterm=bold,reverse ctermfg=default ctermbg=default
|
|
||||||
highlight User1 ctermfg=default ctermbg=default
|
|
||||||
highlight User2 ctermfg=default ctermbg=default
|
|
||||||
highlight User3 ctermfg=default ctermbg=default
|
|
||||||
highlight User4 ctermfg=default ctermbg=default
|
|
||||||
highlight User5 ctermfg=default ctermbg=default
|
|
||||||
highlight User6 ctermfg=default ctermbg=default
|
|
||||||
highlight User7 ctermfg=default ctermbg=default
|
|
||||||
highlight User8 ctermfg=default ctermbg=default
|
|
||||||
highlight User9 ctermfg=default ctermbg=default
|
|
||||||
highlight OtherWin ctermfg=default ctermbg=default
|
|
||||||
highlight LineNr ctermfg=default ctermbg=default
|
|
||||||
highlight OddLine ctermfg=default ctermbg=default
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
This directory is dedicated for user-supplied scripts/executables.
|
|
||||||
vifm modifies its PATH environment variable to let user run those
|
|
||||||
scripts without specifying full path. All subdirectories are added
|
|
||||||
as well. File in a subdirectory overrules file with the same name
|
|
||||||
in parent directories. Restart might be needed to recognize files
|
|
||||||
in newly created or renamed subdirectories.
|
|
||||||
|
|
@ -1,541 +0,0 @@
|
||||||
" vim: filetype=vifm :
|
|
||||||
" Sample configuration file for vifm (last updated: 8 August, 2022)
|
|
||||||
" You can edit this file by hand.
|
|
||||||
" The " character at the beginning of a line comments out the line.
|
|
||||||
" Blank lines are ignored.
|
|
||||||
" The basic format for each item is shown with an example.
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Main settings
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Command used to edit files in various contexts. The default is vim.
|
|
||||||
" If you would like to use another vi clone such as Elvis or Vile
|
|
||||||
" you will need to change this setting.
|
|
||||||
if executable('nvim')
|
|
||||||
set vicmd=nvim
|
|
||||||
elseif executable('vim')
|
|
||||||
set vicmd=vim
|
|
||||||
elseif executable('elvis')
|
|
||||||
set vicmd=elvis\ -G\ termcap
|
|
||||||
elseif executable('vile')
|
|
||||||
set vicmd=vile
|
|
||||||
elseif $EDITOR != ''
|
|
||||||
echo 'Note: using `'.$EDITOR.'` as an editor'
|
|
||||||
let &vicmd = $EDITOR
|
|
||||||
endif
|
|
||||||
|
|
||||||
" This makes vifm perform file operations on its own instead of relying on
|
|
||||||
" standard utilities like `cp`. While using `cp` and alike is a more universal
|
|
||||||
" solution, it's also much slower when processing large amounts of files and
|
|
||||||
" doesn't support progress measuring.
|
|
||||||
set syscalls
|
|
||||||
|
|
||||||
" Trash Directory
|
|
||||||
" The default is to move files that are deleted with dd or :d to
|
|
||||||
" the trash directory. If you change this you will not be able to move
|
|
||||||
" files by deleting them and then using p to put the file in the new location.
|
|
||||||
" I recommend not changing this until you are familiar with vifm.
|
|
||||||
" This probably shouldn't be an option.
|
|
||||||
set trash
|
|
||||||
|
|
||||||
" What should be saved automatically on restarting vifm. Drop "savedirs"
|
|
||||||
" value if you don't want vifm to remember last visited directories for you.
|
|
||||||
set vifminfo=dhistory,savedirs,chistory,state,tui,shistory,
|
|
||||||
\phistory,fhistory,dirstack,registers,bookmarks,bmarks
|
|
||||||
|
|
||||||
" This is how many directories to store in the directory history.
|
|
||||||
set history=100
|
|
||||||
|
|
||||||
" Automatically resolve symbolic links on l or Enter.
|
|
||||||
set nofollowlinks
|
|
||||||
|
|
||||||
" Natural sort of (version) numbers within text.
|
|
||||||
set sortnumbers
|
|
||||||
|
|
||||||
set number
|
|
||||||
set relativenumber
|
|
||||||
|
|
||||||
" Maximum number of changes that can be undone.
|
|
||||||
set undolevels=100
|
|
||||||
|
|
||||||
" Use Vim's format of help file (has highlighting and "hyperlinks").
|
|
||||||
" If you would rather use a plain text help file set novimhelp.
|
|
||||||
set vimhelp
|
|
||||||
|
|
||||||
" If you would like to run an executable file when you
|
|
||||||
" press Enter, l or Right Arrow, set this.
|
|
||||||
set norunexec
|
|
||||||
|
|
||||||
" List of color schemes to try (picks the first one supported by the terminal)
|
|
||||||
colorscheme Default-256 Default
|
|
||||||
|
|
||||||
" Format for displaying time in file list. For example:
|
|
||||||
" TIME_STAMP_FORMAT=%m/%d-%H:%M
|
|
||||||
" See man date or man strftime for details.
|
|
||||||
set timefmt='%Y/%m/%d %H:%M'
|
|
||||||
|
|
||||||
" Show list of matches on tab completion in command-line mode
|
|
||||||
set wildmenu
|
|
||||||
|
|
||||||
" Display completions in a form of popup with descriptions of the matches
|
|
||||||
set wildstyle=popup
|
|
||||||
|
|
||||||
" Display suggestions in normal, visual and view modes for keys, marks and
|
|
||||||
" registers (at most 5 files). In other view, when available.
|
|
||||||
set suggestoptions=normal,visual,view,otherpane,keys,marks,registers
|
|
||||||
|
|
||||||
" Ignore case in search patterns unless it contains at least one uppercase
|
|
||||||
" letter
|
|
||||||
set ignorecase
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" Don't highlight search results automatically
|
|
||||||
set nohlsearch
|
|
||||||
|
|
||||||
" Use increment searching (search while typing)
|
|
||||||
set incsearch
|
|
||||||
|
|
||||||
" Try to leave some space from cursor to upper/lower border in lists
|
|
||||||
set scrolloff=4
|
|
||||||
|
|
||||||
" Don't do too many requests to slow file systems
|
|
||||||
if !has('win')
|
|
||||||
set slowfs=curlftpfs
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Set custom status line look
|
|
||||||
set statusline=" Hint: %z%= %A %10u:%-7g %15s %20d "
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Bookmarks
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" :mark mark /full/directory/path [filename]
|
|
||||||
|
|
||||||
mark b ~/bin/
|
|
||||||
mark h ~/
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Commands
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" :com[mand][!] command_name action
|
|
||||||
"
|
|
||||||
" These are some of the macros that can be used in the action part:
|
|
||||||
" %a for user arguments
|
|
||||||
" %c for current file under the cursor
|
|
||||||
" %C for current file under the cursor of inactive pane
|
|
||||||
" %f for selected file(s)
|
|
||||||
" %F for selected file(s) of inactive pane
|
|
||||||
" %b is the same as %f %F
|
|
||||||
" %d for current directory name
|
|
||||||
" %D for current directory name of inactive pane
|
|
||||||
" %r{x} for list of files in register {x}
|
|
||||||
" %m runs the command in a menu window
|
|
||||||
" %u uses command's output to build a file list
|
|
||||||
" see `:help vifm-macros` and `:help vifm-filename-modifiers` for more
|
|
||||||
|
|
||||||
command! df df -h %m 2> /dev/null
|
|
||||||
command! diff vim -d %f %F
|
|
||||||
command! zip zip -r %c.zip %f
|
|
||||||
command! run !! ./%f
|
|
||||||
command! make !!make %a
|
|
||||||
command! mkcd :mkdir %a | cd %a
|
|
||||||
command! vgrep vim "+grep %a"
|
|
||||||
command! reload :write | restart full
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" File types association
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" :filetype pattern1,pattern2 defaultprogram,program2
|
|
||||||
" :fileviewer pattern1,pattern2 consoleviewer
|
|
||||||
"
|
|
||||||
" The first entry is the default program to be used with a matching file.
|
|
||||||
" The other programs for the file type can be accessed via :file command.
|
|
||||||
" The command macros like %f, %F, %d, %D may be used in the commands.
|
|
||||||
" The %a macro is ignored. To use a % you must put %%.
|
|
||||||
" Spaces in an app name must be escaped, for example: QuickTime\ Player.app
|
|
||||||
|
|
||||||
" For automated FUSE mounts, you must register an extension with :file[x]type
|
|
||||||
" in one of the following formats:
|
|
||||||
"
|
|
||||||
" :filetype patterns FUSE_MOUNT|mount_cmd %SOURCE_FILE %DESTINATION_DIR
|
|
||||||
"
|
|
||||||
" %SOURCE_FILE and %DESTINATION_DIR are filled in at runtime.
|
|
||||||
"
|
|
||||||
" Example:
|
|
||||||
" :filetype *.zip,*.[jwe]ar FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR
|
|
||||||
"
|
|
||||||
" :filetype patterns FUSE_MOUNT2|mount_cmd %PARAM %DESTINATION_DIR
|
|
||||||
"
|
|
||||||
" %PARAM and %DESTINATION_DIR are filled in at runtime.
|
|
||||||
"
|
|
||||||
" Example:
|
|
||||||
" :filetype *.ssh FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR
|
|
||||||
"
|
|
||||||
" %PARAM value is the first line of the matched file, example: root@127.0.0.1:/
|
|
||||||
"
|
|
||||||
" You can also add %CLEAR if you want to clear screen before running FUSE
|
|
||||||
" program. There is also %FOREGROUND, which is useful for entering passwords.
|
|
||||||
|
|
||||||
" Pdf
|
|
||||||
filextype {*.pdf},<application/pdf> zathura %c %i &, apvlv %c, xpdf %c
|
|
||||||
fileviewer {*.pdf},<application/pdf> pdftotext -nopgbrk %c -
|
|
||||||
|
|
||||||
" PostScript
|
|
||||||
filextype {*.ps,*.eps,*.ps.gz},<application/postscript>
|
|
||||||
\ {View in zathura}
|
|
||||||
\ zathura %f,
|
|
||||||
\ {View in gv}
|
|
||||||
\ gv %c %i &,
|
|
||||||
|
|
||||||
" Djvu
|
|
||||||
filextype {*.djvu},<image/vnd.djvu>
|
|
||||||
\ {View in zathura}
|
|
||||||
\ zathura %f,
|
|
||||||
\ {View in apvlv}
|
|
||||||
\ apvlv %f,
|
|
||||||
|
|
||||||
" Audio
|
|
||||||
filetype {*.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus},
|
|
||||||
\<audio/*>
|
|
||||||
\ {Play using ffplay}
|
|
||||||
\ ffplay -nodisp -hide_banner -autoexit %c,
|
|
||||||
\ {Play using MPlayer}
|
|
||||||
\ mplayer %c,
|
|
||||||
\ {Play using mpv}
|
|
||||||
\ mpv --no-video %c %s,
|
|
||||||
fileviewer {*.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus,
|
|
||||||
\*.aac}
|
|
||||||
\ ffprobe -hide_banner -pretty %c 2>&1
|
|
||||||
|
|
||||||
" Video
|
|
||||||
filextype {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|
||||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
|
||||||
\*.as[fx]},
|
|
||||||
\<video/*>
|
|
||||||
\ {View using ffplay}
|
|
||||||
\ ffplay -fs -hide_banner -autoexit %f,
|
|
||||||
\ {View using Dragon}
|
|
||||||
\ dragon %f:p,
|
|
||||||
\ {View using mplayer}
|
|
||||||
\ mplayer %f,
|
|
||||||
\ {Play using mpv}
|
|
||||||
\ mpv --no-video %c %s,
|
|
||||||
fileviewer {*.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
|
|
||||||
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
|
|
||||||
\*.as[fx]},
|
|
||||||
\<video/*>
|
|
||||||
\ ffprobe -hide_banner -pretty %c 2>&1
|
|
||||||
|
|
||||||
" Web
|
|
||||||
filextype {*.xhtml,*.html,*.htm},<text/html>
|
|
||||||
\ {Open with qutebrowser}
|
|
||||||
\ qutebrowser %f %i &,
|
|
||||||
\ {Open with firefox}
|
|
||||||
\ firefox %f &,
|
|
||||||
filetype {*.xhtml,*.html,*.htm},<text/html> links, lynx
|
|
||||||
|
|
||||||
" Object
|
|
||||||
filetype {*.o},<application/x-object> nm %f | less
|
|
||||||
|
|
||||||
" Man page
|
|
||||||
filetype {*.[1-8]},<text/troff> man ./%c
|
|
||||||
fileviewer {*.[1-8]},<text/troff> man ./%c | col -b
|
|
||||||
|
|
||||||
" Images
|
|
||||||
filextype {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
|
|
||||||
\ {View in sxiv}
|
|
||||||
\ sxiv %f,
|
|
||||||
\ {View in gpicview}
|
|
||||||
\ gpicview %c,
|
|
||||||
\ {View in shotwell}
|
|
||||||
\ shotwell,
|
|
||||||
fileviewer {*.bmp,*.jpg,*.jpeg,*.png,*.gif,*.xpm},<image/*>
|
|
||||||
\ identify %f
|
|
||||||
|
|
||||||
" OpenRaster
|
|
||||||
filextype *.ora
|
|
||||||
\ {Edit in MyPaint}
|
|
||||||
\ mypaint %f,
|
|
||||||
|
|
||||||
" Mindmap
|
|
||||||
filextype *.vym
|
|
||||||
\ {Open with VYM}
|
|
||||||
\ vym %f &,
|
|
||||||
|
|
||||||
" MD5
|
|
||||||
filetype *.md5
|
|
||||||
\ {Check MD5 hash sum}
|
|
||||||
\ md5sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA1
|
|
||||||
filetype *.sha1
|
|
||||||
\ {Check SHA1 hash sum}
|
|
||||||
\ sha1sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA256
|
|
||||||
filetype *.sha256
|
|
||||||
\ {Check SHA256 hash sum}
|
|
||||||
\ sha256sum -c %f %S,
|
|
||||||
|
|
||||||
" SHA512
|
|
||||||
filetype *.sha512
|
|
||||||
\ {Check SHA512 hash sum}
|
|
||||||
\ sha512sum -c %f %S,
|
|
||||||
|
|
||||||
" GPG signature
|
|
||||||
filetype {*.asc},<application/pgp-signature>
|
|
||||||
\ {Check signature}
|
|
||||||
\ !!gpg --verify %c,
|
|
||||||
|
|
||||||
" Torrent
|
|
||||||
filetype {*.torrent},<application/x-bittorrent> ktorrent %f &
|
|
||||||
fileviewer {*.torrent},<application/x-bittorrent> dumptorrent -v %c
|
|
||||||
|
|
||||||
" FuseZipMount
|
|
||||||
filetype {*.zip,*.jar,*.war,*.ear,*.oxt,*.apkg},
|
|
||||||
\<application/zip,application/java-archive>
|
|
||||||
\ {Mount with fuse-zip}
|
|
||||||
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
\ {View contents}
|
|
||||||
\ tar -tf %f | less,
|
|
||||||
\ {Extract here}
|
|
||||||
\ tar -vxf %c,
|
|
||||||
fileviewer *.zip,*.jar,*.war,*.ear,*.oxt tar -tf %f
|
|
||||||
|
|
||||||
" ArchiveMount
|
|
||||||
filetype {*.tar,*.tar.bz2,*.tbz2,*.tgz,*.tar.gz,*.tar.xz,*.txz,*.tar.zst,
|
|
||||||
\*.tzst},
|
|
||||||
\<application/x-tar>
|
|
||||||
\ {Mount with archivemount}
|
|
||||||
\ FUSE_MOUNT|archivemount %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer *.tgz,*.tar.gz tar -tzf %c
|
|
||||||
fileviewer *.tar.bz2,*.tbz2 tar -tjf %c
|
|
||||||
fileviewer *.tar.xz,*.txz tar -tJf %c
|
|
||||||
fileviewer *.tar.zst,*.tzst tar -t --zstd -f %c
|
|
||||||
fileviewer {*.tar},<application/x-tar> tar -tf %c
|
|
||||||
|
|
||||||
" Rar2FsMount and rar archives
|
|
||||||
filetype {*.rar},<application/x-rar>
|
|
||||||
\ {Mount with rar2fs}
|
|
||||||
\ FUSE_MOUNT|rar2fs %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer {*.rar},<application/x-rar> unrar v %c
|
|
||||||
|
|
||||||
" IsoMount
|
|
||||||
filetype {*.iso},<application/x-iso9660-image>
|
|
||||||
\ {Mount with fuseiso}
|
|
||||||
\ FUSE_MOUNT|fuseiso %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
|
|
||||||
" SshMount
|
|
||||||
filetype *.ssh
|
|
||||||
\ {Mount with sshfs}
|
|
||||||
\ FUSE_MOUNT2|sshfs %PARAM %DESTINATION_DIR %FOREGROUND,
|
|
||||||
|
|
||||||
" FtpMount
|
|
||||||
filetype *.ftp
|
|
||||||
\ {Mount with curlftpfs}
|
|
||||||
\ FUSE_MOUNT2|curlftpfs -o ftp_port=-,,disable_eprt %PARAM %DESTINATION_DIR %FOREGROUND,
|
|
||||||
|
|
||||||
" Fuse7z and 7z archives
|
|
||||||
filetype {*.7z},<application/x-7z-compressed>
|
|
||||||
\ {Mount with fuse-7z}
|
|
||||||
\ FUSE_MOUNT|fuse-7z %SOURCE_FILE %DESTINATION_DIR,
|
|
||||||
fileviewer {*.7z},<application/x-7z-compressed> 7z l %c
|
|
||||||
|
|
||||||
" Office files
|
|
||||||
filextype {*.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx,*.ppt},
|
|
||||||
\<application/vnd.openxmlformats-officedocument.*,
|
|
||||||
\application/msword,
|
|
||||||
\application/vnd.ms-excel>
|
|
||||||
\ libreoffice %f &
|
|
||||||
fileviewer {*.doc},<application/msword> catdoc %c
|
|
||||||
fileviewer {*.docx},
|
|
||||||
\<application/
|
|
||||||
\vnd.openxmlformats-officedocument.wordprocessingml.document>
|
|
||||||
\ docx2txt.pl %f -
|
|
||||||
|
|
||||||
" TuDu files
|
|
||||||
filetype *.tudu tudu -f %c
|
|
||||||
|
|
||||||
" Qt projects
|
|
||||||
filextype *.pro qtcreator %f &
|
|
||||||
|
|
||||||
" Directories
|
|
||||||
filextype */
|
|
||||||
\ {View in thunar}
|
|
||||||
\ Thunar %f &,
|
|
||||||
|
|
||||||
" Syntax highlighting in preview
|
|
||||||
"
|
|
||||||
" Explicitly set highlight type for some extensions
|
|
||||||
"
|
|
||||||
" 256-color terminal
|
|
||||||
" fileviewer *.[ch],*.[ch]pp highlight -O xterm256 -s dante --syntax c %c
|
|
||||||
" fileviewer Makefile,Makefile.* highlight -O xterm256 -s dante --syntax make %c
|
|
||||||
"
|
|
||||||
" 16-color terminal
|
|
||||||
" fileviewer *.c,*.h highlight -O ansi -s dante %c
|
|
||||||
"
|
|
||||||
" Or leave it for automatic detection
|
|
||||||
" fileviewer *[^/] pygmentize -O style=monokai -f console256 -g
|
|
||||||
|
|
||||||
" Displaying pictures in terminal
|
|
||||||
" fileviewer *.jpg,*.png shellpic %c
|
|
||||||
|
|
||||||
" Open all other files with default system programs (you can also remove all
|
|
||||||
" :file[x]type commands above to ensure they don't interfere with system-wide
|
|
||||||
" settings). By default all unknown files are opened with 'vi[x]cmd'
|
|
||||||
" uncommenting one of lines below will result in ignoring 'vi[x]cmd' option
|
|
||||||
" for unknown file types.
|
|
||||||
" For *nix:
|
|
||||||
" filetype * xdg-open
|
|
||||||
" For OS X:
|
|
||||||
" filetype * open
|
|
||||||
" For Windows:
|
|
||||||
" filetype * explorer %"f &
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Panel configuration examples
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Customize view columns a bit (enable ellipsis for truncated file names)
|
|
||||||
" set viewcolumns=-{name}..,6{}.
|
|
||||||
|
|
||||||
" Show vertical border
|
|
||||||
" set fillchars=vborder:│
|
|
||||||
|
|
||||||
" Filter-out build and temporary files
|
|
||||||
" filter! {*.lo,*.o,*.d,*.class,*.pyc,*.pyo,.*~}
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Sample keyboard mappings
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Start shell in current directory
|
|
||||||
nnoremap s :shell<cr>
|
|
||||||
|
|
||||||
" Display sorting dialog
|
|
||||||
nnoremap S :sort<cr>
|
|
||||||
|
|
||||||
" Toggle visibility of preview window
|
|
||||||
nnoremap w :view<cr>
|
|
||||||
vnoremap w :view<cr>gv
|
|
||||||
|
|
||||||
if $DISPLAY && executable('gvim')
|
|
||||||
" Open file in existing instance of gvim
|
|
||||||
nnoremap o :!gvim --remote-tab-silent %f<cr>
|
|
||||||
" Open file in new instance of gvim
|
|
||||||
nnoremap O :!gvim %f<cr>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Open file in the background using its default program
|
|
||||||
nnoremap gb :file &<cr>l
|
|
||||||
|
|
||||||
" Interaction with system clipboard
|
|
||||||
if has('win')
|
|
||||||
" Yank current directory path to Windows clipboard with forward slashes
|
|
||||||
nnoremap yp :!echo %"d:gs!\!/! %i | clip<cr>
|
|
||||||
" Yank path to current file to Windows clipboard with forward slashes
|
|
||||||
nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr>
|
|
||||||
elseif $WAYLAND_DISPLAY
|
|
||||||
if executable('wl-copy')
|
|
||||||
" Yank current directory path into primary and selection clipboards
|
|
||||||
nnoremap yd :!echo -n %d | wl-copy %i &&
|
|
||||||
\ echo -n %d | wl-copy -p %i<cr>
|
|
||||||
" Yank current file path into into primary and selection clipboards
|
|
||||||
nnoremap yf :!echo -n %c:p | wl-copy %i &&
|
|
||||||
\ echo -n %c:p | wl-copy -p %i<cr>
|
|
||||||
endif
|
|
||||||
elseif $DISPLAY
|
|
||||||
if executable('xclip')
|
|
||||||
" Yank current directory path into the clipboard
|
|
||||||
nnoremap yd :!echo %d | xclip %i<cr>
|
|
||||||
" Yank current file path into the clipboard
|
|
||||||
nnoremap yf :!echo %c:p | xclip %i<cr>
|
|
||||||
elseif executable('xsel')
|
|
||||||
" Yank current directory path into primary and selection clipboards
|
|
||||||
nnoremap yd :!echo -n %d | xsel --input --primary %i &&
|
|
||||||
\ echo -n %d | xsel --clipboard --input %i<cr>
|
|
||||||
" Yank current file path into into primary and selection clipboards
|
|
||||||
nnoremap yf :!echo -n %c:p | xsel --input --primary %i &&
|
|
||||||
\ echo -n %c:p | xsel --clipboard --input %i<cr>
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Mappings for faster renaming
|
|
||||||
nnoremap I cw<c-a>
|
|
||||||
nnoremap cc cw<c-u>
|
|
||||||
nnoremap A cw
|
|
||||||
|
|
||||||
" As above, but without the file extension
|
|
||||||
" nnoremap I cW<c-a>
|
|
||||||
" nnoremap cc cW<c-u>
|
|
||||||
" nnoremap A cW
|
|
||||||
|
|
||||||
" Open console in current directory
|
|
||||||
if $DISPLAY && executable('xterm')
|
|
||||||
nnoremap ,t :!xterm &<cr>
|
|
||||||
elseif $TERMINAL
|
|
||||||
nnoremap ,t :!$TERMINAL &<cr>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Open editor to edit vifmrc and apply settings after returning to vifm
|
|
||||||
nnoremap ,c :write | edit $MYVIFMRC | restart full<cr>
|
|
||||||
|
|
||||||
" Open gvim to edit vifmrc
|
|
||||||
if $DISPLAY && executable('gvim')
|
|
||||||
nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr>
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Toggle wrap setting on ,w key
|
|
||||||
nnoremap ,w :set wrap!<cr>
|
|
||||||
|
|
||||||
" Example of standard two-panel file managers mappings
|
|
||||||
nnoremap <f3> :!less %f<cr>
|
|
||||||
nnoremap <f4> :edit<cr>
|
|
||||||
nnoremap <f5> :copy<cr>
|
|
||||||
nnoremap <f6> :move<cr>
|
|
||||||
nnoremap <f7> :mkdir<space>
|
|
||||||
nnoremap <f8> :delete<cr>
|
|
||||||
|
|
||||||
" Midnight commander alike mappings
|
|
||||||
" Open current directory in the other pane
|
|
||||||
nnoremap <a-i> :sync<cr>
|
|
||||||
" Open directory under cursor in the other pane
|
|
||||||
nnoremap <a-o> :sync %c<cr>
|
|
||||||
" Swap panes
|
|
||||||
nnoremap <c-u> <c-w>x
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Various customization examples
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" Use ag (the silver searcher) instead of grep
|
|
||||||
" set grepprg='ag --line-numbers %i %a %s'
|
|
||||||
|
|
||||||
" Add additional place to look for executables
|
|
||||||
" let $PATH = $HOME.'/bin/fuse:'.$PATH
|
|
||||||
|
|
||||||
" Block particular shortcut
|
|
||||||
" nnoremap <left> <nop>
|
|
||||||
|
|
||||||
" Export IPC name of current instance as environment variable and use it to
|
|
||||||
" communicate with the instance later.
|
|
||||||
"
|
|
||||||
" It can be used in some shell script that gets run from inside vifm, for
|
|
||||||
" example, like this:
|
|
||||||
" vifm --server-name "$VIFM_SERVER_NAME" --remote +"cd '$PWD'"
|
|
||||||
"
|
|
||||||
" let $VIFM_SERVER_NAME = v:servername
|
|
||||||
|
|
||||||
" Activate screen/tmux support
|
|
||||||
" screen!
|
|
||||||
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
" Icon decorations example
|
|
||||||
" ------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
" https://github.com/cirala/vifm_devicons
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
atim/lazygit
|
|
||||||
atim/starship
|
|
||||||
the4runner/firefox-dev
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
bat
|
|
||||||
dnf-plugin-system-upgrade
|
|
||||||
duf
|
|
||||||
eza
|
|
||||||
fd-find
|
|
||||||
firefox-dev
|
|
||||||
flatpak
|
|
||||||
fzf
|
|
||||||
gcc
|
|
||||||
gcc-c++
|
|
||||||
git
|
|
||||||
gnome-software
|
|
||||||
lazygit
|
|
||||||
neovim
|
|
||||||
nodejs
|
|
||||||
papirus-icon-theme
|
|
||||||
gitlint
|
|
||||||
remove-retired-packages
|
|
||||||
ripgrep
|
|
||||||
sd
|
|
||||||
starship
|
|
||||||
tealdeer
|
|
||||||
tmux
|
|
||||||
tree-sitter-cli
|
|
||||||
zoxide
|
|
||||||
zsh
|
|
||||||
130
setup.sh
|
|
@ -1,130 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Main entrypoint for all the setup functions
|
|
||||||
# it's called "_main" so it's stay on top only...
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
REPO="git@codeberg.org:aleidk/dots.git"
|
|
||||||
DOTS="$HOME/Repos/Private/dots"
|
|
||||||
CONFIG="$HOME/.config"
|
|
||||||
BINS="$HOME/.local/bin"
|
|
||||||
THEMES="$HOME/.themes"
|
|
||||||
ICONS="$HOME/.local/share/icons"
|
|
||||||
|
|
||||||
dependencies=(chsh curl git jq nvim tar wget zsh)
|
|
||||||
check_dependencies() {
|
|
||||||
for dependency in "${dependencies[@]}"; do
|
|
||||||
if ! command -v "$dependency" >/dev/null; then
|
|
||||||
echo -e "${RED}Error: ${YLW}'$dependency' ${RST}command not found. \nPlease install it first and try again."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
create() {
|
|
||||||
local dir="$1"
|
|
||||||
local dir_name
|
|
||||||
dir_name="$(basename "$dir")"
|
|
||||||
if [[ ! -d "$dir" ]]; then
|
|
||||||
echo -e "Creating directory for ${BLD}${BLU}'$dir_name'${RST}..."
|
|
||||||
mkdir -p "$dir" && sleep 0.3
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
backup() {
|
|
||||||
local file="$1"
|
|
||||||
local backup_file=${2:-$file.dots}
|
|
||||||
|
|
||||||
if [[ -e "$file" ]] && [[ ! -e "$backup_file" ]]; then
|
|
||||||
echo "Backing up ${BLD}${BLU}$file${RST} to ${BLD}${CYN}$backup_file${RST}..."
|
|
||||||
cp -r "$file" "$backup_file" && sleep 0.3
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
symlink() {
|
|
||||||
local dootsfile="$1" target_dir="$2"
|
|
||||||
|
|
||||||
final_path="$target_dir/$(basename "$dootsfile")"
|
|
||||||
backup_file=$final_path.dots
|
|
||||||
|
|
||||||
if [[ -e "$final_path" ]] && [[ ! -L "$final_path" ]] && [[ ! -e "$backup_file" ]]; then
|
|
||||||
echo "Backing up ${BLD}${BLU}$target_dir${RST} to ${BLD}${CYN}$backup_file${RST}..."
|
|
||||||
mv "$final_path" "$backup_file" && sleep 0.3
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "Symlinking ${BLD}${BLU}$dootsfile${RST} to ${BLD}${GRN}$target_dir${RST}..."
|
|
||||||
ln -sf "$dootsfile" "$target_dir" && sleep 0.3
|
|
||||||
}
|
|
||||||
|
|
||||||
setup() {
|
|
||||||
if [ ! -d "$DOTS" ]; then
|
|
||||||
echo "Fetching Dots from the source..."
|
|
||||||
create "$DOTS" && cd "$_" || return
|
|
||||||
git clone --recurse-submodules "$REPO" "$(pwd)"
|
|
||||||
source "$DOTS/config/zsh/config/colors.zsh" && define_colors
|
|
||||||
# backup files first
|
|
||||||
dirs=("$CONFIG" "$BINS" "$THEMES" "$ICONS")
|
|
||||||
for dir in "${dirs[@]}"; do
|
|
||||||
backup "$dir"
|
|
||||||
create "$dir"
|
|
||||||
done
|
|
||||||
|
|
||||||
# execute install scripts
|
|
||||||
./setup.sh
|
|
||||||
|
|
||||||
# bat cache --build
|
|
||||||
# recommended tools to install
|
|
||||||
echo -e "${BLD}${BLU}All done.${WHT}\n\nRecommended tools to install:${RST}"
|
|
||||||
source ./scripts/check-tools
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
main() {
|
|
||||||
setup
|
|
||||||
source "$DOTS/config/zsh/config/colors.zsh" && define_colors
|
|
||||||
source "$DOTS/setup/config"
|
|
||||||
source "$DOTS/setup/zsh"
|
|
||||||
|
|
||||||
# for file in ./setup/*; do
|
|
||||||
# shellcheck disable=all
|
|
||||||
# source "$file"
|
|
||||||
# done
|
|
||||||
}
|
|
||||||
|
|
||||||
check_dependencies
|
|
||||||
main
|
|
||||||
|
|
||||||
# For custom installation comment out `stow_this config` from above, and
|
|
||||||
# uncomment this line of array below then remove some you don't want to include
|
|
||||||
# Note: Using stow will not work it will litter all the files in the target dir without their foldername/basename
|
|
||||||
# TODO: add colors, make this interactive, and split into multiple file?
|
|
||||||
|
|
||||||
# doots=(
|
|
||||||
# alacritty
|
|
||||||
# atuin
|
|
||||||
# bat
|
|
||||||
# broot
|
|
||||||
# btop
|
|
||||||
# cava
|
|
||||||
# foot
|
|
||||||
# fzf
|
|
||||||
# git
|
|
||||||
# gtk-3.0
|
|
||||||
# gtk-4.0
|
|
||||||
# hypr
|
|
||||||
# kitty
|
|
||||||
# librewolf
|
|
||||||
# lsd
|
|
||||||
# neofetch
|
|
||||||
# nvim
|
|
||||||
# ripgrep
|
|
||||||
# tealdeer
|
|
||||||
# tmux
|
|
||||||
# zsh
|
|
||||||
# )
|
|
||||||
#
|
|
||||||
# for dot in "${doots[@]}"; do
|
|
||||||
# cd "$DOTSFILES/config"
|
|
||||||
# symlink "$(pwd)/$dot" "${CONFIG}"
|
|
||||||
# done
|
|
||||||
18
setup/config
|
|
@ -1,18 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo -e "\n${BLD}${SUL}${GRN}Setting up config...${RST}\n"
|
|
||||||
|
|
||||||
original_pwd="$(pwd)"
|
|
||||||
cd "$DOTS/config" || exit
|
|
||||||
|
|
||||||
readarray -t configs < <(
|
|
||||||
fd -d 1 \
|
|
||||||
--exclude "*.old" \
|
|
||||||
--exclude "create*"
|
|
||||||
)
|
|
||||||
|
|
||||||
for dot in "${configs[@]}"; do
|
|
||||||
symlink "$(pwd)/$dot" "${CONFIG}"
|
|
||||||
done
|
|
||||||
|
|
||||||
cd "$original_pwd" || exit
|
|
||||||
10
setup/rust
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo -e "\n${BLD}${SUL}${GRN}Setting up ${RED}Rust${GRN}...${RST}\n"
|
|
||||||
|
|
||||||
if ! command -v cargo >/dev/null; then
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
# installed through package-manager
|
|
||||||
# cargo install tree-sitter-cli
|
|
||||||
31
setup/themes
|
|
@ -1,31 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo -e "\n${BLD}${SUL}${GRN}Setting up themes...${RST}\n"
|
|
||||||
|
|
||||||
original_pwd="$(pwd)"
|
|
||||||
cd "$DOTS/themes" || exit
|
|
||||||
|
|
||||||
CURRENT_DESKTOP="$(echo "$XDG_CURRENT_DESKTOP" | awk '{for (i=1;i<=NF;i++) { $i=toupper(substr($i,1,1)) tolower(substr($i,2)) }}1')"
|
|
||||||
|
|
||||||
gtk() {
|
|
||||||
cd gtk || return
|
|
||||||
|
|
||||||
create "$THEMES"
|
|
||||||
|
|
||||||
for theme in "$PWD"/*; do
|
|
||||||
symlink "$theme" "${THEMES}"
|
|
||||||
done
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$CURRENT_DESKTOP" in
|
|
||||||
Gnome)
|
|
||||||
gtk
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Desktop $CURRENT_DESKTOP have no setup..."
|
|
||||||
;;
|
|
||||||
|
|
||||||
esac
|
|
||||||
|
|
||||||
cd "$original_pwd" || return
|
|
||||||
12
setup/zsh
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
echo -e "\n${BLD}${SUL}${GRN}Setting up ZSH...${RST}\n"
|
|
||||||
|
|
||||||
setup_zsh() {
|
|
||||||
backup "$HOME/.zshenv"
|
|
||||||
create "$HOME/.local/state/zsh/"
|
|
||||||
symlink "$DOTS/config/zsh/zshrc" "$HOME"/.zshrc
|
|
||||||
symlink "$DOTS/config/zsh/zprofile" "$HOME"/.zprofile
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_zsh
|
|
||||||
|
Before Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 183 B |
|
Before Width: | Height: | Size: 184 B |
|
Before Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 187 B |
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 689 B |
|
Before Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 557 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 585 B |
|
Before Width: | Height: | Size: 579 B |
|
Before Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 143 B |
|
Before Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 690 B |
|
Before Width: | Height: | Size: 683 B |
|
Before Width: | Height: | Size: 538 B |
|
Before Width: | Height: | Size: 301 B |
|
Before Width: | Height: | Size: 789 B |
|
Before Width: | Height: | Size: 772 B |
|
Before Width: | Height: | Size: 194 B |
|
Before Width: | Height: | Size: 227 B |
|
Before Width: | Height: | Size: 326 B |
|
Before Width: | Height: | Size: 342 B |
|
Before Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 144 B |
|
Before Width: | Height: | Size: 276 B |
|
Before Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 348 B |
|
Before Width: | Height: | Size: 363 B |
|
Before Width: | Height: | Size: 439 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 884 B |
|
Before Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 446 B |
|
Before Width: | Height: | Size: 466 B |
|
Before Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 470 B |
|
Before Width: | Height: | Size: 486 B |
|
|
@ -1,23 +0,0 @@
|
||||||
button_offset=9
|
|
||||||
button_spacing=0
|
|
||||||
|
|
||||||
show_app_icon=false
|
|
||||||
|
|
||||||
full_width_title=true
|
|
||||||
|
|
||||||
title_shadow_active=false
|
|
||||||
title_shadow_inactive=false
|
|
||||||
|
|
||||||
title_horizontal_offset=3
|
|
||||||
|
|
||||||
active_text_color=#afafaf
|
|
||||||
active_text_shadow_color=#252525
|
|
||||||
|
|
||||||
inactive_text_color=#808080
|
|
||||||
inactive_text_shadow_color=#252525
|
|
||||||
|
|
||||||
shadow_delta_height=2
|
|
||||||
shadow_delta_width=0
|
|
||||||
shadow_delta_x=0
|
|
||||||
shadow_delta_y=-5
|
|
||||||
shadow_opacity=40
|
|
||||||
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 164 B |
|
Before Width: | Height: | Size: 157 B |
|
Before Width: | Height: | Size: 255 B |
|
Before Width: | Height: | Size: 235 B |
|
Before Width: | Height: | Size: 254 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 719 B |
|
Before Width: | Height: | Size: 720 B |
|
Before Width: | Height: | Size: 583 B |
|
Before Width: | Height: | Size: 360 B |
|
Before Width: | Height: | Size: 609 B |
|
Before Width: | Height: | Size: 603 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 360 B |