38 lines
861 B
Bash
Executable File
38 lines
861 B
Bash
Executable File
#!/bin/bash
|
|
|
|
fix_thunar() {
|
|
# Remove thunar wallpaper plugin #
|
|
twplug="/usr/lib/thunarx-3/thunar-wallpaper-plugin.so"
|
|
|
|
if [[ -e "$twplug" ]]; then
|
|
rm -rf "$twplug"
|
|
fi
|
|
}
|
|
|
|
fix_nmd() {
|
|
# Create nmd script for bspwm session #
|
|
cp -rf /usr/bin/networkmanager_dmenu /usr/local/bin/nmd && sed -i -e 's/config.ini/nmd.ini/g' /usr/local/bin/nmd
|
|
}
|
|
|
|
fix_grub() {
|
|
sed -i -e 's/GRUB_DISTRIBUTOR=.*/GRUB_DISTRIBUTOR="Tarch OS"/g' /etc/default/grub
|
|
cat /etc/grub.d/10_linux | grep 'OS="${GRUB_DISTRIBUTOR} Linux"' &>/dev/null
|
|
|
|
if [[ "$?" == 0 ]]; then
|
|
sed -i -e 's/OS="${GRUB_DISTRIBUTOR} Linux"/OS="${GRUB_DISTRIBUTOR}"/g' /etc/grub.d/10_linux
|
|
fi
|
|
}
|
|
|
|
main() {
|
|
local hookname="$1"
|
|
|
|
case "$hookname" in
|
|
fix-thunar) fix_thunar ;;
|
|
fix-nmd) fix_nmd ;;
|
|
fix-grub) fix_grub ;;
|
|
"") echo "Nothing to do!";;
|
|
esac
|
|
}
|
|
|
|
main "$@"
|