#!/bin/bash -
#===============================================================================
#
# FILE: ledctrl
#
# USAGE: ./ledctrl
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: linkscue (scue), linkscue@gmail.com
# ORGANIZATION:
# CREATED: 2014年02月13日 13时16分55秒 CST
# REVISION: ---
#===============================================================================
status=/tmp/keyboard_led_status
if [[ ${1} == "on" ]] || [[ ! -e ${status} ]]; then
xset led named 'Scroll Lock' && echo "on" > ${status}
else
xset -led named 'Scroll Lock' && rm -f ${status}
fi
网友评论