config/shell: script fixes
This commit is contained in:
parent
e27c3dabda
commit
1e873ab6fa
|
@ -6,7 +6,7 @@ alias sc="$sudo systemctl"
|
|||
alias scs="$sudo systemctl status"
|
||||
alias sce="$sudo systemctl enable --now"
|
||||
alias sced="$sudo --preserve-env=EDITOR systemctl edit"
|
||||
alias scr="$sudo systemctl reload-or-restart"
|
||||
alias scr="$sudo systemctl daemon-reload && $sudo systemctl reload-or-restart"
|
||||
|
||||
highlight() { echo "[4m$1[0m"; }
|
||||
status() {
|
||||
|
@ -28,8 +28,8 @@ status() {
|
|||
fi
|
||||
}
|
||||
|
||||
alias u='$sudo apt update && sudo apt upgrade'
|
||||
alias ur='u && $sudo reboot'
|
||||
alias u="$sudo apt update && $sudo apt upgrade"
|
||||
alias ur="u && $sudo reboot"
|
||||
|
||||
# Diff recursively
|
||||
difr() { diff --color=always --unified=1 --recursive "$@" | less --RAW-CONTROL-CHARS --quit-on-intr --quit-if-one-screen; }
|
||||
|
|
|
@ -482,7 +482,7 @@ killJava() {
|
|||
|
||||
which exa >/dev/null &&
|
||||
alias l='exa --icons --group-directories-first' &&
|
||||
alias ll='l --long --extended --git --all'
|
||||
alias ll='l --long --git --all'
|
||||
|
||||
if which fd >/dev/null 2>&1
|
||||
then fn() { $(command -v fd || echo fdfind) --hidden --no-ignore-vcs --one-file-system "$@" | less -F; } # [F]ind [n]o ignore
|
||||
|
|
|
@ -155,3 +155,5 @@ subhighlight "Setup kakoune plugin loader"
|
|||
cloneshallow plug.kak robertmeta "$XDG_CONFIG_HOME/kak/plugins/plug.kak"
|
||||
|
||||
touch $HOME/.local/state/wget-hsts
|
||||
|
||||
dasht-docsets-install haskell rails_4 >/dev/null
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh -e
|
||||
# Suspend screen until enter is pressed
|
||||
xset dpms force off
|
||||
read
|
||||
xset dpms force on
|
|
@ -6,8 +6,8 @@ if test -e "$JOURNAL"; then
|
|||
do read intention
|
||||
done
|
||||
jrnl intentions "$intention"
|
||||
apprise $(pass service/apprise/intentions) -t 'janeks intention' -b "$intention"
|
||||
sudo nft flush chain inet filter outall
|
||||
sudo nft add rule inet filter outall meta hour "$(date +%H:%M)"-"$(date +%H:%M --date="${1:-10}min")" accept
|
||||
#expr \( "$1" \> 40 \) \* 10 \| "$1"
|
||||
apprise $(pass service/apprise/intentions | head -1) -t 'janeks intention' -b "$intention"
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh
|
||||
# shows size statistics for subfolders
|
||||
# max depth is equal to the first argument if it is a number or 1
|
||||
export chars=$(expr $(tput cols) - 60)
|
||||
case "$1" in (+*) size=${1#+}; depth=2; shift;; esac
|
||||
case "$1" in ([0-9]) depth=$1; shift;; esac
|
||||
(du --max-depth "${depth:-1}" -xhat ${size:-50}M "$@" | sort -h | grep -v "^0") ||
|
||||
(du --max-depth "${depth:-1}" -xhat ${size:-50}M "$@" | sort -h | grep -v "^0") |
|
||||
while read line; do echo "$line $(pacman -Qqo $(echo $line | awk '{print $2}') 2>/dev/null | paste -s -d',' | sed "s/\(.\{${chars}\}\).*/\1.../")"; done || #| column -t ||
|
||||
(du --max-depth "${depth:-1}" -xha "$@" | sort -h | tail)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh -e
|
||||
# Install syncthingtray with dependencies
|
||||
# Install syncthingtray, preventing conflicts
|
||||
# Pass -git as argument to install the git version with dependencies
|
||||
pacman -Qq | grep '^syncthingtray' | xargs -r yay --noconfirm -R
|
||||
suffix=$1
|
||||
yay --noconfirm -Syy --nobatchinstall boost c++utilities$suffix qtforkawesome$suffix qtutilities$suffix
|
||||
|
|
|
@ -13,7 +13,7 @@ case $1 in
|
|||
esac
|
||||
test $# -eq 0 || $cmd -vi "$@" "$dir/LINUX"
|
||||
find "$dir" -type f -iname "*32-*.iso" -exec mv -vi {} {}def32 \;
|
||||
find "$dir" -type f -iname "*.iso" -exec mv -vi {} {}def64 \;
|
||||
find "$dir" -type f -name "*.iso" -exec mv -vi {} {}def64 \;
|
||||
drive=$(mount | grep "$(dirname "$dir")" | cut -d' ' -f1)
|
||||
sudo umount $drive
|
||||
sudo udefrag $drive
|
||||
|
|
Loading…
Reference in New Issue