Skip to content

Merge upstream #5

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

Merged
merged 139 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
09a9694
Added synchronize-panes plugin
JannoTjarks Dec 22, 2021
3e75296
Add attached-clients plugin
aaronkollasch Jun 18, 2022
07813ac
Add documentation for attached_clients.sh
aaronkollasch Jun 18, 2022
44018de
Add 'custom' status plugin to get status texts from external scripts.
pataquets Jul 10, 2022
d9b6d00
dracula.sh: add use_arbitrary_time_format and time_format options
ucchiee Sep 18, 2021
bca3481
dracula.sh: add prefix dracula-
ucchiee Sep 18, 2021
4b6bdaf
dracula.sh: fixed branch
ucchiee Sep 18, 2021
d4f3009
dracula.sh: changed default value of time_format
ucchiee Sep 18, 2021
c39cc30
dracula.sh: debug case statement
ucchiee Sep 18, 2021
597f7be
dracula.sh: deleted use_arbitrary_time_format option
ucchiee Oct 15, 2021
0850532
feat: add network-vpn plugin (only macOS)
tmigone Aug 26, 2022
e1ea232
Merge branch 'master' into attached-clients
aaronkollasch Aug 30, 2022
7311146
Display CPU label on CPU load configuration
tarantila Aug 31, 2022
eedd337
git: add remote info support
nunojsa Sep 20, 2022
143a0d8
Add option to show/hide empty plugins
aaronkollasch Oct 28, 2022
92583ed
Merge branch 'master' into synchronize-panes
JannoTjarks Oct 28, 2022
e2dd7c8
Reject unrecognized plugins in config
aaronkollasch Oct 28, 2022
ac95b3e
♻️ refactor(network_bandwidth): more flexibility and less spaghetti
IGLOU-EU Jan 5, 2023
4bb5e56
✨ feat(network_bandwidth): add more configuration option
IGLOU-EU Jan 6, 2023
a960a12
🐛 fix(#180): set network_ping as executable
IGLOU-EU Jan 7, 2023
beb6085
🐛 fix(#165): is no longer based on word matching
IGLOU-EU Jan 7, 2023
1d3d07c
♻️ refactor(ram_info): cleanup and follow bash recommendations
IGLOU-EU Jan 7, 2023
b346d10
Merge pull request #174 from nunojsa/dev/git-remote-info
ethancedwards8 Feb 1, 2023
0810927
add fossil
Feb 10, 2023
5cd6616
add OpenBSD
Feb 10, 2023
594812e
get the change only
Feb 10, 2023
422bf2b
missed on path change
Feb 10, 2023
129c602
fix he ram value
Feb 14, 2023
1a90a5a
set Timezone different from current
Feb 14, 2023
83a05e1
fix gpu reporting issue #195
darko1002001 Mar 22, 2023
09c5750
Add cwd.sh to display the tmux pane's current working directory, upda…
jonathanforhan Apr 8, 2023
ff6bdb5
Merge pull request #198 from jonathanforhan/master
ethancedwards8 Apr 8, 2023
55e507c
Merge pull request #188 from IGLOU-EU/i180
ethancedwards8 Apr 8, 2023
8a55e04
Merge pull request #187 from IGLOU-EU/patch-2
ethancedwards8 Apr 8, 2023
181efce
Merge pull request #189 from IGLOU-EU/i165
ethancedwards8 Apr 8, 2023
6333a3d
Merge pull request #196 from darko1002001/master
ethancedwards8 Apr 8, 2023
c431005
add gpu driver disclaimer
ethancedwards8 Apr 8, 2023
e5ccca8
Merge branch 'master' into reject-unknown-plugins
ethancedwards8 Apr 8, 2023
eda8c62
Merge pull request #176 from aaronkollasch/reject-unknown-plugins
ethancedwards8 Apr 8, 2023
ae09b2f
Merge branch 'master' into attached-clients
ethancedwards8 Apr 8, 2023
872c128
Merge pull request #161 from aaronkollasch/attached-clients
ethancedwards8 Apr 8, 2023
ffcefe3
Merge branch 'master' into feature/time/arbitrary_format
ethancedwards8 Apr 8, 2023
96a3984
Merge pull request #124 from ucchiee/feature/time/arbitrary_format
ethancedwards8 Apr 8, 2023
3a7ea6f
Merge pull request #175 from aaronkollasch/show-hide-empty-plugins
ethancedwards8 Apr 8, 2023
8dbb6be
Merge pull request #168 from tarantila/patch-1
ethancedwards8 Apr 8, 2023
42deb77
fix documentation errors
ethancedwards8 Apr 8, 2023
8eacce7
add only Darwin support
ethancedwards8 Apr 8, 2023
19f69a1
Merge branch 'master' into tmigone/add-network-vpn
ethancedwards8 Apr 8, 2023
51d2407
Merge pull request #167 from tmigone/tmigone/add-network-vpn
ethancedwards8 Apr 8, 2023
643d51c
fix weather script
palkx Apr 20, 2023
92a9a47
fix: default value for the time format should be empty
palkx Apr 22, 2023
43fb1e5
Merge pull request #204 from miknikif/fix/time-format-is-not-applied
ethancedwards8 Apr 23, 2023
6de4866
Merge pull request #203 from miknikif/feature/fix-weather-script
ethancedwards8 Apr 24, 2023
9d596d6
Merge branch 'master' into add-custom-script-plugin
pataquets Apr 26, 2023
49a1c3f
add gpu ram info plugin
gdkrmr Apr 26, 2023
854ea97
Merge branch 'master' into add-custom-script-plugin
pataquets Apr 26, 2023
a588a9d
fix gpu memory
gdkrmr Apr 26, 2023
0f345b2
add gpu power usage monitor
gdkrmr Apr 26, 2023
d7fce8e
fix gpu power monitor
gdkrmr Apr 26, 2023
d1e93cc
add new features to README.md
gdkrmr Apr 26, 2023
8ee569d
Add dracula-spotify-tui-format
jumscrafteur Apr 26, 2023
15ce396
Change default format to spt's default
jumscrafteur Apr 26, 2023
9b084c6
Merge pull request #207 from jumscrafteur/master
ethancedwards8 Apr 27, 2023
934f3ee
Merge pull request #206 from gdkrmr/master
ethancedwards8 Apr 27, 2023
c5f8b4a
Merge branch 'master' into add-custom-script-plugin
ethancedwards8 Apr 27, 2023
e859815
Merge pull request #163 from pataquets/add-custom-script-plugin
ethancedwards8 Apr 27, 2023
eca1ca2
doc(Install): Add missing plugins. [#193]
danriedl May 4, 2023
a787cd1
Merge pull request #208 from danriedl/patch-1
ethancedwards8 May 4, 2023
3132716
added eks support for kubernetes prompt
TheSantacloud May 12, 2023
d4080e4
Added terraform workspace support
TheSantacloud May 12, 2023
6fe8552
fix bug with multi-word cwd
jonathanforhan May 12, 2023
85aa664
Merge pull request #215 from jonathanforhan/master
ethancedwards8 May 14, 2023
79068c4
Merge pull request #213 from dormunis/feature/terraform-workspace
ethancedwards8 May 14, 2023
b8d1c83
Merge branch 'master' into feature/eks-support
TheSantacloud May 15, 2023
311da18
Add tmux-ram-usage plugin
aaronkollasch Nov 11, 2022
487db8f
Add tmux-ram-usage feature to README.md
aaronkollasch Jun 17, 2023
83416ad
Add mercurial script
pele1410 Jul 4, 2023
601696f
Fix symbol for deleted files
pele1410 Jul 4, 2023
a6aaf65
Add missing flags to INSTALL.md
pele1410 Jul 9, 2023
b6fe033
Add fallback for tmux-ram-usage without pstree
aaronkollasch Jul 9, 2023
640eb4c
Fix shellcheck warnings
aaronkollasch Jul 9, 2023
5e9c4e1
Merge pull request #220 from aaronkollasch/feat/tmux-ram-usage
ethancedwards8 Jul 9, 2023
bd87fa7
Merge pull request #226 from pele1410/master
ethancedwards8 Jul 9, 2023
7c38079
Merge branch 'master' into synchronize-panes
ethancedwards8 Jul 12, 2023
ef42ec6
Merge pull request #138 from JannoTjarks/synchronize-panes
ethancedwards8 Jul 12, 2023
3ef141f
[fix] 'synchronize-panes' is not runnable
Jul 14, 2023
b603b24
Merge pull request #228 from magnuslarsen/SyncPanesFix
ethancedwards8 Jul 15, 2023
5af1faa
Add plugin for tmux-continuum status
aaronkollasch Oct 28, 2022
14300a6
Improve tmux-continuum status plugin
aaronkollasch Oct 28, 2022
67cde9d
Improve date compat in tmux-continuum status
aaronkollasch Oct 28, 2022
e0dd39d
Improve tmux-continuum status if no save present
aaronkollasch Nov 1, 2022
7a8c436
Trim tmux-continuum status if no save present
aaronkollasch Nov 11, 2022
cf474c9
Add tmux-continuum feature to README.md
aaronkollasch Jun 17, 2023
1b6e44e
Merge pull request #221 from aaronkollasch/feat/tmux-continuum
ethancedwards8 Jul 24, 2023
73a2bf2
Update INSTALL.md
FriendlyTroll Aug 29, 2023
ce10069
Merge pull request #230 from FriendlyTroll/patch-1
ethancedwards8 Aug 29, 2023
c200b96
Merge branch 'master' into feature/eks-support
ethancedwards8 Sep 25, 2023
038b1d4
Merge pull request #211 from dormunis/feature/eks-support
ethancedwards8 Sep 25, 2023
59e4fe7
Merge branch 'master' into master
ethancedwards8 Sep 25, 2023
ff25428
Merge pull request #191 from rbucker/master
ethancedwards8 Sep 25, 2023
c03375f
check for bc program and show info if not found
dashorty Oct 1, 2023
171d0cc
Update README.md
sourhub226 Oct 2, 2023
f61d1b8
Merge pull request #233 from dashorty/master
ethancedwards8 Oct 2, 2023
c9c08f5
feat: Add ssh-session plugin
abelanaya Oct 11, 2023
bda4fda
docs: Add documentation for ssh-session plugin
abelanaya Oct 11, 2023
c9334a6
Add hostname option
Oct 14, 2023
a8da118
Merge pull request #236 from deanc/master
ethancedwards8 Oct 15, 2023
42af610
Update network.sh to not cut off SSIDs starting with `^`
dennispaagman Oct 16, 2023
77bad73
Merge pull request #237 from djfpaagman/patch-1
ethancedwards8 Oct 17, 2023
a486050
feat: Added mpc plugin
pspiagicw Oct 19, 2023
187a57d
feat: Added MPC documentation
pspiagicw Oct 19, 2023
0fafe37
feat: Added tmux.conf customizations
pspiagicw Oct 19, 2023
a96c825
Spell checked INSTALL.md
taflaj Oct 25, 2023
ac4639b
fix: Use correct path for ssh configuration file
abelanaya Nov 6, 2023
ffa8d28
refactor: Check both /etc/ssh/ssh_config and ~/.ssh/config to retriev…
abelanaya Nov 7, 2023
e8b07be
Merge branch 'dracula:master' into master
abelanaya Nov 7, 2023
31c8af3
refactor: Remove code duplication and check local config file exists …
abelanaya Nov 13, 2023
ad59ebc
refactor: Improve script maintainability and readability with cleaner…
abelanaya Nov 14, 2023
b908ce8
refactor: Avoid if statements with double quotes and use single quote…
abelanaya Nov 14, 2023
2d1253f
Merge pull request #239 from pspiagicw/master
ethancedwards8 Dec 2, 2023
57f6f0b
Merge pull request #240 from taflaj/hostname
ethancedwards8 Dec 3, 2023
1b328c1
Merge pull request #234 from sourhub226/master
ethancedwards8 Dec 3, 2023
892e659
Merge branch 'master' into master
ethancedwards8 Dec 3, 2023
d8b7d01
Merge pull request #235 from AbelAnaya/master
ethancedwards8 Dec 3, 2023
bb44e5c
Fix: Avoid potential delay in calc of RAM (darwin)
aftaylor2 Dec 15, 2023
3f2466a
Merge pull request #243 from aftaylor2/fix_ram_info_darwin_total_mem
ethancedwards8 Dec 17, 2023
a43fd55
UPDATE: the power_supply device selection
dev-onejun Jan 3, 2024
504098e
Fix multi word fixed location
dwdunham Jan 4, 2024
6dd08eb
Merge pull request #246 from dwdunham/fix-fixed-location-space-breaks
ethancedwards8 Jan 6, 2024
ac097bb
Merge pull request #245 from dev-onejun/battery-selections
ethancedwards8 Jan 16, 2024
5f47b16
add a way to detect network interface on macOS
emmagamma Jan 30, 2024
509c2c1
update interface_bytes and get_bandwidth to support macOS as well
emmagamma Jan 30, 2024
43ee6f2
replace bc usage with an awk floating point math limiting to 2 decima…
emmagamma Jan 30, 2024
a56a5f6
Merge pull request #249 from emmagamma/macos_network_bandwidth
ethancedwards8 Jan 30, 2024
24486de
feat: Added playerctl plugin
stevendejongnl Apr 3, 2024
787e9cd
Merge pull request #257 from stevendejongnl/playerctl-plugin
ethancedwards8 Apr 7, 2024
df75ea2
Modify how network name is parsed for Mac because airport command is …
pratnala Apr 8, 2024
c2b1d67
Merge pull request #259 from pratnala/patch-1
ethancedwards8 Apr 10, 2024
1e9f8b3
merge changes
maxpetretta May 28, 2024
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
161 changes: 156 additions & 5 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To enable plugins set up the `@dracula-plugins` option in you `.tmux.conf` file,
The order that you define the plugins will be the order on the status bar left to right.

```bash
# available plugins: battery, cpu-usage, git, gpu-usage, ram-usage, network, network-bandwidth, network-ping, weather, time
# 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
set -g @dracula-plugins "cpu-usage gpu-usage ram-usage"
```

Expand All @@ -74,7 +74,7 @@ Switch powerline symbols
# for left
set -g @dracula-show-left-sep 

# for right symbol (can set any symbol you like as seperator)
# for right symbol (can set any symbol you like as separator)
set -g @dracula-show-right-sep 
```

Expand All @@ -94,7 +94,7 @@ set -g @dracula-refresh-rate 5
Switch the left smiley icon

```bash
# it can accept `session`, `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
```

Expand All @@ -111,6 +111,12 @@ Enable high contrast pane border
set -g @dracula-border-contrast true
```

Hide empty plugins

```bash
set -g @dracula-show-empty-plugins false
```

#### cpu-usage options

Customize label
Expand Down Expand Up @@ -138,6 +144,8 @@ set -g @dracula-battery-label "Battery"

#### gpu-usage options

Note, currently only the Linux NVIDIA Proprietary drivers are supported. Nouveau and AMD Graphics Cards support are still under development.

Customize label

```bash
Expand All @@ -152,6 +160,26 @@ Customize label
set -g @dracula-ram-usage-label "RAM"
```

#### tmux-ram-usage options

Customize label

```bash
set -g @dracula-tmux-ram-usage-label "MEM"
```

#### network-bandwidth

You can configure which network interface you want to view the bandwidth,
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.

```bash
set -g @dracula-network-bandwidth eth0
set -g @dracula-network-bandwidth-interval 0
set -g @dracula-network-bandwidth-show-interface true
```

#### network-ping options

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.
Expand All @@ -160,6 +188,13 @@ You can configure which server (hostname, IP) you want to ping and at which rate
set -g @dracula-ping-server "google.com"
set -g @dracula-ping-rate 5
```
### ssh-session options

Show SSH session port

```bash
set -g @dracula-show-ssh-session-port true
```

#### time options

Expand All @@ -181,6 +216,12 @@ Enable military time
set -g @dracula-military-time true
```

Set custom time format e.g (2023-01-01 14:00)
```bash
set -g @dracula-time-format "%F %R"
```
See [[this page]](https://man7.org/linux/man-pages/man1/date.1.html) for other format symbols.

#### git options

Hide details of git changes
Expand All @@ -190,13 +231,13 @@ set -g @dracula-git-disable-status true

Set symbol to use for when branch is up to date with HEAD
```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 symbol to use for when branch diverges from HEAD
```bash
# default is unicode !. Avoid bash special characters
# default is unicode !. Avoid bash special characters
set -g @dracula-git-show-diff-symbol !
```

Expand All @@ -212,6 +253,43 @@ Hide untracked files from being displayed as local changes
set -g @dracula-git-no-untracked-files true
```

Show remote tracking branch together with diverge/sync state
```bash
# default is false
set -g @dracula-git-show-remote-status true
```

#### hg options

Hide details of hg changes
```bash
set -g @dracula-hg-disable-status true
```

Set symbol to use for when branch is up to date with HEAD
```bash
#default is ✓.Avoid using non unicode characters that bash uses like $, * and !
set -g @dracula-hg-show-current-symbol ✓
```

Set symbol to use for when branch diverges from HEAD
```bash
#default is unicode !.Avoid bash special characters
set -g @dracula-hg-show-diff-symbol !
```

Set symbol or message to use when the current pane has no hg repo
```bash
#default is unicode no message
set -g @dracula-hg-no-repo-message ""
```

Hide untracked files from being displayed as local changes
```bash
#default is false
set -g @dracula-hg-no-untracked-files false
```

#### weather options

Switch from default fahrenheit to celsius
Expand All @@ -231,3 +309,76 @@ Hide your location
```bash
set -g @dracula-show-location false
```

#### synchronize-panes options

Customize label

```bash
set -g @dracula-synchronize-panes-label "Sync"
```
#### attached-clients options

Set the minimum number of clients to show (otherwise, show nothing)

```bash
set -g @dracula-clients-minimum 1
```

Set the label when there is one client, or more than one client

```bash
set -g @dracula-clients-singular client
set -g @dracula-clients-plural clients
```

#### Kubernetes options

Add prefix label before the context

```bash
set -g @dracula-kubernetes-context-label "Some Label"
```

Hide user from the context string

```
set -g @dracula-kubernetes-hide-user true
```

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
```

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

#### continuum options

Set the output mode. Options are:
- **countdown**: Show a T- countdown to the next save (default)
- **time**: Show the time since the last save
- **alert**: Hide output if no save has been performed recently
- **interval**: Show the continuum save interval

```bash
set -g @dracula-continuum-mode countdown
```

Show if the last save was performed less than 60 seconds ago (default threshold is 15 seconds)

```bash
set -g @dracula-continuum-time-threshold 60
```

#### Playerctl format

Set the playerctl metadata format

```
set -g @dracula-playerctl-format "► {{ artist }} - {{ title }}"
```
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2020 Dane Williams
Copyright (c) 2022 Max Petretta, https://maxp.co

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
50 changes: 28 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,62 @@
# Dracula for [tmux](https://github.com/tmux/tmux/wiki)
# Monokai Pro for tmux

> A dark theme for [tmux](https://github.com/tmux/tmux/wiki)
A customized version of the [Dracula theme](https://github.com/dracula/tmux) for [tmux](https://github.com/tmux/tmux/wiki), using colors from [Monokai Pro](https://monokai.pro/).

![Screenshot](./screenshot.png)

## Install

All instructions can be found at [draculatheme.com/tmux](https://draculatheme.com/tmux).
Using [tpm](https://github.com/tmux-plugins/tpm), add the following to your `.tmux.conf`:

```
set -g @plugin 'maxpetretta/tmux-monokai-pro'
```

## Configuration

Configuration and options can be found at [draculatheme.com/tmux](https://draculatheme.com/tmux).

**NOTE**: Replace all mentions of `@dracula` with `@monokai`

## Features

- Support for powerline
- Day, date, time, timezone
- Current location based on network with temperature and forecast icon (if available)
- Network connection status, bandwidth and SSID
- SSH session user, hostname and port of active tmux pane
- Git branch and status
- Battery percentage and AC power connection status
- Refresh rate control
- CPU usage (percentage or load average)
- RAM usage
- RAM usage (system and/or tmux server)
- GPU usage
- Color code based on if prefix is active or not
- List of windows with current window highlighted
- When prefix is enabled smiley face turns from green to yellow
- Custom status texts from external scripts
- GPU VRAM usage
- GPU power draw
- Color code based on whether a prefix is active or not
- List of windows with the current window highlighted
- When prefix is enabled, a smiley face turns from green to yellow
- When charging, 'AC' is displayed
- If forecast information is available, a ☀, ☁, ☂, or ❄ unicode character corresponding with the forecast is displayed alongside the temperature
- Info if the Panes are synchronized
- Spotify playback (needs the tool spotify-tui installed)
- Music Player Daemon status (needs the tool mpc installed)
- Playerctl, get current track metadata
- Current kubernetes context
- Countdown to tmux-continuum save
- Current working directory of tmux pane

## Compatibility

Compatible with macOS and Linux. Tested on tmux 3.1b
FreeBSD compatibility is in development

## Team

This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/tmux/graphs/contributors).
Tested on macOS Monterey, with & without powerline symbols

| [![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) |
## License

## Community
[MIT License](./LICENSE)

- [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.
## Credits

## License
All credit goes to [dracula/tmux](https://github.com/dracula/tmux), which this theme was forked from

[MIT License](./LICENSE)
Special thanks to [Monokai](https://monokai.nl/) for creating the One True Color Theme <3
4 changes: 2 additions & 2 deletions dracula.tmux → monokai.tmux
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env bash

# source and run dracula theme
# source and run monokai theme

current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

$current_dir/scripts/dracula.sh
$current_dir/scripts/monokai.sh

Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions scripts/attached_clients.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
# setting the locale, some users have issues with different locales, this forces the correct one
export LC_ALL=en_US.UTF-8

# configuration
# @dracula-clients-minimum 1
# @dracula-clients-singular client
# @dracula-clients-plural clients

current_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source $current_dir/utils.sh

count_clients() {
pane=$(tmux list-panes -F "#{session_name}" | head -n 1)
tmux list-clients -t $pane | wc -l | tr -d ' '
}

main() {
# storing the refresh rate in the variable RATE, default is 5
RATE=$(get_tmux_option "@dracula-refresh-rate" 5)
clients_count=$(count_clients)
clients_minimum=$(get_tmux_option "@dracula-clients-minimum" 1)
if (( $clients_count >= $clients_minimum )); then
if (( $clients_count > 1 )); then
clients_label=$(get_tmux_option "@dracula-clients-plural" "clients")
else
clients_label=$(get_tmux_option "@dracula-clients-singular" "client")
fi
echo "$clients_count $clients_label"
fi
sleep $RATE
}

# run main driver
main
2 changes: 1 addition & 1 deletion scripts/battery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source $current_dir/utils.sh

linux_acpi() {
arg=$1
BAT=$(ls -d /sys/class/power_supply/BAT* | head -1)
BAT=$(ls -d /sys/class/power_supply/*)
if [ ! -x "$(which acpi 2> /dev/null)" ];then
case "$arg" in
status)
Expand Down
Loading