config: directory configuration improvements
This commit is contained in:
parent
4aad9349f1
commit
6879d89e88
|
@ -78,7 +78,7 @@ edshell() {
|
||||||
esac
|
esac
|
||||||
test -f "$file" || return 2
|
test -f "$file" || return 2
|
||||||
checksum="$(md5sum "$file")"
|
checksum="$(md5sum "$file")"
|
||||||
$EDITOR $(test "$line" && echo "+normal!\ ${line}ggzx") "${file%:*}"
|
$EDITOR "$(test "$line" && echo "+normal! ${line}ggzx" || echo "--")" "${file%:*}"
|
||||||
test "$checksum" != "$(md5sum $file)" && source "$HOME/.zprofile" && exec $SHELL
|
test "$checksum" != "$(md5sum $file)" && source "$HOME/.zprofile" && exec $SHELL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +308,12 @@ mvln() {
|
||||||
ln -vsr "$2" "$1"
|
ln -vsr "$2" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Move into XDG_DATA_HOME or so
|
||||||
|
mvx() {
|
||||||
|
mvln "$1" "${2:-$XDG_DATA_HOME}/${1#.}"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create directory and move into it
|
# Create directory and move into it
|
||||||
mkcd() {
|
mkcd() {
|
||||||
mkdir -p "$1" && cd "$1"
|
mkdir -p "$1" && cd "$1"
|
||||||
|
|
|
@ -24,10 +24,9 @@ listprojects() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Underline the project names
|
# Underline the project names
|
||||||
highlight() { echo "[4m$1[0m" }
|
highlight() { echo "[4m$1[0m"; }
|
||||||
|
|
||||||
# Lists all projects and evaluates the given command.
|
# Lists all projects and evaluates the given command.
|
||||||
alias pr=projects
|
|
||||||
projects() {
|
projects() {
|
||||||
test "$1" = "--all" && all="$1" && shift
|
test "$1" = "--all" && all="$1" && shift
|
||||||
case $1 in
|
case $1 in
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"aururl": "https://aur.archlinux.org",
|
"aururl": "https://aur.archlinux.org",
|
||||||
"buildDir": "/home/janek/.cache/yay",
|
|
||||||
"absdir": "/home/janek/.cache/yay/abs",
|
|
||||||
"editor": "",
|
"editor": "",
|
||||||
"editorflags": "",
|
"editorflags": "",
|
||||||
"makepkgbin": "makepkg",
|
"makepkgbin": "makepkg",
|
||||||
|
|
|
@ -18,9 +18,10 @@ tput setaf 4 && $elevate file -E "$last" | { grep -v --color=never 'directory$'
|
||||||
case "$($elevate file --dereference --mime "$last")" in
|
case "$($elevate file --dereference --mime "$last")" in
|
||||||
(*inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;;
|
(*inode/directory*) tput sgr0 && $(test -x "$last" || echo "sudo") ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --all "$@" | less -XF;;
|
||||||
(*binary)
|
(*binary)
|
||||||
if expr "$(file "$last")" : ".*: .*compress" >/dev/null
|
case "$(file "$last")" in
|
||||||
then /usr/share/nvim/runtime/macros/less.sh "$@"
|
(*:\ *compress*) /usr/share/nvim/runtime/macros/less.sh "$@";;
|
||||||
fi
|
(*:\ *\ image\ data*) viu --height "$(echo $LINES/2 | bc)" "$@";;
|
||||||
|
esac
|
||||||
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
tput setaf 3 && $elevate stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||||
;;
|
;;
|
||||||
(*) $elevate bat --style header "$@" --pager 'less -RXF'
|
(*) $elevate bat --style header "$@" --pager 'less -RXF'
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
typeset -A _clean_map
|
typeset -A _clean_map
|
||||||
_clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [c]=/var/cache)
|
_clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [c]=/var/cache)
|
||||||
# Directories to always clean
|
# Directories to always clean
|
||||||
_clean_folders=(~/.ant ~/.autopsy ~/.cargo ~/.electron-gyp ~/.nix-defexpr ~/.npm ~/.parallel ~/.stack ~/.yarn
|
_clean_folders=(~/.ant ~/.autopsy ~/.cargo ~/.electron-gyp ~/.gradle ~/.konan ~/.nix-defexpr ~/.npm ~/.parallel ~/.stack ~/.yarn
|
||||||
~/.lesshst)
|
~/.lesshst ~/.yarnrc)
|
||||||
|
|
||||||
|
|
||||||
for f in ${_clean_folders[@]}
|
for f in ${_clean_folders[@]}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
# Default value: -Xmx10248m -XX:MaxPermSize=256m
|
||||||
org.gradle.jvmargs=-mx2G -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
org.gradle.jvmargs=-mx2G -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
# This option should only be used with decoupled projects. More details, visit
|
||||||
|
|
16
.zprofile
16
.zprofile
|
@ -9,20 +9,23 @@ export XDG_CACHE_HOME="$HOME/.local/cache"
|
||||||
export XDG_CONFIG_HOME="$HOME/.config"
|
export XDG_CONFIG_HOME="$HOME/.config"
|
||||||
export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin"
|
export PATH="$HOME/.local/bin/scripts:$HOME/.local/bin:$PATH:$XDG_CONFIG_HOME/emacs/bin"
|
||||||
# adjust programs to use xdg
|
# adjust programs to use xdg
|
||||||
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
|
||||||
export MNT="$XDG_RUNTIME_DIR"/mnt
|
export MNT="$XDG_RUNTIME_DIR"/mnt
|
||||||
|
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
|
||||||
|
|
||||||
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
|
||||||
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
|
||||||
|
export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass
|
||||||
|
|
||||||
|
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
||||||
export KDEHOME="$XDG_STATE_HOME"/kdehome
|
export KDEHOME="$XDG_STATE_HOME"/kdehome
|
||||||
|
|
||||||
|
export WINEPREFIX="$XDG_DATA_HOME"/wine
|
||||||
|
export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap
|
||||||
|
|
||||||
|
## Development tools
|
||||||
export GOPATH="$XDG_STATE_HOME"/go
|
export GOPATH="$XDG_STATE_HOME"/go
|
||||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||||
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
export RUSTUP_HOME="$XDG_DATA_HOME"/rustup
|
||||||
|
|
||||||
export GTK2_RC_FILES="$XDG_CONFIG_HOME"/gtk-2.0/gtkrc
|
|
||||||
export RLWRAP_HOME="$XDG_DATA_HOME"/rlwrap
|
|
||||||
|
|
||||||
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
|
export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
|
||||||
export CABAL_DIR="$XDG_CACHE_HOME"/cabal
|
export CABAL_DIR="$XDG_CACHE_HOME"/cabal
|
||||||
|
|
||||||
|
@ -53,7 +56,8 @@ export CONFIG_SHELLS="$XDG_CONFIG_HOME/shell"
|
||||||
# environment
|
# environment
|
||||||
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
which nvim >/dev/null && export EDITOR='nvim' || export EDITOR='vim'
|
||||||
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)"
|
||||||
export IGNOREDIRS="-x dev -x .sync -x .stfolder -x .git -x .gradle -x .idea -x out -x *build -x dist_newstyle -x generated -x cache -x node_modules -x virtualenv"
|
export IGNOREDIRS_PURE="-x .sync -x .stfolder -x .gradle -x dist_newstyle -x node_modules -x generated -x .cache -x *Cache -x .local/cache"
|
||||||
|
export IGNOREDIRS="-x dev -x *build -x .git -x .idea -x out -x cache -x Partitions $IGNOREDIRS_PURE"
|
||||||
# red stderr
|
# red stderr
|
||||||
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||||
# software config
|
# software config
|
||||||
|
|
Loading…
Reference in New Issue