This commit is contained in:
josh
2018-10-22 10:29:55 +03:00
parent 5c1d7a61c0
commit 1021f06842
14 changed files with 95 additions and 51 deletions

View File

@@ -11,7 +11,7 @@ case $1 in
notify-send -t 250 "VOL: $(pamixer --get-volume)"
pkill -RTMIN+1 i3blocks
;;
"toggle_mute")
"toggle-mute")
pamixer --toggle-mute
notify-send -t 250 "MUTE: $(pamixer --get-mute)"
;;

View File

@@ -5,4 +5,5 @@
[[ ! $(pidof mpd) ]] && mpd &
[[ ! $(pidof transmission-daemon) ]] && transmission-daemon &
[[ ! $(pidof dunst) ]] && dunst &
[[ ! $(pidof flameshot) ]] && flameshot &

View File

@@ -13,7 +13,7 @@ sudo -A mount "$chosen" && exit 0
# You may want to change the line below for more suggestions for mounting.
# I.e. you can increase the depth of the search, or add directories.
# This will increase the load time briefly though.
mp="$(find /mnt /media /mount /home -type d -maxdepth 5 2>/dev/null | ~/.scripts/dmen.sh -i -p "Mount point:")"
mp="$(find /mnt /media /mount /home -type d -maxdepth 5 2>/dev/null | ~/.scripts/dmenu.sh -i -p "Mount point:")"
[ "$mp" = "" ] && exit 1
if [ ! -d "$mp" ]; then
mkdiryn=$(printf "No\\nYes" | ~/.scripts/dmenu.sh -i -p "$mp does not exist. Create it?")

View File

@@ -1,7 +1,7 @@
#!/bin/bash
case $1 in
"toggle")
"toggle-playback")
mpc toggle
;;
"prev")

View File

@@ -7,15 +7,20 @@ fi
kernel_modules="vfio_pci vfio vfio_iommu_type1 vfio_virqfd"
ovmf_xrandr="xrandr --output HDMI1 --mode 2560x1440 --rate 59.95 --output HDMI2 --mode 1920x1080 --rate 59.93 --left-of HDMI1"
default_xrandr="xrandr --output HDMI-3 --mode 2560x1440 --rate 59.95 --output DVI-D-2 --mode 1920x1080 --rate 59.93 --left-of HDMI-3"
select choice1 in "enable vfio" "disable vfio" "exit"; do
case $choice1 in
"enable vfio")
sudo echo "options vfio-pci ids=1002:67b1,1002:aac8" >> /etc/modprobe.d/vfio.conf
sudo sed -i -e "s/MODULES=()/MODULES=($kernel_modules)/g" /etc/mkinitcpio.conf
sed -i -e "s/$default_xrandr/$ovmf_xrandr/g" /home/josh/.config/i3/config
break;;
"disable vfio")
sudo rm /etc/modprobe.d/vfio.conf
sudo sed -i -e "s/MODULES=($kernel_modules)/MODULES=()/g" /etc/mkinitcpio.conf
sed -i -e "s/$ovmf_xrandr/$default_xrandr/g" /home/josh/.config/i3/config
break;;
"exit")
exit;;
@@ -27,6 +32,17 @@ select choice2 in "yes" "no"; do
case $choice2 in
"yes")
sudo mkinitcpio -p linux
echo "make sure to switch to PEG/IGD in bios"
echo "reboot now?"
select choice2 in "yes" "no"; do
case $choice2 in
"yes")
sudo reboot
break;;
"no")
break;;
esac
done
break;;
"no")
exit;;