Skip to content

Commit fb459cb

Browse files
authored
Merge branch 'master' into mac-player
2 parents 0c61664 + 89d16fd commit fb459cb

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

docs/CONFIG.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,14 @@ which will display the battery charge and whether its charging (or just drawing
198198
set -g @dracula-battery-label false
199199
set -g @dracula-show-battery-status true
200200
```
201+
these settings will introduce the following icons:
202+
- the battery is discharging and at the current level: `󰂎` `󰁺` `󰁻` `󰁼` `󰁽` `󰁾` `󰁿` `󰂀` `󰂁` `󰂂` `󰁹`
203+
- the battery is charging and at the current level: `󰢟` `󰢜` `󰂆` `󰂇` `󰂈` `󰢝` `󰂉` `󰢞` `󰂊` `󰂋` `󰂅`
204+
- power is being drawn from AC, but the battery is neither charging nor discharging: ``
205+
- we were able to determine that the battery is charging/ discharging, but something about the percentage went wrong: `󰂃`
206+
- we don't know the status of the battery: ``
207+
208+
201209

202210
if you have no battery and would like the widget to hide in that case, set the following:
203211

@@ -643,13 +651,18 @@ set -g @dracula-ping-rate 5
643651

644652
### network-vpn - [up](#table-of-contents)
645653

646-
This widget displays whether a vpn is connected.
654+
This widget tries to display whether a vpn is connected.
655+
Tailscale exit nodes are fully supported for Linux and MacOS.
647656

648-
These options are not available yet.
657+
Set verbose to true in order to see the VPNs IP or name of Tailscale exit node.
649658

650659
```bash
651660
set -g @dracula-network-vpn-verbose true
652-
set -g @dracula-network-vpn-label
661+
```
662+
663+
Set the widgets label like so:
664+
```bash
665+
set -g @dracula-network-vpn-label "󰌘 "
653666
```
654667

655668
### playerctl - [up](#table-of-contents)

scripts/battery.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ battery_status()
126126
)
127127
echo "${battery_labels[$((bat_perc/10*10))]:-󰂃}"
128128
;;
129-
ACattached)
129+
ACattached|Notcharging|"Not charging")
130130
# drawing from AC but not charging
131+
# ACattached - MacOS
132+
# Not charging - Linux without acpi
133+
# Notcharging - Linux with acpi
131134
echo ''
132135
;;
133136
finishingcharge)

scripts/network_vpn.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ vpn_function() {
1313

1414
verbose=$(get_tmux_option "@dracula-network-vpn-verbose" false)
1515

16-
#Show IP of tun0 if connected
16+
# Show IP of tun0 if connected
1717
vpn=$(ip -o -4 addr show dev tun0 | awk '{print $4}' | cut -d/ -f1)
1818

1919
which -s tailscale > /dev/null
2020
tailscale_installed=$?
2121

2222
if [[ $vpn =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
23-
echo $vpn
23+
if $verbose; then
24+
vpn_label=$(get_tmux_option "@dracula-network-vpn-label" "󰌘 ")
25+
echo "$vpn_label$vpn"
26+
else
27+
vpn_label=$(get_tmux_option "@dracula-network-vpn-label" "VPN-ON")
28+
echo "$vpn_label"
29+
fi
2430
elif [ $tailscale_installed ]; then
2531
# if tailscale is installed
2632
#

0 commit comments

Comments
 (0)