Remove unnused script's.

This commit is contained in:
CronyAkatsuki 2024-01-08 16:43:51 +01:00
parent 8d19009dd7
commit 4fa1d623bd
13 changed files with 0 additions and 248 deletions

View File

@ -1,18 +0,0 @@
#!/bin/sh
# Script to get anime game's wish history link for paimon.moe
if [ $XDG_SESSION_TYPE = "wayland" ]; then
if cat -v "$HOME/.local/share/anime-game-launcher/game/drive_c/Program Files/Genshin Impact/GenshinImpact_Data/webCaches/Cache/Cache_Data/data_2" | grep "e20190909gacha-v2" | sed 's/1\/0\//\n/g' | grep "e20190909gacha-v2" | sed 's/global.*/global/' | tail -n 1 | wl-copy -n ; then
quick-notify "Copied wish link"
else
quick-notify "Failed to copy"
fi
else
if cat -v "$HOME/.local/share/anime-game-launcher/game/drive_c/Program Files/Genshin Impact/GenshinImpact_Data/webCaches/Cache/Cache_Data/data_2" | grep "e20190909gacha-v2" | sed 's/1\/0\//\n/g' | grep "e20190909gacha-v2" | sed 's/global.*/global/' | tail -n 1 | xclip -sel c ; then
quick-notify "Copied wish link"
else
quick-notify "Failed to copy"
fi
fi

View File

@ -1,37 +0,0 @@
#!/bin/bash
# basic scratchpad functionality for dk
# spawns a set command with a known title if not already open
# if open toggle between the current workspace and the last
# written by Nathaniel Maia - 2021
# example rule for the below script to be placed in your dkrc
# dkcmd rule class="^scratchpad$" float=true
# Dinamically get both class and command of the needed scratchpad
title="$1"
shift
cmd="$@"
# window ID, we need to printf it as 8 hex digits to later match with dk status
win=$(printf '0x%08x' "$(xwininfo -root -children | awk '/'"$title"'/ {print $1}')")
stat=$(dkcmd status num=1 type=full)
if (( win != 0 )); then
# window is already open so toggle it
ws=$(awk '/^workspaces:/ { for (i = 1; i <= NF; i++) { if ($i ~ "*") print i - 1 } }' <<< "$stat")
wins=$(sed -n '/^windows:/,/^$/p' <<< "$stat")
win_ws=$(grep "^\s*${win}" <<< "$wins" | awk -F'" ' '{print $4}' | cut -d' ' -f1)
if (( win_ws == ws )); then
# hide it
# we could create a new workspace and place it there instead to not mess with the users existing workspaces
dkcmd ws send "$win" "$(awk '/numws/{print $2}' <<< "$stat")"
else
# show it
dkcmd ws send "$win" "$ws"
fi
else
# the window is not yet spawned so do so
${cmd} &>/dev/null & disown
fi

View File

@ -1,59 +0,0 @@
#!/bin/env bash
# simple script to take a list of path in system of
# git repos then doing specified action for it
starting_dir=$(pwd)
Push () {
cd "$Path"
[ -z "$(git status -s)" ] && printf '\n%s\n' "Repo $Path already up to date." && return
printf '\n%s\n' "In repo $Path"
commited="n"
done="n"
while [ ! -z "$(git status -s)" ] && [ "$done" != "y" ]; do
toCommit=$(git status -s | awk '{ print $2 }' | fzf -m)
if [ ! -z "$toCommit" ]; then
git add "$toCommit"
read -p 'Commit message: ' message < /dev/tty
git commit -m "$message"
commited="y"
fi
[ ! -z "$(git status -s )" ] && read -p "Have you commited everything you wanted to [y/n]: " done < /dev/tty
done
[ "$commited" = "y" ] && git push
printf '\n%s\n' "Repo $Path pushed completely."
}
Pull () {
cd $Path
printf '\n%s\n' "In repo $Path"
git pull
printf '\n%s\n' "Repo $Path updated."
}
while read -a Line; do
Action=${Line[0]}
Path=${Line[1]}
if [ "$Action" = "push" ]; then
Push
fi
if [ "$Action" = "pull" ]; then
Pull
fi
done <<< "$(< $HOME/.config/gupdate/repos)"
cd "$starting_dir"

View File

@ -1,11 +0,0 @@
#!/bin/bash
[ ! -z "$2" ] && w="$2" || w=$(($(tput cols) / 2 ))
[ ! -z "$3" ] && h="$3" || h=$(($(tput lines) / 2 ))
[ ! -z "$4" ] && x="$4" || x=$(($(tput cols) / 2 + 2))
[ ! -z "$5" ] && y="$5" || y="1"
kitty +icat --clear --silent --transfer-mode file
kitty +icat --silent --transfer-mode file --align=left --place ${w}x${h}@${x}x${y} "$1"
exit 1

