## About
-Flex Launcher is a customizable application launcher designed with a [10 foot user interface](https://en.wikipedia.org/wiki/10-foot_user_interface). Its intended purpose is to simplify the control of a home theater or couch gaming PC by providing an interface that is similar to a TV set-top box or game console. Flex Launcher allows you to launch applications on your living room PC entirely by use of a TV remote or a gamepad. No keyboard or mouse required!
+Flex Launcher is a customizable application launcher and front end designed with a TV-friendly [10 foot user interface](https://en.wikipedia.org/wiki/10-foot_user_interface), intending to mimic the look and feel of a streaming box or game console. Flex Launcher allows you to launch applications on your HTPC or couch gaming PC entirely by use of a TV remote or a gamepad. No keyboard or mouse required!
Flex Launcher is compatible with both Windows and Linux (including Raspberry Pi devices).
## Screenshots
-![Screenshot 1](extra/screenshots/screenshot1.png "Screenshot 1")
-![Screenshot 1](extra/screenshots/screenshot2.png "Screenshot 2")
+![Screenshot 1](docs/assets/screenshots/screenshot1.png "Screenshot 1")
+
+https://user-images.githubusercontent.com/95071366/208355237-11f00cbb-9cc3-436b-98f7-8de350e584a7.mp4
## Installation
-Compiled binaries are available for Windows 64 bit, Linux x86-64, and Raspberry Pi. Alternatively, you may also choose to compile the program yourself using the [compilation guide](extra/docs/compilation_guide.md).
+Executables are available for Windows 64 bit, Linux x86-64, and Raspberry Pi. You can also compile the program yourself using the [compilation guide](docs/compilation.md).
### Windows
-A win64 zip file is provided on the [release page](https://github.com/complexlogic/flex-launcher/releases). Simply download the file and extract the contents to a directory of your choosing.
+Download the win64 .zip file from the [latest release](https://github.com/complexlogic/flex-launcher/releases/latest) and extract the contents to a directory of your choice. Flex Launcher should be run on an up-to-date Windows 10 system, or Windows 11.
### Linux
Binary packages are available on the [release page](https://github.com/complexlogic/flex-launcher/releases) for APT and pacman based distributions. You may use the commands below to install.
-#### APT-based x86-64 Distributions (Debian, Ubuntu, Mint, etc.)
-```
-VERSION=1.4
-wget https://github.com/complexlogic/flex-launcher/releases/download/v${VERSION}/flex-launcher_${VERSION}_amd64.deb
-sudo apt install ./flex-launcher_${VERSION}_amd64.deb
+#### APT-based x86-64 Distributions (Debian, Ubuntu, etc.)
+This package is compatible with Debian Bullseye and later, Ubuntu 21.04 and later.
+```bash
+wget https://github.com/complexlogic/flex-launcher/releases/download/v2.2/flex-launcher_2.2_amd64.deb
+sudo apt install ./flex-launcher_2.2_amd64.deb
```
#### Pacman-based x86-64 Distributions (Arch, Manjaro, etc.)
-```
-VERSION=1.4
-wget https://github.com/complexlogic/flex-launcher/releases/download/v${VERSION}/flex-launcher-${VERSION}-1-x86_64.pkg.tar.zst
-sudo pacman -U flex-launcher-${VERSION}-1-x86_64.pkg.tar.zst
+```bash
+wget https://github.com/complexlogic/flex-launcher/releases/download/v2.2/flex-launcher-2.2-1-x86_64.pkg.tar.zst
+sudo pacman -U flex-launcher-2.2-1-x86_64.pkg.tar.zst
```
#### Raspberry Pi
-```
-VERSION=1.4
-wget https://github.com/complexlogic/flex-launcher/releases/download/v${VERSION}/flex-launcher_${VERSION}_armhf.deb
-sudo apt install ./flex-launcher_${VERSION}_armhf.deb
+This package is compatible with Raspbian Bullseye and later, 64 bit only.
+```bash
+wget https://github.com/complexlogic/flex-launcher/releases/download/v2.2/flex-launcher_2.2_arm64.deb
+sudo apt install ./flex-launcher_2.2_arm64.deb
```
#### Copying Assets to Home Directory
-The Linux packages install a default config file and assets to /usr/share/flex-launcher. It is strongly recommended to NOT edit this config file directly, as it will be overwritten if you upgrade to a later version of Flex Launcher. Instead, copy these files to your home directory and edit it there.
-```
+The Linux packages install a default config file and assets to `/usr/share/flex-launcher`. It is strongly recommended to *not* edit this config file directly, as it will be overwritten if you upgrade to a later version of Flex Launcher. Instead, copy these files to your home directory and edit it there.
+```bash
cp -r /usr/share/flex-launcher ~/.config
sed -i "s|/usr/share/flex-launcher|$HOME/.config/flex-launcher|g" ~/.config/flex-launcher/config.ini
```
## Usage
-Flex Launcher uses an INI file to configure the menus and settings. Upon startup, the program will search for a file named ```config.ini``` in the following locations in order:
+Flex Launcher uses an INI file to configure the menus and settings. Upon startup, the program will search for a file named `config.ini` in the following locations in order:
1. The current working directory
-2. The directory containing the ```flex-launcher``` executable
-3. Linux only: ~/.config/flex-launcher
-4. Linux only: /usr/share/flex-launcher
+2. The directory containing the `flex-launcher` executable
+3. Linux only: `~/.config/flex-launcher`
+4. Linux only: `/usr/share/flex-launcher`
If your config file is in one of the above locations, Flex Launcher can be started simply by double clicking the executable file or adding it to autostart. If your config file is in a non-standard location, you must specify the path via command line argument:
-```
+```bash
flex-launcher -c /path/to/config.ini
```
-Flex Launcher ships with a default config file which is intended strictly for demonstration purposes. If you try to start one of the applications, it is possible that nothing will happen because the install path is different on your system, or you don't have the application installed at all. See the [configuration file documentation](extra/docs/configuration.md) for instuctions on how to change the menus and settings.
+Flex Launcher ships with a default config file which is intended strictly for demonstration purposes. If you try to start one of the applications, it is possible that nothing will happen because the install path is different on your system, or you don't have the application installed at all. See the [configuration file documentation](docs/configuration.md#configuring-flex-launcher) for instuctions on how to change the menus and settings.
### Controls
-The keyboard arrow keys move the cursor left and right. Enter selects the current entry, backspace goes back to the previous menu (if applicable), and Esc quits the program.
+The keyboard arrow keys move the highlight cursor left and right. Enter selects the current entry, backspace goes back to the previous menu (if applicable), and Esc quits the program.
#### TV Remotes
-Flex Launcher does not feature built-in decoding of IR or CEC signals. If you plan to use a TV remote to control the device, it is assumed that these signals are decoded by the OS or another program and mapped to keyboard presses, which can then be received by Flex Launcher. You can also use a hardware-based solution, such as the FLIRC USB device
+Flex Launcher does not feature built-in decoding of IR or CEC signals. If you plan to use a TV remote to control the device, it is assumed that these signals are decoded by the OS or another program and mapped to keyboard presses, which can then be received by Flex Launcher.
#### Gamepads
-Gamepad controls are built-in to the program, but are disabled by default. To enable them, open your configuration file, and, under the "Gamepad" section, change the "Enabled" setting from false to true. After that, the gamepad controls should "Just Work" for most users. If your gamepad is not recognized automatically, or you want to change the default controls, see the [gamepad controls documentation](extra/docs/configuration.md#gamepad-controls).
+Gamepad controls are built-in to the program, but are disabled by default. To enable them, open your configuration file and, under the "Gamepad" section, change the "Enabled" setting from false to true. After that, the gamepad controls should "Just Work" for most users. If your gamepad is not recognized automatically, or you want to change the default controls, see the [gamepad controls documentation](docs/configuration.md#gamepad-controls).
### Debugging
Flex Launcher has a debug mode which may be enabled as follows:
-```
+```bash
flex-launcher -d
```
-This will output a logfile named ```flex-launcher.log``` in the same directory as ```flex-launcher.exe``` on Windows, and in ~/.local/share/flex-launcher on Linux.
+This will output a logfile named `flex-launcher.log` in the same directory as `flex-launcher.exe` on Windows, and in `~/.local/share/flex-launcher` on Linux.
-## Contributing
-Contributions are welcome for bugfixes and new features. Please keep code formatted to [2 space K&R style](https://gist.github.com/jesseschalken/0f47a2b5a738ced9c845).
+## Development Status
+Flex Launcher has reached a mature state, and there are currently no feature releases planned for the future. I've started a [new HTPC launcher project](https://github.com/complexlogic/big-launcher) which is similar in nature to Flex Launcher, but aims to provide a more advanced, Smart TV-like user interface. My future development effort will be focused on that new project, but I will still maintain Flex Launcher for bugfixes and dependency updates.
## Documentation
Here is a list of available documentation:
-- [Configuration File](extra/docs/configuration.md)
-- [Compilation Guide](extra/docs/compilation_guide.md)
+- [Configuration](docs/configuration.md#configuring-flex-launcher)
+- [General Setup Guide](docs/setup.md#setup-guide)
+ - [Windows-specific Setup Guide](docs/setup_windows.md#windows-setup-guide)
+ - [Linux-specific Setup Guide](docs/setup_linux.md#linux-setup-guide)
+- [Compilation Guide](docs/compilation.md#compilation-guide)
## Credits
Flex Launcher is made possible by the following projects:
@@ -122,4 +125,4 @@ Flex Launcher is made possible by the following projects:
- [inih](https://github.com/benhoyt/inih)
- [Numix icons](https://github.com/numixproject)
-Flex Launcher was inspired and strongly influenced by the excellent desktop application launcher [xlunch](https://github.com/Tomas-M/xlunch).
+The design of Flex Launcher was strongly influenced by the excellent desktop application launcher [xlunch](https://github.com/Tomas-M/xlunch).
diff --git a/UNLICENSE.txt b/UNLICENSE
similarity index 100%
rename from UNLICENSE.txt
rename to UNLICENSE
diff --git a/assets/fonts/Inter-Regular.ttf b/assets/fonts/Inter-Regular.ttf
new file mode 100644
index 0000000..cc73944
Binary files /dev/null and b/assets/fonts/Inter-Regular.ttf differ
diff --git a/assets/fonts/Roboto-Regular.ttf b/assets/fonts/Roboto-Regular.ttf
new file mode 100644
index 0000000..3d6861b
Binary files /dev/null and b/assets/fonts/Roboto-Regular.ttf differ
diff --git a/assets/fonts/SourceSansPro-Regular.ttf b/assets/fonts/SourceSansPro-Regular.ttf
new file mode 100644
index 0000000..5623846
Binary files /dev/null and b/assets/fonts/SourceSansPro-Regular.ttf differ
diff --git a/assets/scroll_indicator.svg b/assets/scroll_indicator.svg
deleted file mode 100755
index 8a39e3a..0000000
--- a/assets/scroll_indicator.svg
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake
deleted file mode 100755
index 2445d36..0000000
--- a/cmake/FindSDL2.cmake
+++ /dev/null
@@ -1,388 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
-# Copyright 2019 Amine Ben Hassouna
-# Copyright 2000-2019 Kitware, Inc. and Contributors
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-
-# * Neither the name of Kitware, Inc. nor the names of Contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#[=======================================================================[.rst:
-FindSDL2
---------
-
-Locate SDL2 library
-
-This module defines the following 'IMPORTED' targets:
-
-::
-
- SDL2::Core
- The SDL2 library, if found.
- Libraries should link to SDL2::Core
-
- SDL2::Main
- The SDL2main library, if found.
- Applications should link to SDL2::Main instead of SDL2::Core
-
-
-
-This module will set the following variables in your project:
-
-::
-
- SDL2_LIBRARIES, the name of the library to link against
- SDL2_INCLUDE_DIRS, where to find SDL.h
- SDL2_FOUND, if false, do not try to link to SDL2
- SDL2MAIN_FOUND, if false, do not try to link to SDL2main
- SDL2_VERSION_STRING, human-readable string containing the version of SDL2
-
-
-
-This module responds to the following cache variables:
-
-::
-
- SDL2_PATH
- Set a custom SDL2 Library path (default: empty)
-
- SDL2_NO_DEFAULT_PATH
- Disable search SDL2 Library in default path.
- If SDL2_PATH (default: ON)
- Else (default: OFF)
-
- SDL2_INCLUDE_DIR
- SDL2 headers path.
-
- SDL2_LIBRARY
- SDL2 Library (.dll, .so, .a, etc) path.
-
- SDL2MAIN_LIBRAY
- SDL2main Library (.a) path.
-
- SDL2_BUILDING_LIBRARY
- This flag is useful only when linking to SDL2_LIBRARIES insead of
- SDL2::Main. It is required only when building a library that links to
- SDL2_LIBRARIES, because only applications need main() (No need to also
- link to SDL2main).
- If this flag is defined, then no SDL2main will be added to SDL2_LIBRARIES
- and no SDL2::Main target will be created.
-
-
-Don't forget to include SDLmain.h and SDLmain.m in your project for the
-OS X framework based version. (Other versions link to -lSDL2main which
-this module will try to find on your behalf.) Also for OS X, this
-module will automatically add the -framework Cocoa on your behalf.
-
-
-Additional Note: If you see an empty SDL2_LIBRARY in your project
-configuration, it means CMake did not find your SDL2 library
-(SDL2.dll, libsdl2.so, SDL2.framework, etc). Set SDL2_LIBRARY to point
-to your SDL2 library, and configure again. Similarly, if you see an
-empty SDL2MAIN_LIBRARY, you should set this value as appropriate. These
-values are used to generate the final SDL2_LIBRARIES variable and the
-SDL2::Core and SDL2::Main targets, but when these values are unset,
-SDL2_LIBRARIES, SDL2::Core and SDL2::Main does not get created.
-
-
-$SDL2DIR is an environment variable that would correspond to the
-./configure --prefix=$SDL2DIR used in building SDL2. l.e.galup 9-20-02
-
-
-
-Created by Amine Ben Hassouna:
- Adapt FindSDL.cmake to SDL2 (FindSDL2.cmake).
- Add cache variables for more flexibility:
- SDL2_PATH, SDL2_NO_DEFAULT_PATH (for details, see doc above).
- Mark 'Threads' as a required dependency for non-OSX systems.
- Modernize the FindSDL2.cmake module by creating specific targets:
- SDL2::Core and SDL2::Main (for details, see doc above).
-
-
-Original FindSDL.cmake module:
- Modified by Eric Wing. Added code to assist with automated building
- by using environmental variables and providing a more
- controlled/consistent search behavior. Added new modifications to
- recognize OS X frameworks and additional Unix paths (FreeBSD, etc).
- Also corrected the header search path to follow "proper" SDL
- guidelines. Added a search for SDLmain which is needed by some
- platforms. Added a search for threads which is needed by some
- platforms. Added needed compile switches for MinGW.
-
-On OSX, this will prefer the Framework version (if found) over others.
-People will have to manually change the cache value of SDL2_LIBRARY to
-override this selection or set the SDL2_PATH variable or the CMake
-environment CMAKE_INCLUDE_PATH to modify the search paths.
-
-Note that the header path has changed from SDL/SDL.h to just SDL.h
-This needed to change because "proper" SDL convention is #include
-"SDL.h", not . This is done for portability reasons
-because not all systems place things in SDL/ (see FreeBSD).
-#]=======================================================================]
-
-# Define options for searching SDL2 Library in a custom path
-
-set(SDL2_PATH "" CACHE STRING "Custom SDL2 Library path")
-
-set(_SDL2_NO_DEFAULT_PATH OFF)
-if(SDL2_PATH)
- set(_SDL2_NO_DEFAULT_PATH ON)
-endif()
-
-set(SDL2_NO_DEFAULT_PATH ${_SDL2_NO_DEFAULT_PATH}
- CACHE BOOL "Disable search SDL2 Library in default path")
-unset(_SDL2_NO_DEFAULT_PATH)
-
-set(SDL2_NO_DEFAULT_PATH_CMD)
-if(SDL2_NO_DEFAULT_PATH)
- set(SDL2_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
-endif()
-
-# Search for the SDL2 include directory
-find_path(SDL2_INCLUDE_DIR SDL.h
- HINTS
- ENV SDL2DIR
- ${SDL2_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES SDL2
- # path suffixes to search inside ENV{SDL2DIR}
- include/SDL2 include
- PATHS ${SDL2_PATH}
- DOC "Where the SDL2 headers can be found"
-)
-
-set(SDL2_INCLUDE_DIRS "${SDL2_INCLUDE_DIR}")
-
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(VC_LIB_PATH_SUFFIX lib/x64)
-else()
- set(VC_LIB_PATH_SUFFIX lib/x86)
-endif()
-
-# SDL-2.0 is the name used by FreeBSD ports...
-# don't confuse it for the version number.
-find_library(SDL2_LIBRARY
- NAMES SDL2 SDL-2.0
- HINTS
- ENV SDL2DIR
- ${SDL2_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
- PATHS ${SDL2_PATH}
- DOC "Where the SDL2 Library can be found"
-)
-
-set(SDL2_LIBRARIES "${SDL2_LIBRARY}")
-
-if(NOT SDL2_BUILDING_LIBRARY)
- if(NOT SDL2_INCLUDE_DIR MATCHES ".framework")
- # Non-OS X framework versions expect you to also dynamically link to
- # SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
- # seem to provide SDL2main for compatibility even though they don't
- # necessarily need it.
-
- if(SDL2_PATH)
- set(SDL2MAIN_LIBRARY_PATHS "${SDL2_PATH}")
- endif()
-
- if(NOT SDL2_NO_DEFAULT_PATH)
- set(SDL2MAIN_LIBRARY_PATHS
- /sw
- /opt/local
- /opt/csw
- /opt
- "${SDL2MAIN_LIBRARY_PATHS}"
- )
- endif()
-
- find_library(SDL2MAIN_LIBRARY
- NAMES SDL2main
- HINTS
- ENV SDL2DIR
- ${SDL2_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
- PATHS ${SDL2MAIN_LIBRARY_PATHS}
- DOC "Where the SDL2main library can be found"
- )
- unset(SDL2MAIN_LIBRARY_PATHS)
- endif()
-endif()
-
-# SDL2 may require threads on your system.
-# The Apple build may not need an explicit flag because one of the
-# frameworks may already provide it.
-# But for non-OSX systems, I will use the CMake Threads package.
-if(NOT APPLE)
- find_package(Threads QUIET)
- if(NOT Threads_FOUND)
- set(SDL2_THREADS_NOT_FOUND "Could NOT find Threads (Threads is required by SDL2).")
- if(SDL2_FIND_REQUIRED)
- message(FATAL_ERROR ${SDL2_THREADS_NOT_FOUND})
- else()
- if(NOT SDL2_FIND_QUIETLY)
- message(STATUS ${SDL2_THREADS_NOT_FOUND})
- endif()
- return()
- endif()
- unset(SDL2_THREADS_NOT_FOUND)
- endif()
-endif()
-
-# MinGW needs an additional link flag, -mwindows
-# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -mwindows
-if(MINGW)
- set(MINGW32_LIBRARY mingw32 "-mwindows" CACHE STRING "link flags for MinGW")
-endif()
-
-if(SDL2_LIBRARY)
- # For SDL2main
- if(SDL2MAIN_LIBRARY AND NOT SDL2_BUILDING_LIBRARY)
- list(FIND SDL2_LIBRARIES "${SDL2MAIN_LIBRARY}" _SDL2_MAIN_INDEX)
- if(_SDL2_MAIN_INDEX EQUAL -1)
- set(SDL2_LIBRARIES "${SDL2MAIN_LIBRARY}" ${SDL2_LIBRARIES})
- endif()
- unset(_SDL2_MAIN_INDEX)
- endif()
-
- # For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
- # CMake doesn't display the -framework Cocoa string in the UI even
- # though it actually is there if I modify a pre-used variable.
- # I think it has something to do with the CACHE STRING.
- # So I use a temporary variable until the end so I can set the
- # "real" variable in one-shot.
- if(APPLE)
- set(SDL2_LIBRARIES ${SDL2_LIBRARIES} -framework Cocoa)
- endif()
-
- # For threads, as mentioned Apple doesn't need this.
- # In fact, there seems to be a problem if I used the Threads package
- # and try using this line, so I'm just skipping it entirely for OS X.
- if(NOT APPLE)
- set(SDL2_LIBRARIES ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
- endif()
-
- # For MinGW library
- if(MINGW)
- set(SDL2_LIBRARIES ${MINGW32_LIBRARY} ${SDL2_LIBRARIES})
- endif()
-
-endif()
-
-# Read SDL2 version
-if(SDL2_INCLUDE_DIR AND EXISTS "${SDL2_INCLUDE_DIR}/SDL_version.h")
- file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_MINOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_INCLUDE_DIR}/SDL_version.h" SDL2_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_PATCHLEVEL[ \t]+[0-9]+$")
- string(REGEX REPLACE "^#define[ \t]+SDL_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MAJOR "${SDL2_VERSION_MAJOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_MINOR "${SDL2_VERSION_MINOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_VERSION_PATCH "${SDL2_VERSION_PATCH_LINE}")
- set(SDL2_VERSION_STRING ${SDL2_VERSION_MAJOR}.${SDL2_VERSION_MINOR}.${SDL2_VERSION_PATCH})
- unset(SDL2_VERSION_MAJOR_LINE)
- unset(SDL2_VERSION_MINOR_LINE)
- unset(SDL2_VERSION_PATCH_LINE)
- unset(SDL2_VERSION_MAJOR)
- unset(SDL2_VERSION_MINOR)
- unset(SDL2_VERSION_PATCH)
-endif()
-
-include(FindPackageHandleStandardArgs)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2
- REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR
- VERSION_VAR SDL2_VERSION_STRING)
-
-if(SDL2MAIN_LIBRARY)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2main
- REQUIRED_VARS SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR
- VERSION_VAR SDL2_VERSION_STRING)
-endif()
-
-
-mark_as_advanced(SDL2_PATH
- SDL2_NO_DEFAULT_PATH
- SDL2_LIBRARY
- SDL2MAIN_LIBRARY
- SDL2_INCLUDE_DIR
- SDL2_BUILDING_LIBRARY)
-
-
-# SDL2:: targets (SDL2::Core and SDL2::Main)
-if(SDL2_FOUND)
-
- # SDL2::Core target
- if(SDL2_LIBRARY AND NOT TARGET SDL2::Core)
- add_library(SDL2::Core UNKNOWN IMPORTED)
- set_target_properties(SDL2::Core PROPERTIES
- IMPORTED_LOCATION "${SDL2_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${SDL2_INCLUDE_DIR}")
-
- if(APPLE)
- # For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
- # For more details, please see above.
- set_property(TARGET SDL2::Core APPEND PROPERTY
- INTERFACE_LINK_OPTIONS -framework Cocoa)
- else()
- # For threads, as mentioned Apple doesn't need this.
- # For more details, please see above.
- set_property(TARGET SDL2::Core APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES Threads::Threads)
- endif()
- endif()
-
- # SDL2::Main target
- # Applications should link to SDL2::Main instead of SDL2::Core
- # For more details, please see above.
- if(NOT SDL2_BUILDING_LIBRARY AND NOT TARGET SDL2::Main)
-
- if(SDL2_INCLUDE_DIR MATCHES ".framework" OR NOT SDL2MAIN_LIBRARY)
- add_library(SDL2::Main INTERFACE IMPORTED)
- set_property(TARGET SDL2::Main PROPERTY
- INTERFACE_LINK_LIBRARIES SDL2::Core)
- elseif(SDL2MAIN_LIBRARY)
- # MinGW requires that the mingw32 library is specified before the
- # libSDL2main.a static library when linking.
- # The SDL2::MainInternal target is used internally to make sure that
- # CMake respects this condition.
- add_library(SDL2::MainInternal UNKNOWN IMPORTED)
- set_property(TARGET SDL2::MainInternal PROPERTY
- IMPORTED_LOCATION "${SDL2MAIN_LIBRARY}")
- set_property(TARGET SDL2::MainInternal PROPERTY
- INTERFACE_LINK_LIBRARIES SDL2::Core)
-
- add_library(SDL2::Main INTERFACE IMPORTED)
-
- if(MINGW)
- # MinGW needs an additional link flag '-mwindows' and link to mingw32
- set_property(TARGET SDL2::Main PROPERTY
- INTERFACE_LINK_LIBRARIES "mingw32" "-mwindows")
- endif()
-
- set_property(TARGET SDL2::Main APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES SDL2::MainInternal)
- endif()
-
- endif()
-endif()
diff --git a/cmake/FindSDL2_image.cmake b/cmake/FindSDL2_image.cmake
deleted file mode 100755
index 624e915..0000000
--- a/cmake/FindSDL2_image.cmake
+++ /dev/null
@@ -1,222 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
-# Copyright 2019 Amine Ben Hassouna
-# Copyright 2000-2019 Kitware, Inc. and Contributors
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-
-# * Neither the name of Kitware, Inc. nor the names of Contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#[=======================================================================[.rst:
-FindSDL2_image
---------------
-
-Locate SDL2_image library
-
-This module defines the following 'IMPORTED' target:
-
-::
-
- SDL2::Image
- The SDL2_image library, if found.
- Have SDL2::Core as a link dependency.
-
-
-
-This module will set the following variables in your project:
-
-::
-
- SDL2_IMAGE_LIBRARIES, the name of the library to link against
- SDL2_IMAGE_INCLUDE_DIRS, where to find the headers
- SDL2_IMAGE_FOUND, if false, do not try to link against
- SDL2_IMAGE_VERSION_STRING - human-readable string containing the
- version of SDL2_image
-
-
-
-This module responds to the following cache variables:
-
-::
-
- SDL2_IMAGE_PATH
- Set a custom SDL2_image Library path (default: empty)
-
- SDL2_IMAGE_NO_DEFAULT_PATH
- Disable search SDL2_image Library in default path.
- If SDL2_IMAGE_PATH (default: ON)
- Else (default: OFF)
-
- SDL2_IMAGE_INCLUDE_DIR
- SDL2_image headers path.
-
- SDL2_IMAGE_LIBRARY
- SDL2_image Library (.dll, .so, .a, etc) path.
-
-
-Additional Note: If you see an empty SDL2_IMAGE_LIBRARY in your project
-configuration, it means CMake did not find your SDL2_image library
-(SDL2_image.dll, libsdl2_image.so, etc). Set SDL2_IMAGE_LIBRARY to point
-to your SDL2_image library, and configure again. This value is used to
-generate the final SDL2_IMAGE_LIBRARIES variable and the SDL2::Image target,
-but when this value is unset, SDL2_IMAGE_LIBRARIES and SDL2::Image does not
-get created.
-
-
-$SDL2IMAGEDIR is an environment variable that would correspond to the
-./configure --prefix=$SDL2IMAGEDIR used in building SDL2_image.
-
-$SDL2DIR is an environment variable that would correspond to the
-./configure --prefix=$SDL2DIR used in building SDL2.
-
-
-
-Created by Amine Ben Hassouna:
- Adapt FindSDL_image.cmake to SDL2_image (FindSDL2_image.cmake).
- Add cache variables for more flexibility:
- SDL2_IMAGE_PATH, SDL2_IMAGE_NO_DEFAULT_PATH (for details, see doc above).
- Add SDL2 as a required dependency.
- Modernize the FindSDL2_image.cmake module by creating a specific target:
- SDL2::Image (for details, see doc above).
-
-Original FindSDL_image.cmake module:
- Created by Eric Wing. This was influenced by the FindSDL.cmake
- module, but with modifications to recognize OS X frameworks and
- additional Unix paths (FreeBSD, etc).
-#]=======================================================================]
-
-# SDL2 Library required
-find_package(SDL2 QUIET)
-if(NOT SDL2_FOUND)
- set(SDL2_IMAGE_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_image).")
- if(SDL2_image_FIND_REQUIRED)
- message(FATAL_ERROR ${SDL2_IMAGE_SDL2_NOT_FOUND})
- else()
- if(NOT SDL2_image_FIND_QUIETLY)
- message(STATUS ${SDL2_IMAGE_SDL2_NOT_FOUND})
- endif()
- return()
- endif()
- unset(SDL2_IMAGE_SDL2_NOT_FOUND)
-endif()
-
-
-# Define options for searching SDL2_image Library in a custom path
-
-set(SDL2_IMAGE_PATH "" CACHE STRING "Custom SDL2_image Library path")
-
-set(_SDL2_IMAGE_NO_DEFAULT_PATH OFF)
-if(SDL2_IMAGE_PATH)
- set(_SDL2_IMAGE_NO_DEFAULT_PATH ON)
-endif()
-
-set(SDL2_IMAGE_NO_DEFAULT_PATH ${_SDL2_IMAGE_NO_DEFAULT_PATH}
- CACHE BOOL "Disable search SDL2_image Library in default path")
-unset(_SDL2_IMAGE_NO_DEFAULT_PATH)
-
-set(SDL2_IMAGE_NO_DEFAULT_PATH_CMD)
-if(SDL2_IMAGE_NO_DEFAULT_PATH)
- set(SDL2_IMAGE_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
-endif()
-
-# Search for the SDL2_image include directory
-find_path(SDL2_IMAGE_INCLUDE_DIR SDL_image.h
- HINTS
- ENV SDL2IMAGEDIR
- ENV SDL2DIR
- ${SDL2_IMAGE_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES SDL2
- # path suffixes to search inside ENV{SDL2DIR}
- # and ENV{SDL2IMAGEDIR}
- include/SDL2 include
- PATHS ${SDL2_IMAGE_PATH}
- DOC "Where the SDL2_image headers can be found"
-)
-
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(VC_LIB_PATH_SUFFIX lib/x64)
-else()
- set(VC_LIB_PATH_SUFFIX lib/x86)
-endif()
-
-# Search for the SDL2_image library
-find_library(SDL2_IMAGE_LIBRARY
- NAMES SDL2_image
- HINTS
- ENV SDL2IMAGEDIR
- ENV SDL2DIR
- ${SDL2_IMAGE_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
- PATHS ${SDL2_IMAGE_PATH}
- DOC "Where the SDL2_image Library can be found"
-)
-
-# Read SDL2_image version
-if(SDL2_IMAGE_INCLUDE_DIR AND EXISTS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h")
- file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_IMAGE_INCLUDE_DIR}/SDL_image.h" SDL2_IMAGE_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+[0-9]+$")
- string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MAJOR "${SDL2_IMAGE_VERSION_MAJOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_MINOR "${SDL2_IMAGE_VERSION_MINOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_IMAGE_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_IMAGE_VERSION_PATCH "${SDL2_IMAGE_VERSION_PATCH_LINE}")
- set(SDL2_IMAGE_VERSION_STRING ${SDL2_IMAGE_VERSION_MAJOR}.${SDL2_IMAGE_VERSION_MINOR}.${SDL2_IMAGE_VERSION_PATCH})
- unset(SDL2_IMAGE_VERSION_MAJOR_LINE)
- unset(SDL2_IMAGE_VERSION_MINOR_LINE)
- unset(SDL2_IMAGE_VERSION_PATCH_LINE)
- unset(SDL2_IMAGE_VERSION_MAJOR)
- unset(SDL2_IMAGE_VERSION_MINOR)
- unset(SDL2_IMAGE_VERSION_PATCH)
-endif()
-
-set(SDL2_IMAGE_LIBRARIES ${SDL2_IMAGE_LIBRARY})
-set(SDL2_IMAGE_INCLUDE_DIRS ${SDL2_IMAGE_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_image
- REQUIRED_VARS SDL2_IMAGE_LIBRARIES SDL2_IMAGE_INCLUDE_DIRS
- VERSION_VAR SDL2_IMAGE_VERSION_STRING)
-
-
-mark_as_advanced(SDL2_IMAGE_PATH
- SDL2_IMAGE_NO_DEFAULT_PATH
- SDL2_IMAGE_LIBRARY
- SDL2_IMAGE_INCLUDE_DIR)
-
-
-if(SDL2_IMAGE_FOUND)
-
- # SDL2::Image target
- if(SDL2_IMAGE_LIBRARY AND NOT TARGET SDL2::Image)
- add_library(SDL2::Image UNKNOWN IMPORTED)
- set_target_properties(SDL2::Image PROPERTIES
- IMPORTED_LOCATION "${SDL2_IMAGE_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${SDL2_IMAGE_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES SDL2::Core)
- endif()
-endif()
diff --git a/cmake/FindSDL2_ttf.cmake b/cmake/FindSDL2_ttf.cmake
deleted file mode 100755
index 2ab9a76..0000000
--- a/cmake/FindSDL2_ttf.cmake
+++ /dev/null
@@ -1,222 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
-# Copyright 2019 Amine Ben Hassouna
-# Copyright 2000-2019 Kitware, Inc. and Contributors
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-
-# * Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-
-# * Neither the name of Kitware, Inc. nor the names of Contributors
-# may be used to endorse or promote products derived from this
-# software without specific prior written permission.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-#[=======================================================================[.rst:
-FindSDL2_ttf
-------------
-
-Locate SDL2_ttf library
-
-This module defines the following 'IMPORTED' target:
-
-::
-
- SDL2::TTF
- The SDL2_ttf library, if found.
- Have SDL2::Core as a link dependency.
-
-
-
-This module will set the following variables in your project:
-
-::
-
- SDL2_TTF_LIBRARIES, the name of the library to link against
- SDL2_TTF_INCLUDE_DIRS, where to find the headers
- SDL2_TTF_FOUND, if false, do not try to link against
- SDL2_TTF_VERSION_STRING - human-readable string containing the
- version of SDL2_ttf
-
-
-
-This module responds to the following cache variables:
-
-::
-
- SDL2_TTF_PATH
- Set a custom SDL2_ttf Library path (default: empty)
-
- SDL2_TTF_NO_DEFAULT_PATH
- Disable search SDL2_ttf Library in default path.
- If SDL2_TTF_PATH (default: ON)
- Else (default: OFF)
-
- SDL2_TTF_INCLUDE_DIR
- SDL2_ttf headers path.
-
- SDL2_TTF_LIBRARY
- SDL2_ttf Library (.dll, .so, .a, etc) path.
-
-
-Additional Note: If you see an empty SDL2_TTF_LIBRARY in your project
-configuration, it means CMake did not find your SDL2_ttf library
-(SDL2_ttf.dll, libsdl2_ttf.so, etc). Set SDL2_TTF_LIBRARY to point
-to your SDL2_ttf library, and configure again. This value is used to
-generate the final SDL2_TTF_LIBRARIES variable and the SDL2::TTF target,
-but when this value is unset, SDL2_TTF_LIBRARIES and SDL2::TTF does not
-get created.
-
-
-$SDL2TTFDIR is an environment variable that would correspond to the
-./configure --prefix=$SDL2TTFDIR used in building SDL2_ttf.
-
-$SDL2DIR is an environment variable that would correspond to the
-./configure --prefix=$SDL2DIR used in building SDL2.
-
-
-
-Created by Amine Ben Hassouna:
- Adapt FindSDL_ttf.cmake to SDL2_ttf (FindSDL2_ttf.cmake).
- Add cache variables for more flexibility:
- SDL2_TTF_PATH, SDL2_TTF_NO_DEFAULT_PATH (for details, see doc above).
- Add SDL2 as a required dependency.
- Modernize the FindSDL2_ttf.cmake module by creating a specific target:
- SDL2::TTF (for details, see doc above).
-
-Original FindSDL_ttf.cmake module:
- Created by Eric Wing. This was influenced by the FindSDL.cmake
- module, but with modifications to recognize OS X frameworks and
- additional Unix paths (FreeBSD, etc).
-#]=======================================================================]
-
-# SDL2 Library required
-find_package(SDL2 QUIET)
-if(NOT SDL2_FOUND)
- set(SDL2_TTF_SDL2_NOT_FOUND "Could NOT find SDL2 (SDL2 is required by SDL2_ttf).")
- if(SDL2_ttf_FIND_REQUIRED)
- message(FATAL_ERROR ${SDL2_TTF_SDL2_NOT_FOUND})
- else()
- if(NOT SDL2_ttf_FIND_QUIETLY)
- message(STATUS ${SDL2_TTF_SDL2_NOT_FOUND})
- endif()
- return()
- endif()
- unset(SDL2_TTF_SDL2_NOT_FOUND)
-endif()
-
-
-# Define options for searching SDL2_ttf Library in a custom path
-
-set(SDL2_TTF_PATH "" CACHE STRING "Custom SDL2_ttf Library path")
-
-set(_SDL2_TTF_NO_DEFAULT_PATH OFF)
-if(SDL2_TTF_PATH)
- set(_SDL2_TTF_NO_DEFAULT_PATH ON)
-endif()
-
-set(SDL2_TTF_NO_DEFAULT_PATH ${_SDL2_TTF_NO_DEFAULT_PATH}
- CACHE BOOL "Disable search SDL2_ttf Library in default path")
-unset(_SDL2_TTF_NO_DEFAULT_PATH)
-
-set(SDL2_TTF_NO_DEFAULT_PATH_CMD)
-if(SDL2_TTF_NO_DEFAULT_PATH)
- set(SDL2_TTF_NO_DEFAULT_PATH_CMD NO_DEFAULT_PATH)
-endif()
-
-# Search for the SDL2_ttf include directory
-find_path(SDL2_TTF_INCLUDE_DIR SDL_ttf.h
- HINTS
- ENV SDL2TTFDIR
- ENV SDL2DIR
- ${SDL2_TTF_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES SDL2
- # path suffixes to search inside ENV{SDL2DIR}
- # and ENV{SDL2TTFDIR}
- include/SDL2 include
- PATHS ${SDL2_TTF_PATH}
- DOC "Where the SDL2_ttf headers can be found"
-)
-
-if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- set(VC_LIB_PATH_SUFFIX lib/x64)
-else()
- set(VC_LIB_PATH_SUFFIX lib/x86)
-endif()
-
-# Search for the SDL2_ttf library
-find_library(SDL2_TTF_LIBRARY
- NAMES SDL2_ttf
- HINTS
- ENV SDL2TTFDIR
- ENV SDL2DIR
- ${SDL2_TTF_NO_DEFAULT_PATH_CMD}
- PATH_SUFFIXES lib ${VC_LIB_PATH_SUFFIX}
- PATHS ${SDL2_TTF_PATH}
- DOC "Where the SDL2_ttf Library can be found"
-)
-
-# Read SDL2_ttf version
-if(SDL2_TTF_INCLUDE_DIR AND EXISTS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h")
- file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_MAJOR_LINE REGEX "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_MINOR_LINE REGEX "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+[0-9]+$")
- file(STRINGS "${SDL2_TTF_INCLUDE_DIR}/SDL_ttf.h" SDL2_TTF_VERSION_PATCH_LINE REGEX "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+[0-9]+$")
- string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MAJOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MAJOR "${SDL2_TTF_VERSION_MAJOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_TTF_MINOR_VERSION[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_MINOR "${SDL2_TTF_VERSION_MINOR_LINE}")
- string(REGEX REPLACE "^#define[ \t]+SDL_TTF_PATCHLEVEL[ \t]+([0-9]+)$" "\\1" SDL2_TTF_VERSION_PATCH "${SDL2_TTF_VERSION_PATCH_LINE}")
- set(SDL2_TTF_VERSION_STRING ${SDL2_TTF_VERSION_MAJOR}.${SDL2_TTF_VERSION_MINOR}.${SDL2_TTF_VERSION_PATCH})
- unset(SDL2_TTF_VERSION_MAJOR_LINE)
- unset(SDL2_TTF_VERSION_MINOR_LINE)
- unset(SDL2_TTF_VERSION_PATCH_LINE)
- unset(SDL2_TTF_VERSION_MAJOR)
- unset(SDL2_TTF_VERSION_MINOR)
- unset(SDL2_TTF_VERSION_PATCH)
-endif()
-
-set(SDL2_TTF_LIBRARIES ${SDL2_TTF_LIBRARY})
-set(SDL2_TTF_INCLUDE_DIRS ${SDL2_TTF_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_ttf
- REQUIRED_VARS SDL2_TTF_LIBRARIES SDL2_TTF_INCLUDE_DIRS
- VERSION_VAR SDL2_TTF_VERSION_STRING)
-
-
-mark_as_advanced(SDL2_TTF_PATH
- SDL2_TTF_NO_DEFAULT_PATH
- SDL2_TTF_LIBRARY
- SDL2_TTF_INCLUDE_DIR)
-
-
-if(SDL2_TTF_FOUND)
-
- # SDL2::TTF target
- if(SDL2_TTF_LIBRARY AND NOT TARGET SDL2::TTF)
- add_library(SDL2::TTF UNKNOWN IMPORTED)
- set_target_properties(SDL2::TTF PROPERTIES
- IMPORTED_LOCATION "${SDL2_TTF_LIBRARY}"
- INTERFACE_INCLUDE_DIRECTORIES "${SDL2_TTF_INCLUDE_DIR}"
- INTERFACE_LINK_LIBRARIES SDL2::Core)
- endif()
-endif()
diff --git a/config/PKGBUILD.in b/config/PKGBUILD.in
index 2f47b12..1c7c5fe 100644
--- a/config/PKGBUILD.in
+++ b/config/PKGBUILD.in
@@ -7,7 +7,7 @@ arch=('x86_64')
url="@CMAKE_PROJECT_HOMEPAGE_URL@"
license=('Unlicense')
#groups=()
-depends=('sdl2' 'sdl2_image' 'sdl2_ttf')
+depends=('sdl2' 'sdl2_image' 'sdl2_ttf' 'libinih')
makedepends=('cmake')
#checkdepends=()
#optdepends=()
diff --git a/config/config.ini.in b/config/config.ini.in
index 6b7afcb..3cc8b55 100644
--- a/config/config.ini.in
+++ b/config/config.ini.in
@@ -1,33 +1,64 @@
# @PROJECT_NAME@ v@PROJECT_VERSION@ sample configuration file
-# For documentation of these settings, visit: https://github.com/complexlogic/flex-launcher/blob/master/extra/docs/configuration.md
-[Settings]
+# For documentation of these settings, visit: https://complexlogic.github.io/flex-launcher/configuration
+[General]
@SETTING_DEFAULT_MENU@=@DEFAULT_MENU@
-@SETTING_MAX_BUTTONS@=@DEFAULT_MAX_BUTTONS@
+@SETTING_VSYNC@=@DEFAULT_VSYNC@
+#@SETTING_FPS_LIMIT@=
+#@SETTING_APPLICATION_TIMEOUT@=@DEFAULT_APPLICATION_TIMEOUT@
+@SETTING_ON_LAUNCH@=@DEFAULT_ON_LAUNCH@
+@SETTING_WRAP_ENTRIES@=@DEFAULT_WRAP_ENTRIES@
+@SETTING_RESET_ON_BACK@=@DEFAULT_RESET_ON_BACK@
+@SETTING_MOUSE_SELECT@=@DEFAULT_MOUSE_SELECT@
+@SETTING_INHIBIT_OS_SCREENSAVER@=@DEFAULT_INHIBIT_OS_SCREENSAVER@
+#@SETTING_STARTUP_CMD@=
+#@SETTING_QUIT_CMD@=
+
+[Background]
@SETTING_BACKGROUND_MODE@=@DEFAULT_BACKGROUND_MODE@
-@SETTING_BACKGROUND_COLOR@=@DEFAULT_BACKGROUND_COLOR_R@@DEFAULT_BACKGROUND_COLOR_G@@DEFAULT_BACKGROUND_COLOR_B@
+@SETTING_BACKGROUND_COLOR@=#@DEFAULT_BACKGROUND_COLOR_R@@DEFAULT_BACKGROUND_COLOR_G@@DEFAULT_BACKGROUND_COLOR_B@
#@SETTING_BACKGROUND_IMAGE@=
#@SETTING_SLIDESHOW_DIRECTORY@=
#@SETTING_SLIDESHOW_IMAGE_DURATION@=@DEFAULT_SLIDESHOW_IMAGE_DURATION_CONFIG@
#@SETTING_SLIDESHOW_TRANSITION_TIME@=@DEFAULT_SLIDESHOW_TRANSITION_TIME_CONFIG@
+#@SETTING_CHROMA_KEY_COLOR@=#@DEFAULT_CHROMA_KEY_COLOR_R@@DEFAULT_CHROMA_KEY_COLOR_G@@DEFAULT_CHROMA_KEY_COLOR_B@
+@SETTING_BACKGROUND_OVERLAY@=@DEFAULT_BACKGROUND_OVERLAY@
+@SETTING_BACKGROUND_OVERLAY_COLOR@=#@DEFAULT_BACKGROUND_OVERLAY_COLOR_R@@DEFAULT_BACKGROUND_OVERLAY_COLOR_G@@DEFAULT_BACKGROUND_OVERLAY_COLOR_B@
+@SETTING_BACKGROUND_OVERLAY_OPACITY@=@DEFAULT_BACKGROUND_OVERLAY_OPACITY@
+
+[Layout]
+@SETTING_MAX_BUTTONS@=@DEFAULT_MAX_BUTTONS@
@SETTING_ICON_SIZE@=@DEFAULT_ICON_SIZE@
@SETTING_ICON_SPACING@=@DEFAULT_ICON_SPACING@
+@SETTING_VCENTER@=@DEFAULT_VCENTER@
+
+[Titles]
+@SETTING_TITLES_ENABLED@=@DEFAULT_TITLES_ENABLED@
@SETTING_TITLE_FONT@=@FONT_PREFIX@@DEFAULT_FONT@
@SETTING_TITLE_FONT_SIZE@=@DEFAULT_FONT_SIZE@
-@SETTING_TITLE_COLOR@=@DEFAULT_TITLE_COLOR_R@@DEFAULT_TITLE_COLOR_G@@DEFAULT_TITLE_COLOR_B@
+@SETTING_TITLE_FONT_COLOR@=#@DEFAULT_TITLE_FONT_COLOR_R@@DEFAULT_TITLE_FONT_COLOR_G@@DEFAULT_TITLE_FONT_COLOR_B@
@SETTING_TITLE_OPACITY@=@DEFAULT_TITLE_OPACITY@
+@SETTING_TITLE_SHADOWS@=@DEFAULT_TITLE_SHADOWS@
+@SETTING_TITLE_SHADOW_COLOR@=#@DEFAULT_TITLE_SHADOW_COLOR_R@@DEFAULT_TITLE_SHADOW_COLOR_G@@DEFAULT_TITLE_SHADOW_COLOR_B@
@SETTING_TITLE_OVERSIZE_MODE@=@DEFAULT_TITLE_OVERSIZE_MODE@
@SETTING_TITLE_PADDING@=@DEFAULT_TITLE_PADDING@
-@SETTING_HIGHLIGHT_COLOR@=@DEFAULT_HIGHLIGHT_COLOR_R@@DEFAULT_HIGHLIGHT_COLOR_G@@DEFAULT_HIGHLIGHT_COLOR_B@
-@SETTING_HIGHLIGHT_OPACITY@=@DEFAULT_HIGHLIGHT_OPACITY@
+
+[Highlight]
+@SETTING_HIGHLIGHT_ENABLED@=@DEFAULT_HIGHLIGHT_ENABLED@
+@SETTING_HIGHLIGHT_FILL_COLOR@=#@DEFAULT_HIGHLIGHT_FILL_COLOR_R@@DEFAULT_HIGHLIGHT_FILL_COLOR_G@@DEFAULT_HIGHLIGHT_FILL_COLOR_B@
+@SETTING_HIGHLIGHT_FILL_OPACITY@=@DEFAULT_HIGHLIGHT_FILL_OPACITY@
+@SETTING_HIGHLIGHT_OUTLINE_SIZE@=@DEFAULT_HIGHLIGHT_OUTLINE_SIZE@
+@SETTING_HIGHLIGHT_OUTLINE_COLOR@=#@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_R@@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_G@@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_B@
+@SETTING_HIGHLIGHT_OUTLINE_OPACITY@=@DEFAULT_HIGHLIGHT_OUTLINE_OPACITY@
@SETTING_HIGHLIGHT_CORNER_RADIUS@=@DEFAULT_HIGHLIGHT_CORNER_RADIUS@
@SETTING_HIGHLIGHT_VPADDING@=@DEFAULT_HIGHLIGHT_VPADDING@
@SETTING_HIGHLIGHT_HPADDING@=@DEFAULT_HIGHLIGHT_HPADDING@
-@SETTING_BUTTON_CENTERLINE@=@DEFAULT_BUTTON_CENTERLINE@
+
+[Scroll Indicators]
@SETTING_SCROLL_INDICATORS@=@DEFAULT_SCROLL_INDICATORS@
-@SETTING_SCROLL_INDICATOR_COLOR@=@DEFAULT_SCROLL_INDICATOR_COLOR_R@@DEFAULT_SCROLL_INDICATOR_COLOR_G@@DEFAULT_SCROLL_INDICATOR_COLOR_B@
+@SETTING_SCROLL_INDICATOR_FILL_COLOR@=#@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_R@@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_G@@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_B@
+@SETTING_SCROLL_INDICATOR_OUTLINE_SIZE@=@DEFAULT_SCROLL_INDICATOR_OUTLINE_SIZE@
+@SETTING_SCROLL_INDICATOR_OUTLINE_COLOR@=#@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_R@@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_G@@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_B@
@SETTING_SCROLL_INDICATOR_OPACITY@=@DEFAULT_SCROLL_INDICATOR_OPACITY@
-@SETTING_ON_LAUNCH@=@DEFAULT_ON_LAUNCH@
-@SETTING_RESET_ON_BACK@=@DEFAULT_RESET_ON_BACK@
[Clock]
@SETTING_CLOCK_ENABLED@=@DEFAULT_CLOCK_ENABLED@
@@ -35,8 +66,10 @@
@SETTING_CLOCK_ALIGNMENT@=@DEFAULT_CLOCK_ALIGNMENT@
@SETTING_CLOCK_FONT@=@FONT_PREFIX@@DEFAULT_CLOCK_FONT@
@SETTING_CLOCK_FONT_SIZE@=@DEFAULT_CLOCK_FONT_SIZE@
+@SETTING_CLOCK_FONT_COLOR@=#@DEFAULT_CLOCK_FONT_COLOR_R@@DEFAULT_CLOCK_FONT_COLOR_G@@DEFAULT_CLOCK_FONT_COLOR_B@
+@SETTING_CLOCK_SHADOWS@=@DEFAULT_CLOCK_SHADOWS@
+@SETTING_CLOCK_SHADOW_COLOR@=#@DEFAULT_CLOCK_SHADOW_COLOR_R@@DEFAULT_CLOCK_SHADOW_COLOR_G@@DEFAULT_CLOCK_SHADOW_COLOR_B@
@SETTING_CLOCK_MARGIN@=@DEFAULT_CLOCK_MARGIN@
-@SETTING_CLOCK_COLOR@=@DEFAULT_CLOCK_COLOR_R@@DEFAULT_CLOCK_COLOR_G@@DEFAULT_CLOCK_COLOR_B@
@SETTING_CLOCK_OPACITY@=@DEFAULT_CLOCK_OPACITY@
@SETTING_CLOCK_TIME_FORMAT@=@DEFAULT_CLOCK_TIME_FORMAT@
@SETTING_CLOCK_DATE_FORMAT@=@DEFAULT_CLOCK_DATE_FORMAT@
@@ -50,11 +83,11 @@
[Hotkeys]
# Esc to quit
-Hotkey1=1B;:quit
+Hotkey1=#1B;:quit
[Gamepad]
@SETTING_GAMEPAD_ENABLED@=@DEFAULT_GAMEPAD_ENABLED@
-#@SETTING_GAMEPAD_DEVICE@=@DEFAULT_GAMEPAD_DEVICE@
+@SETTING_GAMEPAD_DEVICE@=@DEFAULT_GAMEPAD_DEVICE@
#@SETTING_GAMEPAD_MAPPINGS_FILE@=
@SETTING_GAMEPAD_LSTICK_XM@=:left
@SETTING_GAMEPAD_LSTICK_XP@=:right
diff --git a/config/config_settings.cmake b/config/config_settings.cmake
new file mode 100644
index 0000000..13f22df
--- /dev/null
+++ b/config/config_settings.cmake
@@ -0,0 +1,192 @@
+# Config setting keys
+set(SETTING_DEFAULT_MENU "DefaultMenu")
+set(SETTING_MAX_BUTTONS "MaxButtons")
+set(SETTING_VSYNC "VSync")
+set(SETTING_FPS_LIMIT "FPSLimit")
+set(SETTING_APPLICATION_TIMEOUT "ApplicationTimeout")
+set(SETTING_WRAP_ENTRIES "WrapEntries")
+set(SETTING_BACKGROUND_MODE "Mode")
+set(SETTING_BACKGROUND_COLOR "Color")
+set(SETTING_BACKGROUND_IMAGE "Image")
+set(SETTING_SLIDESHOW_DIRECTORY "SlideshowDirectory")
+set(SETTING_SLIDESHOW_IMAGE_DURATION "SlideshowImageDuration")
+set(SETTING_SLIDESHOW_TRANSITION_TIME "SlideshowTransitionTime")
+set(SETTING_CHROMA_KEY_COLOR "ChromaKeyColor")
+set(SETTING_BACKGROUND_OVERLAY "Overlay")
+set(SETTING_BACKGROUND_OVERLAY_COLOR "OverlayColor")
+set(SETTING_BACKGROUND_OVERLAY_OPACITY "OverlayOpacity")
+set(SETTING_ICON_SIZE "IconSize")
+set(SETTING_ICON_SPACING "IconSpacing")
+set(SETTING_TITLES_ENABLED "Enabled")
+set(SETTING_TITLE_FONT "Font")
+set(SETTING_TITLE_FONT_SIZE "FontSize")
+set(SETTING_TITLE_FONT_COLOR "Color")
+set(SETTING_TITLE_SHADOWS "Shadows")
+set(SETTING_TITLE_SHADOW_COLOR "ShadowColor")
+set(SETTING_TITLE_OPACITY "Opacity")
+set(SETTING_TITLE_OVERSIZE_MODE "OversizeMode")
+set(SETTING_TITLE_PADDING "Padding")
+set(SETTING_HIGHLIGHT_ENABLED "Enabled")
+set(SETTING_HIGHLIGHT_FILL_COLOR "FillColor")
+set(SETTING_HIGHLIGHT_FILL_OPACITY "FillOpacity")
+set(SETTING_HIGHLIGHT_OUTLINE_SIZE "OutlineSize")
+set(SETTING_HIGHLIGHT_OUTLINE_COLOR "OutlineColor")
+set(SETTING_HIGHLIGHT_OUTLINE_OPACITY "OutlineOpacity")
+set(SETTING_HIGHLIGHT_CORNER_RADIUS "CornerRadius")
+set(SETTING_HIGHLIGHT_VPADDING "VPadding")
+set(SETTING_HIGHLIGHT_HPADDING "HPadding")
+set(SETTING_VCENTER "VCenter")
+set(SETTING_SCROLL_INDICATORS "Enabled")
+set(SETTING_SCROLL_INDICATOR_FILL_COLOR "FillColor")
+set(SETTING_SCROLL_INDICATOR_OUTLINE_SIZE "OutlineSize")
+set(SETTING_SCROLL_INDICATOR_OUTLINE_COLOR "OutlineColor")
+set(SETTING_SCROLL_INDICATOR_OPACITY "Opacity")
+set(SETTING_ON_LAUNCH "OnLaunch")
+set(SETTING_RESET_ON_BACK "ResetOnBack")
+set(SETTING_MOUSE_SELECT "MouseSelect")
+set(SETTING_INHIBIT_OS_SCREENSAVER "InhibitOSScreensaver")
+set(SETTING_STARTUP_CMD "StartupCmd")
+set(SETTING_QUIT_CMD "QuitCmd")
+set(SETTING_CLOCK_ENABLED "Enabled")
+set(SETTING_CLOCK_SHOW_DATE "ShowDate")
+set(SETTING_CLOCK_ALIGNMENT "Alignment")
+set(SETTING_CLOCK_FONT "Font")
+set(SETTING_CLOCK_FONT_COLOR "FontColor")
+set(SETTING_CLOCK_SHADOWS "Shadows")
+set(SETTING_CLOCK_SHADOW_COLOR "ShadowColor")
+set(SETTING_CLOCK_OPACITY "Opacity")
+set(SETTING_CLOCK_FONT_SIZE "FontSize")
+set(SETTING_CLOCK_MARGIN "Margin")
+set(SETTING_CLOCK_TIME_FORMAT "TimeFormat")
+set(SETTING_CLOCK_DATE_FORMAT "DateFormat")
+set(SETTING_CLOCK_INCLUDE_WEEKDAY "IncludeWeekday")
+set(SETTING_SCREENSAVER_ENABLED "Enabled")
+set(SETTING_SCREENSAVER_IDLE_TIME "IdleTime")
+set(SETTING_SCREENSAVER_INTENSITY "Intensity")
+set(SETTING_SCREENSAVER_PAUSE_SLIDESHOW "PauseSlideshow")
+set(SETTING_GAMEPAD_ENABLED "Enabled")
+set(SETTING_GAMEPAD_DEVICE "DeviceIndex")
+set(SETTING_GAMEPAD_MAPPINGS_FILE "ControllerMappingsFile")
+set(SETTING_GAMEPAD_LSTICK_XM "LStickX-")
+set(SETTING_GAMEPAD_LSTICK_XP "LStickX+")
+set(SETTING_GAMEPAD_LSTICK_YM "LStickY-")
+set(SETTING_GAMEPAD_LSTICK_YP "LStickY+")
+set(SETTING_GAMEPAD_RSTICK_XM "RStickX-")
+set(SETTING_GAMEPAD_RSTICK_XP "RStickX+")
+set(SETTING_GAMEPAD_RSTICK_YM "RStickY-")
+set(SETTING_GAMEPAD_RSTICK_YP "RStickY+")
+set(SETTING_GAMEPAD_LTRIGGER "LTrigger")
+set(SETTING_GAMEPAD_RTRIGGER "RTrigger")
+set(SETTING_GAMEPAD_BUTTON_A "ButtonA")
+set(SETTING_GAMEPAD_BUTTON_B "ButtonB")
+set(SETTING_GAMEPAD_BUTTON_X "ButtonX")
+set(SETTING_GAMEPAD_BUTTON_Y "ButtonY")
+set(SETTING_GAMEPAD_BUTTON_BACK "ButtonBack")
+set(SETTING_GAMEPAD_BUTTON_GUIDE "ButtonGuide")
+set(SETTING_GAMEPAD_BUTTON_START "ButtonStart")
+set(SETTING_GAMEPAD_BUTTON_LEFT_STICK "ButtonLeftStick")
+set(SETTING_GAMEPAD_BUTTON_RIGHT_STICK "ButtonRightStick")
+set(SETTING_GAMEPAD_BUTTON_LEFT_SHOULDER "ButtonLeftShoulder")
+set(SETTING_GAMEPAD_BUTTON_RIGHT_SHOULDER "ButtonRightShoulder")
+set(SETTING_GAMEPAD_BUTTON_DPAD_UP "ButtonDPadUp")
+set(SETTING_GAMEPAD_BUTTON_DPAD_DOWN "ButtonDPadDown")
+set(SETTING_GAMEPAD_BUTTON_DPAD_LEFT "ButtonDPadLeft")
+set(SETTING_GAMEPAD_BUTTON_DPAD_RIGHT "ButtonDPadRight")
+
+# Default settings
+set(DEFAULT_MENU "Main")
+set(DEFAULT_MAX_BUTTONS 4)
+set(DEFAULT_VSYNC "true")
+set(DEFAULT_APPLICATION_TIMEOUT "15")
+set(DEFAULT_WRAP_ENTRIES "false")
+set(DEFAULT_BACKGROUND_MODE "Color")
+set(DEFAULT_BACKGROUND_COLOR_R "00")
+set(DEFAULT_BACKGROUND_COLOR_G "00")
+set(DEFAULT_BACKGROUND_COLOR_B "00")
+set(DEFAULT_SLIDESHOW_IMAGE_DURATION "30000")
+set(DEFAULT_SLIDESHOW_IMAGE_DURATION_CONFIG "30")
+set(DEFAULT_SLIDESHOW_TRANSITION_TIME "1500")
+set(DEFAULT_SLIDESHOW_TRANSITION_TIME_CONFIG "3")
+set(DEFAULT_CHROMA_KEY_COLOR_R "01")
+set(DEFAULT_CHROMA_KEY_COLOR_G "01")
+set(DEFAULT_CHROMA_KEY_COLOR_B "01")
+set(DEFAULT_CHROMA_KEY_COLOR_A "FF")
+set(DEFAULT_BACKGROUND_OVERLAY "false")
+set(DEFAULT_BACKGROUND_OVERLAY_COLOR_R "00")
+set(DEFAULT_BACKGROUND_OVERLAY_COLOR_G "00")
+set(DEFAULT_BACKGROUND_OVERLAY_COLOR_B "00")
+set(DEFAULT_BACKGROUND_OVERLAY_COLOR_A "7F")
+set(DEFAULT_BACKGROUND_OVERLAY_OPACITY "50%")
+set(DEFAULT_ICON_SIZE 256)
+set(DEFAULT_ICON_SPACING "5%")
+set(DEFAULT_FONT "OpenSans-Regular.ttf")
+set(DEFAULT_FONT_SIZE 36)
+set(DEFAULT_TITLES_ENABLED "true")
+set(DEFAULT_TITLE_FONT_COLOR_R "FF")
+set(DEFAULT_TITLE_FONT_COLOR_G "FF")
+set(DEFAULT_TITLE_FONT_COLOR_B "FF")
+set(DEFAULT_TITLE_FONT_COLOR_A "FF")
+set(DEFAULT_TITLE_SHADOWS "false")
+set(DEFAULT_TITLE_SHADOW_COLOR_R "00")
+set(DEFAULT_TITLE_SHADOW_COLOR_G "00")
+set(DEFAULT_TITLE_SHADOW_COLOR_B "00")
+set(DEFAULT_TITLE_SHADOW_COLOR_A "FF")
+set(DEFAULT_TITLE_OPACITY "100%")
+set(DEFAULT_TITLE_OVERSIZE_MODE "Shrink")
+set(DEFAULT_TITLE_PADDING 20)
+set(DEFAULT_HIGHLIGHT_ENABLED "true")
+set(DEFAULT_HIGHLIGHT_FILL_COLOR_R "FF")
+set(DEFAULT_HIGHLIGHT_FILL_COLOR_G "FF")
+set(DEFAULT_HIGHLIGHT_FILL_COLOR_B "FF")
+set(DEFAULT_HIGHLIGHT_FILL_COLOR_A "40")
+set(DEFAULT_HIGHLIGHT_FILL_OPACITY "25%")
+set(DEFAULT_HIGHLIGHT_OUTLINE_SIZE 0)
+set(DEFAULT_HIGHLIGHT_OUTLINE_COLOR_R "00")
+set(DEFAULT_HIGHLIGHT_OUTLINE_COLOR_G "00")
+set(DEFAULT_HIGHLIGHT_OUTLINE_COLOR_B "FF")
+set(DEFAULT_HIGHLIGHT_OUTLINE_COLOR_A "FF")
+set(DEFAULT_HIGHLIGHT_OUTLINE_OPACITY "100%")
+set(DEFAULT_HIGHLIGHT_CORNER_RADIUS 0)
+set(DEFAULT_HIGHLIGHT_VPADDING 30)
+set(DEFAULT_HIGHLIGHT_HPADDING 30)
+set(DEFAULT_VCENTER "50%")
+set(DEFAULT_SCROLL_INDICATORS "true")
+set(DEFAULT_SCROLL_INDICATOR_FILL_COLOR_R "FF")
+set(DEFAULT_SCROLL_INDICATOR_FILL_COLOR_G "FF")
+set(DEFAULT_SCROLL_INDICATOR_FILL_COLOR_B "FF")
+set(DEFAULT_SCROLL_INDICATOR_FILL_COLOR_A "FF")
+set(DEFAULT_SCROLL_INDICATOR_OUTLINE_SIZE 0)
+set(DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_R "00")
+set(DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_G "00")
+set(DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_B "00")
+set(DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_A "FF")
+set(DEFAULT_SCROLL_INDICATOR_OPACITY "100%")
+set(DEFAULT_ON_LAUNCH "Blank")
+set(DEFAULT_RESET_ON_BACK "false")
+set(DEFAULT_INHIBIT_OS_SCREENSAVER "true")
+set(DEFAULT_MOUSE_SELECT "false")
+set(DEFAULT_CLOCK_ENABLED "false")
+set(DEFAULT_CLOCK_SHOW_DATE "false")
+set(DEFAULT_CLOCK_ALIGNMENT "Left")
+set(DEFAULT_CLOCK_FONT "SourceSansPro-Regular.ttf")
+set(DEFAULT_CLOCK_MARGIN "5%")
+set(DEFAULT_CLOCK_FONT_COLOR_R "FF")
+set(DEFAULT_CLOCK_FONT_COLOR_G "FF")
+set(DEFAULT_CLOCK_FONT_COLOR_B "FF")
+set(DEFAULT_CLOCK_FONT_COLOR_A "FF")
+set(DEFAULT_CLOCK_SHADOWS "false")
+set(DEFAULT_CLOCK_SHADOW_COLOR_R "00")
+set(DEFAULT_CLOCK_SHADOW_COLOR_G "00")
+set(DEFAULT_CLOCK_SHADOW_COLOR_B "00")
+set(DEFAULT_CLOCK_SHADOW_COLOR_A "FF")
+set(DEFAULT_CLOCK_OPACITY "100%")
+set(DEFAULT_CLOCK_FONT_SIZE "50")
+set(DEFAULT_CLOCK_TIME_FORMAT "Auto")
+set(DEFAULT_CLOCK_DATE_FORMAT "Auto")
+set(DEFAULT_CLOCK_INCLUDE_WEEKDAY "true")
+set(DEFAULT_SCREENSAVER_ENABLED "false")
+set(DEFAULT_SCREENSAVER_IDLE_TIME "300")
+set(DEFAULT_SCREENSAVER_INTENSITY "70%")
+set(DEFAULT_SCREENSAVER_PAUSE_SLIDESHOW "true")
+set(DEFAULT_GAMEPAD_ENABLED "false")
+set(DEFAULT_GAMEPAD_DEVICE -1)
diff --git a/config/flex-launcher.manifest.in b/config/flex-launcher.manifest.in
new file mode 100644
index 0000000..88a49f8
--- /dev/null
+++ b/config/flex-launcher.manifest.in
@@ -0,0 +1,10 @@
+
+
+
+
+
+ UTF-8
+ permonitor
+
+
+
diff --git a/src/launcher_config.h.in b/config/launcher_config.h.in
similarity index 55%
rename from src/launcher_config.h.in
rename to config/launcher_config.h.in
index 1083f33..5ee6bb2 100644
--- a/src/launcher_config.h.in
+++ b/config/launcher_config.h.in
@@ -1,12 +1,12 @@
// Project information
+#define PROJECT_NAME "@CMAKE_PROJECT_NAME@"
+#define EXECUTABLE_TITLE "@EXECUTABLE_TITLE@"
+#define PROJECT_VERSION "@PROJECT_VERSION@"
#define PROJECT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define PROJECT_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define PROJECT_VERSION_PATCH @PROJECT_VERSION_PATCH@
-#define PROJECT_NAME "@CMAKE_PROJECT_NAME@"
-#define EXECUTABLE_TITLE "@EXECUTABLE_TITLE@"
// Default filenames and paths
-#define FILENAME_SCROLL_INDICATOR "scroll_indicator.svg"
#define FILENAME_DEFAULT_CONFIG "config.ini"
#define FILENAME_DEFAULT_FONT "OpenSans-Regular.ttf"
#define FILENAME_DEFAULT_CLOCK_FONT "@DEFAULT_CLOCK_FONT@"
@@ -33,6 +33,10 @@
// Config file setting names
#define SETTING_DEFAULT_MENU "@SETTING_DEFAULT_MENU@"
#define SETTING_MAX_BUTTONS "@SETTING_MAX_BUTTONS@"
+#define SETTING_VSYNC "@SETTING_VSYNC@"
+#define SETTING_FPS_LIMIT "@SETTING_FPS_LIMIT@"
+#define SETTING_APPLICATION_TIMEOUT "@SETTING_APPLICATION_TIMEOUT@"
+#define SETTING_WRAP_ENTRIES "@SETTING_WRAP_ENTRIES@"
#define SETTING_BACKGROUND_MODE "@SETTING_BACKGROUND_MODE@"
#define SETTING_BACKGROUND_IMAGE "@SETTING_BACKGROUND_IMAGE@"
#define SETTING_BACKGROUND_COLOR "@SETTING_BACKGROUND_COLOR@"
@@ -40,30 +44,49 @@
#define SETTING_SLIDESHOW_IMAGE_DURATION "@SETTING_SLIDESHOW_IMAGE_DURATION@"
#define SETTING_SLIDESHOW_TRANSITION_TIME "@SETTING_SLIDESHOW_TRANSITION_TIME@"
#define SETTING_SCREENSAVER_PAUSE_SLIDESHOW "@SETTING_SCREENSAVER_PAUSE_SLIDESHOW@"
+#define SETTING_CHROMA_KEY_COLOR "@SETTING_CHROMA_KEY_COLOR@"
+#define SETTING_BACKGROUND_OVERLAY "@SETTING_BACKGROUND_OVERLAY@"
+#define SETTING_BACKGROUND_OVERLAY_COLOR "@SETTING_BACKGROUND_OVERLAY_COLOR@"
+#define SETTING_BACKGROUND_OVERLAY_OPACITY "@SETTING_BACKGROUND_OVERLAY_OPACITY@"
#define SETTING_ICON_SIZE "@SETTING_ICON_SIZE@"
#define SETTING_ICON_SPACING "@SETTING_ICON_SPACING@"
+#define SETTING_TITLES_ENABLED "@SETTING_TITLES_ENABLED@"
#define SETTING_TITLE_FONT "@SETTING_TITLE_FONT@"
#define SETTING_TITLE_FONT_SIZE "@SETTING_TITLE_FONT_SIZE@"
-#define SETTING_TITLE_COLOR "@SETTING_TITLE_COLOR@"
+#define SETTING_TITLE_FONT_COLOR "@SETTING_TITLE_FONT_COLOR@"
+#define SETTING_TITLE_SHADOWS "@SETTING_TITLE_SHADOWS@"
+#define SETTING_TITLE_SHADOW_COLOR "@SETTING_TITLE_SHADOW_COLOR@"
#define SETTING_TITLE_OVERSIZE_MODE "@SETTING_TITLE_OVERSIZE_MODE@"
#define SETTING_TITLE_OPACITY "@SETTING_TITLE_OPACITY@"
#define SETTING_TITLE_PADDING "@SETTING_TITLE_PADDING@"
-#define SETTING_HIGHLIGHT_COLOR "@SETTING_HIGHLIGHT_COLOR@"
-#define SETTING_HIGHLIGHT_OPACITY "@SETTING_HIGHLIGHT_OPACITY@"
+#define SETTING_HIGHLIGHT_ENABLED "@SETTING_HIGHLIGHT_ENABLED@"
+#define SETTING_HIGHLIGHT_FILL_COLOR "@SETTING_HIGHLIGHT_FILL_COLOR@"
+#define SETTING_HIGHLIGHT_FILL_OPACITY "@SETTING_HIGHLIGHT_FILL_OPACITY@"
+#define SETTING_HIGHLIGHT_OUTLINE_COLOR "@SETTING_HIGHLIGHT_OUTLINE_COLOR@"
+#define SETTING_HIGHLIGHT_OUTLINE_OPACITY "@SETTING_HIGHLIGHT_OUTLINE_OPACITY@"
+#define SETTING_HIGHLIGHT_OUTLINE_SIZE "@SETTING_HIGHLIGHT_OUTLINE_SIZE@"
#define SETTING_HIGHLIGHT_VPADDING "@SETTING_HIGHLIGHT_VPADDING@"
#define SETTING_HIGHLIGHT_HPADDING "@SETTING_HIGHLIGHT_HPADDING@"
#define SETTING_HIGHLIGHT_CORNER_RADIUS "@SETTING_HIGHLIGHT_CORNER_RADIUS@"
-#define SETTING_BUTTON_CENTERLINE "@SETTING_BUTTON_CENTERLINE@"
+#define SETTING_VCENTER "@SETTING_VCENTER@"
#define SETTING_SCROLL_INDICATORS "@SETTING_SCROLL_INDICATORS@"
-#define SETTING_SCROLL_INDICATOR_COLOR "@SETTING_SCROLL_INDICATOR_COLOR@"
+#define SETTING_SCROLL_INDICATOR_FILL_COLOR "@SETTING_SCROLL_INDICATOR_FILL_COLOR@"
+#define SETTING_SCROLL_INDICATOR_OUTLINE_SIZE "@SETTING_SCROLL_INDICATOR_OUTLINE_SIZE@"
+#define SETTING_SCROLL_INDICATOR_OUTLINE_COLOR "@SETTING_SCROLL_INDICATOR_OUTLINE_COLOR@"
#define SETTING_SCROLL_INDICATOR_OPACITY "@SETTING_SCROLL_INDICATOR_OPACITY@"
#define SETTING_ON_LAUNCH "@SETTING_ON_LAUNCH@"
#define SETTING_RESET_ON_BACK "@SETTING_RESET_ON_BACK@"
+#define SETTING_MOUSE_SELECT "@SETTING_MOUSE_SELECT@"
+#define SETTING_INHIBIT_OS_SCREENSAVER "@SETTING_INHIBIT_OS_SCREENSAVER@"
+#define SETTING_STARTUP_CMD "@SETTING_STARTUP_CMD@"
+#define SETTING_QUIT_CMD "@SETTING_QUIT_CMD@"
#define SETTING_CLOCK_ENABLED "@SETTING_CLOCK_ENABLED@"
#define SETTING_CLOCK_SHOW_DATE "@SETTING_CLOCK_SHOW_DATE@"
#define SETTING_CLOCK_ALIGNMENT "@SETTING_CLOCK_ALIGNMENT@"
#define SETTING_CLOCK_FONT "@SETTING_CLOCK_FONT@"
-#define SETTING_CLOCK_COLOR "@SETTING_CLOCK_COLOR@"
+#define SETTING_CLOCK_FONT_COLOR "@SETTING_CLOCK_FONT_COLOR@"
+#define SETTING_CLOCK_SHADOWS "@SETTING_CLOCK_SHADOWS@"
+#define SETTING_CLOCK_SHADOW_COLOR "@SETTING_CLOCK_SHADOW_COLOR@"
#define SETTING_CLOCK_OPACITY "@SETTING_CLOCK_OPACITY@"
#define SETTING_CLOCK_FONT_SIZE "@SETTING_CLOCK_FONT_SIZE@"
#define SETTING_CLOCK_MARGIN "@SETTING_CLOCK_MARGIN@"
@@ -104,42 +127,79 @@
// Config file default settings
#define DEFAULT_MAX_BUTTONS @DEFAULT_MAX_BUTTONS@
+#define DEFAULT_VSYNC @DEFAULT_VSYNC@
+#define DEFAULT_APPLICATION_TIMEOUT @DEFAULT_APPLICATION_TIMEOUT@
+#define DEFAULT_WRAP_ENTRIES @DEFAULT_WRAP_ENTRIES@
#define DEFAULT_BACKGROUND_COLOR_R 0x@DEFAULT_BACKGROUND_COLOR_R@
#define DEFAULT_BACKGROUND_COLOR_G 0x@DEFAULT_BACKGROUND_COLOR_G@
#define DEFAULT_BACKGROUND_COLOR_B 0x@DEFAULT_BACKGROUND_COLOR_B@
#define DEFAULT_SLIDESHOW_IMAGE_DURATION @DEFAULT_SLIDESHOW_IMAGE_DURATION@
#define DEFAULT_SLIDESHOW_TRANSITION_TIME @DEFAULT_SLIDESHOW_TRANSITION_TIME@
+#define DEFAULT_CHROMA_KEY_COLOR_R 0x@DEFAULT_CHROMA_KEY_COLOR_R@
+#define DEFAULT_CHROMA_KEY_COLOR_G 0x@DEFAULT_CHROMA_KEY_COLOR_G@
+#define DEFAULT_CHROMA_KEY_COLOR_B 0x@DEFAULT_CHROMA_KEY_COLOR_B@
+#define DEFAULT_CHROMA_KEY_COLOR_A 0x@DEFAULT_CHROMA_KEY_COLOR_A@
+#define DEFAULT_BACKGROUND_OVERLAY @DEFAULT_BACKGROUND_OVERLAY@
+#define DEFAULT_BACKGROUND_OVERLAY_COLOR_R 0x@DEFAULT_BACKGROUND_OVERLAY_COLOR_R@
+#define DEFAULT_BACKGROUND_OVERLAY_COLOR_G 0x@DEFAULT_BACKGROUND_OVERLAY_COLOR_G@
+#define DEFAULT_BACKGROUND_OVERLAY_COLOR_B 0x@DEFAULT_BACKGROUND_OVERLAY_COLOR_B@
+#define DEFAULT_BACKGROUND_OVERLAY_COLOR_A 0x@DEFAULT_BACKGROUND_OVERLAY_COLOR_A@
+#define DEFAULT_BACKGROUND_OVERLAY_OPACITY "@DEFAULT_BACKGROUND_OVERLAY_OPACITY@"
#define DEFAULT_ICON_SIZE @DEFAULT_ICON_SIZE@
#define DEFAULT_ICON_SPACING "@DEFAULT_ICON_SPACING@"
#define DEFAULT_FONT_SIZE @DEFAULT_FONT_SIZE@
-#define DEFAULT_TITLE_COLOR_R 0x@DEFAULT_TITLE_COLOR_R@
-#define DEFAULT_TITLE_COLOR_G 0x@DEFAULT_TITLE_COLOR_G@
-#define DEFAULT_TITLE_COLOR_B 0x@DEFAULT_TITLE_COLOR_B@
-#define DEFAULT_TITLE_COLOR_A 0x@DEFAULT_TITLE_COLOR_A@
+#define DEFAULT_TITLES_ENABLED @DEFAULT_TITLES_ENABLED@
+#define DEFAULT_TITLE_FONT_COLOR_R 0x@DEFAULT_TITLE_FONT_COLOR_R@
+#define DEFAULT_TITLE_FONT_COLOR_G 0x@DEFAULT_TITLE_FONT_COLOR_G@
+#define DEFAULT_TITLE_FONT_COLOR_B 0x@DEFAULT_TITLE_FONT_COLOR_B@
+#define DEFAULT_TITLE_FONT_COLOR_A 0x@DEFAULT_TITLE_FONT_COLOR_A@
+#define DEFAULT_TITLE_SHADOWS @DEFAULT_TITLE_SHADOWS@
+#define DEFAULT_TITLE_SHADOW_COLOR_R 0x@DEFAULT_TITLE_SHADOW_COLOR_R@
+#define DEFAULT_TITLE_SHADOW_COLOR_G 0x@DEFAULT_TITLE_SHADOW_COLOR_G@
+#define DEFAULT_TITLE_SHADOW_COLOR_B 0x@DEFAULT_TITLE_SHADOW_COLOR_B@
+#define DEFAULT_TITLE_SHADOW_COLOR_A 0x@DEFAULT_TITLE_SHADOW_COLOR_A@
#define DEFAULT_TITLE_PADDING @DEFAULT_TITLE_PADDING@
-#define DEFAULT_HIGHLIGHT_COLOR_R 0x@DEFAULT_HIGHLIGHT_COLOR_R@
-#define DEFAULT_HIGHLIGHT_COLOR_G 0x@DEFAULT_HIGHLIGHT_COLOR_G@
-#define DEFAULT_HIGHLIGHT_COLOR_B 0x@DEFAULT_HIGHLIGHT_COLOR_B@
-#define DEFAULT_HIGHLIGHT_COLOR_A 0x@DEFAULT_HIGHLIGHT_COLOR_A@
+#define DEFAULT_HIGHLIGHT_ENABLED @DEFAULT_HIGHLIGHT_ENABLED@
+#define DEFAULT_HIGHLIGHT_FILL_COLOR_R 0x@DEFAULT_HIGHLIGHT_FILL_COLOR_R@
+#define DEFAULT_HIGHLIGHT_FILL_COLOR_G 0x@DEFAULT_HIGHLIGHT_FILL_COLOR_G@
+#define DEFAULT_HIGHLIGHT_FILL_COLOR_B 0x@DEFAULT_HIGHLIGHT_FILL_COLOR_B@
+#define DEFAULT_HIGHLIGHT_FILL_COLOR_A 0x@DEFAULT_HIGHLIGHT_FILL_COLOR_A@
+#define DEFAULT_HIGHLIGHT_OUTLINE_COLOR_R 0x@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_R@
+#define DEFAULT_HIGHLIGHT_OUTLINE_COLOR_G 0x@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_G@
+#define DEFAULT_HIGHLIGHT_OUTLINE_COLOR_B 0x@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_B@
+#define DEFAULT_HIGHLIGHT_OUTLINE_COLOR_A 0x@DEFAULT_HIGHLIGHT_OUTLINE_COLOR_A@
+#define DEFAULT_HIGHLIGHT_OUTLINE_SIZE @DEFAULT_HIGHLIGHT_OUTLINE_SIZE@
#define DEFAULT_HIGHLIGHT_CORNER_RADIUS @DEFAULT_HIGHLIGHT_CORNER_RADIUS@
#define DEFAULT_HIGHLIGHT_VPADDING @DEFAULT_HIGHLIGHT_VPADDING@
#define DEFAULT_HIGHLIGHT_HPADDING @DEFAULT_HIGHLIGHT_HPADDING@
#define DEFAULT_SCROLL_INDICATORS @DEFAULT_SCROLL_INDICATORS@
-#define DEFAULT_SCROLL_INDICATOR_COLOR_R 0x@DEFAULT_SCROLL_INDICATOR_COLOR_R@
-#define DEFAULT_SCROLL_INDICATOR_COLOR_G 0x@DEFAULT_SCROLL_INDICATOR_COLOR_G@
-#define DEFAULT_SCROLL_INDICATOR_COLOR_B 0x@DEFAULT_SCROLL_INDICATOR_COLOR_B@
-#define DEFAULT_SCROLL_INDICATOR_COLOR_A 0x@DEFAULT_SCROLL_INDICATOR_COLOR_A@
-#define DEFAULT_BUTTON_CENTERLINE "@DEFAULT_BUTTON_CENTERLINE@"
+#define DEFAULT_SCROLL_INDICATOR_FILL_COLOR_R 0x@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_R@
+#define DEFAULT_SCROLL_INDICATOR_FILL_COLOR_G 0x@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_G@
+#define DEFAULT_SCROLL_INDICATOR_FILL_COLOR_B 0x@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_B@
+#define DEFAULT_SCROLL_INDICATOR_FILL_COLOR_A 0x@DEFAULT_SCROLL_INDICATOR_FILL_COLOR_A@
+#define DEFAULT_SCROLL_INDICATOR_OUTLINE_SIZE @DEFAULT_SCROLL_INDICATOR_OUTLINE_SIZE@
+#define DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_R 0x@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_R@
+#define DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_G 0x@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_G@
+#define DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_B 0x@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_B@
+#define DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_A 0x@DEFAULT_SCROLL_INDICATOR_OUTLINE_COLOR_A@
+#define DEFAULT_VCENTER "@DEFAULT_VCENTER@"
#define DEFAULT_RESET_ON_BACK @DEFAULT_RESET_ON_BACK@
+#define DEFAULT_MOUSE_SELECT @DEFAULT_MOUSE_SELECT@
+#define DEFAULT_INHIBIT_OS_SCREENSAVER @DEFAULT_INHIBIT_OS_SCREENSAVER@
#define DEFAULT_CLOCK_ENABLED @DEFAULT_CLOCK_ENABLED@
#define DEFAULT_CLOCK_SHOW_DATE @DEFAULT_CLOCK_SHOW_DATE@
#define DEFAULT_CLOCK_FONT @DEFAULT_CLOCK_FONT@
#define DEFAULT_CLOCK_MARGIN "@DEFAULT_CLOCK_MARGIN@"
-#define DEFAULT_CLOCK_COLOR_R 0x@DEFAULT_CLOCK_COLOR_R@
-#define DEFAULT_CLOCK_COLOR_G 0x@DEFAULT_CLOCK_COLOR_G@
-#define DEFAULT_CLOCK_COLOR_B 0x@DEFAULT_CLOCK_COLOR_B@
-#define DEFAULT_CLOCK_COLOR_A 0x@DEFAULT_CLOCK_COLOR_A@
+#define DEFAULT_CLOCK_FONT_COLOR_R 0x@DEFAULT_CLOCK_FONT_COLOR_R@
+#define DEFAULT_CLOCK_FONT_COLOR_G 0x@DEFAULT_CLOCK_FONT_COLOR_G@
+#define DEFAULT_CLOCK_FONT_COLOR_B 0x@DEFAULT_CLOCK_FONT_COLOR_B@
+#define DEFAULT_CLOCK_FONT_COLOR_A 0x@DEFAULT_CLOCK_FONT_COLOR_A@
#define DEFAULT_CLOCK_FONT_SIZE @DEFAULT_CLOCK_FONT_SIZE@
+#define DEFAULT_CLOCK_SHADOWS @DEFAULT_CLOCK_SHADOWS@
+#define DEFAULT_CLOCK_SHADOW_COLOR_R 0x@DEFAULT_CLOCK_SHADOW_COLOR_R@
+#define DEFAULT_CLOCK_SHADOW_COLOR_G 0x@DEFAULT_CLOCK_SHADOW_COLOR_G@
+#define DEFAULT_CLOCK_SHADOW_COLOR_B 0x@DEFAULT_CLOCK_SHADOW_COLOR_B@
+#define DEFAULT_CLOCK_SHADOW_COLOR_A 0x@DEFAULT_CLOCK_SHADOW_COLOR_A@
#define DEFAULT_CLOCK_INCLUDE_WEEKDAY @DEFAULT_CLOCK_INCLUDE_WEEKDAY@
#define DEFAULT_CLOCK_ALIGNMENT ALIGNMENT_LEFT
#define DEFAULT_CLOCK_TIME_FORMAT FORMAT_TIME_AUTO
diff --git a/docs/Gemfile b/docs/Gemfile
new file mode 100644
index 0000000..68d388c
--- /dev/null
+++ b/docs/Gemfile
@@ -0,0 +1,27 @@
+source "https://rubygems.org"
+
+#gem "jekyll", "~> 4.2.2"
+gem 'jekyll-seo-tag'
+gem "jekyll-remote-theme"
+gem "github-pages", group: :jekyll_plugins
+
+# If you have any plugins, put them here!
+group :jekyll_plugins do
+ gem "jekyll-feed", "~> 0.12"
+end
+
+# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
+# and associated library.
+platforms :mingw, :x64_mingw, :mswin, :jruby do
+ gem "tzinfo", "~> 1.2"
+ gem "tzinfo-data"
+end
+
+# Performance-booster for watching directories on Windows
+gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
+
+# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
+# do not have a Java counterpart.
+gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
+
+gem "webrick", "~> 1.7"
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 0000000..6013668
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1,15 @@
+title: Flex Launcher
+description: A customizable HTPC application launcher and front-end interface
+url: "" # the base hostname & protocol for your site, e.g. http://example.com
+github_username: complexlogic
+repository: complexlogic/flex-launcher
+launcher_version: 2.2
+
+# Build settings
+remote_theme: pages-themes/slate@v0.2.0
+plugins:
+ - jekyll-feed
+ - jekyll-remote-theme
+ - jekyll-seo-tag
+
+
diff --git a/docs/_data/menu.yml b/docs/_data/menu.yml
new file mode 100644
index 0000000..21dc110
--- /dev/null
+++ b/docs/_data/menu.yml
@@ -0,0 +1,8 @@
+- title: Home
+ link: /flex-launcher
+- title: Download
+ link: /flex-launcher/download
+- title: Configuration
+ link: /flex-launcher/configuration
+- title: Setup Guide
+ link: /flex-launcher/setup
diff --git a/docs/_includes/head-custom-google-analytics.html b/docs/_includes/head-custom-google-analytics.html
new file mode 100644
index 0000000..fde10e6
--- /dev/null
+++ b/docs/_includes/head-custom-google-analytics.html
@@ -0,0 +1,9 @@
+
+
+
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html
new file mode 100644
index 0000000..1ed7ec5
--- /dev/null
+++ b/docs/_layouts/default.html
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+ {% seo %}
+ {% include head-custom.html %}
+
+
+
+
+
+
+
+ {% if site.github.is_project_page %}
+ View on GitHub
+ {% endif %}
+
+
+
+
+
+
+
+
diff --git a/docs/_sass/jekyll-theme-slate.scss b/docs/_sass/jekyll-theme-slate.scss
new file mode 100644
index 0000000..3096280
--- /dev/null
+++ b/docs/_sass/jekyll-theme-slate.scss
@@ -0,0 +1,528 @@
+@import "rouge-github";
+
+/*******************************************************************************
+MeyerWeb Reset
+*******************************************************************************/
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+sup {
+ font-size: 65%;
+ vertical-align: super;
+ font-weight: bold;
+}
+
+/* HTML5 display-role reset for older browsers */
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
+
+ol, ul {
+ list-style: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+/*******************************************************************************
+Theme Styles
+*******************************************************************************/
+
+body {
+ box-sizing: border-box;
+ color:#373737;
+ background: #212121;
+ font-size: 16px;
+ font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif;
+ line-height: 1.5;
+ -webkit-font-smoothing: antialiased;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ margin: 10px 0;
+ font-weight: 700;
+ color:#222222;
+ font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif;
+ letter-spacing: -1px;
+}
+
+h1 {
+ font-size: 36px;
+ font-weight: 700;
+}
+
+h2 {
+ padding-bottom: 10px;
+ font-size: 32px;
+ background: url('../images/bg_hr.png') repeat-x bottom;
+}
+
+h3 {
+ font-size: 24px;
+}
+
+h4 {
+ font-size: 21px;
+}
+
+h5 {
+ font-size: 18px;
+}
+
+h6 {
+ font-size: 16px;
+}
+
+nav ul {
+ display: flex;
+ list-style: none;
+ padding-left: 0px;
+ margin-top: 5px;
+ margin-bottom: 0px;
+}
+
+nav ul li {
+ margin-right: 5px;
+ font-size: 20px;
+}
+
+p {
+ margin: 10px 0 15px 0;
+}
+
+footer p {
+ color: #f2f2f2;
+}
+
+a {
+ text-decoration: none;
+ color: #0F79D0;
+ text-shadow: none;
+
+ transition: color 0.5s ease;
+ transition: text-shadow 0.5s ease;
+ -webkit-transition: color 0.5s ease;
+ -webkit-transition: text-shadow 0.5s ease;
+ -moz-transition: color 0.5s ease;
+ -moz-transition: text-shadow 0.5s ease;
+ -o-transition: color 0.5s ease;
+ -o-transition: text-shadow 0.5s ease;
+ -ms-transition: color 0.5s ease;
+ -ms-transition: text-shadow 0.5s ease;
+}
+
+a:hover, a:focus {
+ text-decoration: underline;
+}
+
+footer a {
+ color: #F2F2F2;
+ text-decoration: underline;
+}
+
+em, cite {
+ font-style: italic;
+}
+
+strong {
+ font-weight: bold;
+}
+
+img {
+ position: relative;
+ margin: 0 auto;
+ max-width: 800px;
+ padding: 5px;
+ margin: 10px 0 10px 0;
+ border: 1px solid #ebebeb;
+
+ box-shadow: 0 0 5px #ebebeb;
+ -webkit-box-shadow: 0 0 5px #ebebeb;
+ -moz-box-shadow: 0 0 5px #ebebeb;
+ -o-box-shadow: 0 0 5px #ebebeb;
+ -ms-box-shadow: 0 0 5px #ebebeb;
+}
+
+p img {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ vertical-align: middle;
+ text-align: center;
+ border: none;
+}
+
+pre, code {
+ color: #222;
+ background-color: #fff;
+
+ font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
+ font-size: 0.875em;
+
+ border-radius: 2px;
+ -moz-border-radius: 2px;
+ -webkit-border-radius: 2px;
+}
+
+pre {
+ padding: 10px;
+ box-shadow: 0 0 10px rgba(0,0,0,.1);
+ overflow: auto;
+}
+
+code {
+ padding: 3px;
+ margin: 0 3px;
+ box-shadow: 0 0 10px rgba(0,0,0,.1);
+}
+
+pre code {
+ display: block;
+ box-shadow: none;
+}
+
+blockquote {
+ color: #666;
+ margin-bottom: 20px;
+ padding: 0 0 0 20px;
+ border-left: 3px solid #bbb;
+}
+
+
+ul, ol, dl {
+ margin-bottom: 15px
+}
+
+ul {
+ list-style-position: inside;
+ list-style: disc;
+ padding-left: 20px;
+}
+
+ol {
+ list-style-position: inside;
+ list-style: decimal;
+ padding-left: 20px;
+}
+
+dl dt {
+ font-weight: bold;
+}
+
+dl dd {
+ padding-left: 20px;
+ font-style: italic;
+}
+
+dl p {
+ padding-left: 20px;
+ font-style: italic;
+}
+
+hr {
+ height: 1px;
+ margin-bottom: 5px;
+ border: none;
+ background: url('../images/bg_hr.png') repeat-x center;
+}
+
+table {
+ border: 1px solid #373737;
+ margin-bottom: 20px;
+ text-align: left;
+ }
+
+th {
+ font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ padding: 10px;
+ background: #373737;
+ color: #fff;
+ }
+
+td {
+ padding: 10px;
+ border: 1px solid #373737;
+ }
+
+form {
+ background: #f2f2f2;
+ padding: 20px;
+}
+
+kbd {
+ background-color: #fafbfc;
+ border: 1px solid #c6cbd1;
+ border-bottom-color: #959da5;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #959da5;
+ color: #444d56;
+ display: inline-block;
+ font-size: 11px;
+ line-height: 11px;
+ padding: 3px 5px;
+ vertical-align: middle;
+}
+
+/*******************************************************************************
+Full-Width Styles
+*******************************************************************************/
+
+.outer {
+ width: 100%;
+}
+
+.inner {
+ position: relative;
+ max-width: 800px;
+ padding: 20px 10px;
+ margin: 0 auto;
+}
+
+.download {
+ border: none;
+ vertical-align: top;
+ box-shadow: none;
+ padding-bottom: 20px;
+}
+
+.menu_link {
+ font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif;
+}
+
+.menu_no_link {
+ color: #ffffff;
+}
+
+.menu_link_active {
+ font-family: 'Lucida Grande', 'Calibri', Helvetica, Arial, sans-serif;
+ color: #ffffff;
+}
+
+#forkme_banner {
+ display: block;
+ position: absolute;
+ top:0;
+ right: 10px;
+ z-index: 10;
+ padding: 10px 50px 10px 10px;
+ color: #fff;
+ background: url('../images/blacktocat.png') #0090ff no-repeat 95% 50%;
+ font-weight: 700;
+ box-shadow: 0 0 10px rgba(0,0,0,.5);
+ border-bottom-left-radius: 2px;
+ border-bottom-right-radius: 2px;
+}
+
+#header_wrap {
+ background: #212121;
+ background: -moz-linear-gradient(top, #373737, #212121);
+ background: -webkit-linear-gradient(top, #373737, #212121);
+ background: -ms-linear-gradient(top, #373737, #212121);
+ background: -o-linear-gradient(top, #373737, #212121);
+ background: linear-gradient(to top, #373737, #212121);
+}
+
+#header_wrap .inner {
+ padding: 40px 10px 5px 10px;
+}
+
+#project_title {
+ margin: 0;
+ color: #fff;
+ font-size: 42px;
+ font-weight: 700;
+ text-shadow: #111 0px 0px 10px;
+}
+
+#project_tagline {
+ color: #fff;
+ font-size: 24px;
+ font-weight: 300;
+ background: none;
+ text-shadow: #111 0px 0px 10px;
+}
+
+#downloads {
+ position: absolute;
+ width: 210px;
+ z-index: 10;
+ bottom: -40px;
+ right: 0;
+ height: 70px;
+ background: url('../images/icon_download.png') no-repeat 0% 90%;
+}
+
+.zip_download_link {
+ display: block;
+ float: right;
+ width: 90px;
+ height:70px;
+ text-indent: -5000px;
+ overflow: hidden;
+ background: url(../images/sprite_download.png) no-repeat bottom left;
+}
+
+.tar_download_link {
+ display: block;
+ float: right;
+ width: 90px;
+ height:70px;
+ text-indent: -5000px;
+ overflow: hidden;
+ background: url(../images/sprite_download.png) no-repeat bottom right;
+ margin-left: 10px;
+}
+
+.zip_download_link:hover {
+ background: url(../images/sprite_download.png) no-repeat top left;
+}
+
+.tar_download_link:hover {
+ background: url(../images/sprite_download.png) no-repeat top right;
+}
+
+#main_content_wrap {
+ background: #f2f2f2;
+ border-top: 1px solid #111;
+ border-bottom: 1px solid #111;
+}
+
+#main_content {
+ padding-top: 40px;
+}
+
+#footer_wrap {
+ background: #212121;
+}
+
+
+
+/*******************************************************************************
+Small Device Styles
+*******************************************************************************/
+
+@media screen and (max-width: 992px) {
+ img {
+ max-width: 100%;
+ }
+}
+
+@media screen and (max-width: 480px) {
+ body {
+ font-size:14px;
+ }
+
+ #downloads {
+ display: none;
+ }
+
+ .inner {
+ min-width: 320px;
+ max-width: 480px;
+ }
+
+ #project_title {
+ font-size: 32px;
+ }
+
+ h1 {
+ font-size: 28px;
+ }
+
+ h2 {
+ font-size: 24px;
+ }
+
+ h3 {
+ font-size: 21px;
+ }
+
+ h4 {
+ font-size: 18px;
+ }
+
+ h5 {
+ font-size: 14px;
+ }
+
+ h6 {
+ font-size: 12px;
+ }
+
+ code, pre {
+ font-size: 11px;
+ }
+
+}
+
+@media screen and (max-width: 320px) {
+ body {
+ font-size:14px;
+ }
+
+ #downloads {
+ display: none;
+ }
+
+ .inner {
+ min-width: 240px;
+ max-width: 320px;
+ }
+
+ #project_title {
+ font-size: 28px;
+ }
+
+ h1 {
+ font-size: 24px;
+ }
+
+ h2 {
+ font-size: 21px;
+ }
+
+ h3 {
+ font-size: 18px;
+ }
+
+ h4 {
+ font-size: 16px;
+ }
+
+ h5 {
+ font-size: 14px;
+ }
+
+ h6 {
+ font-size: 12px;
+ }
+
+ code, pre {
+ min-width: 240px;
+ max-width: 320px;
+ font-size: 11px;
+ }
+
+}
+
diff --git a/docs/assets/icons/favicon.png b/docs/assets/icons/favicon.png
new file mode 100644
index 0000000..526daf5
Binary files /dev/null and b/docs/assets/icons/favicon.png differ
diff --git a/docs/assets/icons/linux.svg b/docs/assets/icons/linux.svg
new file mode 100644
index 0000000..dce080a
--- /dev/null
+++ b/docs/assets/icons/linux.svg
@@ -0,0 +1,368 @@
+
+
\ No newline at end of file
diff --git a/docs/assets/icons/raspberry_pi.svg b/docs/assets/icons/raspberry_pi.svg
new file mode 100644
index 0000000..27192be
--- /dev/null
+++ b/docs/assets/icons/raspberry_pi.svg
@@ -0,0 +1,17 @@
+
+
diff --git a/docs/assets/icons/source.svg b/docs/assets/icons/source.svg
new file mode 100644
index 0000000..8cdf492
--- /dev/null
+++ b/docs/assets/icons/source.svg
@@ -0,0 +1,7 @@
+
+
+
+
\ No newline at end of file
diff --git a/docs/assets/icons/windows.svg b/docs/assets/icons/windows.svg
new file mode 100644
index 0000000..6fac0df
--- /dev/null
+++ b/docs/assets/icons/windows.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/extra/screenshots/screenshot1.png b/docs/assets/screenshots/screenshot1.png
old mode 100755
new mode 100644
similarity index 100%
rename from extra/screenshots/screenshot1.png
rename to docs/assets/screenshots/screenshot1.png
diff --git a/extra/screenshots/screenshot2.png b/docs/assets/screenshots/screenshot2.png
old mode 100755
new mode 100644
similarity index 100%
rename from extra/screenshots/screenshot2.png
rename to docs/assets/screenshots/screenshot2.png
diff --git a/docs/compilation.md b/docs/compilation.md
new file mode 100644
index 0000000..38d5fb0
--- /dev/null
+++ b/docs/compilation.md
@@ -0,0 +1,92 @@
+---
+layout: default
+title: Compilation Guide
+---
+# Compilation Guide
+## Table of Contents
+1. [Overview](#overview)
+2. [Linux](#linux)
+3. [Windows](#windows)
+
+## Overview
+ Flex Launcher builds natively on Linux and Windows, and features a cross-platform CMake build system. The following external dependencies are required:
+ - SDL ≥ 2.0.14
+ - SDL_image ≥ 2.0.5
+ - SDL_ttf ≥ 2.0.15
+
+## Linux
+Flex Launcher on Linux builds with GCC. This guide assumes you already have the development tools Git, CMake, pkg-config, and GCC installed on your system. If not, consult your distro's documentation.
+
+First, install the dependencies. The steps to do so are dependent on your distro:
+
+#### APT-based Distributions (Debian, Ubuntu, Mint, Raspberry Pi OS etc.)
+```bash
+sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libinih-dev
+```
+
+#### Pacman-based Distributions (Arch, Manjaro, etc.)
+```bash
+sudo pacman -S sdl2 sdl2_image sdl2_ttf libinih
+```
+
+#### DNF-based Distributions (Fedora)
+```bash
+sudo dnf install SDL2-devel SDL2_image-devel SDL2_ttf-devel inih-devel
+```
+
+### Building
+Clone the master repo and create a build directory:
+```bash
+git clone https://github.com/complexlogic/flex-launcher.git
+cd flex-launcher
+mkdir build && cd build
+```
+Generate the Makefile:
+```bash
+cmake .. -DCMAKE_BUILD_TYPE=Release
+```
+If you're building on Raspberry Pi, it's recommended to pass `-DRPI=1` to cmake, which tweaks the default configuration to be more Pi-centric.
+
+Build and test the program:
+```bash
+make
+./flex-launcher
+```
+Optionally, install it into your system directories:
+```bash
+sudo make install
+```
+By default, this will install the program and assets with a prefix of `/usr/local`. If you wish to use a different prefix, re-run the cmake generation step with `-DCMAKE_INSTALL_PREFIX=prefix`.
+
+## Windows
+Flex Launcher on Windows builds with Visual Studio, and uses [vcpkg](https://vcpkg.io/en/index.html) to manage the dependencies. Before starting, make sure the following steps are completed:
+- Visual Studio is installed. The free Community Edition is available for download from Microsoft's website. The following tools and features for Visual Studio are required:
+ - C++ core desktop features
+ - Latest MSVC
+ - Latest Windows SDK
+ - C++ CMake tools
+- Git is installed and in your `Path` environment variable
+- CMake is installed and in your `Path` environment variable
+
+### Building
+Clone the master repo and create a build directory:
+```
+git clone https://github.com/complexlogic/flex-launcher.git
+cd flex-launcher
+mkdir build
+cd build
+```
+Build the dependencies and generate the Visual Studio project files:
+```
+git clone https://github.com/microsoft/vcpkg
+cmake .. -DCMAKE_TOOLCHAIN_FILE=".\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static"
+```
+Build and test the program:
+```
+cmake --build .
+.\Debug\flex-launcher.exe
+```
+Optionally, generate a clean zipped install package which may then be extracted to a directory of your choosing:
+```
+cmake --build . --config Release --target package
+```
diff --git a/docs/configuration.md b/docs/configuration.md
new file mode 100644
index 0000000..1da2a67
--- /dev/null
+++ b/docs/configuration.md
@@ -0,0 +1,644 @@
+---
+layout: default
+title: Configuration
+---
+# Configuring Flex Launcher
+## Table of Contents
+
+1. [Overview](#overview)
+2. [Settings](#settings)
+ - [General](#general)
+ - [Background](#background)
+ - [Layout](#layout)
+ - [Titles](#titles)
+ - [Highlight](#highlight)
+ - [Scroll Indicators](#scroll-indicators)
+3. [Creating Menus](#creating-menus)
+ - [Special Commands](#special-commands)
+ - [Desktop Files (Linux Only)](#desktop-files-linux-only)
+4. [Clock](#clock)
+5. [Screensaver](#screensaver)
+6. [Hotkeys](#hotkeys)
+7. [Gamepad Controls](#gamepad-controls)
+8. [Transparent Backgrounds](#transparent-backgrounds)
+
+## Overview
+Flex Launcher uses an [INI file](https://en.wikipedia.org/wiki/INI_file) to configure settings and menus. The INI file consists of sections enclosed in square brackets, and in each section there are entries which consist of a key and a value. Example:
+```ini
+[Section]
+Key1=value
+Key2=value
+...
+```
+A line can be commented out by using the # character at the beginning of the line, which will cause the line to be ignored by the program. In-line comments are not allowable. Here are a few things to note about the configuration settings for Flex Launcher:
+- All keys and values are case sensitive.
+- Full UTF-8 character set is supported for titles.
+- The following image formats are supported: JPEG, PNG, and WebP
+- Relative paths are evaluated with respect to the *current working directory*, which may not be the same as the directory that the config file is located in. It is recommended to use absolute paths whenever possible to eliminate any confusion.
+- Color is specified in 24 bit RGB HEX format prefixed with the # character, e.g. the color red should be `#FF0000`. The letters can be uppercase or lowercase. HEX color pickers can be easily found online to assist color choices.
+- Several settings allow for values to be specified in pixels *or* as a percentage of another value. In this case, if no percent sign is detected it will be interpreted as pixels, and if the percent sign is present, than it will be interpreted as a percent value e.g. "5" means 5 pixels and "5%" means 5 percent.
+- Shell variable expansion is generally not supported, e.g. you cannot use the ~ character to refer to your home directory. The exception is for commands, since those are passed through to your system shell.
+
+## Settings
+The following sections contain settings that control the look and behavior of the launcher:
+- [General](#general)
+- [Background](#background)
+- [Layout](#layout)
+- [Titles](#titles)
+- [Highlight](#highlight)
+- [Scroll Indicators](#scroll-indicators)
+
+#### General
+The settings in this section control the general behavior of the launcher.
+
+- [DefaultMenu](#defaultmenu)
+- [VSync](#vsync)
+- [FPSLimit](#fpslimit)
+- [OnLaunch](#onlaunch)
+- [ResetOnBack](#resetonback)
+- [MouseSelect](#mouseselect)
+- [InhibitOSScreensaver](#inhibitosscreensaver)
+- [StartupCmd](#startupcmd)
+- [QuitCmd](#quitcmd)
+
+##### DefaultMenu
+This is the title of the main menu that shows when Flex Launcher is started. The value *must* match the name of one of your menu sections, or there will be an error and Flex Launcher will refuse to start. See the [Creating Menus](#creating-menus) section for more information.
+
+##### VSync
+Defines whether VSync will be used to synchronize the frame rate with the refresh rate of your monitor. This setting is a boolean "true" or "false"
+
+Default: true
+
+##### FPSLimit
+When `VSync` is set to false, this setting defines the maximum number of frames per second that Flex Launcher will render. The minimum is 10, and the maximum is the same as the refresh rate of your monitor.
+
+##### ApplicationTimeout
+Defines the time in seconds that the launcher will wait for an application to launch. If the launcher does not lose the window focus before the timeout occurs, it assumes there was an error with the launched application.
+
+Default: 15
+
+##### OnLaunch
+Defines the action that Flex Launcher will take upon the launch of an application. Possible values: "None", "Blank", and "Quit"
+- None: Flex Launcher will maintain its window while waiting for the launched application to initialize.
+- Blank: Flex Launcher will change to a blank, black screen while waiting for the launched application to initialize.
+- Quit: Flex Launcher will quit immediately after the successful launch of an application.
+
+Default: Blank
+
+##### WrapEntries
+Defines whether the highlight will wrap to the other side of the screen after reaching its leftmost or rightmost position. This setting is a boolean "true" or "false".
+
+Default: false
+
+##### ResetOnBack
+Defines whether Flex Launcher will remember the previous entry position when going back to a previous menu. If set to true, the highlight will be reset to the first entry in the menu when going back. This setting is a boolean "true" or "false".
+
+Default: false
+
+##### MouseSelect
+Defines whether the left mouse button can be used to select the highlighted entry. This setting is intended to support gyroscopic mouse devices where the enter/ok button functions as a mouse left click instead of the keyboard enter button. This setting is a boolean "true" or "false".
+
+Default: false
+
+##### InhibitOSScreensaver
+Defines whether Flex Launcher will prevent your default OS screensaver from activating while it is running. On Windows, this will also inhibit any power saving features as well (e.g. autosleep). This setting is a boolean "true" or "false".
+
+Default: true
+
+##### StartupCmd
+Defines a command that Flex Launcher will execute immediately upon startup. This can be used to autostart your favorite application.
+
+##### QuitCmd
+Defines a command that Flex Launcher will execute immediately before quitting. This can be used to do any mode switching or appplication starting to prepare your desktop, e.g. for maintenance.
+
+#### Background
+The settings in this section control what Flex Launcher will display in the background.
+
+- [Mode](#mode)
+- [Color](#color)
+- [Image](#image)
+- [SlideshowDirectory](#slideshowdirectory)
+- [SlideshowImageDuration](#slideshowimageduration)
+- [SlideshowTransitionTime](#slideshowtransitiontime)
+- [ChromaKeyColor](#chromakeycolor)
+- [Overlay](#overlay)
+- [OverlayColor](#overlaycolor)
+- [OverlayOpacity](#overlayopacity)
+
+##### Mode
+Defines what mode the background will be. Possible values: "Color", "Image", and "Slideshow"
+- Color: The background will be a solid color.
+- Image: The background will be an image.
+- Slideshow: The background will be a series of images displayed in random order, with a fading transition between each image.
+- Transparent: The background will be transparent. This is an advanced feature; users should read the [Transparent Backgrounds](#transparent-backgrounds) section before proceeding.
+
+Default: Color
+
+##### Color
+When `Mode` is set to "Color", this setting defines the color of the background.
+
+Default: #000000 (Black)
+
+##### Image
+When `Mode` is set to "Image", this setting defines the image to be displayed in the background. The value should be a path to an image file. If the image is not the same resolution as your desktop, it will be stretched accordingly.
+
+##### SlideshowDirectory
+When `Mode` is set to "Slideshow", this setting defines the directory (folder) which contains the images to display in the background. The value should be a path to a directory on your filesystem. The number of images that may be scanned from the directory is limited to 250.
+
+##### SlideshowImageDuration
+When `Mode` is set to "Slideshow", this setting defines the amount of time in seconds to display each image. Must be an integer value.
+
+Default: 30
+
+##### SlideshowTransitionTime
+When `Mode` is set to "Slideshow", this setting defines the amount of time in seconds that the next background image will fade in. The fading transition may be disabled by setting this to 0, which will yield a "hard" transition between images. Decimal values are acceptable.
+
+Default: 3
+
+##### ChromaKeyColor
+When `Mode` is set to "Transparent", this setting defines the color that will be applied to the background for chroma key transparency.
+
+Default: #010101
+
+##### Overlay
+Defines whether the background overlay feature is enabled. The background overlay is a solid color, typically black, that is painted over your background to improve the contrast between the background and the text/icons. This setting is a boolean "true" or "false".
+
+Default: false
+
+##### OverlayColor
+Defines the color of the background overlay.
+
+Default: #000000 (Black)
+
+##### OverlayOpacity
+Defines the opacity of the background overlay. Must be a percent value.
+
+Default: 50%
+
+#### Layout
+The settings in this section define the geometric layout of the launcher.
+
+- [MaxButtons](#maxbuttons)
+- [IconSize](#iconsize)
+- [IconSpacing](#iconspacing)
+- [VCenter](#vcenter)
+
+##### MaxButtons
+The maximum number of buttons that can be displayed on the screen. If a menu has more entries than this value, it will be split into multiple pages. A value of 3-5 is sensible for a typical TV size and viewing distance.
+
+Default: 4
+
+##### IconSize
+The width and height of icons on the screen in pixels. If an icon is not the same resolution, it will be stretched accordingly.
+
+Default: 256
+
+##### IconSpacing
+Distance between the menu entry icons, in pixels or percent of the screen width.
+
+Default: 5%
+
+##### VCenter
+Defines the vertical centering of the menu entries in percent of the screen height. A value of 50% will cause the buttons to be centered halfway in the screen. Increasing the value will lower the buttons, and lowering it will raise them.
+
+Default: 50%
+
+#### Titles
+The settings in this section affect the application titles that display below the icons.
+
+- [Enabled](#enabled)
+- [Font](#font)
+- [FontSize](#fontsize)
+- [Color](#color-1)
+- [Shadows](#shadows)
+- [ShadowColor](#shadowcolor)
+- [Opacity](#opacity)
+- [OversizeMode](#oversizemode)
+- [Padding](#padding)
+
+##### Enabled
+Defines whether or not application titles are enabled. This setting is a boolean "true" or "false".
+
+Default: true
+
+##### Font
+Defines the font to use for the titles of the menu entries. The value should be the path to a TrueType (TTF) font file. Non-TTF font formats are not supported. Flex Launcher ships with a handful of libre fonts.
+
+Default: OpenSans
+
+##### FontSize
+Defines the font size of each menu entry title.
+
+Default: 36
+
+##### Color
+Defines the color of the menu entry titles.
+
+Default: #FFFFFF (White)
+
+##### Shadows
+Defines whether shadows are enabled for the menu titles. Shadows give a 3D textured appearance to the text to improve the contrast from the background. This setting is a boolean "true" or "false".
+
+Default: false
+
+##### ShadowColor
+Defines the color of the title shadows.
+
+Default: #000000 (Black)
+
+##### Opacity
+Defines the opacity of the menu entry titles. Must be a percent value.
+
+Default: 100%
+
+##### OversizeMode
+Defines the behavior when the width of a menu entry title exceeds the width of its icon (which is defined in `IconSize`). Possible values: "Truncate", "Shrink", and "None"
+- Truncate: Truncates the title at the maximum width and adds "..." to the end.
+- Shrink: Shrinks oversized titles to a smaller font size than `TitleFontSize` so that the entire title fits within the maximum width.
+- None: No action is taken to limit the width of titles. Overlaps with other titles may occur, and it is the user's responsibility to manually handle any such case.
+
+Default: Truncate
+
+##### Padding
+Defines the vertical spacing between an icon and its title, in pixels.
+
+Default: 20
+
+#### Highlight
+The settings in this section control the menu highlight.
+
+- [Enabled](#enabled-1)
+- [FillColor](#fillcolor)
+- [FillOpacity](#fillopacity)
+- [OutlineSize](#outlinesize)
+- [OutlineColor](#outlinecolor)
+- [OutlineOpacity](#outlineopacity)
+- [CornerRadius](#cornerradius)
+- [VPadding](#vpadding)
+- [HPadding](#hpadding)
+
+##### Enabled
+Defines whether or not the highlight is enabled. If a user disables the highlight, it is assumed that they will be using the [Sected Icon Overrides](#selected-icon-overrides) feature instead. This setting is a boolean "true" or "false".
+
+Default: true
+
+##### FillColor
+Defines the fill color of the highlight cursor.
+
+Default: #FFFFFF (White)
+
+##### FillOpacity
+Defines the fill opacity of the highlight cursor. Must be a percent value.
+
+Default: 25%
+
+##### OutlineSize
+Defines the stroke width in pixels of the outline of the highlight cursor. Setting this to 0 will disable the outline.
+
+Default: 0
+
+##### OutlineColor
+Defines the outline color of the highlight cursor.
+
+Default: #0000FF (Blue)
+
+##### OutlineOpacity
+Defines the outline opacity of the highlight cursor. Must be a percent value.
+
+Default: 100%
+
+##### CornerRadius
+Defines the corner radius of the highlight cursor, in pixels. A value of 0 will yield a plain rectangle. Increasing the value will yield a rounded rectangle with increasingly round corners. The value of `HighlightOutlineSize` must be 0, otherwise this setting will be ignored.
+
+Default: 0
+
+##### VPadding
+Defines the amount of vertical distance that the highlight cursor extends beyond the top and bottom of the menu entry icon, in pixels.
+
+Default: 30
+
+##### HPadding
+Defines the amount of horizontal distance that the highlight cursor extends beyond the left and right of the menu entry icon, in pixels.
+
+Default: 30
+
+#### Scroll Indicators
+The settings in this section pertain to scroll indicators. Scroll indicators are arrows which appear in the bottom left and/or bottom right of the screen to inform the user that there are additional pages of applications to scroll to.
+
+- [Enabled](#enabled-2)
+- [FillColor](#fillcolor-1)
+- [OutlineSize](#outlinesize-1)
+- [OutlineColor](#outlinecolor-1)
+- [Opacity](#opacity-1)
+
+##### Enabled
+Defines whether scroll indicators will be enabled in the event that a menu has multiple pages of entries. This setting is a boolean "true" or "false".
+
+Default: true
+
+##### OutlineSize
+Defines the stroke width in pixels of the scroll indicator outline. Setting this to 0 will disable the outline.
+
+Default: 0
+
+##### FillColor
+Defines the fill color of the scroll indicators.
+
+Default: #FFFFFF (White)
+
+##### OutlineColor
+Defines the color of the scroll indicator outline.
+
+Default: #000000 (Black)
+
+##### Opacity
+Defines the opacity of the scroll indicators. Must be a percent value.
+
+Default: 100%
+
+## Creating Menus
+At least one menu must be defined in the configuration file, and the title must match the `DefaultMenu` setting value. The title of a menu is its section name. Any title may be used that is not reserved for another section, such as "Settings", "Gamepad", etc. The entries of the menu are implemented as key=value pairs. The name of the key will be ignored by the program, and is therefore arbtrary. However, it is recommended to pick something intutitive such as Entry1, Entry2, Entry3, etc. The entry information is contained in the value.
+
+Each entry value contains 3 parts of information in order: the title, the icon image path, and the command to run when the button is clicked. These are delimited by semicolons:
+```ini
+Entry=title;icon_path;command
+```
+The command is typically one of the following:
+1. The path to the program executable that you want to launch
+2. Windows: the path to a program shortcut (.lnk file)
+3. Linux: the path to a [.desktop file](#desktop-files-linux-only)
+4. A [special command](#special-commands)
+5. The path to an executable script, in the case that you want to perform multiple actions upon program launch.
+
+ A simple example menu titled `Media` is shown below:
+```ini
+[Media]
+Entry1=Kodi;C:\Pictures\Icons\kodi.png;"C:\Program Shortcuts\kodi.lnk"
+Entry2=Netflix;C:\Pictures\Icons\netflix.png;"C:\Program Shortcuts\netflix.lnk"
+Entry3=Plex;C:\Pictures\Icons\plex.png;"C:\Program Shortcuts\plex.lnk"
+Entry4=Back;C:\Pictures\Icons\back.png;:back
+```
+
+### Selected Icon Overrides
+The Selected Icon Override feature allows the user to define a different icon for the launcher to display when an entry is highlighted. To use this feature, name the path of the selected icon the same as the default entry icon path, but with a suffix of `_selected` (not including the file extension).
+
+For example, if the icon path for an entry is defined as `C:\icons\kodi.png`, then the program will check for the existence of `C:\icons\kodi_selected.png` and, if it exists, this icon will be shown when the entry is selected instead of the default. This feature allows the user to implement custom highlight effects such as glowing, color changes, etc.
+
+### Special Commands
+Special commands are commands that are internal to Flex Launcher and begin with a colon. The following is a list of special commands:
+
+#### :submenu
+Change to a different menu. Requires a menu title as an argument. For example, the command `:submenu Games` will change to the menu `Games`. The argument must be a valid menu title that is defined elsewhere in the config file.
+
+#### :fork
+Forks a new process and executes a command in it without exiting the launcher. This is typically used in combination with a [hotkey](#hotkeys). Use this special command when you want to execute a command on your system for some reason other than launching a graphical application. Example use cases:
+- Change a Wi-Fi connection
+- Pair or connect a Bluetooth device
+- Start or stop some system service/daemon
+
+The :fork special command requires a command as an argument. For example `:fork command arguments` will execute `command arguments` without leaving the launcher.
+
+Windows users should invoke a command line interpreter such as Command Prompt and pass the command to run as an argument, e.g. `:fork cmd.exe /c "command arguments"`
+
+#### :exit
+Windows only. Quits the currently running application. This special command is only available as a hotkey command. See the [Exit Hotkey](#exit-hotkey-windows-only) section for more information.
+
+#### :back
+Go back to the previous menu.
+
+#### :home
+Change to the menu defined in the `DefaultMenu` setting.
+
+#### :quit
+Quit Flex Launcher.
+
+#### :left
+Move the highlight cursor left.
+
+#### :right
+Move the highlight cursor right.
+
+#### :select
+Press enter on the current selection. This special command is only available as a gamepad or hotkey command, it is forbidden for menu entries.
+
+#### :shutdown
+Shut down the computer.1
+
+#### :restart
+Restart the computer.1
+
+#### :sleep
+Put the computer to sleep.1
+
+1 *Linux: Works in systemd-based distros only. Non-systemd distro users need to implement the command manually for their init system.*
+
+### Desktop Files (Linux Only)
+If the application you want to launch was installed via your distro's package manager, a .desktop file was most likely provided. The command to launch a Linux application can simply be the path to its .desktop file, and Flex Launcher will run the Exec command that the developers have specified in the file. Desktop files are located in /usr/share/applications.
+
+#### Desktop Actions
+Some .desktop files contain "Actions", which affect how the program is launched. An action may be specified by delimiting it from the path to the .desktop file with a semicolon. For example, Steam has a mode called "Big Picture Mode", which provides an interface similar to a game console and is ideal for a living room PC. The action in the .desktop file is called "BigPicture". A sample menu entry to launch Steam in Big Picture mode is shown below:
+```
+Entry1=Steam;/path/to/steamicon.png;/usr/share/applications/steam.desktop;BigPicture
+```
+
+## Clock
+Flex Launcher contains a clock widget, which displays the current time, and, optionally, the current date. The following settings may be used to control the behavior of the clock.
+
+#### Enabled
+Defines whether or not the clock is enabled. This setting is a boolean "true" or "false".
+
+Default: false
+
+#### ShowDate
+Defines whether or not the current date should be shown in addition to the current time. This setting is a boolean "true" or "false".
+
+Default: false
+
+#### Alignment
+Defines which side of the screen the clock text should align to. Possible values: "Left" and "Right"
+
+Default: Left
+
+#### Font
+Defines the font to use for the clock text. The value should be the path to a TrueType (TTF) font file.
+
+Default: SourceSansPro
+
+#### FontSize
+Defines the font size of the clock text
+
+Default: 50
+
+#### Margin
+Defines the distance of the clock text from the top and side of the screen, in pixels or percent of the screen height.
+
+Default: 5%
+
+#### FontColor
+Defines the color of the clock text.
+
+Default: #FFFFFF (White)
+
+#### Shadows
+Defines whether shadows are enabled for the clock text. Shadows give a 3D textured appearance to the text to improve the contrast from the background. This setting is a boolean "true" or "false".
+
+Default: false
+
+#### ShadowColor
+Defines the color of the clock text shadows.
+
+Default: #000000 (Black)
+
+#### Opacity
+Defines the opacity of the clock text. Must be a percent value.
+
+Default: 100%
+
+#### TimeFormat
+Defines the format of the current time. Possible values: "24hr", "12hr", and "Auto"
+- 24hr: The clock will be a 24 hour format.
+- 12hr: The clock will be a 12 hour format, including AM/PM designation in your locale.
+- Auto: Automatically determine the time format based on your system locale.
+
+Default: Auto
+
+#### DateFormat
+Defines the order of the month and day in the date. Possible values: "Little", "Big", "Auto"
+- Little: The day will come before the month.
+- Big: The month will come before the day.
+- Auto: Automatically determine the date format based on your system locale.
+
+#### IncludeWeekday
+Defines whether the date format should include the abbreviated weekday in your system locale. This setting is a boolean "true" or "false"
+
+Default: true
+
+## Screensaver
+Flex Launcher contains a screensaver feature, which will dim the screen after the input has been idle for the specified amount of time. Here are the settings that control the behavior of the screensaver
+
+#### Enabled
+Defines whether or not the screensaver is enabled. This setting is a boolean "true" or "false".
+
+Default: false
+
+#### IdleTime
+Defines the amount of time in seconds that the input should be idle before activating the screensaver
+
+Default: 300 (5 minutes)
+
+#### Intensity
+Defines the amount to dim the screen. Must be a percent value.
+
+Default: 70%
+
+#### PauseSlideshow
+When `BackgroundMode` is set to "Slideshow", this setting defines whether or not the slideshow should be paused while the screensaver is active. This setting is a boolean "true" or "false".
+
+Default: true
+
+## Hotkeys
+Flex Launcher supports configurable hotkeys, which executes a command when a specified key is pressed. Each hotkey consists of a key=value pair, where the key is an arbitrary name, and the value contains the SDL keycode of the hotkey and the command to run when it is pressed, delimited by a semicolon:
+```ini
+Hotkey=keycode;command
+```
+The keycode is a HEX prefixed with the # character. There are two ways to find a keycode for a given key. The first is to use the [lookup table provided by SDL](https://wiki.libsdl.org/SDLKeycodeLookup). The name of each key is in the right column of the table, and the corresponding HEX keycode is in the center column. The second is to run Flex Launcher in debug mode, press the key, then check the log. For each keystroke, the name of the key will be printed and the HEX value will be in parenthesis next to it.
+
+Any key can be set as a hotkey, except keys that are reserved for the default controls: the left and right arrow keys, enter/return, and backspace. Hotkeys may be used to "speed dial" your favorite applications, or to add controls via [special commands](#special-commands). As an example configuration below, the first hotkey is mapped to F1 and will launch Kodi when it is pressed, and the second hotkey is mapped to F12 and will cause Flex Launcher to quit when it is pressed:
+```ini
+[Hotkeys]
+Hotkey1=#4000003A;"C:\Program Shortcuts\kodi.lnk"
+Hotkey2=#40000045;:quit
+```
+
+### Exit Hotkey (Windows only)
+The exit hotkey feature allows a user to quit the running application using a button on their remote. This is especially useful for applications that don't have a quit button, such as a web browser operating in fullscreen mode.
+
+Only the function keys F1-F24 may be used as an exit hotkey, with the exception of F12 which is forbidden by Windows. Pressing an exit hotkey is functionally equivalent to using the Alt+F4 keyboard shortcut on the active window; it is not a forceful method, so the application is able to close cleanly. However, the application could also choose to ignore it, display a confirmation dialog, or not respond if it's hung.
+
+The following example maps F10 as an exit hotkey:
+```ini
+Hotkey=#40000043;:exit
+```
+Linux users that desire similar functionality should check the documentation of their desktop environment and/or window manager. Most support global hotkeys that can be configured to close the active window.
+
+## Gamepad Controls
+Flex Launcher has built-in support for gamepad controls through SDL. All settings for gamepads will be in a section titled `Gamepad`. Within the section, there are key=value pairs which define the gamepad settings and the commands to be run when a button or axis is pressed.
+
+### Settings
+The following settings are available in the `Gamepad` section to define the behavior of gamepads
+
+#### Enabled
+Defines whether or not gamepad controls are enabled. This setting is a boolean "true" or "false".
+
+Default: false
+
+#### DeviceIndex
+Defines the device index of the gamepad in SDL. If this value is negative, any gamepad may be used to control the launcher.
+
+Default: -1
+
+#### ControllerMappingsFile
+A path to a text file that contains 1 or more controller mappings to override the default. This is usually not necessary, but if you want to change the mapping for your controller, or there is no default mapping for your controller in SDL, it can be specified via this interface. A community database of mappings for many common controllers can be found [here](https://github.com/gabomdq/SDL_GameControllerDB). Alternatively, you may create a custom mapping using a GUI tool such as the [SDL2 Gamepad Tool](https://generalarcade.com/gamepadtool/).
+
+### Controls
+The controls are defined in key=value pairs, where the key is the name of the axis or button that is pressed, and the value is the command that is to be run, which is typically a [special command](#special-commands). An axis is an analog stick or a trigger. For analog sticks, negative (-) represents left for the x axis and up for the y axis, and postive (+) represents right for the x axis and down for the y axis.
+
+The [SDL GameController](https://wiki.libsdl.org/CategoryGameController) interface is an abstraction which conceptualizes a controller as having an Xbox-style layout. The mapping names in SDL are based on the *location* of the buttons on an Xbox controller, and may not correspond to the actual labelling of the buttons on your controller. For example, `ButtonA` is for the "bottom" button, `ButtonB` is for the "right" button of the 4 main control buttons. If you have a Playstation-style controller, those mapping names will correspond to the X button and the Circle button, respectively.
+
+The default controls in Flex Launcher allow the user to move the highlight cursor left and right by using the left stick or the DPad, select an entry by pressing A, and go back to the previous menu by pressing B. These controls are simple and will suffice for the vast majority of use cases.
+
+The following axis and buttons are available for control in Flex Launcher:
+- LStickX-
+- LStickX+
+- LStickY-
+- LStickY+
+- RStickX-
+- RStickX+
+- RStickY-
+- RStickY+
+- LTrigger
+- RTrigger
+- ButtonA
+- ButtonB
+- ButtonX
+- ButtonY
+- ButtonBack
+- ButtonGuide
+- ButtonStart
+- ButtonLeftStick
+- ButtonRightStick
+- ButtonLeftShoulder
+- ButtonRightShoulder
+- ButtonDPadUp
+- ButtonDPadDown
+- ButtonDPadLeft
+- ButtonDPadRight
+
+## Transparent Backgrounds
+*Note for Linux users only: this feature requires compositor implementation. See the [Linux Setup Guide](https://complexlogic.github.io/flex-launcher/setup_linux#transparent-backgrounds) for details.*
+
+Flex Launcher supports transparent backgrounds using the chroma key technique. This method works by setting a strategically chosen color to the background, which is removed later. In film production, this technique is often refered to as "blue screening" or "green screening".
+
+The chosen chroma key color should be one that is not found in your icons/text, as this would cause them to become transparent. The color is set with the `ChromaKeyColor` setting in the Background section. The default is `#010101`, a slight off-shade of black.
+
+A limitation of this method is that your icons and text must be fully opqaue or fully transparent. Any semi-transparent pixels will blend with the chroma key background so that it does not produce a color match, and consequently will not be removed from the background.
+
+Flex Launcher's text rendering is anti-aliased, which gives the text a "feathered" look with semi-transparent pixels on the edges. Normally, this is desirable, but in the case of chroma keying, semi-transparent pixels will cause your chroma key background color to "bleed through" on the edges of the text. If bright blue or bright green is chosen as the chroma key, this will result in a blue or green glowing effect around the text, which is usually undesirable. This is the reason why a dark color is chosen as the default chroma key. The bleed though appears as a dark outline rather than as a bright glowing.
+
+Some icons have shadows which are intended to provide a textured look. The shadows are usually semi-transparent, which will cause them to not render properly with the chroma key technique. You should choose icons without shadows, or manually erase the shadows from an icon if there are no other icons available for the given application. Some icons are also heavily anti-aliased, which can give a glowing or outline effect similar to the text rendering described above.
+
+Another common issue is the highlight. The default highlight is semi-transparent, which will not render properly when blended with the chroma key background. There are a few ways to address with this:
+- Set the `FillOpacity` setting to 0%, and use an outline-only highlight instead
+- Use custom [Selected Icons](#selected-icon-overrides) in place of Flex Launcher's highlight
+- Linux only: use a shader to recover the highlight's transparency. See the [Linux Setup Guide](https://complexlogic.github.io/flex-launcher/setup_linux#transparent-backgrounds) for details.
+
+Transparent backgrounds will require some effort to obtain a setup that looks good and works well. Be prepared to do a significant amount of tinkering if you wish to use this feature.
+
+### Windows Implenetation
+The Windows implementation of transparency is not hardware accelerated. If your refresh rate is very high, this can result in a signficant load on the CPU. If you find that the trasparent background is causing a high load on your system, consider changing the `VSync` setting to false and setting `FPSLimit` to 30 or lower, which will reduce the amount of computation required.
+
+### Animated Backgrounds
+Transparent backgrounds can be used to implement animated backgrounds in combination with another program. On Windows, [Wallpaper Engine](https://www.wallpaperengine.io) and [Lively](https://github.com/rocksdanister/lively) are popular choices. For Linux, I recommend [anipaper](https://github.com/Theldus/anipaper); see the [Linux Setup Guide](https://complexlogic.github.io/flex-launcher/setup_linux#animated-backgrounds) for details.
+
+### Custom Widgets
+Flex Launcher offers a simple clock widget which can show the current time and date. For more advanced functionality, you can combine a transparent background with a third party widget program. For example, you can have a widget that displays weather, news, etc. in addition to the time. [Rainmeter](https://www.rainmeter.net/) is a popular option on Windows, and [Conky](https://github.com/brndnmtthws/conky) for Linux.
diff --git a/docs/download.md b/docs/download.md
new file mode 100644
index 0000000..f0d4fc8
--- /dev/null
+++ b/docs/download.md
@@ -0,0 +1,64 @@
+---
+layout: default
+title: Download
+---
+
+## License
+Flex Launcher is released under the [Unlicense](https://unlicense.org/), i.e. public domain.
+
+## Download
+Binary packages are available for Windows 64 bit, Linux x86-64, and Raspberry Pi. The latest stable release is version {{site.launcher_version}}.
+
+
+
+
+
+## Source Code
+If your platform is not listed above, you're interested in development, or you simply prefer compiling your own software, you can download source packages below. See the [compilation guide](compilation) for build instructions.
+
+
+
+
diff --git a/extra/flex-launcher.png b/docs/flex-launcher.png
old mode 100755
new mode 100644
similarity index 100%
rename from extra/flex-launcher.png
rename to docs/flex-launcher.png
diff --git a/extra/flex-launcher.svg b/docs/flex-launcher.svg
old mode 100755
new mode 100644
similarity index 100%
rename from extra/flex-launcher.svg
rename to docs/flex-launcher.svg
diff --git a/docs/index.md b/docs/index.md
new file mode 100644
index 0000000..aa17d82
--- /dev/null
+++ b/docs/index.md
@@ -0,0 +1,58 @@
+---
+layout: default
+---
+
+Flex Launcher is a customizable application launcher and front end designed with a TV-friendly [10 foot user interface](https://en.wikipedia.org/wiki/10-foot_user_interface), intending to mimic the look and feel of a streaming box or game console. Flex Launcher allows you to launch applications on your HTPC or couch gaming PC entirely by use of a TV remote or a gamepad. No keyboard or mouse required!
+
+Flex Launcher is compatible with both Windows and Linux (including Raspberry Pi devices).
+
+## Screenshots
+
+
+
+## About
+Flex Launcher was initially released in late 2021. Its creation was motivated by the puzzling lack of good HTPC control options at the time. Flex Launcher is designed with the following principles in mind:
+- **Flexibility:** Indicated in the name *Flex* Launcher, the configuration should be highly flexible, with user having a great deal of control over the appearance and behavior of the program.
+- **Simplicity:** The interface should be simple, yet beautiful.
+- **Portability:** Many of the other existing solutions only support a single platform. Flex Launcher aims to be portable and cross-platform, running on ARM-based SBCs such as Raspberry Pi, to high-end Windows PCs, and everything in between.
+- **Ease of Navigation:** Flex Launcher should be completely navigable using only directional keys, enter, and back. The launcher should include built-in support for gamepad devices.
+
+Flex Launcher is completely free and open source. Accordingly, you are entitled to modify or redsitribute it as you wish. The source code is available on [GitHub](https://github.com/complexlogic/flex-launcher).
+
+## Features
+The following is a list of features supported by Flex Launcher:
+
+#### Custom Backgrounds
+The background of the Flex Launcher is customizable. There are three supported modes for the background: a solid color, an image, or a slideshow of images. In the case of the slideshow, the user is able to specify how long to show the images, and how quickly to fade between them.
+
+#### Application Icons
+The user is able to pick the application icons, specify how large they should be, and how far apart they should be. The user is also able to control the vertical centering of the application icons.
+
+#### Submenus
+Flex Launcher supports submenus, which allows you to group your various applications in an organized fashion. For example, you can have separate menus for media and gaming applications.
+
+#### Selection Highlighting
+The user is able to change the size, color, opacity, and corner radius of the default highlight rectangle, as well as the border.
+
+Additionally, Flex Launcher also supports an icon-based selection mode where the user can specify a different icon that will display when a menu entry is selected. This allows the user to implement custom highlighting effects.
+
+#### Fonts
+The font, size, color, and opacity of all texts are customizable. Flex Launcher ships with a few royalty free fonts, but the user is able to substitute their own font instead.
+
+#### Hotkeys
+With the hotkeys feature, you can map custom commands to a button on your remote. This can be used to “speed dial” your favorite applications, add new controls, or exit a currently running application.
+
+#### System Controls
+There are built-in menu options to shut down, restart, or put your PC to sleep.
+
+#### Gamepad Controls
+Flex Launcher has full support for gamepad controls, allowing easy menu navigation. Enable the controls via the configuration file and connect your gamepad. The user can also add a custom mapping for a given gamepad.
+
+#### Screensaver
+Flex Launcher includes a screensaver mode that will dim the screen after it has been idle. The user is able to adjust how long the idle time should be, and how much to dim the screen.
+
+#### Clock
+There is an available clock widget that displays the current time and, optionally, the current date. The user is able to adjust the size, font, placement, and time/date format.
+
+## Support
+If you believe you have found a bug in Flex Launcher, open an issue on the [GitHub issue tracker](https://github.com/complexlogic/flex-launcher/issues). For general technical support or feature requests, please use the [Discussions page](https://github.com/complexlogic/flex-launcher/discussions) instead.
diff --git a/docs/setup.md b/docs/setup.md
new file mode 100644
index 0000000..6172668
--- /dev/null
+++ b/docs/setup.md
@@ -0,0 +1,87 @@
+---
+layout: default
+title: Setup Guide
+---
+# Setup Guide
+## Table of Contents
+1. [Overview](#overview)
+2. [Selecting Menu Icons](#selecting-menu-icons)
+3. [Maintaining Controls](#maintaining-contrast)
+4. [Launching a Web Browser](#launching-a-web-browser)
+5. [Watching YouTube](#watching-youtube)
+6. [Directly Launching Steam Games](#directly-launching-steam-games)
+
+## Overview
+This page contains tips for setting up Flex Launcher, and HTPCs in general. The recommendations herein are broadly applicable to all platforms supported by Flex Launcher. Additionally, see the platform setup guides for platform-specfic advice:
+- [Windows Setup Guide](https://complexlogic.github.io/flex-launcher/setup_windows)
+- [Linux Setup Guide](https://complexlogic.github.io/flex-launcher/setup_linux)
+
+Make that you are generally familiar with the [configuration options](https://complexlogic.github.io/flex-launcher/configuration) as well.
+
+## Selecting Menu Icons
+Transparency is essential for menu icons. Therefore, you should not use JPEG images for icons, since the JPEG format does not support transparency. Use PNG or WebP instead. PNG icons for most popular applications are easily found online in common sizes up to 256x256.
+
+Any icon that is not the same resolution as the `IconSize` setting in your config file will be stretched. If your `IconSize` setting is not a common icon resolution (e.g. 256), then it is advisable to find SVG icons instead. However, Flex Launcher does not currently support SVGs for menu icons, so you will need to rasterize them into PNG or WebP using a tool such as [Inkscape](https://inkscape.org/). An example command can quickly rasterize an SVG into your desired resolution:
+```bash
+inkscape --export-width= --export-type=png /path/to/file.svg
+```
+You can easily write a script to rasterize all SVGs in a directory to PNG at a given resolution. Here is an example in Python:
+```python
+import glob
+import subprocess
+WIDTH=300 # Width of the PNG in pixels
+
+svg_files = glob.glob("*.svg")
+for file in svg_files:
+ subprocess.run(['inkscape', f'--export-width={WIDTH}', '--export-type=png', file])
+```
+
+## Maintaining Contrast
+When using an image as the background, it is often difficult to read the text that is displayed on top. This is particularly true if the image is a photograph and the text is white. Flex Launcher has several features that will improve the contrast between the background and the objects on top.
+
+The background overlay feature draws a solid color, typically black, over the background. This will darken the background to improve the contrast ratio. The user can adjust how much to darken the background with the `OverlayOpacity` setting.
+
+Text shadows will give displayed text a textured, 3 dimensional appearance, which helps it stand out from the background.
+
+The highlight and scroll indicators each have an outline setting. The user can choose how thick and which color the outline should be, to improve the contrast with the background.
+
+## Launching a Web Browser
+My recommended web browser for HTPC use is Chrome/Chromium. This browser has many command line launch options which make it more flexible to configure than Firefox and its derivatives. Some launch options that have particular relevance to HTPC use:
+- `--start-fullscreen`: This starts the browser in a fullscreen mode. However, do note that the address bar will be hidden, so make sure to include the URL of the website you want to launch as an argument.
+- `--force-device-scale-factor=n`: This can be used to make web pages rendered larger for viewing from a distance. For example, try, 1.1 or 1.2 as `n`.
+- `--user-agent`: Sets a custom HTML user-agent string. This is necessary for [watching YouTube](#watching-youtube).
+
+## Watching YouTube
+There is currently no desktop application for YouTube. However, there is a TV-friendly web interface located at [youtube.com/tv](https://www.youtube.com/tv) that is intended for use by Smart TVs . Google recently blocked access to this interface for desktop web browsers, but the block can be easily circumvented by spoofing the user-agent string of a Smart TV. A list of valid Smart TV user-agent strings is easily found online by search engine. The following example menu entries will launch an app-like YouTube experience in a browser:
+
+**Windows:**
+```ini
+Entry=YouTube;C:\icons\youtube.png;"C:\Program Files\Google\Chrome\Application\chrome.exe" --start-fullscreen --user-agent="Mozilla/5.0 (Linux; Tizen 2.3; SmartHub; SMART-TV; SmartTV; U; Maple2012) AppleWebKit/538.1+ (KHTML, like Gecko) TV Safari/538.1+" youtube.com/tv
+```
+
+**Linux:**
+```ini
+Entry=YouTube;/path/to/icons/youtube.png;chromium --start-fullscreen --user-agent="Mozilla/5.0 (Linux; Tizen 2.3; SmartHub; SMART-TV; SmartTV; U; Maple2012) AppleWebKit/538.1+ (KHTML, like Gecko) TV Safari/538.1+" youtube.com/tv
+```
+
+This method is far superior to other HTPC YouTube options, such as Kodi's YouTube add-on. You can install a browser extension such as [uBlock Origin](https://ublockorigin.com/) to prevent ads from being shown before videos.
+
+The web interface also supports casting videos from the YouTube app on your smartphone to your TV. You can pair your phone in the settings. You can also sign into your YouTube account in the settings if you wish.
+
+### Exiting
+The one caveat to this method is that the exit button in the menu doesn't work. As such, you will need to provide an alternative method to close the web browser after you've finished watching so you can return back to the launcher. For Windows users, the most straightforward solution is to configure an [exit hotkey](https://complexlogic.github.io/flex-launcher/configuration#exit-hotkey-windows-only) on your remote. Linux users should set up a hotkey with their DE/WM to close the active window.
+
+## Directly Launching Steam Games
+Steam users may desire to launch their most frequently played games directly from Flex Launcher to avoid having to navigate through the Steam client UI first. Valve provides a [protocol](https://developer.valvesoftware.com/wiki/Steam_browser_protocol) to directly launch games, among other actions. To do so, pass `steam://run/` as an argument to Steam, where `` is replaced by the id of the game you want to watch. You can find the id of a game by searching [steamdb](https://steamdb.info/). For example, the id of Portal 2 is 620. You would structure your menu entry to launch Portal 2 like so:
+
+**Windows:**
+```ini
+Entry=Portal 2;C:\icons\portal_2.png;"C:\Program Files (x86)\Steam\steam.exe" steam://run/620
+```
+
+**Linux:**
+```ini
+Entry=Portal 2;/path/to/icons/portal_2.png;steam steam://run/620
+```
+
+Make sure you have autologin configured in Steam, otherwise you will be prompted for your password before the game launches.
diff --git a/docs/setup_linux.md b/docs/setup_linux.md
new file mode 100644
index 0000000..d348a0a
--- /dev/null
+++ b/docs/setup_linux.md
@@ -0,0 +1,440 @@
+---
+layout: default
+title: Linux Setup Guide
+---
+# Linux Setup Guide
+## Table of Contents
+1. [Overview](#overview)
+2. [Autostarting](#autostarting)
+3. [Choosing a Distro](#choosing-a-distro)
+4. [Desktop Enviornment](#desktop-environment)
+5. [Display Protocol](#display-protocol)
+6. [Transparent Backgrounds](#transparent-backgrounds)
+7. [Kiosk Mode Setup](#kiosk-mode-setup)
+8. [HTPC as Audio Receiver](#htpc-as-audio-receiver)
+9. [Using an IR Remote](#using-an-ir-remote)
+
+## Overview
+This page contains tips for setting up Flex Launcher on Linux-based systems, as well as general HTPC setup tips.
+
+## Autostarting
+In a typical HTPC setup, Flex Launcher is autostarted after boot. On Linux, this can be accomplished in multiple ways. The most widely implemented is [XDG Autostart](https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html). Application .desktop files in `~/.config/autostart` will be autostarted upon user login. The .desktop file for Flex Launcher is installed to `/usr/share/applications`. Copy it to your autostart directory:
+```bash
+mkdir -p ~/.config/autostart
+cp /usr/share/applications/flex-launcher.desktop ~/.config/autostart
+```
+Additionally, some desktop enviornments have their own, separate autostart protocol. Consult your DE's documentation for more details.
+
+## Choosing A Distro
+My preferred distribution for a Linux HTPC is [Arch](https://archlinux.org/). It has a minimal base installation and very up-to-date packages, which make it well suited for HTPC use.
+
+If you dislike Arch's rolling release model, another good choice is [Debian](https://www.debian.org/). When installing, make sure to deselect a desktop environment so you can have a minimal base install, similar to Arch.
+
+## Desktop Environment
+I recommend [Openbox](http://openbox.org/wiki/Main_Page), which is not a full-fledged desktop enviornment, but rather a standalone window manager. An HTPC is a very simple device, and most of the features of desktop environments are not needed and add unnecessary bloat. Since HTPC applications are always in fullscreen, not even compositing is necessary.
+
+Openbox is lightweight and highly customizable. The basic install of Openbox provides only a black root window, over which Flex Launcher and your desired applications can be drawn.
+
+## Display Protocol
+Being based on SDL, Flex Launcher has support for both X11 and Wayland display protocols. I recommend using X11. The benefits that Wayland offers aren't broadly applicable to an HTPC, and Wayland support is still lacking in many areas.
+
+If you choose to run Flex Launcher in Wayland, it is strongly recommended to use it with the latest stable release of SDL, as later versions have seen significantly improved support.
+
+## Transparent Backgrounds
+Transparent backgrounds requires compositor support. I recommend [picom](https://github.com/yshui/picom), which supports transparency via GLSL shaders. The method described below requires version 10 or later which, as of this writing, is not yet packaged for most Linux distros. If this is this case for your distro, you will need to build it from source yourself.
+
+The picom option `--window-shader-fg` can be used to specify a custom GLSL shader to apply to the windows. The below shader program can be used as a starting point to implement transparency with Flex Launcher. The macros should be changed to match the values in your Flex Launcher config file, if necessary.
+
+```glsl
+#version 330
+
+// Set this to 1 to restore a semi-transparent highlight
+#define RESTORE_HIGHLIGHT 1
+
+// Set this to 1 to use a background overlay to darken the video
+#define BACKGROUND_OVERLAY 0
+
+#define BACKGROUND_OVERLAY_R 0x00
+#define BACKGROUND_OVERLAY_G 0x00
+#define BACKGROUND_OVERLAY_B 0x00
+#define BACKGROUND_OVERLAY_OPACITY 0.25
+
+// Replace with the values from your Flex Launcher config
+#define CHROMA_R 0x01
+#define CHROMA_G 0x01
+#define CHROMA_B 0x01
+#define HIGHLIGHT_R 0xFF
+#define HIGHLIGHT_G 0xFF
+#define HIGHLIGHT_B 0xFF
+#define HIGHLIGHT_OPACITY 0.25
+
+#define BLEND(src, dst) vec4( \
+ src.x * src.w + (dst.x * (1.0 - src.w)), \
+ src.y * src.w + (dst.y * (1.0 - src.w)), \
+ src.z * src.w + (dst.z * (1.0 - src.w)), \
+ src.w + (dst.w * (1 - src.w)) \
+)
+
+in vec2 texcoord;
+uniform sampler2D tex;
+uniform vec4 chroma_key = vec4(float(CHROMA_R) / 255.0, float(CHROMA_G) / 255.0, float(CHROMA_B) / 255.0, 1.0);
+uniform vec4 highlight_color = vec4(float(HIGHLIGHT_R) / 255.0, float(HIGHLIGHT_G) / 255.0, float(HIGHLIGHT_B) / 255.0, float(int(HIGHLIGHT_OPACITY * 255.0)) / 255.0);
+#if BACKGROUND_OVERLAY
+uniform vec4 overlay_color = vec4(float(BACKGROUND_OVERLAY_R) / 255.0, float(BACKGROUND_OVERLAY_G) / 255.0, float(BACKGROUND_OVERLAY_B) / 255.0, float(int(BACKGROUND_OVERLAY_OPACITY * 255.0)) / 255.0);
+#endif
+
+vec4 window_shader()
+{
+ vec4 c = texelFetch(tex, ivec2(texcoord), 0);
+
+ // Remove background
+ vec4 vdiff = abs(chroma_key - c);
+ float diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
+ if (diff < 0.0001)
+#if BACKGROUND_OVERLAY
+ c = overlay_color;
+#else
+ c.w = 0.0;
+#endif
+
+ // Restore highlight
+#if RESTORE_HIGHLIGHT
+ else {
+ vec4 blend = BLEND(highlight_color, chroma_key);
+ vdiff = abs(blend - c);
+ diff = max(max(max(vdiff.r, vdiff.g), vdiff.b), vdiff.a);
+ if (diff < 0.01) {
+#if BACKGROUND_OVERLAY
+ c = BLEND(highlight_color, overlay_color);
+#else
+ c = highlight_color;
+ c *= c.w;
+#endif
+ }
+ }
+#endif
+
+ return c;
+}
+
+```
+Save the shader program to a .glsl file in a directory of your choice.
+
+Since you will typically not want to run the compositor while your launched applications are running, you will need to start and stop it frequently. This is best accomplished with a systemd service. Create a new user unit file:
+```bash
+nano /etc/systemd/user/picom-transparent.service
+```
+Paste the following into the file:
+```ini
+[Unit]
+Description=X11 compositor with alpha transparency
+
+[Service]
+ExecStart=/usr/bin/picom --backend glx --force-win-blend --window-shader-fg=/path/to/shader.glsl
+
+[Install]
+WantedBy=multi-user.target
+```
+Replace `` with the appropriate path, then save the file. The compositor can be enabled/disabled with:
+```bash
+systemctl --user start picom-transparency.service
+systemctl --user stop picom-transparency.service
+```
+Use shell scripts to launch your applications and make sure to stop the compositor prior to launch, and start it again after the application has completed.
+
+### Animated Backgrounds
+For an animated transparent background implementation, I recommend [anipaper](https://github.com/Theldus/anipaper), which will play a video of your choice in a loop. anipaper should be run with the following options enabled:
+- `-b` (Borderless Fullscreen): Since this method requires a compositor, we will need to run anipaper as a borderless fullscreen window rather than as a wallpaper
+- `-p` (Pause): We will need to pause the playback when the application launches, and resume it after it finishes
+- `-d` (Hardware decoding): This will keep the CPU use as low as possible, and consequently fan noise and power consumption. Requires the hardware device name as an argument. This option is not absolutely required, but you should use it if your hardware is supported.
+
+In your autostart setup, make sure that anipaper starts *before* Flex Launcher. This ensures that Flex Launcher will have the window focus.
+
+#### Pausing anipaper
+When the `-p` option is enabled, anipaper can be paused when applications launch, and resumed when they finish. This is necessary to prevent anipaper from unecessarily consuming resources when the video is not visible. Use the following command in your scripts to pause and resume anipaper
+```bash
+pkill -SIGUSR1 anipaper
+```
+
+#### Example Script
+To handle the advanced functionality of starting and stopping various services when applications are launched, you will need to use a shell script. Here is a simple example:
+```bash
+# Pre-launch
+systemctl --user stop picom-transparent.service
+pkill -SIGUSR1 anipaper
+
+# Launch application
+if [[ "$1" == "kodi" ]]; then
+ ...
+elif [[ "$1" == "youtube" ]]; then
+ ...
+fi
+
+# Post-launch
+systemctl --user start picom-transparent.service
+pkill -SIGUSR1 anipaper
+```
+The above example script takes an argument which determines which application to launch. The script executes pre and post launch commands which are common to all applications, as well as commands that are specific to the particular application being launched. In your Flex Launcher config, your menu entry command should be the path to the script with the application you want to launch as the first argument.
+
+## Kiosk Mode Setup
+"Kiosk Mode" typically refers to a user interface which resembles an embedded-style device that performs only a single function (as opposed to a multitasking PC with a desktop interface). This section contains instructions to set up my interpretation of a "Kiosk Mode" interface for a Linux HTPC. The design is based on my recommendations in the previous sections, consisting of Xorg, Openbox, and Flex Launcher.
+
+### Prerequisites
+Before starting I assume that you have one of the following operating systems installed *without* a desktop evironnment (only a console login):
+- Arch Linux
+- Debian Bookworm or later
+- Raspberry Pi OS Lite
+
+I also assume that you can use the Linux command line at an intermediate level or higher.
+
+### First Steps
+The first thing to do is configure a network connection and SSH server. On Raspberry Pi, both of those tasks are easily accomplished with the `raspi-config` utility. Otherwise, the exact steps will vary based on which operating system you are on (Arch/Debian) and what backends you choose. Refer to the [Arch Wiki](https://wiki.archlinux.org/) and [Debian Wiki](https://wiki.debian.org/) for more detailed help.
+
+It is recommended to set up a static IP on your LAN. Since you will be doing most of your setup and maintenance remotely via SSH, you will want to have a consistent login.
+
+You will also need to install a terminal-based text editor, since we don't have any graphical interface yet. I recommend nano, and that is what will be used in subsequent sections. You can use a different text editor if you wish, just make sure to substitute commands where appropriate.
+
+### Set Up Autologin
+Configure the TTY console to log you in automatically without user or password prompt. On Raspberry Pi, you can use `raspi-config`, or you can also follow the instructions for Arch/Debian below which will also work.
+
+Create a systemd drop-in file for the getty TTY1 service:
+```
+sudo nano /etc/systemd/system/getty@tty1.service.d/autologin.conf
+```
+Paste the following into the file:
+
+```ini
+[Service]
+ExecStart=
+ExecStart=-/sbin/agetty --autologin --noclear %I $TERM
+```
+Replace `` with your username, then save the file. Reboot your HTPC and verify that it logs you into the console automatically.
+
+### Install Packages
+Install the necessary packages.
+
+**Arch:**
+```bash
+sudo pacman -S xorg xorg-xinit openbox unclutter pulseaudio wget
+```
+**Debian/Raspberry Pi:**
+```bash
+sudo apt install xorg openbox unclutter-xfixes pulseaudio wget
+```
+Then, install Flex Launcher according to the instructions on the [README](https://github.com/complexlogic/flex-launcher#linux). Also, make sure to [copy the assets to your home directory](https://github.com/complexlogic/flex-launcher#copying-assets-to-home-directory).
+
+### Configure Xorg
+Configure X to start after user login with `.bash_profile` and `startx`:
+```bash
+nano ~/.bash_profile
+```
+Paste the following into the file and save it:
+```bash
+if [ "x${SSH_TTY}" = "x" ]; then
+ startx
+fi
+```
+The `.bash_profile` script will execute every time the user logs in, *including remote logins via SSH*. The purpose of the `if` block is to ensure that `startx` will only be executed during a local login, not remote logins via SSH.
+
+The `startx` program will look for an `xinitrc` script to run: first in the user's home directory, then in the system directory. We will define a basic user `xinitrc` script to configure X and start Openbox:
+```bash
+nano ~/.xinitrc
+```
+Paste the following into the file:
+```bash
+#!/bin/sh
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+sysresources=/etc/X11/xinit/.Xresources
+sysmodmap=/etc/X11/xinit/.Xmodmap
+
+# merge in defaults and keymaps
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f "$userresources" ]; then
+ xrdb -merge "$userresources"
+fi
+
+if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+fi
+
+# Startup scripts
+if [ -d /etc/X11/xinit/xinitrc.d ] ; then
+ for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+unclutter --start-hidden &
+exec openbox-session
+```
+You can make additions to this script if you wish. For example, the screen resolution can be forced using the `xrandr` utility. However, note that the `exec openbox-session` line of the script will never return. Therefore, any additions you make must come *before* this line.
+
+### Configure Openbox
+Openbox ships with default configuration files installed to `/etc/xdg/openbox`. These files should be copied to your home directory:
+```bash
+mkdir -p ~/.config/openbox
+cp -a /etc/xdg/openbox/ ~/.config/
+```
+Among these configuration files is `autostart`, which Openbox will execute after initialization. This is the best way to autostart Flex Launcher:
+```bash
+nano ~/.config/openbox/autostart
+```
+Add `flex-launcher` to the file, then save it.
+
+#### Application Menu
+You can access a basic application menu by right clicking anywhere on Openbox's root window. The menu entries are populated from `~/.config/openbox/menu.xml`. On Arch, this is a static menu that was pre-populated with programs, most of which you won't have installed. See the [Openbox Wiki](http://openbox.org/wiki/Help:Menus#Static_menus) for editing instructions. On Debian/Raspberry Pi, this is a dynamic menu that is automatically populated from your installed .desktop files, so you shouldn't need to edit anything.
+
+You can also install taskbars and various other graphical interfaces for Openbox, however, this is not recommended. The default interface is clean and the right-click menu provides enough basic functionality for maintenance of your HTPC.
+
+#### Keybinds
+[Keybinds](http://openbox.org/wiki/Help:Bindings) can be set in the `rc.xml` file, which maps a keypress to an [Action](http://openbox.org/wiki/Help:Actions). The "Close" action closes the active window, which is very useful for an HTPC. It allows you to quit the current application and return back to the launcher by using a button on your remote. For example, you can use the F10 key to quit the current application like so:
+```bash
+nano ~/.config/openbox/rc.xml
+```
+In the `` section, paste the following:
+```xml
+
+
+
+```
+This assumes that you have a key on your TV remote that maps to F10.
+
+### Install Applications
+The last step is to install your desired applications. Edit your Flex Launcher configuration file to add menu entries for each of the applications. See the [configuration file documentation](https://complexlogic.github.io/flex-launcher/configuration) for more details.
+
+## HTPC as Audio Receiver
+You can use your HTPC as a smart audio receiver for listening to music or podcasts on your living room speakers.
+
+### Bluetooth
+If your HTPC has Bluetooth connectivity, you can use it as a receiver and play audio from your smartphone or other device. PulseAudio has support for the A2DP Bluetooth profile via the BlueZ stack. Make sure you have the module installed. It is packaged as `pulseaudio-bluetooth` on Arch and `pulseaudio-module-bluetooth` on Debian/Raspberry Pi. Also, make sure that the systemd bluetooth service is enabled.
+
+You will need to pair your device with your HTPC. This is best done with the `bluetoothctl` utility while you are logged in via SSH. Instructions can be found on the [Arch Wiki](https://wiki.archlinux.org/title/Bluetooth#Pairing) (applicable to all distros, not just Arch).
+
+The pairing only needs to be performed once. Subsequent connections can be initiated from the Bluetooth settings on your mobile device. Make sure to check on your device that audio output is enabled for the connection. Then, you can test playing some audio. PulseAudio should send the audio to your default sink without any additional configuration.
+
+### Spotify Connect
+Spotify has a feature called Spotify Connect that allows Premium subscribers to stream audio to another device from the app. [Librespot](https://github.com/librespot-org/librespot) implements Spotify Connect as a Linux daemon. With Librespot, you can play Spotify audio on your HTPC, but control it from your smartphone.
+
+First, install Librespot. I recommend building it from source. The instructions are available on GitHub.
+
+I manage Librespot with a systemd user service:
+```bash
+mkdir -p ~/.config/systemd/user
+nano ~/.config/systemd/user/librespot.service
+```
+Paste the following into the file:
+```ini
+[Unit]
+Description=Librespot Spotify Connect daemon
+After=network-online.target
+Wants=network-online.target
+Wants=pulseaudio.service
+After=pulseaudio.service
+
+[Service]
+ExecStart=/usr/bin/librespot \
+ --backend pulseaudio \
+ --bitrate 320 \
+ --device-type computer \
+ --disable-audio-cache \
+ --name "HTPC"
+
+[Install]
+WantedBy=network-online.target
+```
+Verify that the path of the `librespot` executable is the same on your system, or change it if necessary. The `--bitrate` controls the bitrate of the streamed audio in kbps. The `--name` controls which name your HTPC will show up as in the Spotify app devices menu. Change them if desired.
+
+If you want Librespot to always run, you can simply enable the service:
+```bash
+systemctl --user enable librespot
+```
+If you want Librespot to stop when you launch an application, you will have to use scripts and manually start and stop it:
+```bash
+systemctl --user start librespot
+systemctl --user stop librespot
+```
+Verify Librespot is running with:
+```bash
+systemctl --user status librespot
+```
+Then, try to connect to it with the Spotify app on your phone.
+
+## Using an IR Remote
+Some mini PCs have an integrated IR receiver, which can receive signals from a conventional TV remote. The Linux kernel has built-in support for decoding IR signals, which allows you to translate them into keyboard presses. Before starting, make sure the IR receiver is enabled in your motherboard settings.
+
+The IR signal decoding can be controlled with the `ir-keytable` utility. This program is packaged with `v4l-utils` on most distros. First, check to see that your IR receiver is recognized:
+```bash
+sudo ir-keytable
+```
+The result should look something like this:
+```
+Found /sys/class/rc/rc0/ with:
+ Name: ITE8708 CIR transceiver
+ Driver: ite-cir
+ Default keymap: rc-rc6-mce
+ Input device: /dev/input/event3
+ LIRC device: /dev/lirc0
+ Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm
+ Enabled kernel protocols: lirc nec rc-6
+ bus: 25, vendor/product: 1283:0000, version: 0x0000
+ Repeat delay = 500 ms, repeat period = 125 ms
+```
+Take note of the supported kernel protocols. Test the receiving with `-t`:
+```bash
+ir-keytable -v -t -p irc,rc-5,rc-5-sz,jvc,sony,nec,sanyo,mce_kbd,rc-6,sharp,xmp,imon,rc-mm
+```
+The protocols specified with `-p` should be comma delimited, and must *not* contain a space. You should update the protocols of the above command based on your output of `sudo ir-keytable` in the previous step.
+
+The `-t` mode will output information for each received signal. Point your remote at the receiver and press various buttons to verify that the signals are being received. Take note of the protocol and the hex values for each button. You will need to create a mapping file that contains the corresponding hex value for each button name. Here is a simple example:
+```
+#table RCA, type: rc-6
+0x800f741e KEY_UP
+0x800f741f KEY_DOWN
+0x800f7420 KEY_LEFT
+0x800f7421 KEY_RIGHT
+0x800f7422 KEY_ENTER
+0x800f7423 KEY_BACKSPACE
+0x800f7425 KEY_ESC
+```
+The table name is arbitrary, but the `type` must match one of the supported protocols from the previous step. You can find a comprehensive list of valid button names by running:
+```bash
+irrecord -l
+```
+Save your mapping file as `/etc/rc_keymaps/default.txt`. Then, test the mapping:
+```bash
+sudo ir-keytable -c -w /etc/rc_keymaps/default.txt
+```
+Open a program on your HTPC, press the mapped buttons on your remote, and verify that the proper keys are being triggered on the HTPC.
+
+### Make the Mapping Persistent
+The mapping will not persist between reboots. Therefore, you will need to set up a way to run the `ir-keytable` command automatically after boot. One way to do that is with a systemd service.
+```bash
+sudo nano /etc/systemd/system/remote-setup.service
+```
+Paste the following into the file:
+```ini
+[Unit]
+Description=Set up IR remotes
+After=multi-user.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ir-keytable -c -w /etc/rc_keymaps/default.txt
+
+[Install]
+WantedBy=multi-user.target
+```
+Save the file, then enable the service:
+```bash
+sudo systemctl enable remote-setup
+```
+Reboot your HTPC and verify that the remote still works.
diff --git a/docs/setup_windows.md b/docs/setup_windows.md
new file mode 100644
index 0000000..20bdb32
--- /dev/null
+++ b/docs/setup_windows.md
@@ -0,0 +1,56 @@
+---
+layout: default
+title: Windows Setup Guide
+---
+# Windows Setup Guide
+## Table of Contents
+1. [Overview](#overview)
+2. [Editing Your Config File](#editing-your-config-file)
+3. [Autostarting](#autostarting)
+4. [Autologin](#autologin)
+5. [Disable Lock Screen](#disable-lock-screen)
+6. [Kiosk Mode Setup](#kiosk-mode-setup)
+
+## Overview
+This page contains tips for setting up Flex Launcher on Windows-based systems. These instructions are tailored for Windows 10, but should apply to Windows 11 as well.
+
+## Editing Your Config File
+I recommend editing your configuration file with a development-oriented text editor such as [Notepad++](https://notepad-plus-plus.org/) instead of the default Windows Notepad program. These text editors have color syntax highlighting for the INI format which makes sections, keys, values, and comments visually distinct.
+
+Several settings require a path as a value. In Windows Explorer, hold shift on your keyboard, then right click on a file or folder and select "Copy as path" from the context menu to copy the file path. You can then paste the path into your configuration file so you don't have to type the path manually.
+
+## Autostarting
+In a typical HTPC setup, Flex Launcher should be configured to autostart after login. Right click `flex-launcher.exe` and selct "Create shortcut" in the context menu. Use Windows key + R to bring up the run box, then type `shell:startup` and press enter. This will bring up a Windows Explorer window of your autostart folder. Move the shortcut created in the previous step into this folder, which will cause Flex Launcher to autostart.
+
+Make sure that no other graphical programs are set to autostart. The window creation order of autostarted programs is not easily predictable, so if there is another program that creates a window *after* Flex Launcher, it could cause Flex Launcher to lose the window focus.
+
+## Autologin
+Autologin should be configured to prevent users from having to enter a PIN/password with a keyboard after boot. Use Windows key + R to bring up the run box, then type `netplwiz` and press enter. In the resulting window, uncheck the box that says "Users must enter a user name and password to use this computer", then click apply. In the dialog box that pops up, enter the user name that you want to sign in automatically, and the password for it.
+
+## Disable Lock Screen
+If you plan to use the `:sleep` special command to put your HTPC to sleep, you will be greeted by the Windows lock screen by default after your HTPC wakes up. This requires you to enter your PIN/password with a keyboard, even if autologin was configured. The lock screen should be disabled so that you return back to Flex Launcher immediately after waking from sleep.
+
+Open the Settings app, then select Accounts, then select Sign-in options. Under the "Require sign-in" section, change the drop down menu value to "Never".
+
+## Kiosk Mode Setup
+"Kiosk Mode" typically refers to a user interface which resembles an embedded-style device that performs only a single function (as opposed to a multitasking PC with a desktop interface). This section contains instructions to set up my interpretation of a "Kiosk Mode" interface for a Windows HTPC. Before starting, make sure you have [set up autologin](#autologin) and [disabled your lock screen](#disable-lock-screen) per the previous sections.
+
+In Windows Explorer, navigate to the folder that contains Flex Launcher. Hold shift on your keyboard, then right click on `flex-launcher.exe` and select "Copy as path" from the context menu. Use Windows key + R to bring up the run box, then type `gpedit.msc` and press enter. In the left pane under "User Configuration", select "Administrative Templates", then "System". In the right pane, double click "Custom User Interface". Change the radio button to "Enabled". Then, under "Interface file name", paste the path to `flex-launcher.exe` that was copied in the previous step. Press OK to confirm the changes. This will cause Flex Launcher to replace the Windows desktop as your default graphical user interface.
+
+Running Flex Launcher in this manner changes the working directory. The default config file that ships with Flex Launcher uses relative paths from the directory containing `flex-launcher.exe`, which will no longer be valid. Therefore, you should convert all relative paths in your config file to absolute paths, e.g. `.\assets\icons\kodi.png` should instead be `C:\path\to\assets\icons\kodi.png`, otherwise images will not load properly.
+
+Reboot your HTPC for the change to take effect.
+
+### Restoring the Desktop
+It may be desirable to use the desktop interface occasionally, e.g. during maintenance or installation of new software. You can get your desktop back by running `explorer.exe`. This can be accomplished in a few ways.
+
+Using the `QuitCmd` setting in your config file, you can automatically restore your desktop after you quit Flex Launcher:
+```ini
+[General]
+...
+QuitCmd=:fork explorer.exe
+```
+
+To manually restore the desktop, hold Ctrl + Shift + Esc to bring up Task Manager. Then, select File->Run new task from the toolbar. Type `explorer.exe` and press OK.
+
+You can permanently switch back to the desktop as your default interface by navigating to Custom User Interface in the Group Policy editor as above, and disabling it.
\ No newline at end of file
diff --git a/extra/docs/compilation_guide.md b/extra/docs/compilation_guide.md
deleted file mode 100755
index a40f0f4..0000000
--- a/extra/docs/compilation_guide.md
+++ /dev/null
@@ -1,98 +0,0 @@
- # Compiling Flex Launcher
-
- Table of Contents
-
-
-
-
-## Overview
- Flex Launcher builds natively on Linux and Windows, and features a cross-platform CMake build system. The following external dependencies are required:
- - SDL >= 2.0.14
- - SDL_image >=2.0.5
- - SDL_ttf >= 2.0.15
-
-## Linux
-Flex Launcher on Linux builds with GCC. This guide assumes you already have the tools Git, CMake, and GCC installed on your system. If not, consult your distro's documentation.
-
-First, install the dependencies. The steps to do so are dependent on your distro:
-
-### APT-based Distributions (Debian, Ubuntu, Mint, Raspberry Pi OS etc.)
-```
-sudo apt install libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev
-```
-
-### Pacman-based Distributions (Arch, Manjaro, etc.)
-```
-sudo pacman -S sdl2 sdl2_image sdl2_ttf
-```
-
-### Building
-Clone the master repo and create a build directory:
-```
-git clone https://github.com/complexlogic/flex-launcher.git
-cd flex-launcher
-mkdir build && cd build
-```
-Generate the Makefile:
-```
-cmake -Wno-dev ..
-```
-If you're building on Raspberry Pi, it's recommended to pass -DRPI=1 to cmake, which tweaks the default configuration to be more Pi-centric.
-
-Build and test the program:
-```
-make
-./flex-launcher
-```
-Optionally, install it into your system directories:
-```
-sudo make install
-```
-By default, this will install the program and assets with a prefix of /usr/local. If you wish to use a different prefix, re-run the cmake generation step with the -DCMAKE_INSTALL_PREFIX flag.
-
-## Windows
-Flex Launcher on Windows builds with Visual Studio, and uses [vcpkg](https://vcpkg.io/en/index.html) to manage the dependencies. Before starting, make sure the following steps are completed:
-- Visual Studio is installed. The Community Edition is available for download without charge from Microsoft's website. The following tools and features for Visual Studio are required:
- - C++ core desktop features
- - Latest MSVC
- - Latest Windows SDK
- - C++ CMake tools
-- Git is installed and in your PATH environment variable
-- CMake is installed and in your PATH environment variable
-
-### Building
-Clone the master repo and create a build directory:
-```
-git clone https://github.com/complexlogic/flex-launcher.git
-cd flex-launcher
-mkdir build && cd build
-```
-Build the dependencies with vcpkg:
-```
-git clone https://github.com/microsoft/vcpkg
-.\vcpkg\bootstrap-vcpkg.bat -disableMetrics
-.\vcpkg\vcpkg install sdl2 sdl2-image[libjpeg-turbo,libwebp] sdl2-ttf --triplet=x64-windows-static
-```
-Generate the Visual Studio project files:
-```
-cmake -G "Visual Studio 17 2022" -DCMAKE_TOOLCHAIN_FILE=".\vcpkg\scripts\buildsystems\vcpkg.cmake" -DVCPKG_TARGET_TRIPLET="x64-windows-static" ..
-```
-If you're using a different version of Visual Studio than above, then change the generator output.
-
-Build and test the program:
-```
-cmake --build .
-.\Debug\flex-launcher.exe
-```
-Optionally, generate a clean zipped install package which may then be extracted to a directory of your choosing:
-```
-cmake --build . --config Release --target package
-```
diff --git a/extra/docs/configuration.md b/extra/docs/configuration.md
deleted file mode 100755
index af633c0..0000000
--- a/extra/docs/configuration.md
+++ /dev/null
@@ -1,493 +0,0 @@
-# Configuring Flex Launcher
-
-
- Table of Contents
-
-
-
-
-
-
-## Overview
-Flex Launcher uses an [INI file](https://en.wikipedia.org/wiki/INI_file) to configure settings and menus. The INI file consists of sections enclosed in square brackets, and in each section there are entries which consist of a key and a value. Example:
-```
-[Section]
-Key1=value
-Key2=value
-...
-```
-A line can be commented out by using the # character at the beginning of the line, which will cause the line to be ignored by the program. Here are a few things to note about the configuration settings for Flex Launcher:
-- All keys and values are case sensitive.
-- Full UTF-8 character set is supported for titles.
-- The following image formats are supported: JPEG, PNG, and WebP
-- Relative paths are evaluated with respect to the *current working directory*, which may not be the same as the directory that the config file is located in. It is recommended to use absolute paths whenever possible to eliminate any confusion.
-- Color is specified in 24 bit RGB HEX format, *without* a 0x or # prefix e.g. the color red should be FF0000. HEX color pickers can be easily found online to assist color choices.
-- Several settings allow for values to be specified in pixels *or* as a percentage of another value. In this case, if no percent sign is detected it will be interpreted as pixels, and if the percent sign is present, than it will be interpreted as a percent value e.g. "5" means 5 pixels and "5%" means 5 percent.
-## Settings
-Every config file must have a section titled "Settings". Within this section, the following keys may be used to control the behavior of Flex Launcher:
-
-
-
- List of settings
-