From 06696ca201682f63ea50da3ab41d992ed6b61816 Mon Sep 17 00:00:00 2001 From: ene Date: Sat, 25 Feb 2023 07:54:37 +0100 Subject: Feat(packages): Add my scripts --- .../deprecated/locate_rewrite/locate | 2 ++ .../locate_rewrite/update_locate_database | 8 ++++++ .../scripts/small_functions/deprecated/order | 12 ++++++++ .../scripts/small_functions/deprecated/ply-pre | 33 ++++++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100755 home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/locate create mode 100755 home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/update_locate_database create mode 100755 home-manager/packages/scripts/small_functions/deprecated/order create mode 100755 home-manager/packages/scripts/small_functions/deprecated/ply-pre (limited to 'home-manager/packages/scripts/small_functions/deprecated') diff --git a/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/locate b/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/locate new file mode 100755 index 00000000..3dbddae9 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/locate @@ -0,0 +1,2 @@ +#! /bin/bash +awk --assign=se=$1 ' $0 ~ se {print $0} ' "${LOCATE_DATABASE}" diff --git a/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/update_locate_database b/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/update_locate_database new file mode 100755 index 00000000..88330ff6 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/deprecated/locate_rewrite/update_locate_database @@ -0,0 +1,8 @@ +#! /bin/bash +LOCATE_DATABASE="/home/dt/.cache/locate.db" +if [ ! -e ${LOCATE_DATABASE} ]; then + touch ${LOCATE_DATABASE} +fi +echo $(date) > ${LOCATE_DATABASE} +sudo find / >> ${LOCATE_DATABASE} + diff --git a/home-manager/packages/scripts/small_functions/deprecated/order b/home-manager/packages/scripts/small_functions/deprecated/order new file mode 100755 index 00000000..1471fcbd --- /dev/null +++ b/home-manager/packages/scripts/small_functions/deprecated/order @@ -0,0 +1,12 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +file=$HOME/hi3 +cat $file | clean | awk '{ + print (""$2" => {println!(\""$1"\")}") +}' + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi diff --git a/home-manager/packages/scripts/small_functions/deprecated/ply-pre b/home-manager/packages/scripts/small_functions/deprecated/ply-pre new file mode 100755 index 00000000..8e40486c --- /dev/null +++ b/home-manager/packages/scripts/small_functions/deprecated/ply-pre @@ -0,0 +1,33 @@ +#!/bin/sh + +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + +## Preview Plymouth Splash ## +## by _khAttAm_ ## +## www.khattam.info ## +## License: GPL v3 ## + +chk_root () { + + if [ ! "$( id -u )" -eq 0 ]; then + echo Must be run as root + exit 1 + fi + +} + +chk_root + +DURATION=$1 + +if [ $# -ne 1 ]; then + DURATION=5 +fi + +plymouthd; plymouth --show-splash ; +for i in $(seq 1 $DURATION); do + plymouth --update=test"$i" ; sleep 1; +done; +plymouth quit -- cgit 1.4.1