Changeset View
Changeset View
Standalone View
Standalone View
files/xprofile
- This file was added.
| #!/bin/sh | |||||
| # A sample xprofile for setting up X user session. | |||||
| # NB: Loading xkbmap and xmodmap files do not take effect on Budgie and GNOME desktop environments | |||||
| # since gnome-session overwrites user's keymaps later. A workaround is to create a setkeymaps.desktop | |||||
| # file in ~/.config/autostart to load these files after X session starts. The following is a sample of | |||||
| # setkeymaps.dekstop: | |||||
| # | |||||
| # [Desktop Entry] | |||||
| # Type=Application | |||||
| # Name=setkeymaps | |||||
| # Description=Setting up keymaps for X session | |||||
| # Exec=bash -c "/usr/bin/xmodmap ~/.Xmodmap" | |||||
| # Load keymaps | |||||
| if command -v setxkbmap >/dev/null 2>&1; then | |||||
| for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do | |||||
| if [ -f "$file" ]; then | |||||
| echo "Loading keymap: $file" | |||||
| setxkbmap $(cat "$file") | |||||
| XKB_IN_USE=yes | |||||
| fi | |||||
| done | |||||
| unset file | |||||
| fi | |||||
| # Load xmodmap if not using XKB | |||||
| if [ -z "$XKB_IN_USE" ] && command -v xmodmap >/dev/null 2>&1; then | |||||
| for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do | |||||
| if [ -f "$file" ]; then | |||||
| echo "Loading modmap: $file" | |||||
| xmodmap "$file" | |||||
| fi | |||||
| done | |||||
| unset file | |||||
| fi | |||||
| unset XKB_IN_USE | |||||
Copyright © 2015-2021 Solus Project. The Solus logo is Copyright © 2016-2021 Solus Project. All Rights Reserved.