9
lf-run
View File

@ -1,9 +0,0 @@
#!/bin/sh
set -e
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
lf "$@"
else
[ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf"
lf "$@" 3>&-
fi

View File

@ -1,13 +0,0 @@
#!/bin/sh
# get the drive path
drive="$1"
# open the encrypted drive
sudo cryptsetup luksOpen $drive luks
# check if the /mnt/encrypted directory exists if not create it
[ -d "/mnt/encrypted/" ] || sudo mkdir -p /mnt/encrypted
# mount the decrypted drive to /mnt/encrypted/ directory
sudo mount /dev/mapper/luks /mnt/encrypted

View File

@ -1,15 +0,0 @@
#!/bin/sh
profiles=$(find "$HOME"/.config/mblaze -type f -exec basename "{}" \;)
currentMaildir=$(grep "^Maildir:" "$HOME"/.mblaze/profile | cut -d: -f 2 | sed 's/ //g')
[ -z "$1" ] && basename "$(grep -w "$currentMaildir" -l -R "$HOME"/.config/mblaze)" && exit 0
[ "$1" = "-l" ] && printf '%s\n' "$profiles" && exit 0
profile="$1"
if printf '%s\n' "$profiles" | grep -qw "$profile"; then
cp "$HOME"/.config/mblaze/"$profile" "$HOME"/.mblaze/profile
else
printf '%s\n' "This profile doesn't exist"
fi

5
notes
View File

@ -1,5 +0,0 @@
#!/bin/sh
current_dir=$(pwd)
cd $HOME/docs/vimwiki
nvim notes.md

View File

@ -1,4 +0,0 @@
#!/bin/sh
/usr/bin/paccache -ruk0
/usr/bin/paccache -rk2

View File

@ -1,26 +0,0 @@
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
T='gYw' # The test text
echo -e "\n 40m 41m 42m 43m\
44m 45m 46m 47m";
for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
'1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
' 36m' '1;36m' ' 37m' '1;37m';
do FG=${FGs// /}
echo -en " $FGs \033[$FG $T "
for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
done
echo;
done
echo

View File

@ -1,5 +0,0 @@
#!/bin/sh
# unmount the decrypted drive and close/encypt it again
sudo umount /dev/mapper/luks
sudo cryptsetup luksClose luks

41
watcher
View File

@ -1,41 +0,0 @@
#!/bin/sh
watch () {
mpv "$1"
clear
read -p 'Did you finish watching? [Y/n]: ' yn
while true; do
if [ -z "$yn" ] || [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
name=$(printf '%s\n' "$1" | sed 's:./::g')
printf '%s\n' "$name" >> "$2"
break
elif [ "$yn" = "N" ] || [ "$yn" = "n" ]; then
break
fi
read -p 'Try again? [Y/n]: ' yn
done
}
# check () {
#
# }
# config
[ ! -d "$HOME/.config/watcher" ] && mkdir -p "$HOME/.config/watcher/"
[ ! -f "$HOME/.config/watcher/config" ] && touch "$HOME/.config/watcher/config"
directory=$(cat $HOME/.config/watcher/config | grep 'directory' | cut -d= -f 2)
exclude=$(printf '! -name %s ' $(cat $HOME/.config/watcher/config | grep 'exclude' | cut -d= -f 2 | sed 's/;/\n/g'))
# watchlist
[ ! -f '$HOME/.cache/watchlist' ] && touch "$HOME/.cache/watchlist"
[ -s "$HOME/.cache/watchlist" ] && watchlist=$(printf '! -name %s ' $(cat $HOME/.cache/watchlist)) || watchlist=""
cd $directory
while true; do
current_dir=$(basename $(pwd))
choice=$(find -maxdepth 1 -mindepth 1 $exclude $watchlist | sort | fzf -i --prompt "Current directory: $current_dir ")
[ -z "$choice" ] && clear && exit
[ -d "$choice" ] && cd "$choice"
[ -f "$choice" ] && watch "$choice" "$HOME/.cache/watchlist" && watchlist=$(printf '! -name %s ' $(cat $HOME/.cache/watchlist))
done

5
wiki
View File

@ -1,5 +0,0 @@
#!/bin/sh
current_dir=$(pwd)
cd $HOME/docs/vimwiki
nvim index.md