Merged old and new scripts folder + minor changes

This commit is contained in:
Lord Of Nougate 2022-02-04 21:15:36 +01:00
parent a65c9aa953
commit 6a0369c19b
5 changed files with 41 additions and 25 deletions

21
connect_wacom.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash
echo "Connecting Inutuos BT M.."
bluetoothctl connect $(bluetoothctl devices | grep Intuos | awk '{ print $2 }')
sleep 2
echo "Setting up single monitor setup.."
xinput_out=$(xinput | grep Wacom | awk '{ print $9 }')
wacoms=$(echo $xinput_out | tr " " "\n")
wacoms=${wacoms/id=/}
wacoms=${wacoms/id=/}
for w in $wacoms
do
xinput map-to-output $w DisplayPort-0
done
echo "done."

18
foreach Executable file
View File

@ -0,0 +1,18 @@
#/bin/bash
if [[ "$1" == "--help" ]]
then
echo -e "\nforeach [filter] [path] [action]\n"
exit
elif [[ "$1" == "-h" ]]
then
echo -e "\nforeach [filter] [path] [action]\n"
exit
fi
action=$3
filter=$1
path=$2
for f in $path/$filter
do
$action
done

View File

@ -1,25 +0,0 @@
#!/usr/bin/env bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
prefix=${PASSWORD_STORE_DIR-~/.password-store}
password_files=( "$prefix"/**/*.gpg )
password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
password=$(printf '%s\n' "${password_files[@]}" | dmenu "$@")
[[ -n $password ]] || exit
if [[ $typeit -eq 0 ]]; then
pass show -c "$password" 2>/dev/null
else
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } |
xdotool type --clearmodifiers --file -
fi

View File

2
show_ip.sh Executable file
View File

@ -0,0 +1,2 @@
ip_value=$(curl -s https://dnsleak.com/ | grep "You are connecting from an IPv4 address" -A 2 | grep "text" | awk '{ print $3}')
echo $ip_value | sed -e 's/value="//g' | sed -e 's/"//g'