Unverified Commit 6095e7cb authored by Batuhan Osman Taşkaya's avatar Batuhan Osman Taşkaya Committed by GitHub

Indentetion

parent 61008d34
......@@ -7,85 +7,85 @@ IDENTIFIERCOUNT=0
MHWD_ADD_DEVICE_SECTION_FOR_EACH_BUSID()
{
local XORGDRIVER="$1"
local XORGFILE="$2"
local VENDORID="$3"
local PCIBUSIDS=""
local XORGDRIVER="$1"
local XORGFILE="$2"
local VENDORID="$3"
local PCIBUSIDS=""
if [ "$VENDORID" != "" ]; then
PCIBUSIDS="$(MHWD_DEVICE_BUS_ID "0300" "$VENDORID" "false")"
fi
if [ "$VENDORID" != "" ]; then
PCIBUSIDS="$(MHWD_DEVICE_BUS_ID "0300" "$VENDORID" "false")"
fi
if [ "$PCIBUSIDS" == "" ]; then
MHWD_ADD_DEVICE_SECTION "$XORGDRIVER" "$XORGFILE" "$4"
return
fi
if [ "$PCIBUSIDS" == "" ]; then
MHWD_ADD_DEVICE_SECTION "$XORGDRIVER" "$XORGFILE" "$4"
return
fi
while read BUSID; do
MHWD_ADD_DEVICE_SECTION "$XORGDRIVER" "$XORGFILE" "BusID \"PCI:$BUSID\"|$4"
done <<< "$(echo "$PCIBUSIDS")"
while read BUSID; do
MHWD_ADD_DEVICE_SECTION "$XORGDRIVER" "$XORGFILE" "BusID \"PCI:$BUSID\"|$4"
done <<< "$(echo "$PCIBUSIDS")"
}
MHWD_ADD_DEVICE_SECTION()
{
local XORGDRIVER="$1"
local XORGFILE="$2"
local XORGDRIVER="$1"
local XORGFILE="$2"
echo 'Section "Device"' >> "$XORGFILE"
echo " Identifier \"Device${IDENTIFIERCOUNT}\"" >> "$XORGFILE"
echo " Driver \"$XORGDRIVER\"" >> "$XORGFILE"
echo 'Section "Device"' >> "$XORGFILE"
echo " Identifier \"Device${IDENTIFIERCOUNT}\"" >> "$XORGFILE"
echo " Driver \"$XORGDRIVER\"" >> "$XORGFILE"
IFS='|'
for i in $3; do
echo " $i" >> "$XORGFILE"
done
unset IFS
IFS='|'
for i in $3; do
echo " $i" >> "$XORGFILE"
done
unset IFS
echo 'EndSection' >> "$XORGFILE"
echo ' ' >> "$XORGFILE"
echo 'EndSection' >> "$XORGFILE"
echo ' ' >> "$XORGFILE"
IDENTIFIERCOUNT=$[IDENTIFIERCOUNT + 1]
IDENTIFIERCOUNT=$[IDENTIFIERCOUNT + 1]
}
MHWD_ADD_DRI()
{
# only for free drivers
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"DRI\" \"true\"\nEndSection"/g "$1"
echo ' ' >> "$1"
echo 'Section "DRI"' >> "$1"
echo ' Group "video"' >> "$1"
echo ' Mode 0666' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
# only for free drivers
sed -i /'Section "Device"'/,/'EndSection'/s/'EndSection'/"\tOption \"DRI\" \"true\"\nEndSection"/g "$1"
echo ' ' >> "$1"
echo 'Section "DRI"' >> "$1"
echo ' Group "video"' >> "$1"
echo ' Mode 0666' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
}
MHWD_ADD_COMPOSITING()
{
echo ' ' >> "$1"
echo 'Section "Extensions"' >> "$1"
echo ' Option "Composite" "Enable"' >> "$1"
echo ' Option "RENDER" "Enable"' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
echo ' ' >> "$1"
echo 'Section "Extensions"' >> "$1"
echo ' Option "Composite" "Enable"' >> "$1"
echo ' Option "RENDER" "Enable"' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
}
MHWD_ADD_BACKSPACE()
{
echo ' ' >> "$1"
echo 'Section "InputClass"' >> "$1"
echo ' Identifier "Keyboard Defaults"' >> "$1"
echo ' MatchIsKeyboard "yes"' >> "$1"
echo ' Option "XkbOptions" "terminate:ctrl_alt_bksp"' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
echo ' ' >> "$1"
echo 'Section "InputClass"' >> "$1"
echo ' Identifier "Keyboard Defaults"' >> "$1"
echo ' MatchIsKeyboard "yes"' >> "$1"
echo ' Option "XkbOptions" "terminate:ctrl_alt_bksp"' >> "$1"
echo 'EndSection' >> "$1"
echo ' ' >> "$1"
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment