diff options
Diffstat (limited to 'waybar/.config')
| -rw-r--r-- | waybar/.config/waybar/config | 81 | ||||
| -rwxr-xr-x | waybar/.config/waybar/scripts/gpu_usage.sh | 22 | ||||
| -rwxr-xr-x | waybar/.config/waybar/scripts/wifi-menu.sh | 11 | ||||
| -rw-r--r-- | waybar/.config/waybar/style.css | 40 |
4 files changed, 154 insertions, 0 deletions
diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config new file mode 100644 index 0000000..752a01a --- /dev/null +++ b/waybar/.config/waybar/config @@ -0,0 +1,81 @@ +{ + "layer": "top", + "modules-left": ["niri/workspaces", "niri/window"], + "modules-right": ["mpd", "pulseaudio", "cpu", "memory", "network", "clock", "tray"], + + "niri/workspaces": { + "format": "{index}", + "all-outputs": true + }, + + "niri/window": { + "format": "{title}", + "seperate-outputs": true + }, + + "clock": { + "interval": 60, + "format": "{:%H:%M}", // What shows on the bar (Time) + "tooltip-format": "<big>{:%Y %B %d}</big>\n<tt><small>{calendar}</small></tt>", + }, + + "network": { + "format-wifi": "{icon} {signalStrength}%", + "format-ethernet": " {ifname}", + "format-disconnected": " Disconnected", + "format-icons": ["", "", "", "", ""], + "tooltip-format": "{essid} via {gwaddr} ", + "on-click": "uwsm app -- ghostty -e nmcli" + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-muted": " Muted", + "format-icons": { + "default": ["", "", ""] + } + }, + + "cpu": { + "interval": 10, + "format": " {usage}%", + "tooltip": true, + "on-click": "uwsm app -- ghostty -e btop" + }, + + "memory": { + "interval": 30, + "format": " {used:0.1f}G", + "tooltip-format": "{used:0.1f}GiB / {total:0.1f}GiB ({percentage}%)", + "on-click": "uwsm app -- ghostty -e btop" + }, + + "mpd": { + "format": "{stateIcon} {artist} - {title} ", + "format-disconnected": " Disconnected", + "format-stopped": " Stopped", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)", + "max-length": 40, + "on-click": "mpc toggle", + "on-scroll-up": "mpc next", + "on-scroll-down": "mpc prev" + } +} diff --git a/waybar/.config/waybar/scripts/gpu_usage.sh b/waybar/.config/waybar/scripts/gpu_usage.sh new file mode 100755 index 0000000..b39b34c --- /dev/null +++ b/waybar/.config/waybar/scripts/gpu_usage.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +GPU_DIR="/sys/class/drm/card0/device" +USAGE_PATH="$GPU_DIR/gpu_busy_percent" +VRAM_USED_PATH="$GPU_DIR/mem_info_vram_used" +VRAM_TOTAL_PATH="$GPU_DIR/mem_info_vram_total" + +USAGE=$(cat "$USAGE_PATH" 2>/dev/null || echo "0") + +TEMP_PATH=$(find "$GPU_DIR/hwmon/hwmon"*/ -name "temp1_input" | head -n 1) +if [ -f "$TEMP_PATH" ]; then + TEMP=$(($(cat "$TEMP_PATH") / 1000)) +else + TEMP="N/A" +fi + +VRAM_USED_RAW=$(cat "$VRAM_USED_PATH" 2>/dev/null || echo "0") +VRAM_TOTAL_RAW=$(cat "$VRAM_TOTAL_PATH" 2>/dev/null || echo "0") +VRAM_USED_MB=$(echo "scale=1; $VRAM_USED_RAW / 1024 / 1024" | bc) +VRAM_TOTAL_MB=$(echo "scale=0; $VRAM_TOTAL_RAW / 1024 / 1024" | bc) + +echo "{\"text\": \"$USAGE%\", \"tooltip\": \"Usage: $USAGE%\nTemp: ${TEMP}°C\nVRAM: ${VRAM_USED_MB}MB / ${VRAM_TOTAL_MB}MB\"}" diff --git a/waybar/.config/waybar/scripts/wifi-menu.sh b/waybar/.config/waybar/scripts/wifi-menu.sh new file mode 100755 index 0000000..8a662dd --- /dev/null +++ b/waybar/.config/waybar/scripts/wifi-menu.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash +echo -e "Option 1\nOption 2\nOption 3" | wofi --show dmenu --style ~/.config/wofi/popup.css --width 200 --height 150 --location top_right --prompt "" + +#!/usr/bin/env nix-shell + +# wifi-menu.sh +#nmcli device wifi list | \ +# tail -n +2 | \ +# wofi --dmenu --prompt "Select Network" | \ +# awk '{print $2}' | \ +# xargs -I {} nmcli device wifi connect {} diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css new file mode 100644 index 0000000..1550cd1 --- /dev/null +++ b/waybar/.config/waybar/style.css @@ -0,0 +1,40 @@ +* { + font-family: + "Berkeley Mono", "Symbols Nerd Font Mono", "Roboto", sans-serif; + font-size: 14px; +} + +.modules-left { + padding-left: 12px; +} + +.modules-right { + padding-right: 12px; +} + +#workspaces button.focused { + border-bottom: 3px solid #8aadf4; +} + +#workspaces button.active { + font-weight: bold; +} + +window#waybar { + border-bottom: none; +} + +#clock, +#tray, +#cpu, +#mpd, +#network, +#pulseaudio, +#memory, +#window, +#workspaces button { + padding: 2px 10px; + margin: 0px 5px; + background: #222222; + color: #dddddd; +} |
