config: Update aliases & set theme default to dark
This commit is contained in:
parent
34a5261eed
commit
52d427b103
|
@ -91,6 +91,8 @@
|
|||
ready = rebase -i @{u}
|
||||
format-head = !git stash && git-clang-format HEAD~ && git commit -a --amend --no-edit && git stash pop
|
||||
|
||||
sm = !git submodule init && git submodule update
|
||||
|
||||
# yadm
|
||||
add-git = !git add $XDG_CONFIG_HOME/git/config $CONFIG_SHELLS/git
|
||||
add-vim = !git add $XDG_CONFIG_HOME/nvim/init*
|
||||
|
|
|
@ -49,6 +49,7 @@ cd() { builtin cd "$@" && command ls --file-type --group-directories-first --col
|
|||
|
||||
# Task management & time tracking
|
||||
alias t='task'
|
||||
alias tl='tasklite'
|
||||
alias tw='timew'
|
||||
twsm() { timew summary $(date --date="Monday $1 week ago" -I) to tomorrow :ids ${@:2} }
|
||||
alias twtest='( TIMEWARRIORDB=/tmp/timewarriordb && rm -rf ${TIMEWARRIORDB} && mkdir -p ${TIMEWARRIORDB}/data && :> ${TIMEWARRIORDB}/timewarrior.cfg && $SHELL )'
|
||||
|
@ -74,6 +75,8 @@ alias vlch="vlc -H | ${PAGER:-less}"
|
|||
alias sc='sudo systemctl'
|
||||
alias scrw='sudo systemctl restart display-manager'
|
||||
|
||||
alias drag='dragon -x -a'
|
||||
|
||||
alias grp='grep --line-number --ignore-case --binary-files=without-match'
|
||||
alias grpr='grp --recursive'
|
||||
# Use grep and sed to replace $1 with $2 recursively
|
||||
|
@ -123,8 +126,9 @@ mozedit() (
|
|||
cat "$tmpfile2" | sed "$2" | lz4 -l | dd bs=1 skip=8 seek=12 of="$file" conv=notrunc
|
||||
)
|
||||
|
||||
theme_save="/tmp/theme"
|
||||
theme_default="$(d=$(date +%H) && test $d -gt 7 && test $d -lt 19 && echo light || echo dark)"
|
||||
theme_save="$XDG_CACHE_HOME/theme"
|
||||
#theme_default="$(d=$(date +%H) && test $d -gt 7 && test $d -lt 19 && echo light || echo dark)"
|
||||
theme_default="dark"
|
||||
theme() {
|
||||
theme="$1"
|
||||
if test "$2" = "kde"
|
||||
|
@ -220,7 +224,7 @@ b() {
|
|||
arg=$(test $# -gt 0 && echo "${@: -1}" || echo .)
|
||||
file $arg | grep -v --color=never directory
|
||||
case "$(file --dereference $arg)" in
|
||||
*directory) ls -l --all --human-readable --dereference-command-line "$@";;
|
||||
*directory) ls -l --almost-all --human-readable --group-directories-first --file-type --dereference-command-line "$@";;
|
||||
*text*) bat --style=numbers "$@";;
|
||||
esac
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ projects() {
|
|||
# Builds all found gradle projects in parallel and then prints the results in batches - WARNING: This is likely to considerably slow down your computer!
|
||||
listprojects $all | while read d; do
|
||||
if test "$(find $d -maxdepth 1 -name "*gradle*")"; then
|
||||
cd $d
|
||||
builtin cd $d
|
||||
buildlog="/tmp/build-$(basename $d)"
|
||||
(nohup gradle build --no-daemon --console=rich &>$buildlog; highlight $(basename $d | awk '{print toupper($0)}') && cat $buildlog) &
|
||||
fi
|
||||
|
@ -53,7 +53,7 @@ projects() {
|
|||
"status")
|
||||
# Sets the current branch upstream to a remote branch of the same name, updates it and shows "git status -s -b"
|
||||
listprojects $all | while read d; do
|
||||
cd $d
|
||||
builtin cd $d
|
||||
highlight $(basename $d)
|
||||
git branch --set-upstream-to=origin/$(git curbranch)>/dev/null
|
||||
git pull --all | grep -v "Already up to date."
|
||||
|
@ -64,7 +64,7 @@ projects() {
|
|||
# Just provide a one-line summary of the status of each project and execute the command entered on every project
|
||||
com="$@"
|
||||
listprojects $all | while read d; do
|
||||
cd $d
|
||||
builtin cd $d
|
||||
if [[ $com != gradle* ]] || (( $(f1 -name "*gradle*" | wc -l) > 0 )); then
|
||||
local st=()
|
||||
local ahead=$(command git rev-list "${branch_name}"@{upstream}..HEAD 2>/dev/null | wc -l)
|
||||
|
@ -79,5 +79,5 @@ projects() {
|
|||
fi
|
||||
done
|
||||
esac
|
||||
cd $projects_dir
|
||||
builtin cd $projects_dir
|
||||
}
|
||||
|
|
|
@ -18,6 +18,8 @@ export MANPAGER="sh -c 'col -bx | bat -l man -p'"
|
|||
# red stderr
|
||||
export LD_PRELOAD="/opt/stderred/build/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
|
||||
# software config
|
||||
# enable pass extensions
|
||||
export PASSWORD_STORE_ENABLE_EXTENSIONS="true"
|
||||
# fzf defaults
|
||||
export FZF_DEFAULT_OPTS='--select-1 --exit-0 --tiebreak=end,length --history=/var/tmp/fzf-history --ansi --bind="alt-enter:execute(test -O {} && $EDITOR {} || sudoedit {}),del:execute(gio trash {}),change:top,left-click:execute(xdg-open {})"'
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --type file --color=always"
|
||||
|
|
Loading…
Reference in New Issue