Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for ~/.tmux-powerlinerc #335

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:/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:/erikw/tmux-powerline/issues/330)
### Fixed
- The now playing segment is fixed for Last.FM using their 2.0 API. [#307](https:/erikw/tmux-powerline/issues/307)
- Correctly handle named colours when specifying theme colours. [#314](https:/erikw/tmux-powerline/issues/314)
Expand Down
9 changes: 4 additions & 5 deletions config/paths.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 1 addition & 5 deletions segments/weather.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand Down