You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
963 B
31 lines
963 B
#!/usr/bin/env bash
|
|
#
|
|
# Author: Dmitry Razumov <asmeron@ublinux.com>
|
|
# Copyright (c) 2021-2025 UBLinux <support@ublinux.com>
|
|
#
|
|
|
|
ENABLED=yes
|
|
[[ ${ENABLED} == yes ]] || exit 0
|
|
|
|
unset ROOTFS; [[ -d /usr/lib/ublinux ]] || ROOTFS=.
|
|
#SOURCE=${ROOTFS}/usr/lib/ublinux/functions; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null || exit 0
|
|
SOURCE=${ROOTFS}/usr/lib/ublinux/default; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null || exit 0
|
|
|
|
SYSCONF="${ROOTFS}${SYSCONF}"
|
|
SOURCE=${SYSCONF}/config; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
SOURCE=${SYSCONF}/keyboard; [[ -f ${SOURCE} ]] && . ${SOURCE} 2>/dev/null
|
|
|
|
[[ ${RESETKBMODE} != @(no|disable) ]] && setxkbmap ${XKBLAYOUT} -model ${XKBMODEL} -option ${XKBOPTIONS}
|
|
|
|
# Automatic detection PC/notebooks
|
|
if [[ -z ${NUMLOCK} ]]; then
|
|
if xinput list | grep -qi touchpad ; then
|
|
NUMLOCK=no
|
|
else
|
|
NUMLOCK=yes
|
|
fi
|
|
fi
|
|
|
|
[[ ${NUMLOCK} == @(yes|on) ]] && numlockx on
|
|
[[ ${NUMLOCK} == @(no|off) ]] && numlockx off
|