Skip to content

Commit

Permalink
fix: hostname-widget missing script
Browse files Browse the repository at this point in the history
  • Loading branch information
janoamaral committed Dec 1, 2024
1 parent abf316f commit d610ced
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/hostname-widget.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Imports
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
. "${ROOT_DIR}/lib/coreutils-compat.sh"

# Check if enabled
ENABLED=$(tmux show-option -gv @tokyo-night-tmux_show_hostname 2>/dev/null)
[[ ${ENABLED} -ne 1 ]] && exit 0

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

hostname=$(hostnamectl hostname)
ACCENT_COLOR="${THEME[black]}"

echo "#[nodim,fg=$ACCENT_COLOR]@${hostname}"

0 comments on commit d610ced

Please sign in to comment.