diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c62aec4..1e4f35f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Config options to set the status bar's initial visibility, refresh interval and justification: `TMUX_POWERLINE_STATUS_VISIBILITY`, `TMUX_POWERLINE_STATUS_INTERVAL` and `TMUX_POWERLINE_STATUS_JUSTIFICATION`. - Allow setting the `default` tmux color in segment themes. [#296](https://github.com/erikw/tmux-powerline/issues/296). - Allow truncation of VCS branch name with a new config `TMUX_POWERLINE_SEG_VCS_BRANCH_MAX_LEN`. +### Changed +- Removed support for the deprecated config file `~/.tmux-powerlinerc`. [#330](https://github.com/erikw/tmux-powerline/issues/330) ### Fixed - The now playing segment is fixed for Last.FM using their 2.0 API. [#307](https://github.com/erikw/tmux-powerline/issues/307) - Correctly handle named colours when specifying theme colours. [#314](https://github.com/erikw/tmux-powerline/issues/314) diff --git a/config/paths.sh b/config/paths.sh index be13e6c3..1fe073d3 100644 --- a/config/paths.sh +++ b/config/paths.sh @@ -5,14 +5,13 @@ 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" if [ -z "$TMUX_POWERLINE_RCFILE" ]; then - if [ -e "${XDG_CONFIG_HOME:-$HOME/.config}/tmux-powerline/config.sh" ]; then - export TMUX_POWERLINE_RCFILE="${XDG_CONFIG_HOME:-$HOME/.config}/tmux-powerline/config.sh" - else - export TMUX_POWERLINE_RCFILE="$HOME/.tmux-powerlinerc" - fi + export TMUX_POWERLINE_RCFILE="${XDG_CONFIG_HOME:-$HOME/.config}/tmux-powerline/config.sh" fi export TMUX_POWERLINE_RCFILE_DEFAULT="${TMUX_POWERLINE_RCFILE}.default" +export TMUX_POWERLINE_RCDIR="$(dirname $TMUX_POWERLINE_RCFILE)" +test -d "$TMUX_POWERLINE_RCDIR" || mkdir -p "$TMUX_POWERLINE_RCDIR" + if [ ! -d "$TMUX_POWERLINE_DIR_TEMPORARY" ]; then mkdir "$TMUX_POWERLINE_DIR_TEMPORARY" fi diff --git a/segments/weather.sh b/segments/weather.sh index 1d1322d5..3fc67533 100755 --- a/segments/weather.sh +++ b/segments/weather.sh @@ -1,15 +1,11 @@ # Prints the current weather in Celsius, Fahrenheits or lord Kelvins. The forecast is cached and updated with a period. +# To configure your location, set TMUX_POWERLINE_SEG_WEATHER_LOCATION in the tmux-powerline config file. TMUX_POWERLINE_SEG_WEATHER_DATA_PROVIDER_DEFAULT="yrno" TMUX_POWERLINE_SEG_WEATHER_JSON_DEFAULT="jq" TMUX_POWERLINE_SEG_WEATHER_UNIT_DEFAULT="c" TMUX_POWERLINE_SEG_WEATHER_UPDATE_PERIOD_DEFAULT="600" -# If you want to set your location, set TMUX_POWERLINE_SEG_WEATHER_LOCATION in the tmux-powerlinerc file. -# 1. You create tmux-powerlinerc file. -# $ ./generate_rc.sh -# $ mv ~/.tmux-powerlinerc.default ~/.tmux-powerlinerc -# 2. You set TMUX_POWERLINE_SEG_WEATHER_LOCATION. if shell_is_bsd && [ -f /user/local/bin/grep ]; then TMUX_POWERLINE_SEG_WEATHER_GREP_DEFAULT="/usr/local/bin/grep"