Merge branch 'master' into kubernetes-context

This commit is contained in:
Janno Tjarks 2022-10-28 22:04:49 +02:00 committed by GitHub
commit 1809c14f76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 23 deletions

View file

@ -128,6 +128,14 @@ set -g @dracula-cpu-display-load true
CPU usage percentage (default) - in percentage (output: %) CPU usage percentage (default) - in percentage (output: %)
Load average is the average system load calculated over a given period of time of 1, 5 and 15 minutes (output: x.x x.x x.x) Load average is the average system load calculated over a given period of time of 1, 5 and 15 minutes (output: x.x x.x x.x)
#### battery options
Customize label
```bash
set -g @dracula-battery-label "Battery"
```
#### gpu-usage options #### gpu-usage options
Customize label Customize label
@ -198,6 +206,11 @@ Set symbol or message to use when the current pane has no git repo
set -g @dracula-git-no-repo-message "" set -g @dracula-git-no-repo-message ""
``` ```
Hide untracked files from being displayed as local changes
```bash
# default is false
set -g @dracula-git-no-untracked-files true
```
#### weather options #### weather options
@ -207,3 +220,14 @@ Switch from default fahrenheit to celsius
set -g @dracula-show-fahrenheit false set -g @dracula-show-fahrenheit false
``` ```
Set your location manually
```bash
set -g @dracula-fixed-location "Some City"
```
Hide your location
```bash
set -g @dracula-show-location false
```

View file

@ -14,22 +14,22 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
## Features ## Features
* Support for powerline - Support for powerline
* Day, date, time, timezone - Day, date, time, timezone
* Current location based on network with temperature and forecast icon (if available) - Current location based on network with temperature and forecast icon (if available)
* Network connection status, bandwidth and SSID - Network connection status, bandwidth and SSID
* Git branch and status - Git branch and status
* Battery percentage and AC power connection status - Battery percentage and AC power connection status
* Refresh rate control - Refresh rate control
* CPU usage (percentage or load average) - CPU usage (percentage or load average)
* RAM usage - RAM usage
* GPU usage - GPU usage
* Color code based on if prefix is active or not - Color code based on if prefix is active or not
* List of windows with current window highlighted - List of windows with current window highlighted
* When prefix is enabled smiley face turns from green to yellow - When prefix is enabled smiley face turns from green to yellow
* When charging, 'AC' is displayed - When charging, 'AC' is displayed
* If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature - If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
* Current kubernetes context - Current kubernetes context
## Compatibility ## Compatibility
@ -40,9 +40,15 @@ FreeBSD compatibility is in development
This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/tmux/graphs/contributors). This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/tmux/graphs/contributors).
[![Dane Williams](https://avatars2.githubusercontent.com/u/22798229?s=70&v=4",)](https://github.com/danerwilliams) | [![Ethan Edwards](https://avatars1.githubusercontent.com/u/60861925?s=70&v=4)](https://github.com/ethancedwards8) | | [![Dane Williams](https://avatars2.githubusercontent.com/u/22798229?s=70&v=4",)](https://github.com/danerwilliams) | [![Ethan Edwards](https://avatars1.githubusercontent.com/u/60861925?s=70&v=4)](https://github.com/ethancedwards8) |
--- | --- | | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- |
[Dane Williams](https://github.com/danerwilliams) | [Ethan Edwards](https://github.com/ethancedwards8) | | [Dane Williams](https://github.com/danerwilliams) | [Ethan Edwards](https://github.com/ethancedwards8) |
## Community
- [Twitter](https://twitter.com/draculatheme) - Best for getting updates about themes and new stuff.
- [GitHub](https://github.com/dracula/dracula-theme/discussions) - Best for asking questions and discussing issues.
- [Discord](https://draculatheme.com/discord-invite) - Best for hanging out with the community.
## License ## License

View file

@ -2,6 +2,9 @@
# setting the locale, some users have issues with different locales, this forces the correct one # setting the locale, some users have issues with different locales, this forces the correct one
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $current_dir/utils.sh
linux_acpi() { linux_acpi() {
arg=$1 arg=$1
BAT=$(ls -d /sys/class/power_supply/BAT* | head -1) BAT=$(ls -d /sys/class/power_supply/BAT* | head -1)
@ -86,10 +89,10 @@ battery_status()
discharging|Discharging) discharging|Discharging)
echo '' echo ''
;; ;;
high) high|Full)
echo '' echo ''
;; ;;
charging) charging|Charging)
echo 'AC' echo 'AC'
;; ;;
*) *)

View file

@ -7,6 +7,7 @@ IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-git-disable-statu
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-git-show-current-symbol" "✓") IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-git-show-current-symbol" "✓")
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-git-show-diff-symbol" "!") IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-git-show-diff-symbol" "!")
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-git-no-repo-message" "") IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-git-no-repo-message" "")
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-git-no-untracked-files" "false")
# Get added, modified, updated and deleted files from git status # Get added, modified, updated and deleted files from git status
getChanges() getChanges()
@ -16,7 +17,7 @@ getChanges()
declare -i updated=0; declare -i updated=0;
declare -i deleted=0; declare -i deleted=0;
for i in $(git -C $path status -s) for i in $(git -C $path --no-optional-locks status -s)
do do
case $i in case $i in
@ -77,8 +78,9 @@ checkEmptySymbol()
# check to see if the current repo is not up to date with HEAD # check to see if the current repo is not up to date with HEAD
checkForChanges() checkForChanges()
{ {
[ $no_untracked_files == "false" ] && no_untracked="" || no_untracked="-uno"
if [ "$(checkForGitDir)" == "true" ]; then if [ "$(checkForGitDir)" == "true" ]; then
if [ "$(git -C $path status -s)" != "" ]; then if [ "$(git -C $path --no-optional-locks status -s $no_untracked)" != "" ]; then
echo "true" echo "true"
else else
echo "false" echo "false"