diff --git a/anime-game-wishes b/anime-game-wishes deleted file mode 100755 index 869032c..0000000 --- a/anime-game-wishes +++ /dev/null @@ -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 diff --git a/dk-scratch b/dk-scratch deleted file mode 100755 index 41830ab..0000000 --- a/dk-scratch +++ /dev/null @@ -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 diff --git a/gupdater b/gupdater deleted file mode 100755 index 7363209..0000000 --- a/gupdater +++ /dev/null @@ -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" diff --git a/kitty-img-previewer b/kitty-img-previewer deleted file mode 100755 index 739477c..0000000 --- a/kitty-img-previewer +++ /dev/null @@ -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 diff --git a/lf-run b/lf-run deleted file mode 100755 index 7044cab..0000000 --- a/lf-run +++ /dev/null @@ -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 diff --git a/mount-luks b/mount-luks deleted file mode 100755 index a4eb6d3..0000000 --- a/mount-luks +++ /dev/null @@ -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 diff --git a/mprofile b/mprofile deleted file mode 100755 index ada5f85..0000000 --- a/mprofile +++ /dev/null @@ -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 diff --git a/notes b/notes deleted file mode 100755 index ee47c5c..0000000 --- a/notes +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -current_dir=$(pwd) -cd $HOME/docs/vimwiki -nvim notes.md diff --git a/pacman-cleanup b/pacman-cleanup deleted file mode 100755 index f774620..0000000 --- a/pacman-cleanup +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -/usr/bin/paccache -ruk0 -/usr/bin/paccache -rk2 diff --git a/print-colors b/print-colors deleted file mode 100755 index b05c345..0000000 --- a/print-colors +++ /dev/null @@ -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 diff --git a/umount-luks b/umount-luks deleted file mode 100755 index 7971c17..0000000 --- a/umount-luks +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# unmount the decrypted drive and close/encypt it again -sudo umount /dev/mapper/luks -sudo cryptsetup luksClose luks diff --git a/watcher b/watcher deleted file mode 100755 index e4e4c0f..0000000 --- a/watcher +++ /dev/null @@ -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 diff --git a/wiki b/wiki deleted file mode 100755 index bcd26e4..0000000 --- a/wiki +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -current_dir=$(pwd) -cd $HOME/docs/vimwiki -nvim index.md