diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/defaults.sh | 5 | ||||
-rw-r--r-- | config/helpers.sh | 9 | ||||
-rw-r--r-- | config/paths.sh | 12 | ||||
-rw-r--r-- | config/shell.sh | 20 |
4 files changed, 46 insertions, 0 deletions
diff --git a/config/defaults.sh b/config/defaults.sh new file mode 100644 index 0000000..bc79496 --- /dev/null +++ b/config/defaults.sh @@ -0,0 +1,5 @@ +# Default values for non segment configuration options. + +export TMUX_POWERLINE_DEBUG_MODE_ENABLED_DEFAULT="false" +export TMUX_POWERLINE_PATCHED_FONT_IN_USE_DEFAULT="true" +export TMUX_POWERLINE_THEME_DEFAULT="default" diff --git a/config/helpers.sh b/config/helpers.sh new file mode 100644 index 0000000..caba053 --- /dev/null +++ b/config/helpers.sh @@ -0,0 +1,9 @@ +# Other settings and helper functions. + +debug_mode_enabled() { + [ -n "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" -a "$TMUX_POWERLINE_DEBUG_MODE_ENABLED" != "false" ]; +} + +patched_font_in_use() { + [ -z "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" -o "$TMUX_POWERLINE_PATCHED_FONT_IN_USE" != "false" ]; +} diff --git a/config/paths.sh b/config/paths.sh new file mode 100644 index 0000000..bf72be3 --- /dev/null +++ b/config/paths.sh @@ -0,0 +1,12 @@ +# Paths + +export TMUX_POWERLINE_DIR_LIB="$TMUX_POWERLINE_DIR_HOME/lib" +export TMUX_POWERLINE_DIR_SEGMENTS="$TMUX_POWERLINE_DIR_HOME/segments" +export TMUX_POWERLINE_DIR_TEMPORARY="/tmp/tmux-powerline_${USER}" +export TMUX_POWERLINE_DIR_THEMES="$TMUX_POWERLINE_DIR_HOME/themes" +export TMUX_POWERLINE_RCFILE="$HOME/.tmux-powerlinerc" +export TMUX_POWERLINE_RCFILE_DEFAULT="$HOME/.tmux-powerlinerc.default" + +if [ ! -d "$TMUX_POWERLINE_DIR_TEMPORARY" ]; then + mkdir "$TMUX_POWERLINE_DIR_TEMPORARY" +fi diff --git a/config/shell.sh b/config/shell.sh new file mode 100644 index 0000000..d24bcf8 --- /dev/null +++ b/config/shell.sh @@ -0,0 +1,20 @@ +# Shell Configuration +# vi: sw=8 ts=8 noet + +ostype() { echo $OSTYPE | tr '[A-Z]' '[a-z]'; } + +export SHELL_PLATFORM='unknown' + +case "$(ostype)" in + *'linux'* ) SHELL_PLATFORM='linux' ;; + *'darwin'* ) SHELL_PLATFORM='osx' ;; + *'bsd'* ) SHELL_PLATFORM='bsd' ;; +esac + +shell_is_linux() { [[ $SHELL_PLATFORM == 'linux' || $SHELL_PLATFORM == 'bsd' ]]; } +shell_is_osx() { [[ $SHELL_PLATFORM == 'osx' ]]; } +shell_is_bsd() { [[ $SHELL_PLATFORM == 'bsd' || $SHELL_PLATFORM == 'osx' ]]; } + +export -f shell_is_linux +export -f shell_is_osx +export -f shell_is_bsd |