Add new scripts and install/uninstall

This commit is contained in:
Pim Nelissen
2024-07-15 09:38:57 +02:00
parent b122fe6da4
commit 88205af3a5
10 changed files with 60 additions and 0 deletions

View File

@ -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

0
scripts/pcs-clean-system Executable file
View File

3
scripts/pcs-copy Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
cat ./$1 | xclip -selection clipboard

5
scripts/pcs-initialise-w10-vm Executable file
View File

@ -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"

3
scripts/pcs-set-keyboard Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
setxkbmap -layout us -variant altgr-intl -option nodeadkeys

10
scripts/pcs-toggle-touchpad Executable file
View File

@ -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

3
scripts/pcs-update Executable file
View File

@ -0,0 +1,3 @@
sudo nala update
sudo nala upgrade
flatpak update

3
scripts/pcs-xgfortran Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
gfortran $1 && ./a.out