Skip to content

Commit 59e4fe7

Browse files
Merge branch 'master' into master
2 parents 1a90a5a + 038b1d4 commit 59e4fe7

23 files changed

+1109
-174
lines changed

INSTALL.md

Lines changed: 134 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ To enable plugins set up the `@dracula-plugins` option in you `.tmux.conf` file,
4848
The order that you define the plugins will be the order on the status bar left to right.
4949

5050
```bash
51-
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, network, network-bandwidth, network-ping, weather, time
51+
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, tmux-ram-usage, network, network-bandwidth, network-ping, attached-clients, network-vpn, weather, time, spotify-tui, kubernetes-context, synchronize-panes
52+
5253
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage"
5354
```
5455

@@ -111,6 +112,12 @@ Enable high contrast pane border
111112
set -g @dracula-border-contrast true
112113
```
113114

115+
Hide empty plugins
116+
117+
```bash
118+
set -g @dracula-show-empty-plugins false
119+
```
120+
114121
#### cpu-usage options
115122

116123
Customize label
@@ -138,6 +145,8 @@ set -g @dracula-battery-label "Battery"
138145

139146
#### gpu-usage options
140147

148+
Note, currently only the Linux NVIDIA Proprietary drivers are supported. Nouveau and AMD Graphics Cards support are still under development.
149+
141150
Customize label
142151

143152
```bash
@@ -152,6 +161,26 @@ Customize label
152161
set -g @dracula-ram-usage-label "RAM"
153162
```
154163

164+
#### tmux-ram-usage options
165+
166+
Customize label
167+
168+
```bash
169+
set -g @dracula-tmux-ram-usage-label "MEM"
170+
```
171+
172+
#### network-bandwidth
173+
174+
You can configure which network interface you want to view the bandwidth,
175+
Displaying of the interface name, The interval between each bandwidth update.
176+
The most common interfaces name are `eth0` for a wired connection and `wlan0` for a wireless connection.
177+
178+
```bash
179+
set -g @dracula-network-bandwidth eth0
180+
set -g @dracula-network-bandwidth-interval 0
181+
set -g @dracula-network-bandwidth-show-interface true
182+
```
183+
155184
#### network-ping options
156185

157186
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.
@@ -181,6 +210,12 @@ Enable military time
181210
set -g @dracula-military-time true
182211
```
183212

