chore: replace all dracula occurrences with kanagawa
This commit is contained in:
parent
c2b1d67cbd
commit
a5bee81d7a
24 changed files with 213 additions and 205 deletions
114
INSTALL.md
114
INSTALL.md
|
@ -23,9 +23,9 @@ programs.tmux = {
|
||||||
{
|
{
|
||||||
plugin = dracula;
|
plugin = dracula;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g @dracula-show-battery false
|
set -g @kanagawa-show-battery false
|
||||||
set -g @dracula-show-powerline true
|
set -g @kanagawa-show-powerline true
|
||||||
set -g @dracula-refresh-rate 10
|
set -g @kanagawa-refresh-rate 10
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -44,20 +44,20 @@ programs.tmux = {
|
||||||
|
|
||||||
#### Configuration
|
#### Configuration
|
||||||
|
|
||||||
To enable plugins set up the `@dracula-plugins` option in you `.tmux.conf` file, separate plugin by space.
|
To enable plugins set up the `@kanagawa-plugins` option in you `.tmux.conf` file, separate plugin by space.
|
||||||
The order that you define the plugins will be the order on the status bar left to right.
|
The order that you define the plugins will be the order on the status bar left to right.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, playerctl, kubernetes-context, synchronize-panes
|
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, ssh-session, attached-clients, network-vpn, weather, time, mpc, spotify-tui, kubernetes-context, synchronize-panes
|
||||||
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage"
|
set -g @kanagawa-plugins "cpu-usage gpu-usage ram-usage"
|
||||||
```
|
```
|
||||||
|
|
||||||
For each plugin is possible to customize background and foreground colors
|
For each plugin is possible to customize background and foreground colors
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# available colors: white, gray, dark_gray, light_purple, dark_purple, cyan, green, orange, red, pink, yellow
|
# available colors: white, gray, dark_gray, light_purple, dark_purple, cyan, green, orange, red, pink, yellow
|
||||||
# set -g @dracula-[plugin-name]-colors "[background] [foreground]"
|
# set -g @kanagawa-[plugin-name]-colors "[background] [foreground]"
|
||||||
set -g @dracula-cpu-usage-colors "pink dark_gray"
|
set -g @kanagawa-cpu-usage-colors "pink dark_gray"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Status bar options
|
#### Status bar options
|
||||||
|
@ -65,56 +65,56 @@ set -g @dracula-cpu-usage-colors "pink dark_gray"
|
||||||
Enable powerline symbols
|
Enable powerline symbols
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-powerline true
|
set -g @kanagawa-show-powerline true
|
||||||
```
|
```
|
||||||
|
|
||||||
Switch powerline symbols
|
Switch powerline symbols
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# for left
|
# for left
|
||||||
set -g @dracula-show-left-sep
|
set -g @kanagawa-show-left-sep
|
||||||
|
|
||||||
# for right symbol (can set any symbol you like as separator)
|
# for right symbol (can set any symbol you like as separator)
|
||||||
set -g @dracula-show-right-sep
|
set -g @kanagawa-show-right-sep
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable window flags
|
Enable window flags
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-flags true
|
set -g @kanagawa-show-flags true
|
||||||
```
|
```
|
||||||
|
|
||||||
Adjust the refresh rate for the status bar
|
Adjust the refresh rate for the status bar
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# the default is 5, it can accept any number
|
# the default is 5, it can accept any number
|
||||||
set -g @dracula-refresh-rate 5
|
set -g @kanagawa-refresh-rate 5
|
||||||
```
|
```
|
||||||
|
|
||||||
Switch the left smiley icon
|
Switch the left smiley icon
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, `window`, or any character.
|
# it can accept `hostname` (full hostname), `session`, `shortname` (short name), `smiley`, `window`, or any character.
|
||||||
set -g @dracula-show-left-icon session
|
set -g @kanagawa-show-left-icon session
|
||||||
```
|
```
|
||||||
|
|
||||||
Add padding to the left smiley icon
|
Add padding to the left smiley icon
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# default is 1, it can accept any number and 0 disables padding.
|
# default is 1, it can accept any number and 0 disables padding.
|
||||||
set -g @dracula-left-icon-padding 1
|
set -g @kanagawa-left-icon-padding 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable high contrast pane border
|
Enable high contrast pane border
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-border-contrast true
|
set -g @kanagawa-border-contrast true
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide empty plugins
|
Hide empty plugins
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-empty-plugins false
|
set -g @kanagawa-show-empty-plugins false
|
||||||
```
|
```
|
||||||
|
|
||||||
#### cpu-usage options
|
#### cpu-usage options
|
||||||
|
@ -122,13 +122,13 @@ set -g @dracula-show-empty-plugins false
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-cpu-usage-label "CPU"
|
set -g @kanagawa-cpu-usage-label "CPU"
|
||||||
```
|
```
|
||||||
|
|
||||||
Show system load average instead of CPU usage percentage (default)
|
Show system load average instead of CPU usage percentage (default)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-cpu-display-load true
|
set -g @kanagawa-cpu-display-load true
|
||||||
```
|
```
|
||||||
|
|
||||||
CPU usage percentage (default) - in percentage (output: %)
|
CPU usage percentage (default) - in percentage (output: %)
|
||||||
|
@ -139,7 +139,7 @@ Load average – is the average system load calculated over a given period of ti
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-battery-label "Battery"
|
set -g @kanagawa-battery-label "Battery"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### gpu-usage options
|
#### gpu-usage options
|
||||||
|
@ -149,7 +149,7 @@ Note, currently only the Linux NVIDIA Proprietary drivers are supported. Nouveau
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-gpu-usage-label "GPU"
|
set -g @kanagawa-gpu-usage-label "GPU"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### ram-usage options
|
#### ram-usage options
|
||||||
|
@ -157,7 +157,7 @@ set -g @dracula-gpu-usage-label "GPU"
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-ram-usage-label "RAM"
|
set -g @kanagawa-ram-usage-label "RAM"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### tmux-ram-usage options
|
#### tmux-ram-usage options
|
||||||
|
@ -165,7 +165,7 @@ set -g @dracula-ram-usage-label "RAM"
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-tmux-ram-usage-label "MEM"
|
set -g @kanagawa-tmux-ram-usage-label "MEM"
|
||||||
```
|
```
|
||||||
|
|
||||||
#### network-bandwidth
|
#### network-bandwidth
|
||||||
|
@ -175,9 +175,9 @@ Displaying of the interface name, The interval between each bandwidth update.
|
||||||
The most common interfaces name are `eth0` for a wired connection and `wlan0` for a wireless connection.
|
The most common interfaces name are `eth0` for a wired connection and `wlan0` for a wireless connection.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-network-bandwidth eth0
|
set -g @kanagawa-network-bandwidth eth0
|
||||||
set -g @dracula-network-bandwidth-interval 0
|
set -g @kanagawa-network-bandwidth-interval 0
|
||||||
set -g @dracula-network-bandwidth-show-interface true
|
set -g @kanagawa-network-bandwidth-show-interface true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### network-ping options
|
#### network-ping options
|
||||||
|
@ -185,15 +185,15 @@ set -g @dracula-network-bandwidth-show-interface true
|
||||||
You can configure which server (hostname, IP) you want to ping and at which rate (in seconds). Default is google.com at every 5 seconds.
|
You can configure which server (hostname, IP) you want to ping and at which rate (in seconds). Default is google.com at every 5 seconds.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-ping-server "google.com"
|
set -g @kanagawa-ping-server "google.com"
|
||||||
set -g @dracula-ping-rate 5
|
set -g @kanagawa-ping-rate 5
|
||||||
```
|
```
|
||||||
### ssh-session options
|
### ssh-session options
|
||||||
|
|
||||||
Show SSH session port
|
Show SSH session port
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-ssh-session-port true
|
set -g @kanagawa-show-ssh-session-port true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### time options
|
#### time options
|
||||||
|
@ -201,24 +201,24 @@ set -g @dracula-show-ssh-session-port true
|
||||||
Disable timezone
|
Disable timezone
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-timezone false
|
set -g @kanagawa-show-timezone false
|
||||||
```
|
```
|
||||||
|
|
||||||
Swap date to day/month
|
Swap date to day/month
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-day-month true
|
set -g @kanagawa-day-month true
|
||||||
```
|
```
|
||||||
|
|
||||||
Enable military time
|
Enable military time
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-military-time true
|
set -g @kanagawa-military-time true
|
||||||
```
|
```
|
||||||
|
|
||||||
Set custom time format e.g (2023-01-01 14:00)
|
Set custom time format e.g (2023-01-01 14:00)
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-time-format "%F %R"
|
set -g @kanagawa-time-format "%F %R"
|
||||||
```
|
```
|
||||||
See [[this page]](https://man7.org/linux/man-pages/man1/date.1.html) for other format symbols.
|
See [[this page]](https://man7.org/linux/man-pages/man1/date.1.html) for other format symbols.
|
||||||
|
|
||||||
|
@ -226,68 +226,68 @@ See [[this page]](https://man7.org/linux/man-pages/man1/date.1.html) for other f
|
||||||
|
|
||||||
Hide details of git changes
|
Hide details of git changes
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-git-disable-status true
|
set -g @kanagawa-git-disable-status true
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol to use for when branch is up to date with HEAD
|
Set symbol to use for when branch is up to date with HEAD
|
||||||
```bash
|
```bash
|
||||||
# default is ✓. Avoid using non unicode characters that bash uses like $, * and !
|
# default is ✓. Avoid using non unicode characters that bash uses like $, * and !
|
||||||
set -g @dracula-git-show-current-symbol ✓
|
set -g @kanagawa-git-show-current-symbol ✓
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol to use for when branch diverges from HEAD
|
Set symbol to use for when branch diverges from HEAD
|
||||||
```bash
|
```bash
|
||||||
# default is unicode !. Avoid bash special characters
|
# default is unicode !. Avoid bash special characters
|
||||||
set -g @dracula-git-show-diff-symbol !
|
set -g @kanagawa-git-show-diff-symbol !
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol or message to use when the current pane has no git repo
|
Set symbol or message to use when the current pane has no git repo
|
||||||
```bash
|
```bash
|
||||||
# default is unicode no message
|
# default is unicode no message
|
||||||
set -g @dracula-git-no-repo-message ""
|
set -g @kanagawa-git-no-repo-message ""
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide untracked files from being displayed as local changes
|
Hide untracked files from being displayed as local changes
|
||||||
```bash
|
```bash
|
||||||
# default is false
|
# default is false
|
||||||
set -g @dracula-git-no-untracked-files true
|
set -g @kanagawa-git-no-untracked-files true
|
||||||
```
|
```
|
||||||
|
|
||||||
Show remote tracking branch together with diverge/sync state
|
Show remote tracking branch together with diverge/sync state
|
||||||
```bash
|
```bash
|
||||||
# default is false
|
# default is false
|
||||||
set -g @dracula-git-show-remote-status true
|
set -g @kanagawa-git-show-remote-status true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### hg options
|
#### hg options
|
||||||
|
|
||||||
Hide details of hg changes
|
Hide details of hg changes
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-hg-disable-status true
|
set -g @kanagawa-hg-disable-status true
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol to use for when branch is up to date with HEAD
|
Set symbol to use for when branch is up to date with HEAD
|
||||||
```bash
|
```bash
|
||||||
#default is ✓.Avoid using non unicode characters that bash uses like $, * and !
|
#default is ✓.Avoid using non unicode characters that bash uses like $, * and !
|
||||||
set -g @dracula-hg-show-current-symbol ✓
|
set -g @kanagawa-hg-show-current-symbol ✓
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol to use for when branch diverges from HEAD
|
Set symbol to use for when branch diverges from HEAD
|
||||||
```bash
|
```bash
|
||||||
#default is unicode !.Avoid bash special characters
|
#default is unicode !.Avoid bash special characters
|
||||||
set -g @dracula-hg-show-diff-symbol !
|
set -g @kanagawa-hg-show-diff-symbol !
|
||||||
```
|
```
|
||||||
|
|
||||||
Set symbol or message to use when the current pane has no hg repo
|
Set symbol or message to use when the current pane has no hg repo
|
||||||
```bash
|
```bash
|
||||||
#default is unicode no message
|
#default is unicode no message
|
||||||
set -g @dracula-hg-no-repo-message ""
|
set -g @kanagawa-hg-no-repo-message ""
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide untracked files from being displayed as local changes
|
Hide untracked files from being displayed as local changes
|
||||||
```bash
|
```bash
|
||||||
#default is false
|
#default is false
|
||||||
set -g @dracula-hg-no-untracked-files false
|
set -g @kanagawa-hg-no-untracked-files false
|
||||||
```
|
```
|
||||||
|
|
||||||
#### weather options
|
#### weather options
|
||||||
|
@ -295,19 +295,19 @@ set -g @dracula-hg-no-untracked-files false
|
||||||
Switch from default fahrenheit to celsius
|
Switch from default fahrenheit to celsius
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-fahrenheit false
|
set -g @kanagawa-show-fahrenheit false
|
||||||
```
|
```
|
||||||
|
|
||||||
Set your location manually
|
Set your location manually
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-fixed-location "Some City"
|
set -g @kanagawa-fixed-location "Some City"
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide your location
|
Hide your location
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-show-location false
|
set -g @kanagawa-show-location false
|
||||||
```
|
```
|
||||||
|
|
||||||
#### synchronize-panes options
|
#### synchronize-panes options
|
||||||
|
@ -315,21 +315,21 @@ set -g @dracula-show-location false
|
||||||
Customize label
|
Customize label
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-synchronize-panes-label "Sync"
|
set -g @kanagawa-synchronize-panes-label "Sync"
|
||||||
```
|
```
|
||||||
#### attached-clients options
|
#### attached-clients options
|
||||||
|
|
||||||
Set the minimum number of clients to show (otherwise, show nothing)
|
Set the minimum number of clients to show (otherwise, show nothing)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-clients-minimum 1
|
set -g @kanagawa-clients-minimum 1
|
||||||
```
|
```
|
||||||
|
|
||||||
Set the label when there is one client, or more than one client
|
Set the label when there is one client, or more than one client
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-clients-singular client
|
set -g @kanagawa-clients-singular client
|
||||||
set -g @dracula-clients-plural clients
|
set -g @kanagawa-clients-plural clients
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Kubernetes options
|
#### Kubernetes options
|
||||||
|
@ -337,25 +337,25 @@ set -g @dracula-clients-plural clients
|
||||||
Add prefix label before the context
|
Add prefix label before the context
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-kubernetes-context-label "Some Label"
|
set -g @kanagawa-kubernetes-context-label "Some Label"
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide user from the context string
|
Hide user from the context string
|
||||||
|
|
||||||
```
|
```
|
||||||
set -g @dracula-kubernetes-hide-user true
|
set -g @kanagawa-kubernetes-hide-user true
|
||||||
```
|
```
|
||||||
|
|
||||||
Hide ARN (show only cluster name) - Available for EKS only (only available for cluster names that are ARNs)
|
Hide ARN (show only cluster name) - Available for EKS only (only available for cluster names that are ARNs)
|
||||||
|
|
||||||
```
|
```
|
||||||
set -g @dracula-kubernetes-eks-hide-arn true
|
set -g @kanagawa-kubernetes-eks-hide-arn true
|
||||||
```
|
```
|
||||||
|
|
||||||
Extract the account as a prefix to the cluster name - Available for EKS only (only available for cluster names that are ARNs)
|
Extract the account as a prefix to the cluster name - Available for EKS only (only available for cluster names that are ARNs)
|
||||||
|
|
||||||
```
|
```
|
||||||
set -g @dracula-kubernetes-eks-extract-account true
|
set -g @kanagawa-kubernetes-eks-extract-account true
|
||||||
|
|
||||||
#### continuum options
|
#### continuum options
|
||||||
|
|
||||||
|
@ -366,13 +366,13 @@ Set the output mode. Options are:
|
||||||
- **interval**: Show the continuum save interval
|
- **interval**: Show the continuum save interval
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-continuum-mode countdown
|
set -g @kanagawa-continuum-mode countdown
|
||||||
```
|
```
|
||||||
|
|
||||||
Show if the last save was performed less than 60 seconds ago (default threshold is 15 seconds)
|
Show if the last save was performed less than 60 seconds ago (default threshold is 15 seconds)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
set -g @dracula-continuum-time-threshold 60
|
set -g @kanagawa-continuum-time-threshold 60
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Playerctl format
|
#### Playerctl format
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# source and run dracula theme
|
|
||||||
|
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
$current_dir/scripts/dracula.sh
|
|
||||||
|
|
7
kanagawa.tmux
Normal file
7
kanagawa.tmux
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# source and run kanagawa theme
|
||||||
|
|
||||||
|
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
$current_dir/scripts/kanagawa.sh
|
|
@ -3,9 +3,9 @@
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
# @dracula-clients-minimum 1
|
# @kanagawa-clients-minimum 1
|
||||||
# @dracula-clients-singular client
|
# @kanagawa-clients-singular client
|
||||||
# @dracula-clients-plural clients
|
# @kanagawa-clients-plural clients
|
||||||
|
|
||||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
@ -17,14 +17,14 @@ count_clients() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
clients_count=$(count_clients)
|
clients_count=$(count_clients)
|
||||||
clients_minimum=$(get_tmux_option "@dracula-clients-minimum" 1)
|
clients_minimum=$(get_tmux_option "@kanagawa-clients-minimum" 1)
|
||||||
if (( $clients_count >= $clients_minimum )); then
|
if (( $clients_count >= $clients_minimum )); then
|
||||||
if (( $clients_count > 1 )); then
|
if (( $clients_count > 1 )); then
|
||||||
clients_label=$(get_tmux_option "@dracula-clients-plural" "clients")
|
clients_label=$(get_tmux_option "@kanagawa-clients-plural" "clients")
|
||||||
else
|
else
|
||||||
clients_label=$(get_tmux_option "@dracula-clients-singular" "client")
|
clients_label=$(get_tmux_option "@kanagawa-clients-singular" "client")
|
||||||
fi
|
fi
|
||||||
echo "$clients_count $clients_label"
|
echo "$clients_count $clients_label"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -111,7 +111,7 @@ battery_status()
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
bat_label=$(get_tmux_option "@dracula-battery-label" "♥")
|
bat_label=$(get_tmux_option "@kanagawa-battery-label" "♥")
|
||||||
bat_stat=$(battery_status)
|
bat_stat=$(battery_status)
|
||||||
bat_perc=$(battery_percent)
|
bat_perc=$(battery_percent)
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
# @dracula-continuum-mode default (countdown|time|alert|interval)
|
# @kanagawa-continuum-mode default (countdown|time|alert|interval)
|
||||||
# @dracula-continuum-time-threshold 15
|
# @kanagawa-continuum-time-threshold 15
|
||||||
|
|
||||||
alert_mode="@dracula-continuum-mode"
|
alert_mode="@kanagawa-continuum-mode"
|
||||||
time_threshold="@dracula-continuum-time-threshold"
|
time_threshold="@kanagawa-continuum-time-threshold"
|
||||||
warn_threshold=360
|
warn_threshold=360
|
||||||
first_save="@dracula-continuum-first-save"
|
first_save="@kanagawa-continuum-first-save"
|
||||||
|
|
||||||
# tmux-resurrect and tmux-continuum options
|
# tmux-resurrect and tmux-continuum options
|
||||||
if [ -d "$HOME/.tmux/resurrect" ]; then
|
if [ -d "$HOME/.tmux/resurrect" ]; then
|
||||||
|
|
|
@ -50,9 +50,9 @@ get_load() {
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
cpu_load=$(get_tmux_option "@dracula-cpu-display-load" false)
|
cpu_load=$(get_tmux_option "@kanagawa-cpu-display-load" false)
|
||||||
cpu_label=$(get_tmux_option "@dracula-cpu-usage-label" "CPU")
|
cpu_label=$(get_tmux_option "@kanagawa-cpu-usage-label" "CPU")
|
||||||
if [ "$cpu_load" = true ]; then
|
if [ "$cpu_load" = true ]; then
|
||||||
echo "$cpu_label $(get_load)"
|
echo "$cpu_label $(get_load)"
|
||||||
else
|
else
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
|
||||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-fossil-disable-status" "false")
|
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-fossil-disable-status" "false")
|
||||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-fossil-show-current-symbol" "✓")
|
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-fossil-show-current-symbol" "✓")
|
||||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-fossil-show-diff-symbol" "!")
|
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@kanagawa-fossil-show-diff-symbol" "!")
|
||||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-fossil-no-repo-message" "")
|
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@kanagawa-fossil-no-repo-message" "")
|
||||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-fossil-no-untracked-files" "false")
|
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-fossil-no-untracked-files" "false")
|
||||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@dracula-fossil-show-remote-status" "false")
|
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@kanagawa-fossil-show-remote-status" "false")
|
||||||
|
|
||||||
# Get added, modified, updated and deleted files from git status
|
# Get added, modified, updated and deleted files from git status
|
||||||
getChanges()
|
getChanges()
|
||||||
|
@ -48,7 +48,7 @@ for i in $(cd $path; fossil changes --differ|cut -f1 -d' ')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||||
getPaneDir()
|
getPaneDir()
|
||||||
{
|
{
|
||||||
nextone="false"
|
nextone="false"
|
||||||
|
|
|
@ -3,12 +3,12 @@
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
|
||||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-git-disable-status" "false")
|
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-git-disable-status" "false")
|
||||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-git-show-current-symbol" "✓")
|
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-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 "@kanagawa-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 "@kanagawa-git-no-repo-message" "")
|
||||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-git-no-untracked-files" "false")
|
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-git-no-untracked-files" "false")
|
||||||
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@dracula-git-show-remote-status" "false")
|
IFS=' ' read -r -a show_remote_status <<< $(get_tmux_option "@kanagawa-git-show-remote-status" "false")
|
||||||
|
|
||||||
# Get added, modified, updated and deleted files from git status
|
# Get added, modified, updated and deleted files from git status
|
||||||
getChanges()
|
getChanges()
|
||||||
|
@ -48,7 +48,7 @@ for i in $(git -C $path --no-optional-locks status -s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||||
getPaneDir()
|
getPaneDir()
|
||||||
{
|
{
|
||||||
nextone="false"
|
nextone="false"
|
||||||
|
|
|
@ -38,8 +38,8 @@ get_gpu()
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "GPU")
|
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "GPU")
|
||||||
gpu_usage=$(get_gpu)
|
gpu_usage=$(get_gpu)
|
||||||
echo "$gpu_label $gpu_usage"
|
echo "$gpu_label $gpu_usage"
|
||||||
sleep $RATE
|
sleep $RATE
|
||||||
|
|
|
@ -37,8 +37,8 @@ get_gpu()
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "VRAM")
|
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "VRAM")
|
||||||
gpu_usage=$(get_gpu)
|
gpu_usage=$(get_gpu)
|
||||||
echo "$gpu_label $gpu_usage"
|
echo "$gpu_label $gpu_usage"
|
||||||
sleep $RATE
|
sleep $RATE
|
||||||
|
|
|
@ -37,8 +37,8 @@ get_gpu()
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
gpu_label=$(get_tmux_option "@dracula-gpu-usage-label" "GPU")
|
gpu_label=$(get_tmux_option "@kanagawa-gpu-usage-label" "GPU")
|
||||||
gpu_usage=$(get_gpu)
|
gpu_usage=$(get_gpu)
|
||||||
echo "$gpu_label $gpu_usage"
|
echo "$gpu_label $gpu_usage"
|
||||||
sleep $RATE
|
sleep $RATE
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
|
||||||
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@dracula-hg-disable-status" "false")
|
IFS=' ' read -r -a hide_status <<< $(get_tmux_option "@kanagawa-hg-disable-status" "false")
|
||||||
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@dracula-hg-show-current-symbol" "✓")
|
IFS=' ' read -r -a current_symbol <<< $(get_tmux_option "@kanagawa-hg-show-current-symbol" "✓")
|
||||||
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@dracula-hg-show-diff-symbol" "!")
|
IFS=' ' read -r -a diff_symbol <<< $(get_tmux_option "@kanagawa-hg-show-diff-symbol" "!")
|
||||||
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@dracula-hg-no-repo-message" "")
|
IFS=' ' read -r -a no_repo_message <<< $(get_tmux_option "@kanagawa-hg-no-repo-message" "")
|
||||||
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@dracula-hg-no-untracked-files" "false")
|
IFS=' ' read -r -a no_untracked_files <<< $(get_tmux_option "@kanagawa-hg-no-untracked-files" "false")
|
||||||
|
|
||||||
# Get added, modified, and removed files from hg status
|
# Get added, modified, and removed files from hg status
|
||||||
getChanges()
|
getChanges()
|
||||||
|
@ -51,7 +51,7 @@ for i in $(hg -R $path status -admru)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# getting the #{pane_current_path} from dracula.sh is no longer possible
|
# getting the #{pane_current_path} from kanagawa.sh is no longer possible
|
||||||
getPaneDir()
|
getPaneDir()
|
||||||
{
|
{
|
||||||
nextone="false"
|
nextone="false"
|
||||||
|
|
|
@ -2,38 +2,11 @@
|
||||||
# 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 )"
|
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
|
||||||
main()
|
main() {
|
||||||
{
|
|
||||||
# set configuration option variables
|
# set configuration option variables
|
||||||
show_kubernetes_context_label=$(get_tmux_option "@dracula-kubernetes-context-label" "")
|
|
||||||
eks_hide_arn=$(get_tmux_option "@dracula-kubernetes-eks-hide-arn" false)
|
|
||||||
eks_extract_account=$(get_tmux_option "@dracula-kubernetes-eks-extract-account" false)
|
|
||||||
hide_kubernetes_user=$(get_tmux_option "@dracula-kubernetes-hide-user" false)
|
|
||||||
terraform_label=$(get_tmux_option "@dracula-terraform-label" "")
|
|
||||||
show_fahrenheit=$(get_tmux_option "@dracula-show-fahrenheit" true)
|
|
||||||
show_location=$(get_tmux_option "@dracula-show-location" true)
|
|
||||||
fixed_location=$(get_tmux_option "@dracula-fixed-location")
|
|
||||||
show_powerline=$(get_tmux_option "@dracula-show-powerline" false)
|
|
||||||
show_flags=$(get_tmux_option "@dracula-show-flags" false)
|
|
||||||
show_left_icon=$(get_tmux_option "@dracula-show-left-icon" smiley)
|
|
||||||
show_left_icon_padding=$(get_tmux_option "@dracula-left-icon-padding" 1)
|
|
||||||
show_military=$(get_tmux_option "@dracula-military-time" false)
|
|
||||||
timezone=$(get_tmux_option "@dracula-set-timezone" "")
|
|
||||||
show_timezone=$(get_tmux_option "@dracula-show-timezone" true)
|
|
||||||
show_left_sep=$(get_tmux_option "@dracula-show-left-sep" )
|
|
||||||
show_right_sep=$(get_tmux_option "@dracula-show-right-sep" )
|
|
||||||
show_border_contrast=$(get_tmux_option "@dracula-border-contrast" false)
|
|
||||||
show_day_month=$(get_tmux_option "@dracula-day-month" false)
|
|
||||||
show_refresh=$(get_tmux_option "@dracula-refresh-rate" 5)
|
|
||||||
show_synchronize_panes_label=$(get_tmux_option "@dracula-synchronize-panes-label" "Sync")
|
|
||||||
time_format=$(get_tmux_option "@dracula-time-format" "")
|
|
||||||
show_ssh_session_port=$(get_tmux_option "@dracula-show-ssh-session-port" false)
|
|
||||||
IFS=' ' read -r -a plugins <<< $(get_tmux_option "@dracula-plugins" "battery network weather")
|
|
||||||
show_empty_plugins=$(get_tmux_option "@dracula-show-empty-plugins" true)
|
|
||||||
|
|
||||||
# Dracula Color Pallette
|
# Dracula Color Pallette
|
||||||
white='#f8f8f2'
|
white='#f8f8f2'
|
||||||
gray='#44475a'
|
gray='#44475a'
|
||||||
|
@ -46,21 +19,53 @@ main()
|
||||||
red='#ff5555'
|
red='#ff5555'
|
||||||
pink='#ff79c6'
|
pink='#ff79c6'
|
||||||
yellow='#f1fa8c'
|
yellow='#f1fa8c'
|
||||||
|
show_kubernetes_context_label=$(get_tmux_option "@kanagawa-kubernetes-context-label" "")
|
||||||
|
eks_hide_arn=$(get_tmux_option "@kanagawa-kubernetes-eks-hide-arn" false)
|
||||||
|
eks_extract_account=$(get_tmux_option "@kanagawa-kubernetes-eks-extract-account" false)
|
||||||
|
hide_kubernetes_user=$(get_tmux_option "@kanagawa-kubernetes-hide-user" false)
|
||||||
|
terraform_label=$(get_tmux_option "@kanagawa-terraform-label" "")
|
||||||
|
show_fahrenheit=$(get_tmux_option "@kanagawa-show-fahrenheit" true)
|
||||||
|
show_location=$(get_tmux_option "@kanagawa-show-location" true)
|
||||||
|
fixed_location=$(get_tmux_option "@kanagawa-fixed-location")
|
||||||
|
show_powerline=$(get_tmux_option "@kanagawa-show-powerline" false)
|
||||||
|
show_flags=$(get_tmux_option "@kanagawa-show-flags" false)
|
||||||
|
show_left_icon=$(get_tmux_option "@kanagawa-show-left-icon" smiley)
|
||||||
|
show_left_icon_padding=$(get_tmux_option "@kanagawa-left-icon-padding" 1)
|
||||||
|
show_military=$(get_tmux_option "@kanagawa-military-time" false)
|
||||||
|
timezone=$(get_tmux_option "@kanagawa-set-timezone" "")
|
||||||
|
show_timezone=$(get_tmux_option "@kanagawa-show-timezone" true)
|
||||||
|
show_left_sep=$(get_tmux_option "@kanagawa-show-left-sep" )
|
||||||
|
show_right_sep=$(get_tmux_option "@kanagawa-show-right-sep" )
|
||||||
|
show_border_contrast=$(get_tmux_option "@kanagawa-border-contrast" false)
|
||||||
|
show_day_month=$(get_tmux_option "@kanagawa-day-month" false)
|
||||||
|
show_refresh=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
|
show_synchronize_panes_label=$(get_tmux_option "@kanagawa-synchronize-panes-label" "Sync")
|
||||||
|
time_format=$(get_tmux_option "@kanagawa-time-format" "")
|
||||||
|
show_ssh_session_port=$(get_tmux_option "@kanagawa-show-ssh-session-port" false)
|
||||||
|
IFS=' ' read -r -a plugins <<<$(get_tmux_option "@kanagawa-plugins" "battery network weather")
|
||||||
|
show_empty_plugins=$(get_tmux_option "@kanagawa-show-empty-plugins" true)
|
||||||
|
|
||||||
|
|
||||||
# Handle left icon configuration
|
# Handle left icon configuration
|
||||||
case $show_left_icon in
|
case $show_left_icon in
|
||||||
smiley)
|
smiley)
|
||||||
left_icon="☺";;
|
left_icon="☺"
|
||||||
session)
|
;;
|
||||||
left_icon="#S";;
|
session)
|
||||||
window)
|
left_icon="#S"
|
||||||
left_icon="#W";;
|
;;
|
||||||
hostname)
|
window)
|
||||||
left_icon="#H";;
|
left_icon="#W"
|
||||||
shortname)
|
;;
|
||||||
left_icon="#h";;
|
hostname)
|
||||||
*)
|
left_icon="#H"
|
||||||
left_icon=$show_left_icon;;
|
;;
|
||||||
|
shortname)
|
||||||
|
left_icon="#h"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
left_icon=$show_left_icon
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Handle left icon padding
|
# Handle left icon padding
|
||||||
|
@ -79,20 +84,24 @@ main()
|
||||||
# Set timezone unless hidden by configuration
|
# Set timezone unless hidden by configuration
|
||||||
if [[ -z "$timezone" ]]; then
|
if [[ -z "$timezone" ]]; then
|
||||||
case $show_timezone in
|
case $show_timezone in
|
||||||
false)
|
false)
|
||||||
timezone="";;
|
timezone=""
|
||||||
true)
|
;;
|
||||||
timezone="#(date +%Z)";;
|
true)
|
||||||
|
timezone="#(date +%Z)"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $show_flags in
|
case $show_flags in
|
||||||
false)
|
false)
|
||||||
flags=""
|
flags=""
|
||||||
current_flags="";;
|
current_flags=""
|
||||||
true)
|
;;
|
||||||
flags="#{?window_flags,#[fg=${dark_purple}]#{window_flags},}"
|
true)
|
||||||
current_flags="#{?window_flags,#[fg=${light_purple}]#{window_flags},}"
|
flags="#{?window_flags,#[fg=${dark_purple}]#{window_flags},}"
|
||||||
|
current_flags="#{?window_flags,#[fg=${light_purple}]#{window_flags},}"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# sets refresh interval to every 5 seconds
|
# sets refresh interval to every 5 seconds
|
||||||
|
@ -136,10 +145,10 @@ main()
|
||||||
|
|
||||||
for plugin in "${plugins[@]}"; do
|
for plugin in "${plugins[@]}"; do
|
||||||
|
|
||||||
if case $plugin in custom:*) true;; *) false;; esac; then
|
if case $plugin in custom:*) true ;; *) false ;; esac then
|
||||||
script=${plugin#"custom:"}
|
script=${plugin#"custom:"}
|
||||||
if [[ -x "${current_dir}/${script}" ]]; then
|
if [[ -x "${current_dir}/${script}" ]]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-custom-plugin-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-custom-plugin-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/${script})"
|
script="#($current_dir/${script})"
|
||||||
else
|
else
|
||||||
colors[0]="red"
|
colors[0]="red"
|
||||||
|
@ -148,80 +157,80 @@ main()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [ $plugin = "cwd" ]; then
|
elif [ $plugin = "cwd" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-cwd-colors" "dark_gray white")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-cwd-colors" "dark_gray white")
|
||||||
tmux set-option -g status-right-length 250
|
tmux set-option -g status-right-length 250
|
||||||
script="#($current_dir/cwd.sh)"
|
script="#($current_dir/cwd.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "fossil" ]; then
|
elif [ $plugin = "fossil" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-fossil-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-fossil-colors" "green dark_gray")
|
||||||
tmux set-option -g status-right-length 250
|
tmux set-option -g status-right-length 250
|
||||||
script="#($current_dir/fossil.sh)"
|
script="#($current_dir/fossil.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "git" ]; then
|
elif [ $plugin = "git" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-git-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-git-colors" "green dark_gray")
|
||||||
tmux set-option -g status-right-length 250
|
tmux set-option -g status-right-length 250
|
||||||
script="#($current_dir/git.sh)"
|
script="#($current_dir/git.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "hg" ]; then
|
elif [ $plugin = "hg" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-hg-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-hg-colors" "green dark_gray")
|
||||||
tmux set-option -g status-right-length 250
|
tmux set-option -g status-right-length 250
|
||||||
script="#($current_dir/hg.sh)"
|
script="#($current_dir/hg.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "battery" ]; then
|
elif [ $plugin = "battery" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-battery-colors" "pink dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-battery-colors" "pink dark_gray")
|
||||||
script="#($current_dir/battery.sh)"
|
script="#($current_dir/battery.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "gpu-usage" ]; then
|
elif [ $plugin = "gpu-usage" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-usage-colors" "pink dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-usage-colors" "pink dark_gray")
|
||||||
script="#($current_dir/gpu_usage.sh)"
|
script="#($current_dir/gpu_usage.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "gpu-ram-usage" ]; then
|
elif [ $plugin = "gpu-ram-usage" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-ram-usage-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-ram-usage-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/gpu_ram_info.sh)"
|
script="#($current_dir/gpu_ram_info.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "gpu-power-draw" ]; then
|
elif [ $plugin = "gpu-power-draw" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-gpu-power-draw-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-gpu-power-draw-colors" "green dark_gray")
|
||||||
script="#($current_dir/gpu_power.sh)"
|
script="#($current_dir/gpu_power.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "cpu-usage" ]; then
|
elif [ $plugin = "cpu-usage" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-cpu-usage-colors" "orange dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-cpu-usage-colors" "orange dark_gray")
|
||||||
script="#($current_dir/cpu_info.sh)"
|
script="#($current_dir/cpu_info.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "ram-usage" ]; then
|
elif [ $plugin = "ram-usage" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-ram-usage-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-ram-usage-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/ram_info.sh)"
|
script="#($current_dir/ram_info.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "tmux-ram-usage" ]; then
|
elif [ $plugin = "tmux-ram-usage" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-tmux-ram-usage-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-tmux-ram-usage-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/tmux_ram_info.sh)"
|
script="#($current_dir/tmux_ram_info.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "network" ]; then
|
elif [ $plugin = "network" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-network-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/network.sh)"
|
script="#($current_dir/network.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "network-bandwidth" ]; then
|
elif [ $plugin = "network-bandwidth" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-network-bandwidth-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-bandwidth-colors" "cyan dark_gray")
|
||||||
tmux set-option -g status-right-length 250
|
tmux set-option -g status-right-length 250
|
||||||
script="#($current_dir/network_bandwidth.sh)"
|
script="#($current_dir/network_bandwidth.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "network-ping" ]; then
|
elif [ $plugin = "network-ping" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-network-ping-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-ping-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/network_ping.sh)"
|
script="#($current_dir/network_ping.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "network-vpn" ]; then
|
elif [ $plugin = "network-vpn" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-network-vpn-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-network-vpn-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/network_vpn.sh)"
|
script="#($current_dir/network_vpn.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "attached-clients" ]; then
|
elif [ $plugin = "attached-clients" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-attached-clients-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-attached-clients-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/attached_clients.sh)"
|
script="#($current_dir/attached_clients.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "mpc" ]; then
|
elif [ $plugin = "mpc" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-mpc-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-mpc-colors" "green dark_gray")
|
||||||
script="#($current_dir/mpc.sh)"
|
script="#($current_dir/mpc.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "spotify-tui" ]; then
|
elif [ $plugin = "spotify-tui" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-spotify-tui-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-spotify-tui-colors" "green dark_gray")
|
||||||
script="#($current_dir/spotify-tui.sh)"
|
script="#($current_dir/spotify-tui.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "playerctl" ]; then
|
elif [ $plugin = "playerctl" ]; then
|
||||||
|
@ -229,27 +238,27 @@ main()
|
||||||
script="#($current_dir/playerctl.sh)"
|
script="#($current_dir/playerctl.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "kubernetes-context" ]; then
|
elif [ $plugin = "kubernetes-context" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-kubernetes-context-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-kubernetes-context-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/kubernetes_context.sh $eks_hide_arn $eks_extract_account $hide_kubernetes_user $show_kubernetes_context_label)"
|
script="#($current_dir/kubernetes_context.sh $eks_hide_arn $eks_extract_account $hide_kubernetes_user $show_kubernetes_context_label)"
|
||||||
|
|
||||||
elif [ $plugin = "terraform" ]; then
|
elif [ $plugin = "terraform" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-terraform-colors" "light_purple dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-terraform-colors" "light_purple dark_gray")
|
||||||
script="#($current_dir/terraform.sh $terraform_label)"
|
script="#($current_dir/terraform.sh $terraform_label)"
|
||||||
|
|
||||||
elif [ $plugin = "continuum" ]; then
|
elif [ $plugin = "continuum" ]; then
|
||||||
IFS=' ' read -r -a colors <<<$(get_tmux_option "@dracula-continuum-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-continuum-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/continuum.sh)"
|
script="#($current_dir/continuum.sh)"
|
||||||
|
|
||||||
elif [ $plugin = "weather" ]; then
|
elif [ $plugin = "weather" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-weather-colors" "orange dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-weather-colors" "orange dark_gray")
|
||||||
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location '$fixed_location')"
|
script="#($current_dir/weather_wrapper.sh $show_fahrenheit $show_location $fixed_location)"
|
||||||
|
|
||||||
elif [ $plugin = "time" ]; then
|
elif [ $plugin = "time" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-time-colors" "dark_purple white")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-time-colors" "dark_purple white")
|
||||||
if [ -n "$time_format" ]; then
|
if [ -n "$time_format" ]; then
|
||||||
script=${time_format}
|
script=${time_format}
|
||||||
else
|
else
|
||||||
if $show_day_month && $show_military ; then # military time and dd/mm
|
if $show_day_month && $show_military; then # military time and dd/mm
|
||||||
script="%a %d/%m %R ${timezone} "
|
script="%a %d/%m %R ${timezone} "
|
||||||
elif $show_military; then # only military time
|
elif $show_military; then # only military time
|
||||||
script="%a %m/%d %R ${timezone} "
|
script="%a %m/%d %R ${timezone} "
|
||||||
|
@ -260,11 +269,11 @@ main()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
elif [ $plugin = "synchronize-panes" ]; then
|
elif [ $plugin = "synchronize-panes" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-synchronize-panes-colors" "cyan dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-synchronize-panes-colors" "cyan dark_gray")
|
||||||
script="#($current_dir/synchronize_panes.sh $show_synchronize_panes_label)"
|
script="#($current_dir/synchronize_panes.sh $show_synchronize_panes_label)"
|
||||||
|
|
||||||
elif [ $plugin = "ssh-session" ]; then
|
elif [ $plugin = "ssh-session" ]; then
|
||||||
IFS=' ' read -r -a colors <<< $(get_tmux_option "@dracula-ssh-session-colors" "green dark_gray")
|
IFS=' ' read -r -a colors <<<$(get_tmux_option "@kanagawa-ssh-session-colors" "green dark_gray")
|
||||||
script="#($current_dir/ssh_session.sh $show_ssh_session_port)"
|
script="#($current_dir/ssh_session.sh $show_ssh_session_port)"
|
||||||
|
|
||||||
else
|
else
|
|
@ -32,7 +32,7 @@ fi
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
OUTPUT_STRING=""
|
OUTPUT_STRING=""
|
||||||
if [ ! -z "$current_account_id" ]
|
if [ ! -z "$current_account_id" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -8,14 +8,14 @@ source $current_dir/utils.sh
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
|
|
||||||
if ! command -v mpc &> /dev/null
|
if ! command -v mpc &> /dev/null
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FORMAT=$(get_tmux_option "@dracula-mpc-format" "%title% - %artist%")
|
FORMAT=$(get_tmux_option "@kanagawa-mpc-format" "%title% - %artist%")
|
||||||
mpc_playback=$(mpc current -f "${FORMAT}")
|
mpc_playback=$(mpc current -f "${FORMAT}")
|
||||||
echo ${mpc_playback}
|
echo ${mpc_playback}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ readonly SIZE=(
|
||||||
|
|
||||||
# interface_get try to automaticaly get the used interface if network_name is empty
|
# interface_get try to automaticaly get the used interface if network_name is empty
|
||||||
interface_get() {
|
interface_get() {
|
||||||
name="$(tmux show-option -gqv "@dracula-network-bandwidth")"
|
name="$(tmux show-option -gqv "@kanagawa-network-bandwidth")"
|
||||||
|
|
||||||
if [[ -z $name ]]; then
|
if [[ -z $name ]]; then
|
||||||
case "$(uname -s)" in
|
case "$(uname -s)" in
|
||||||
|
@ -96,8 +96,8 @@ main() {
|
||||||
bandwidth=()
|
bandwidth=()
|
||||||
|
|
||||||
network_name=""
|
network_name=""
|
||||||
show_interface="$(tmux show-option -gqv "@dracula-network-bandwidth-show-interface")"
|
show_interface="$(tmux show-option -gqv "@kanagawa-network-bandwidth-show-interface")"
|
||||||
interval_update="$(tmux show-option -gqv "@dracula-network-bandwidth-interval")"
|
interval_update="$(tmux show-option -gqv "@kanagawa-network-bandwidth-interval")"
|
||||||
|
|
||||||
if [[ -z $interval_update ]]; then
|
if [[ -z $interval_update ]]; then
|
||||||
interval_update=0
|
interval_update=0
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
# @dracula-ping-server "example.com"
|
# @kanagawa-ping-server "example.com"
|
||||||
# @dracula-ping-rate 5
|
# @kanagawa-ping-rate 5
|
||||||
|
|
||||||
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
source $current_dir/utils.sh
|
source $current_dir/utils.sh
|
||||||
|
@ -13,7 +13,7 @@ ping_function() {
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Linux | Darwin)
|
Linux | Darwin)
|
||||||
# storing the hostname/IP in the variable PINGSERVER, default is google.com
|
# storing the hostname/IP in the variable PINGSERVER, default is google.com
|
||||||
pingserver=$(get_tmux_option "@dracula-ping-server" "google.com")
|
pingserver=$(get_tmux_option "@kanagawa-ping-server" "google.com")
|
||||||
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2)
|
pingtime=$(ping -c 1 "$pingserver" | tail -1 | awk '{print $4}' | cut -d '/' -f 2)
|
||||||
echo "$pingtime ms"
|
echo "$pingtime ms"
|
||||||
;;
|
;;
|
||||||
|
@ -27,7 +27,7 @@ ping_function() {
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
echo $(ping_function)
|
echo $(ping_function)
|
||||||
RATE=$(get_tmux_option "@dracula-ping-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-ping-rate" 5)
|
||||||
sleep $RATE
|
sleep $RATE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ $(vmstat -s | grep "pages zeroed$" | sed -ne 's/^ *\([0-9]*\).*$/\1/p') +
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
ram_label=$(get_tmux_option "@dracula-ram-usage-label" "RAM")
|
ram_label=$(get_tmux_option "@kanagawa-ram-usage-label" "RAM")
|
||||||
ram_ratio=$(get_ratio)
|
ram_ratio=$(get_ratio)
|
||||||
echo "$ram_label $ram_ratio"
|
echo "$ram_label $ram_ratio"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,14 +8,14 @@ source $current_dir/utils.sh
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
|
|
||||||
if ! command -v spt &> /dev/null
|
if ! command -v spt &> /dev/null
|
||||||
then
|
then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FORMAT=$(get_tmux_option "@dracula-spotify-tui-format" "%f %s %t - %a")
|
FORMAT=$(get_tmux_option "@kanagawa-spotify-tui-format" "%f %s %t - %a")
|
||||||
spotify_playback=$(spt playback -f "${FORMAT}")
|
spotify_playback=$(spt playback -f "${FORMAT}")
|
||||||
echo ${spotify_playback}
|
echo ${spotify_playback}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ get_synchronize_panes_status() {
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
synchronize_panes_label=$label
|
synchronize_panes_label=$label
|
||||||
synchronize_panes_status=$(get_synchronize_panes_status)
|
synchronize_panes_status=$(get_synchronize_panes_status)
|
||||||
echo "$synchronize_panes_label $synchronize_panes_status"
|
echo "$synchronize_panes_label $synchronize_panes_status"
|
||||||
|
|
|
@ -9,7 +9,7 @@ source $current_dir/utils.sh
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
# storing the refresh rate in the variable RATE, default is 5
|
# storing the refresh rate in the variable RATE, default is 5
|
||||||
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
|
RATE=$(get_tmux_option "@kanagawa-refresh-rate" 5)
|
||||||
OUTPUT_STRING="N/A"
|
OUTPUT_STRING="N/A"
|
||||||
terraform_dir="$(tmux display-message -p '#{pane_current_path}')/.terraform"
|
terraform_dir="$(tmux display-message -p '#{pane_current_path}')/.terraform"
|
||||||
if [ -d $terraform_dir ]; then
|
if [ -d $terraform_dir ]; then
|
||||||
|
|
|
@ -111,7 +111,7 @@ get_tmux_ram_usage()
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
ram_label=$(get_tmux_option "@dracula-tmux-ram-usage-label" "MEM")
|
ram_label=$(get_tmux_option "@kanagawa-tmux-ram-usage-label" "MEM")
|
||||||
ram_usage=$(get_tmux_ram_usage)
|
ram_usage=$(get_tmux_ram_usage)
|
||||||
echo "$ram_label $ram_usage"
|
echo "$ram_label $ram_usage"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@ fahrenheit=$1
|
||||||
location=$2
|
location=$2
|
||||||
fixedlocation=$3
|
fixedlocation=$3
|
||||||
|
|
||||||
DATAFILE=/tmp/.dracula-tmux-data
|
DATAFILE=/tmp/.kanagawa-tmux-data
|
||||||
LAST_EXEC_FILE="/tmp/.dracula-tmux-weather-last-exec"
|
LAST_EXEC_FILE="/tmp/.kanagawa-tmux-weather-last-exec"
|
||||||
RUN_EACH=1200
|
RUN_EACH=1200
|
||||||
TIME_NOW=$(date +%s)
|
TIME_NOW=$(date +%s)
|
||||||
TIME_LAST=$(cat "${LAST_EXEC_FILE}" 2>/dev/null || echo "0")
|
TIME_LAST=$(cat "${LAST_EXEC_FILE}" 2>/dev/null || echo "0")
|
||||||
|
|
Loading…
Reference in a new issue