From 740297097b63c827dcac1eb45e5b9ee6b2daf4d0 Mon Sep 17 00:00:00 2001 From: Phillip Michelsen Date: Sun, 15 Feb 2026 14:51:16 +0800 Subject: [PATCH] Changed waybar config on desktop --- machines/desktop/config/fish/fish_variables | 4 +++ machines/desktop/config/sway/config | 4 +-- machines/desktop/config/sway/status.sh | 9 ----- machines/desktop/config/waybar/config | 39 ++++++++++++++++++++ machines/desktop/config/waybar/style.css | 40 +++++++++++++++++++++ 5 files changed, 84 insertions(+), 12 deletions(-) create mode 100644 machines/desktop/config/fish/fish_variables delete mode 100755 machines/desktop/config/sway/status.sh create mode 100644 machines/desktop/config/waybar/config create mode 100644 machines/desktop/config/waybar/style.css diff --git a/machines/desktop/config/fish/fish_variables b/machines/desktop/config/fish/fish_variables new file mode 100644 index 0000000..298ca49 --- /dev/null +++ b/machines/desktop/config/fish/fish_variables @@ -0,0 +1,4 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:4300 +SETUVAR fish_greeting:\x1d diff --git a/machines/desktop/config/sway/config b/machines/desktop/config/sway/config index ba6a26a..913b3e9 100644 --- a/machines/desktop/config/sway/config +++ b/machines/desktop/config/sway/config @@ -42,9 +42,7 @@ bar { colors { focused_workspace $b01 $b01 $b05 } - font pango:Hack Nerd Font 10 - position bottom - status_command ~/.config/sway/status.sh + swaybar_command waybar } input type:keyboard { diff --git a/machines/desktop/config/sway/status.sh b/machines/desktop/config/sway/status.sh deleted file mode 100755 index 4632116..0000000 --- a/machines/desktop/config/sway/status.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -while :; do - temp=$(awk '{printf "%d", $1/1000}' /sys/class/thermal/thermal_zone0/temp 2>/dev/null || echo n/a) - datetime=$(date +'%a %d %b %T') - - echo " ${temp}C | ${datetime}" - sleep 1 -done - diff --git a/machines/desktop/config/waybar/config b/machines/desktop/config/waybar/config new file mode 100644 index 0000000..e9afa65 --- /dev/null +++ b/machines/desktop/config/waybar/config @@ -0,0 +1,39 @@ +{ + "layer": "bottom", + "position": "bottom", + "height": 20, + + "modules-left": ["sway/workspaces"], + "modules-right": ["mpris", "pulseaudio", "temperature", "memory", "cpu", "clock", "tray"], + + "sway/workspaces": { "disable-scroll": true }, + + "clock": { "format": "{:%a %d %b %H:%M:%S}", "interval": 1, "tooltip": false }, + + "mpris": { + "player": "spotify", + "format": " {title} — {artist} | ", + "title-len": 30, + "artist-len": 20, + "ellipsis": true, + "interval": 2 + }, + + "temperature": { + "format": " | {temperatureC}°C | ", + "critical-threshold": 80, + "interval": 5, + "tooltip": false + /* If it shows 0°C, set one of these explicitly: + "thermal-zone": 0, + or + "hwmon-path": "/sys/class/hwmon/hwmon0/temp1_input" + */ + }, + + "memory": { "format": "{percentage}% | ", "interval": 5, "tooltip": false }, + + "cpu": { "format": "{usage}% | ", "interval": 2, "tooltip": false }, + + "tray": { "spacing": 7 } +} diff --git a/machines/desktop/config/waybar/style.css b/machines/desktop/config/waybar/style.css new file mode 100644 index 0000000..01ed0d4 --- /dev/null +++ b/machines/desktop/config/waybar/style.css @@ -0,0 +1,40 @@ +* { + font-family: "Hack Nerd Font"; + font-size: 11px; + min-height: 0; +} + +window#waybar { + background: #141415; /* $b00 */ + color: #cdcdcd; /* $b05-ish default text */ +} + +/* Workspaces: try to mimic your focused_workspace colors */ +#workspaces button { + padding: 0 8px; + margin: 0; + border-radius: 0; + border: 0; + background: transparent; + color: #c3c3d5; /* $b04 */ +} + +#workspaces button.focused { + background: #1c1c24; /* $b01 */ + color: #cdcdcd; /* $b05 */ +} + +#workspaces button.urgent { + background: #d8647e; /* $red */ + color: #141415; /* $b00 */ +} + +/* Right side modules */ +#tray { + padding: 0 8px; +} + +#custom-ministatus { + padding: 0 8px; + color: #cdcdcd; /* $b05 */ +}