Add new scripts and install/uninstall
This commit is contained in:
15
install.sh
Executable file
15
install.sh
Executable file
@ -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.
|
10
scripts/pcs-auto-resolution-monitor
Executable file
10
scripts/pcs-auto-resolution-monitor
Executable 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
0
scripts/pcs-clean-system
Executable file
3
scripts/pcs-copy
Executable file
3
scripts/pcs-copy
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
cat ./$1 | xclip -selection clipboard
|
5
scripts/pcs-initialise-w10-vm
Executable file
5
scripts/pcs-initialise-w10-vm
Executable 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
3
scripts/pcs-set-keyboard
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
setxkbmap -layout us -variant altgr-intl -option nodeadkeys
|
10
scripts/pcs-toggle-touchpad
Executable file
10
scripts/pcs-toggle-touchpad
Executable 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
3
scripts/pcs-update
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
sudo nala update
|
||||||
|
sudo nala upgrade
|
||||||
|
flatpak update
|
3
scripts/pcs-xgfortran
Executable file
3
scripts/pcs-xgfortran
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
gfortran $1 && ./a.out
|
8
uninstall.sh
Executable file
8
uninstall.sh
Executable file
@ -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.
|
Reference in New Issue
Block a user