commit after getting everything working on desktop hyprland

This commit is contained in:
bullshar-k
2026-10-16 09:22:39 +00:00
parent 8cec28481a
commit b94a8b62a3
6 changed files with 151 additions and 24 deletions

View File

@@ -4,8 +4,8 @@
"position": "top",
"height": 36,
"margin-top": 7,
"margin-left": 446,
"margin-right": 446,
"margin-left": 0,
"margin-right": 0,
"spacing": 6,
"modules-left": [
"hyprland/workspaces",
@@ -34,9 +34,9 @@
"format": "{title}",
"max-length": 50,
"rewrite": {
"(.*) \u2014 Mozilla Firefox": "\uf279 $1",
"(.*) \u2014 Mozilla Firefox": "\uf269 $1",
"(.*) - Chromium": "\uf268 $1",
"(.*) - Visual Studio Code": "\uf121 $1",
"(.*) - Visual Studio Code": "\ue8da $1",
"(.*) - zed": "\uf121 $1",
"(.*) - Discord": "\uf392 $1",
"(.*) - Steam": "\uf1b6 $1"
@@ -50,26 +50,27 @@
},
"temperature": {
"format": "\uf2c9 {temperatureC}\u00b0",
"hwmon-path": "/sys/class/hwmon/hwmon4/temp1_input",
"interval": 2,
"tooltip": true,
"tooltip-format": "CPU Temp: {temperatureC}\u00b0C"
},
"memory": {
"format": "\uefcd {used:0.1f}G",
"format": "\uefc5 {used:0.1f}G",
"interval": 2,
"tooltip": true,
"tooltip-format": "RAM: {used:0.1f}GB / {total:0.1f}GB ({percentage}%)"
},
"disk": {
"format": "\uf07a {used}",
"format": "\uf0a0 {used}",
"interval": 30,
"path": "/",
"tooltip": true,
"tooltip-format": "Disk: {used} / {total} ({percentage_used}%)"
},
"network": {
"format-wifi": "\uf07a {bandwidthDownBytes} \uf07a {bandwidthUpBytes}",
"format-ethernet": "\uf07a {bandwidthDownBytes} \uf07a {bandwidthUpBytes}",
"format-wifi": "\uf1eb \uf063 {bandwidthDownBytes} \uf062 {bandwidthUpBytes}",
"format-ethernet": "\uef44 \uf063 {bandwidthDownBytes} \uf062 {bandwidthUpBytes}",
"format-disconnected": "\uf1eb Offline",
"interval": 2,
"tooltip": true,
@@ -91,7 +92,7 @@
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-muted": "\uf2e2 Muted",
"format-muted": "\uf026 Muted",
"format-icons": {
"default": [
"\uf026",
@@ -125,16 +126,16 @@
"tooltip": "Session Menu",
"on-click": "python3 $HOME/.config/waybar/scripts/logout-menu.py"
},
"output": "DP-2"
"output": "DP-3"
},
{
"output": "DP-1",
"output": "DP-2",
"layer": "top",
"position": "top",
"height": 36,
"margin-top": 7,
"margin-left": 50,
"margin-right": 50,
"margin-left": 0,
"margin-right": 0,
"spacing": 6,
"modules-left": [
"hyprland/workspaces#portrait"

View File

@@ -0,0 +1,37 @@
#!/usr/bin/env python3
"""Waybar power button: a small session menu driven by fuzzel."""
import shutil
import subprocess
import sys
ENTRIES = [
("Lock", "command -v hyprlock >/dev/null 2>&1 && exec hyprlock"),
("Log out", "hyprctl dispatch exit"),
("Suspend", "systemctl suspend"),
("Reboot", "systemctl reboot"),
("Shut down", "systemctl poweroff"),
]
def main() -> int:
if not shutil.which("fuzzel"):
print("fuzzel not found", file=sys.stderr)
return 1
menu = "\n".join(name for name, _ in ENTRIES) + "\n"
result = subprocess.run(
["fuzzel", "--dmenu", "--prompt", "Session: "],
input=menu,
capture_output=True,
text=True,
)
choice = result.stdout.strip()
for name, command in ENTRIES:
if name == choice:
subprocess.Popen(["sh", "-c", command])
break
return 0
if __name__ == "__main__":
raise SystemExit(main())

View File

@@ -0,0 +1,21 @@
#!/bin/sh
# Waybar "custom/notifications" module (return-type: json).
# Counts active mako notifications and degrades gracefully when mako is absent.
count=0
if command -v makoctl >/dev/null 2>&1; then
count=$(makoctl list 2>/dev/null | grep -c '"id"')
fi
case "$count" in ''|*[!0-9]*) count=0 ;; esac
if [ "$count" -gt 0 ]; then
text=$(printf '\357\203\263 %s' "$count")
tooltip="$count notification(s)"
class=unread
else
text=$(printf '\357\203\263')
tooltip="No notifications"
class=empty
fi
printf '{"text":"%s","tooltip":"%s","class":"%s"}\n' "$text" "$tooltip" "$class"

View File

@@ -4,8 +4,8 @@
* {
all: initial;
font-family:
"JetBrainsMono Nerd Font", "JetBrains Mono", "Font Awesome 6 Free",
monospace;
"JetBrainsMono Nerd Font", "JetBrains Mono", "Font Awesome 6 Brands",
"Font Awesome 6 Free", monospace;
font-size: 13px;
font-weight: 500;
}