aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-08-02 21:39:08 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-08-02 21:39:08 -0300
commite3bb0dade6e1db0aeb6f79f84abafd9f9b84f5de (patch)
tree73dcaf5329c39741cc02bd1f603cc96551fa1415
parentebb72e2df8982e7495afda424a40c3fb285a5739 (diff)
downloadxsession-e3bb0dade6e1db0aeb6f79f84abafd9f9b84f5de.tar.gz
xsession-e3bb0dade6e1db0aeb6f79f84abafd9f9b84f5de.tar.bz2
Fix: use HOSTNAME and FQDN variables
-rwxr-xr-xxsessionrc.dot.link15
1 files 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