Flavour settings for LXQt
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.

lxqt-cheatcodes 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/sh
  2. PATH=/sbin:/usr/sbin:/bin:/usr/bin
  3. NAME="lxqt-cheatcodes"
  4. if [ -r /etc/default/distro ]; then
  5. . /etc/default/distro
  6. fi
  7. . /lib/lsb/init-functions
  8. . /lib/init/fll
  9. ###
  10. # read in variables from /etc/default/fll-locales
  11. ###
  12. if [ -r /etc/default/fll-locales ]; then
  13. . /etc/default/fll-locales
  14. fi
  15. FLL_LIVE_USER_HOME=$(getent passwd ${FLL_LIVE_USER} | cut -d \: -f 6)
  16. timedatectl set-timezone $(timedatectl | awk '/Local/{printf $6}')
  17. ###
  18. # cheatcode handling
  19. ###
  20. for param in $(cat /proc/cmdline); do
  21. case "${param}" in
  22. flldebug=*)
  23. if [ "${param#flldebug=}" = "${NAME}" ] || [ "${param#flldebug=}" = "all" ]; then
  24. fll_redirect
  25. fi
  26. ;;
  27. nointro)
  28. NOINTRO="nointro"
  29. ;;
  30. esac
  31. done
  32. no_intro() {
  33. if [ -z "${NOINTRO}" ] ; then
  34. [ ! -f ${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop ] && sudo -u ${FLL_LIVE_USER} ln -sf "${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop" \
  35. "${FLL_LIVE_USER_HOME}/.config/autostart/"
  36. elif [ -e "${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop" ]; then
  37. # toram + persistency
  38. rm -f "${FLL_LIVE_USER_HOME}/.config/autostart/${FLL_DISTRO_NAME}.desktop"
  39. fi
  40. }
  41. do_start() {
  42. if [ -f ${FLL_LIVE_USER_HOME}/Desktop/${FLL_DISTRO_NAME}.desktop ]; then
  43. no_intro
  44. fi
  45. }
  46. case "${1}" in
  47. start)
  48. log_daemon_msg "${NAME}"
  49. do_start
  50. log_end_msg "${?}"
  51. ;;
  52. stop)
  53. ;;
  54. restart|force-reload)
  55. echo "Error: argument '${1}' not supported" >&2
  56. exit 3
  57. ;;
  58. *)
  59. echo "Usage: ${NAME} {start|stop}" >&2
  60. exit 3
  61. ;;
  62. esac