From 6a0369c19b227689ecddf28840b5f350761eed4b Mon Sep 17 00:00:00 2001 From: Sevi-Kun Date: Fri, 4 Feb 2022 21:15:36 +0100 Subject: [PATCH] Merged old and new scripts folder + minor changes --- connect_wacom.sh | 21 +++++++++++++++++++++ foreach | 18 ++++++++++++++++++ passmenu.sh | 25 ------------------------- settings_manager.sh | 0 show_ip.sh | 2 ++ 5 files changed, 41 insertions(+), 25 deletions(-) create mode 100755 connect_wacom.sh create mode 100755 foreach delete mode 100755 passmenu.sh delete mode 100755 settings_manager.sh create mode 100755 show_ip.sh diff --git a/connect_wacom.sh b/connect_wacom.sh new file mode 100755 index 0000000..7d1985c --- /dev/null +++ b/connect_wacom.sh @@ -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." diff --git a/foreach b/foreach new file mode 100755 index 0000000..48182f8 --- /dev/null +++ b/foreach @@ -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 diff --git a/passmenu.sh b/passmenu.sh deleted file mode 100755 index 83268bc..0000000 --- a/passmenu.sh +++ /dev/null @@ -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 diff --git a/settings_manager.sh b/settings_manager.sh deleted file mode 100755 index e69de29..0000000 diff --git a/show_ip.sh b/show_ip.sh new file mode 100755 index 0000000..d4ae688 --- /dev/null +++ b/show_ip.sh @@ -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'