Author: Adam Evyčędo <git@apiote.xyz>
remove not neede code from functions
.config/sh/functions | 43 +------------------------------------------
diff --git a/.config/sh/functions b/.config/sh/functions index 7c8984666b12b9eaf92cb9b99cab37f2c2b3a6c8..0d967453a7daeea44eac18a615b6a41487c08108 100644 --- a/.config/sh/functions +++ b/.config/sh/functions @@ -1,19 +1,6 @@ #!/bin/sh apk_leaf() { - # printf "Packages that can be dropped: \n\n" - - # while read -r package; do - # deps="$( - # /sbin/apk info -r "$package" | grep . | tail -n+2 \ - # | sed -e 's/-\([^-]\)*-r\(.\)*$//' -e 's/^/ /' - # )" - # if printf "%s" "$deps" | grep -q .; then - # echo "$package" - # echo "$deps" - # fi - # done < /etc/apk/world - printf "\nPackages that no one want: \n\n" while read -r package; do @@ -406,6 +393,7 @@ fi if ! (id -Gn | grep -q backup) then + # shellcheck disable=SC1112 printf 'run as a member of group ‘backup’' exit 1 fi @@ -1221,35 +1209,6 @@ ;; esac done } - -# mpv() { -# has_sway=$(command -v swaymsg) -# touch /tmp/mpv_count -# mpv_count=$(cat /tmp/mpv_count) -# echo $(( ${mpv_count:-0} + 1 )) > /tmp/mpv_count - -# if [ "$has_sway" ] -# then -# case "$*" in -# *--no-video*) ;; -# *--profile=mpa*) ;; -# *) swaymsg bar mode hide -# esac -# fi - -# /usr/bin/mpv "$@" - -# touch /tmp/mpv_count -# mpv_count=$(cat /tmp/mpv_count) -# mpv_count=$(( ${mpv_count:-0} - 1 )) -# echo $mpv_count > /tmp/mpv_count - -# if [ "$has_sway" ] && [ "$mpv_count" -eq 0 ] -# then -# swaymsg bar mode overlay -# bar_all_once -# fi -# } waterInit() { mkdir -p "$HOME/.local/state/water"