This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for xinput_id in $(xinput list | grep 'Razer Razer DeathAdder V2' | grep -o 'id=[0-9]*' | cut -c 4-); do | |
xinput --set-prop "$xinput_id" "libinput Accel Speed" -0.7 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
source /root/.bashrc | |
KEY="$1" | |
if [ -z "$KEY" ]; then | |
key_combo="key:rightshift key:rightalt key:rightctrl" | |
evsieve --input /dev/input/by-id/uinput-persist-z12-keyboard0 \ | |
--hook $key_combo key:f5 exec-shell="$0 f5" \ | |
--hook $key_combo key:f9 exec-shell="$0 f9" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SECOND_GPU="0000:01:00.0" | |
# First argument is the vmid | |
# Second argument is the phase | |
VMID="$1" | |
shift | |
PHASE="$1" | |
if [ "$PHASE" = "post-stop" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
virsh nodedev-reattach pci_0000_26_00_0 | |
virsh nodedev-reattach pci_0000_26_00_1 | |
modprobe nvidia | |
modprobe nvidia_modeset | |
modprobe nvidia_uvm | |
modprobe nvidia_drm | |
systemctl start nfancurve.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
systemctl stop nfancurve.service | |
virsh nodedev-detach pci_0000_26_00_0 | |
virsh nodedev-detach pci_0000_26_00_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Forces gamescope to be the desktop session on boot | |
[Service] | |
Type=oneshot | |
ExecStart=/bin/sh -c 'grep gamescope /etc/sddm.conf.d/zz-steamos-autologin.conf || sudo -u deck /usr/sbin/steamos-session-select gamescope' | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
user="$1" | |
if ! [[ `id "$user" 2> /dev/null` ]]; then | |
echo "Not a valid user" 1>&2 && exit 1 | |
fi | |
if [[ `echo "$user" | grep "|"` ]]; then | |
echo "Username cannot have '|'" 1>&2 && exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
maxnum="99999999" | |
while getopts ":c:d:a:n:" opt; do | |
case "$opt" in | |
c) content=$OPTARG ;; | |
d) dest=$OPTARG ;; | |
a) audio=$OPTARG ;; | |
n) maxnum=$OPTARG ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MAX_WAIT="10" | |
[[ -z "$1" ]] && exit 1 || MOUNT="$1" | |
if [[ ! -z "$2" ]]; then | |
reg="^[0-9]+$" && [[ ! "$2" =~ $reg ]] && exit 1 | |
MAX_WAIT="$2" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Personal PulseAudio microphone toggle script | |
# Allows me to mute/unmute mic as well as send/stop sending microphone output to a virtual machine for | |
# maximum flexibility (e.g simultaneously using discord on linux, game voice chat on windows) and only needing to configure one mic ever | |
source_microphone="alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_REV8-00.analog-stereo" # Main microphone | |
source_we_wanna_send_to_vm="PulseEffects_mic.monitor" # This is PulseEffects mic output (since it improves the quality of the Main microphone) | |
sink_wired_to_vm_sound="alsa_output.usb-C-Media_Electronics_Inc._USB_Audio_Device-00.analog-stereo" # A soundcard that is quite literally wired to another soundcard which is passed in a Virtual Machine. Lmao. Hey, it works.. | |
pid_file="/tmp/pa_mic_loopback.pid" # Where the last pactl module ID will be saved to. | |
# Arguments |