desktop/ksuperkey/ksuperkey.install

46 lines
1.1 KiB
Plaintext
Raw Normal View History

2013-03-06 12:05:35 +08:00
post_install() {
2016-01-05 06:01:00 +08:00
cat << EOF
2013-03-06 12:05:35 +08:00
==> ksuperkey installation notes:
----------------------------------------
Make sure that the keyboard shortcut for the application launcher is set to Alt+F1.
If you do not like the default mapping (Super_L to Alt+F1), you can tell ksuperkey to use another mapping.
The syntax is as follows:
ksuperkey -e 'ModKey=Key[|OtherKey][;NextExpression]'
for example:
ksuperkey -e 'Super_L=Alt_L|F2'
2016-01-05 06:01:00 +08:00
ksuperkey is set to autostart, you can change this behaviour in System Settings.
2013-03-06 12:05:35 +08:00
EOF
2016-01-05 06:01:00 +08:00
# see which is the user name
NAME=$(logname)
# create a .desktop entry for autostart
runuser $NAME -c 'echo "[Desktop Entry]
Exec=ksuperkey
Name=KSuperKey
OnlyShowIn=KDE;
Type=Application
X-DBUS-StartupType=Unique
X-KDE-StartupNotify=false
"' > /home/$NAME/.config/autostart/ksuperkey.desktop
# change ownership of .desktop file
chown $NAME:users /home/$NAME/.config/autostart/ksuperkey.desktop
# check if ksuperkey is already running, if not it starts it
ps cax | grep ksuperkey > /dev/null
if [ $? -eq 0 ]; then
true
else
runuser $NAME -c 'ksuperkey'
fi
2013-03-06 12:05:35 +08:00
}
2016-01-05 06:01:00 +08:00
post_upgrade() {
post_install
}