diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..80d31ca --- /dev/null +++ b/install.sh @@ -0,0 +1,15 @@ +#!/usr/bin/bash + +PATH_TO_INSTALL=/home/$(whoami)/.local/bin +FILES=($PWD/scripts/pcs*) +NUM_OF_FILES=${#FILES[@]} + +for f in ${FILES[*]} +do + final_path=$PATH_TO_INSTALL/$(basename ${f}) + rm $final_path 2> /dev/null + chmod +x $f + ln -s $f $final_path +done + +echo $NUM_OF_FILES scripts successfully installed to $PATH_TO_INSTALL. diff --git a/scripts/pcs-auto-resolution-monitor b/scripts/pcs-auto-resolution-monitor new file mode 100755 index 0000000..8273fb9 --- /dev/null +++ b/scripts/pcs-auto-resolution-monitor @@ -0,0 +1,10 @@ +#!/bin/bash + +# Check if DP1 is connected +if xrandr --listactivemonitors | grep -q "1: +DP1"; then + # DP1 is connected + autorandr --load home_usbc --force +else + # DP1 is not connected, do nothing + echo "Monitor 1 (DP1) is not connected." +fi diff --git a/scripts/pcs-clean-system b/scripts/pcs-clean-system new file mode 100755 index 0000000..e69de29 diff --git a/scripts/pcs-copy b/scripts/pcs-copy new file mode 100755 index 0000000..7f838f4 --- /dev/null +++ b/scripts/pcs-copy @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +cat ./$1 | xclip -selection clipboard diff --git a/scripts/pcs-initialise-w10-vm b/scripts/pcs-initialise-w10-vm new file mode 100755 index 0000000..20bf79f --- /dev/null +++ b/scripts/pcs-initialise-w10-vm @@ -0,0 +1,5 @@ +#!/bin/sh + +sudo virsh net-start default +GVT_GUID="65ab7c99-a004-45fd-a938-029bf3d3dd63" +echo $GVT_GUID | sudo tee "/sys/bus/pci/devices/0000:00:02.0/mdev_supported_types/i915-GVTg_V5_4/create" diff --git a/scripts/pcs-set-keyboard b/scripts/pcs-set-keyboard new file mode 100755 index 0000000..683a41f --- /dev/null +++ b/scripts/pcs-set-keyboard @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +setxkbmap -layout us -variant altgr-intl -option nodeadkeys diff --git a/scripts/pcs-toggle-touchpad b/scripts/pcs-toggle-touchpad new file mode 100755 index 0000000..7762eb2 --- /dev/null +++ b/scripts/pcs-toggle-touchpad @@ -0,0 +1,10 @@ +#!/bin/bash + +ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'` +STATE=`xinput list-props $ID | grep 'Device Enabled' | awk '{print $4}'` +if [ $STATE -eq 1 ] +then + xinput disable $ID +else + xinput enable $ID +fi diff --git a/scripts/pcs-update b/scripts/pcs-update new file mode 100755 index 0000000..a0864fd --- /dev/null +++ b/scripts/pcs-update @@ -0,0 +1,3 @@ +sudo nala update +sudo nala upgrade +flatpak update diff --git a/scripts/pcs-xgfortran b/scripts/pcs-xgfortran new file mode 100755 index 0000000..d9fac19 --- /dev/null +++ b/scripts/pcs-xgfortran @@ -0,0 +1,3 @@ +#!/usr/bin/bash + +gfortran $1 && ./a.out diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..d27b3d8 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,8 @@ +#!/usr/bin/bash + +PATH=/home/$(whoami)/.local/bin +TO_DELETE=($PATH/pcs*) +NUM_OF_FILES=${#TO_DELETE[@]} + +/usr/bin/rm -f ${TO_DELETE[@]} +echo $NUM_OF_FILES scripts removed from $PATH.