OSVERSION="`cut -d . -f 1 /etc/debian_version`"
# Hostname
-HOSTNAME="`cat /etc/hostname`"
+HOSTNAME="`cat /etc/hostname | cut -d . -f 1`"
+FQDN="`cat /etc/hostname`"
# Output
# Example: OUTPUT="VGA-1"
fi
# Apply custom keyboard configuration
-if [ -f "$HOME/.Xmodmaps/$HOSTNAME" ]; then
- xmodmap $HOME/.Xmodmaps/$HOSTNAME
+if [ -f "$HOME/.Xmodmaps/$FQDN" ]; then
+ xmodmap $HOME/.Xmodmaps/$FQDN
# Why xmodmap has to run twice to some changes take place?
# https://faq.i3wm.org/question/558/xmodmap-loading/
# https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/700309
- xmodmap $HOME/.Xmodmaps/$HOSTNAME
+ xmodmap $HOME/.Xmodmaps/$FQDN
fi
# Fix mumble configuration, which varies depending on machine audio
-if [ -f "$HOME/.config/Mumble/Mumble-$HOSTNAME.conf" ]; then
+if [ -f "$HOME/.config/Mumble/Mumble-$FQDN.conf" ]; then
(
cd $HOME/.config/Mumble
- mv Mumble.conf Mumble-$HOSTNAME.conf.backup
- ln -s Mumble-$HOSTNAME.conf Mumble.conf
+ mv Mumble.conf Mumble-$FQDN.conf.backup
+ ln -s Mumble-$FQDN.conf Mumble.conf
)
fi