You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
2.2 KiB
Bash

6 years ago
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export HISTSIZE=10000
export HISTFILESIZE=10000
export PATH="$HOME/.bin:$PATH"
# define a default editor
if [ -x "$(command -v code)" ]; then
export EDITOR='code -w'
elif [ -x "$(command -v vim)" ]; then
export EDITOR=vim
elif [ -x "$(command -v vi)" ]; then
export EDITOR=vi
fi
5 years ago
# enable wayland
export QT_QPA_PLATFORM=wayland-egl
export GDK_BACKEND=wayland
function q1 {
echo 'Important and Urgent'
if [ $# -ne 1 ]; then
task q1
else
task $1 mod prio:H +urg -unu
task inbox
fi
}
function q2 {
echo 'Important and Not Urgent'
if [ $# -ne 1 ]; then
task q2
else
task $1 mod prio:H +unu -urg
task inbox
fi
}
function q3 {
echo 'Not Important and Urgent'
if [ $# -ne 1 ]; then
task q3
else
task $1 mod prio:L +urg -unu
task inbox
fi
}
function q4 {
echo 'Not Important and Not Urgent'
if [ $# -ne 1 ]; then
task q4
else
task $1 mod prio:L +unu -urg
task inbox
fi
}
function toverview {
q4
echo
q3
echo
q2
echo
q1
echo Inbox
task inbox
}
function sqlsetup {
sudo mount -t drvfs '\\hldnt352.berner.lan\softwaredepot/common/microsoft/sqlsetup/scripts' ~/shares/sqlsetup
rm -r ~/shares/sqlsetup/*
cp -a ~/git/sqlsetup/* ~/shares/sqlsetup/
}
6 years ago
function _df() {
echo "$*"
btrfs filesystem usage "$*" 2> /dev/null | grep -o 'Free .*'
btrfs filesystem df "$*"
echo
}
function dfall() {
_df /hdd
_df /ssd
_df /nvme
}
alias ls='ls --color=auto'
alias ip='ip --color=auto'
6 years ago
PS1='`[ $? = 0 ] || echo "$? "`[\u@\h \w]\$ '
alias autopurge='sudo pacman -Rns $(pacman -Qdtq)'
alias syu='sudo pacman -Syu; sudo pacman -Rns $(pacman -Qdtq); pacman -Qem; auracle sync'
6 years ago
alias d-u='sudo apt update && sudo apt full-upgrade && sudo apt --purge autoremove && sudo apt clean'
alias pp='git pull -r && git push'
alias statdiff='git status && git diff --staged'
alias gcode='git pull -r && code . && exit'
# workaround for missing alacritty terminfo on remote terminals
# https://github.com/alacritty/alacritty/issues/3360#issuecomment-588441023
alias ssh='TERM=xterm-256color ssh'