--- /dev/null
+###
+### This script is distributed in the terms of GNU GPL v3.0+
+### (c) Andrew Sichevoi, http://thekondor.net
+###
+### Name: custom-desktop.foundation
+### Description: foundation code to launch lightweight desktop applications
+### Notes: Every 'custom-desktop' application must define unique CD_APPNAME variable
+### before inclusion of this file.
+###
+### Settings of the foundation could be overridden through ~/.config/custom-desktop.settings file.
+###
+
+CUSTOM_DESKTOP_SETTINGS_FILE_EXTENSION=settings
+CUSTOM_DESKTOP_SETTINGS_DIRECTORY=${HOME}/.config
+CUSTOM_DESKTOP_SETTINGS_OVERRIDE=${CUSTOM_DESKTOP_SETTINGS_DIRECTORY}/custom-desktop.settings
+
+if [ -e "${CUSTOM_DESKTOP_SETTINGS_OVERRIDE}" ]; then
+ . ${CUSTOM_DESKTOP_SETTINGS_OVERRIDE}
+fi
+
+if [ -z "${CD_APPNAME}" ]; then
+ echo "CustomDesktop error: required variable 'CD_APPNAME' is not set"
+ exit 1
+fi
+
+### format: settings-directory/app-name.settings-extension
+### e.g.: /home/user/.config/bindkeys.settings
+CD_APP_SETTINGS_FILE=${CUSTOM_DESKTOP_SETTINGS_DIRECTORY}/${CD_APPNAME}.${CUSTOM_DESKTOP_SETTINGS_FILE_EXTENSION}
+
+if [ -e "${CD_APP_SETTINGS_FILE}" ]; then
+ . ${CD_APP_SETTINGS_FILE}
+fi
--- /dev/null
+#!/bin/sh
+
+###
+### This script is distributed in the terms of GNU GPL v3.0+
+### (c) Andrew Sichevoi, http://thekondor.net
+###
+### Name: run-conky
+### Description: Helper script to run Conky
+### Notes: Extra environment allows to run Conky in locale differ from the system's one
+###
+### Conky configuration file must provide disabled 'daemon' mode.
+###
+### Arguments:
+### none
+###
+
+CONKY_EXTRA_ENVIRONMENT=
+CONKY_EXTRA_ARGUMENTS="-u 30"
+CONKY_THEME=default
+
+### <foundation>
+CD_APPNAME=conky
+. /usr/local/bin/custom-desktop.foundation
+### </foundation>
+
+CONKY_THEME_FILE=~/.conky/themes/${CONKY_THEME}/conkyrc
+
+(eval "${CONKY_EXTRA_ENVIRONMENT}"; setsid /usr/bin/conky -c ${CONKY_THEME_FILE} ${CONKY_EXTRA_ARGUMENTS})
--- /dev/null
+#!/bin/bash
+
+###
+### This script is distributed in the terms of GNU GPL v3.0+
+### (c) Andrew Sichevoi, http://thekondor.net
+###
+### Name: set-random-wallpaper
+### Description: Helper script to set random wallpapers through FEH
+### Notes: This script is based on the source listed on https://wiki.archlinux.org/index.php/Feh
+###
+### Notification hook is introduced as a w/a to refresh conky with infrequent refresh interval.
+###
+### Arguments:
+### none
+###
+
+### Default values
+WALLPAPER_DIRECTORY=${HOME}/.wallpapers
+ROTATE_TIME=15m
+NOTIFICATION_HOOK=
+
+### <foundation>
+CD_APPNAME=wallpaper
+. /usr/local/bin/custom-desktop.foundation
+### </foundation>
+
+shopt -s nullglob
+
+while true; do
+ files=()
+ for i in ${WALLPAPER_DIRECTORY}/*.jpg ${WALLPAPER_DIRECTORY}/*.png; do
+ [[ -f $i ]] && files+=("$i")
+ done
+ range=${#files[@]}
+
+ ((range)) && feh --bg-scale "${files[RANDOM % range]}"
+ if [ ! -z "${NOTIFICATION_HOOK}" ]; then
+ ${NOTIFICATION_HOOK}
+ fi
+
+ sleep ${ROTATE_TIME}
+done
--- /dev/null
+#!/bin/sh
+
+###
+### This script is distributed in the terms of GNU GPL v3.0+
+### (c) Andrew Sichevoi, http://thekondor.net
+###
+### Name: set-timeout-lock
+### Description: Helper script to launch user-specified lock application by timeout
+### Notes: Lock application should NOT be a daemon
+###
+### Time out is specified in minutes.
+###
+### Arguments:
+### none
+###
+
+LOCK_APPLICATION=/usr/bin/slock
+LOCK_TIMEOUT=10
+
+### <foundation>
+CD_APPNAME=timeout-lock
+. /usr/local/bin/custom-desktop.foundation
+### </foundation>
+
+/usr/bin/xautolock -time ${LOCK_TIMEOUT} -locker "${LOCK_APPLICATION}"