From 39825c8fbb232ecffb0fc6bc182361d65066e3f3 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 24 Apr 2025 22:07:47 +0200 Subject: [PATCH] Added hostname to waybar --- .../{hypridle_steambox.conf => hyprland_steambox.conf} | 0 config/waybar/config | 8 ++++++++ hostname.sh | 2 ++ 3 files changed, 10 insertions(+) rename config/hypr/{hypridle_steambox.conf => hyprland_steambox.conf} (100%) create mode 100755 hostname.sh diff --git a/config/hypr/hypridle_steambox.conf b/config/hypr/hyprland_steambox.conf similarity index 100% rename from config/hypr/hypridle_steambox.conf rename to config/hypr/hyprland_steambox.conf diff --git a/config/waybar/config b/config/waybar/config index 35ea7c4..7039d98 100644 --- a/config/waybar/config +++ b/config/waybar/config @@ -22,6 +22,7 @@ "hyprland/workspaces", ], "modules-center": [ + "custom/hostname", "clock", ], "modules-right": [ @@ -41,6 +42,13 @@ // Modules // ------------------------------------------------------------------------- + "custom/hostname": { + "format": "{text} - ", + "exec": "$HOME/code_server/hostname.sh", + "interval": "once", + "tooltip": false + }, + "custom/separator": { "format": "|", "interval": "once", diff --git a/hostname.sh b/hostname.sh new file mode 100755 index 0000000..72648fe --- /dev/null +++ b/hostname.sh @@ -0,0 +1,2 @@ +#!/bin/sh +hostname | awk '{ print toupper($0) }'