2024-01-01 23:19:39 +01:00
|
|
|
########################################################################
|
|
|
|
# FUNCTIONS
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
xtitle() {
|
|
|
|
printf '\033]0;%s\007' "$1";
|
|
|
|
}
|
|
|
|
|
|
|
|
xbell() {
|
|
|
|
tput bel
|
|
|
|
}
|
|
|
|
|
|
|
|
x() {
|
|
|
|
xtitle "$ ssh home.codevoid.de"
|
|
|
|
ssh -t home.codevoid.de 'tmux -u attach || tmux -u'
|
|
|
|
}
|
|
|
|
|
|
|
|
scr() {
|
|
|
|
[ -z "$1" ] \
|
|
|
|
&& doas wsconsctl -n display.brightness \
|
|
|
|
|| doas wsconsctl display.brightness="$1"
|
|
|
|
}
|
|
|
|
|
2024-01-19 23:46:43 +01:00
|
|
|
mktags() {
|
|
|
|
rm -f tags
|
|
|
|
fd --regex '\.[ch]$|\.$|\.hpp$|\.cpp$|\.cc$|\.hh$' \
|
|
|
|
| ectags -L - \
|
|
|
|
--links=no \
|
|
|
|
--tag-relative \
|
|
|
|
--exclude=.git \
|
|
|
|
--exclude=CVS \
|
|
|
|
-R \
|
|
|
|
-f tags
|
|
|
|
}
|
|
|
|
mktags1() {
|
|
|
|
rm -f tags
|
|
|
|
fd --one-file-system \
|
|
|
|
-E .git \
|
|
|
|
-E CVS \
|
|
|
|
-E gnu \
|
|
|
|
-t f \
|
|
|
|
-e .c -e .h \
|
|
|
|
-e .cc -e .hh \
|
|
|
|
-e .cpp -e .hpp \
|
|
|
|
-e .vim -e .lua \
|
|
|
|
-e .sh -e .pl \
|
|
|
|
-e Makefile \
|
|
|
|
| ectags -L - \
|
|
|
|
--links=no \
|
|
|
|
--tag-relative \
|
|
|
|
--languages=C,C++,Lua,Make,Perl,Sh,Vim \
|
|
|
|
-R \
|
|
|
|
-f tags
|
|
|
|
}
|