Split .profile into lib files
[khome.git] / lib / login_functions.sh
diff --git a/lib/login_functions.sh b/lib/login_functions.sh
new file mode 100644 (file)
index 0000000..f0963b7
--- /dev/null
@@ -0,0 +1,34 @@
+# Top Disk-Using directories
+tdu() {
+    du "$1" \
+    | sort -n -k 1 -r --parallel="$(nproc)" \
+    | head -50 \
+    | awk '
+        {
+            size = $1
+            path = $0
+            sub("^" $1 "\t+", "", path)
+            gb = size / 1024 / 1024
+            printf("%f\t%s\n", gb, path)
+        }' \
+    | cut -c 1-115
+}
+
+pa_def_sink() {
+    pactl info | awk '/^Default Sink:/ {print $3}'
+}
+
+void_pkgs() {
+    curl "https://xq-api.voidlinux.org/v1/query/x86_64?q=$1" | jq '.data'
+}
+
+# Colorful man
+man() {
+    LESS_TERMCAP_md=$'\e[01;31m' \
+    LESS_TERMCAP_me=$'\e[0m' \
+    LESS_TERMCAP_se=$'\e[0m' \
+    LESS_TERMCAP_so=$'\e[01;44;33m' \
+    LESS_TERMCAP_ue=$'\e[0m' \
+    LESS_TERMCAP_us=$'\e[01;32m' \
+    command man "$@"
+}
This page took 0.039111 seconds and 4 git commands to generate.