diff options
Diffstat (limited to '')
8 files changed, 133 insertions, 0 deletions
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 diff --git a/home-manager/packages/scripts/small_functions/dldragon b/home-manager/packages/scripts/small_functions/dldragon new file mode 100755 index 00000000..b15390b8 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/dldragon @@ -0,0 +1,28 @@ +#!/bin/sh +# Provides the ability to download a file by dropping it into a window + +url=$(dragon -t -x) + +if [ -n "$url" ]; then + printf "File Name: " + name="" + while [ -z $name ] || [ -e $name ] + do + read -r name + if [ -e "$name" ]; then + printf "File already exists, overwrite (y|n): " + read -r ans + + if [ "$ans" = "y" ]; then + break + else + printf "File Name: " + fi + fi + done + + # Download the file with curl + [ -n "$name" ] && curl -o "$name" "$url" || exit 1 +else + exit 1 +fi diff --git a/home-manager/packages/scripts/small_functions/gtk-themes b/home-manager/packages/scripts/small_functions/gtk-themes new file mode 100755 index 00000000..27303c27 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/gtk-themes @@ -0,0 +1,24 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + + + +# usage: import-gsettings +config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini" +if [ ! -f "$config" ]; then exit 1; fi + +gnome_schema="org.gnome.desktop.interface" +gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')" +icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')" +cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')" +font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')" +gsettings set "$gnome_schema" gtk-theme "$gtk_theme" +gsettings set "$gnome_schema" icon-theme "$icon_theme" +gsettings set "$gnome_schema" cursor-theme "$cursor_theme" +gsettings set "$gnome_schema" font-name "$font_name" + + + +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/mocs b/home-manager/packages/scripts/small_functions/mocs new file mode 100755 index 00000000..e14a84c8 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/mocs @@ -0,0 +1,15 @@ +#! /bin/bash +if [[ "$(pgrep mocp)" -eq 0 ]]; +then + mocp -M "${XDG_CONFIG_HOME}"/moc -S + if [[ $1 -eq 0 ]]; + then + mocp -M "${XDG_CONFIG_HOME}"/moc -v 12 + else + mocp -M "${XDG_CONFIG_HOME}"/moc -v "$1" + fi + mocp -M "${XDG_CONFIG_HOME}"/moc -p + mymocp& +else + mocp -M "${XDG_CONFIG_HOME}"/moc -G +fi diff --git a/home-manager/packages/scripts/small_functions/screen_shot b/home-manager/packages/scripts/small_functions/screen_shot new file mode 100755 index 00000000..152feb36 --- /dev/null +++ b/home-manager/packages/scripts/small_functions/screen_shot @@ -0,0 +1,11 @@ +#!/bin/sh +# shellcheck disable=SC2086 +# shellcheck source=/dev/null +. ~/.local/lib/shell/lib + +grim -g "$(slurp)" ~/media/pictures/screenshots/"$(date +%s)".png && + alacritty -e llp -command ":{{ set sortby atime; set reverse!; }}" ~/media/pictures/screenshots + + + +if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi |