Compare commits

..

4 Commits

Author SHA1 Message Date
38ee918732 Update the script. 2024-02-08 18:08:48 +01:00
f7b659fdd9 Lets go 2024-02-08 18:08:35 +01:00
8425d4b953 Just testing out stuff 2024-02-08 18:08:26 +01:00
621ec9a722 Add script for setting up my external monitor 2024-02-08 18:08:12 +01:00
5 changed files with 44 additions and 4 deletions

13
external-monitor.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
if xrandr | grep 'HDMI-A-0' | grep connected >/dev/null; then
# Turn off laptop monitor
xrandr --output eDP --off
# Make sure it's running at 144hz
xrandr --output HDMI-A-0 --mode 1920x1080 --rate 144
# Enable tear free
xrandr --output HDMI-A-0 --set TearFree on
else
# Just enable tearfree
xrandr --output eDP --set TearFree on
fi

3
start-dwl Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec dbus-launch --exit-with-session dwl

3
start-hyprland Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec dbus-launch --exit-with-session Hyprland

21
toggle-xrandr Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
doIt() {
if xrandr | grep 'HDMI-A-0' | grep connected >/dev/null; then
xrandr --output HDMI-A-0 --set TearFree "$1"
else
xrandr --output eDP --set TearFree "on"
fi
}
case "$1" in
"on")
doIt "on"
;;
"off")
doIt "off"
;;
*)
echo "That option doesn't exist"
;;
esac

8
vpn
View File

@ -2,16 +2,16 @@
up () { up () {
transmission-remote --exit transmission-remote --exit
sudo wg-quick up myvpn sudo wg-quick up $1
exit exit
} }
down () { down () {
sudo wg-quick down myvpn sudo wg-quick down $1
start-program transmission-daemon start-program transmission-daemon
exit exit
} }
[ "$1" = "up" ] && up [ "$2" = "up" ] && up $1
[ "$1" = "down" ] && down [ "$2" = "down" ] && down $1
exit 1 exit 1