213+
Set custom time format e.g (2023-01-01 14:00)
214+
```bash
215+
set -g @dracula-time-format "%F %R"
216+
```
217+
See [[this page]](https://man7.org/linux/man-pages/man1/date.1.html) for other format symbols.
218+
184219
#### git options
185220

186221
Hide details of git changes
@@ -190,13 +225,13 @@ set -g @dracula-git-disable-status true
190225

191226
Set symbol to use for when branch is up to date with HEAD
192227
```bash
193-
# default is ✓. Avoid using non unicode characters that bash uses like $, * and !
228+
# default is ✓. Avoid using non unicode characters that bash uses like $, * and !
194229
set -g @dracula-git-show-current-symbol ✓
195230
```
196231

197232
Set symbol to use for when branch diverges from HEAD
198233
```bash
199-
# default is unicode !. Avoid bash special characters
234+
# default is unicode !. Avoid bash special characters
200235
set -g @dracula-git-show-diff-symbol !
201236
```
202237

@@ -218,6 +253,37 @@ Show remote tracking branch together with diverge/sync state
218253
set -g @dracula-git-show-remote-status true
219254
```
220255

256+
#### hg options
257+
258+
Hide details of hg changes
259+
```bash
260+
set -g @dracula-hg-disable-status true
261+
```
262+
263+
Set symbol to use for when branch is up to date with HEAD
264+
```bash
265+
#default is ✓.Avoid using non unicode characters that bash uses like $, * and !
266+
set -g @dracula-hg-show-current-symbol ✓
267+
```
268+
269+
Set symbol to use for when branch diverges from HEAD
270+
```bash
271+
#default is unicode !.Avoid bash special characters
272+
set -g @dracula-hg-show-diff-symbol !
273+
```
274+
275+
Set symbol or message to use when the current pane has no hg repo
276+
```bash
277+
#default is unicode no message
278+
set -g @dracula-hg-no-repo-message ""
279+
```
280+
281+
Hide untracked files from being displayed as local changes
282+
```bash
283+
#default is false
284+
set -g @dracula-hg-no-untracked-files false
285+
```
286+
221287
#### weather options
222288

223289
Switch from default fahrenheit to celsius
@@ -237,3 +303,68 @@ Hide your location
237303
```bash
238304
set -g @dracula-show-location false
239305
```
306+
307+
#### synchronize-panes options
308+
309+
Customize label
310+
311+
```bash
312+
set -g @dracula-synchronize-panes-label "Sync"
313+
```
314+
#### attached-clients options
315+
316+
Set the minimum number of clients to show (otherwise, show nothing)
317+
318+
```bash
319+
set -g @dracula-clients-minimum 1
320+
```
321+
322+
Set the label when there is one client, or more than one client
323+
324+
```bash
325+
set -g @dracula-clients-singular client
326+
set -g @dracula-clients-plural clients
327+
```
328+
329+
#### Kubernetes options
330+
331+
Add prefix label before the context
332+
333+
```bash
334+
set -g @dracula-kubernetes-context-label "Some Label"
335+
```
336+
337+
Hide user from the context string
338+
339+
```
340+
set -g @dracula-kubernetes-hide-user true
341+
```
342+
343+
Hide ARN (show only cluster name) - Available for EKS only (only available for cluster names that are ARNs)
344+
345+
```
346+
set -g @dracula-kubernetes-eks-hide-arn true
347+
```
348+
349+
Extract the account as a prefix to the cluster name - Available for EKS only (only available for cluster names that are ARNs)
350+
351+
```
352+
set -g @dracula-kubernetes-eks-extract-account true
353+
354+
#### continuum options
355+
356+
Set the output mode. Options are:
357+
- **countdown**: Show a T- countdown to the next save (default)
358+
- **time**: Show the time since the last save
359+
- **alert**: Hide output if no save has been performed recently
360+
- **interval**: Show the continuum save interval
361+
362+
```bash
363+
set -g @dracula-continuum-mode countdown
364+
```
365+
366+
Show if the last save was performed less than 60 seconds ago (default threshold is 15 seconds)
367+
368+
```bash
369+
set -g @dracula-continuum-time-threshold 60
370+
```

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,21 @@ Configuration and options can be found at [draculatheme.com/tmux](https://dracul
2222
- Battery percentage and AC power connection status
2323
- Refresh rate control
2424
- CPU usage (percentage or load average)
25-
- RAM usage
25+
- RAM usage (system and/or tmux server)
2626
- GPU usage
27+
- Custom status texts from external scripts
28+
- GPU VRAM usage
29+
- GPU power draw
2730
- Color code based on if prefix is active or not
2831
- List of windows with current window highlighted
2932
- When prefix is enabled smiley face turns from green to yellow
3033
- When charging, 'AC' is displayed
3134
- If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
35+
- Info if the Panes are synchronized
3236
- Spotify playback (needs the tool spotify-tui installed)
3337
- Current kubernetes context
38+
- Countdown to tmux-continuum save
39+
- Current working directory of tmux pane
3440

3541
## Compatibility
3642

scripts/attached_clients.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/usr/bin/env bash
2+
# setting the locale, some users have issues with different locales, this forces the correct one
3+
export LC_ALL=en_US.UTF-8
4+
5+
# configuration
6+
# @dracula-clients-minimum 1
7+
# @dracula-clients-singular client
8+
# @dracula-clients-plural clients
9+
10+
current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11+
source $current_dir/utils.sh
12+
13+
count_clients() {
14+
pane=$(tmux list-panes -F "#{session_name}" | head -n 1)
15+
tmux list-clients -t $pane | wc -l | tr -d ' '
16+
}
17+
18+
main() {
19+
# storing the refresh rate in the variable RATE, default is 5
20+
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
21+
clients_count=$(count_clients)
22+
clients_minimum=$(get_tmux_option "@dracula-clients-minimum" 1)
23+
if (( $clients_count >= $clients_minimum )); then
24+
if (( $clients_count > 1 )); then
25+
clients_label=$(get_tmux_option "@dracula-clients-plural" "clients")
26+
else
27+
clients_label=$(get_tmux_option "@dracula-clients-singular" "client")
28+
fi
29+
echo "$clients_count $clients_label"
30+
fi
31+
sleep $RATE
32+
}
33+
34+
# run main driver
35+
main

0 commit comments

Comments
 (0)