From e3bb0dade6e1db0aeb6f79f84abafd9f9b84f5de Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 2 Aug 2024 21:39:08 -0300 Subject: Fix: use HOSTNAME and FQDN variables --- xsessionrc.dot.link | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xsessionrc.dot.link b/xsessionrc.dot.link index df2ec03..9a3c53c 100755 --- a/xsessionrc.dot.link +++ b/xsessionrc.dot.link @@ -13,7 +13,8 @@ PROGRAMS="xconky blueman-applet xnm-tray pasystray" 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" @@ -110,21 +111,21 @@ if [ -f "$HOME/.Xmodmap" ]; then 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 -- cgit v1.2.3