This commit is contained in:
Mikhail Kilin
2026-06-21 16:22:06 +03:00
parent 698c953c55
commit 8cedd606f5
58 changed files with 4333 additions and 146 deletions

179
fedora/waybar/config.jsonc Normal file
View File

@@ -0,0 +1,179 @@
// -*- mode: jsonc -*-
{
"layer": "top",
"height": 32,
"spacing": 8,
"modules-left": [
"niri/workspaces"
],
"modules-center": [
"niri/window"
],
"modules-right": [
"privacy",
"custom/mail",
"custom/weather",
"pulseaudio",
"network",
"niri/language",
"power-profiles-daemon",
"cpu",
"memory",
"temperature",
"custom/gpu",
"disk",
"custom/calendar",
"tray"
],
"niri/workspaces": {
"format": "{index}"
},
"niri/window": {
"format": "{}",
"max-length": 50,
"align": 0.5,
"justify": "center"
},
"niri/language": {
"format": "{short}",
"align": 0.5,
"justify": "center"
},
"privacy": {
"icon-spacing": 4,
"icon-size": 16,
"transition-duration": 250,
"modules": [
{ "type": "screenshare" },
{ "type": "audio-in" },
{ "type": "audio-out" }
]
},
"custom/mail": {
"format": "<span font='Symbols Nerd Font Mono'>{}</span>",
"return-type": "json",
"exec": "~/.config/waybar/scripts/mail",
"interval": 60,
"tooltip": true,
"on-click": "thunderbird",
"align": 0.5,
"justify": "center"
},
"custom/weather": {
"format": "{}",
"return-type": "json",
"exec": "~/.config/waybar/scripts/weather.sh",
"interval": 900,
"tooltip": true,
"align": 0.5,
"justify": "center"
},
"custom/gpu": {
"format": "{}",
"return-type": "json",
"exec": "~/.config/waybar/scripts/gpu.sh",
"interval": 5,
"tooltip": true,
"align": 0.5,
"justify": "center"
},
"disk": {
"format": "<span font='Font Awesome 6 Free'></span> {percentage_used}%",
"path": "/",
"tooltip-format": "{used} / {total} ({percentage_used}%)",
"align": 0.5,
"justify": "center"
},
"tray": {
"spacing": 10
},
"custom/calendar": {
"format": "<span font='Font Awesome 6 Free'></span> {}",
"return-type": "json",
"exec": "~/.config/waybar/scripts/khal-calendar",
"interval": 30,
"tooltip": true,
"on-click": "alacritty --title khal-popup -e bash -c 'vdirsyncer sync 2>/dev/null; ikhal'",
"align": 0.5,
"justify": "center"
},
"cpu": {
"format": "<span font='Font Awesome 6 Free Solid'></span> {usage}%",
"tooltip": false,
"align": 0.5,
"justify": "center"
},
"memory": {
"format": "<span font='Font Awesome 6 Free Solid'></span> {}%",
"align": 0.5,
"justify": "center"
},
"temperature": {
"critical-threshold": 80,
"format": "<span font='Font Awesome 6 Free Solid'></span> {temperatureC}°C",
"align": 0.5,
"justify": "center"
},
"network": {
"format-wifi": "<span font='Symbols Nerd Font Mono'>{icon}</span>",
"format-ethernet": "",
"format-icons": ["󰤯", "󰤟", "󰤢", "󰤥", "󰤨"],
"tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ipaddr}/{cidr}",
"tooltip-format-ethernet": "{ifname}\n{ipaddr}/{cidr}",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "<span font='Symbols Nerd Font Mono'>󰤭</span>",
"on-click": "",
"align": 0.5,
"justify": "center"
},
"pulseaudio": {
"format": "<span font='Font Awesome 6 Free Solid'>{icon}</span> {volume}% <span font='Font Awesome 6 Free Solid'></span> {format_source}",
"format-bluetooth": "<span font='Font Awesome 6 Free Solid'>{icon}</span> {volume}% <span font='Font Awesome 6 Brands'></span> <span font='Font Awesome 6 Free Solid'></span> {format_source}",
"format-bluetooth-muted": "<span font='Font Awesome 6 Free Solid'></span> <span font='Font Awesome 6 Brands'></span> <span font='Font Awesome 6 Free Solid'></span> {format_source}",
"format-muted": "<span font='Font Awesome 6 Free Solid'></span> <span font='Font Awesome 6 Free Solid'></span> {format_source}",
"format-source": "{volume}%",
"format-source-muted": "<span font='Font Awesome 6 Free Solid'></span>",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol",
"align": 0.5,
"justify": "center"
},
"power-profiles-daemon": {
"format": "<span font='Font Awesome 6 Free Solid'>{icon}</span>",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"align": 0.5,
"justify": "center",
"format-icons": {
"default": "",
"performance": "",
"balanced": "",
"power-saver": ""
}
}
}

9
fedora/waybar/scripts/gpu.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
data=$(nvidia-smi --query-gpu=utilization.gpu,temperature.gpu --format=csv,noheader,nounits 2>/dev/null)
if [ -z "$data" ]; then
echo '{"text": "GPU N/A", "tooltip": "nvidia-smi not available"}'
exit 0
fi
usage=$(echo "$data" | cut -d',' -f1 | tr -d ' ')
temp=$(echo "$data" | cut -d',' -f2 | tr -d ' ')
echo "{\"text\": \"GPU ${usage}% ${temp}°C\", \"tooltip\": \"GPU: ${usage}%\\nTemp: ${temp}°C\", \"class\": \"\"}"

View File

@@ -0,0 +1,8 @@
#!/bin/bash
weather=$(curl -s "wttr.in/?format=%c%t" 2>/dev/null)
if [ -z "$weather" ] || echo "$weather" | grep -q "Unknown"; then
echo '{"text": "N/A", "tooltip": "Weather unavailable"}'
exit 0
fi
tooltip=$(curl -s "wttr.in/?format=%l:+%C+%t+%w+%h" 2>/dev/null)
echo "{\"text\": \"${weather}\", \"tooltip\": \"${tooltip}\"}"

262
fedora/waybar/style.css Normal file
View File

@@ -0,0 +1,262 @@
/* Catppuccin Latte */
@define-color rosewater #dc8a78;
@define-color flamingo #dd7878;
@define-color pink #ea76cb;
@define-color mauve #8839ef;
@define-color red #d20f39;
@define-color maroon #e64553;
@define-color peach #fe640b;
@define-color yellow #df8e1d;
@define-color green #40a02b;
@define-color teal #179299;
@define-color sky #04a5e5;
@define-color sapphire #209fb5;
@define-color blue #1e66f5;
@define-color lavender #7287fd;
@define-color text #4c4f69;
@define-color subtext1 #5c5f77;
@define-color subtext0 #6c6f85;
@define-color overlay2 #7c7f93;
@define-color overlay1 #8c8fa1;
@define-color overlay0 #9ca0b0;
@define-color surface2 #acb0be;
@define-color surface1 #bcc0cc;
@define-color surface0 #ccd0da;
@define-color base #eff1f5;
@define-color mantle #e6e9ef;
@define-color crust #dce0e8;
* {
font-family: 'Noto Sans Mono', 'Symbols Nerd Font Mono', 'Symbols Nerd Font', 'Font Awesome 6 Free', monospace;
font-size: 15px;
font-weight: bold;
}
window#waybar {
background-color: rgba(30, 30, 46, 0.72);
color: @text;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
button {
box-shadow: inset 0 -3px transparent;
border: none;
border-radius: 16px;
}
button:hover {
background: inherit;
box-shadow: inset 0 -2px @blue;
}
/* Workspaces */
#workspaces button {
min-height: 24px;
padding: 4px 8px;
background-color: #000000;
color: @overlay2;
border-radius: 16px;
}
#workspaces button:hover {
background: #000000;
}
#workspaces button.active {
color: @blue;
box-shadow: inset 0 -2px @blue;
}
#workspaces button.urgent {
background-color: #000000;
color: @base;
}
/* Common module styling */
#window,
#custom-calendar,
#cpu,
#memory,
#disk,
#temperature,
#network,
#pulseaudio,
#wireplumber,
#tray,
#power-profiles-daemon,
#language,
#custom-gpu,
#custom-weather,
#privacy {
min-height: 24px;
padding: 4px 8px;
background-color: #000000;
border-radius: 16px;
color: @text;
}
#workspaces button label,
#window label,
#custom-calendar label,
#cpu label,
#memory label,
#disk label,
#temperature label,
#network label,
#pulseaudio label,
#wireplumber label,
#tray label,
#power-profiles-daemon label,
#language label,
#custom-gpu label,
#custom-weather label,
#privacy label {
min-height: 24px;
padding: 0;
margin: 0;
}
#window,
#workspaces {
margin: 0 4px;
}
#window {
color: @text;
}
/* Calendar/Clock */
#custom-calendar {
color: @blue;
font-weight: bold;
}
/* CPU */
#cpu {
color: @green;
}
/* Memory */
#memory {
color: @mauve;
}
/* Temperature */
#temperature {
color: @peach;
}
#temperature.critical {
color: @red;
}
/* Network */
#network {
color: @sapphire;
font-size: 20px;
}
#network.disconnected {
color: @red;
}
/* Pulseaudio */
#pulseaudio {
color: @yellow;
}
#pulseaudio.muted {
color: @overlay1;
}
/* Language */
#language {
color: @teal;
font-weight: bold;
}
/* Power profiles */
#power-profiles-daemon {
color: @subtext0;
}
#power-profiles-daemon.performance {
color: @red;
}
#power-profiles-daemon.balanced {
color: @blue;
}
#power-profiles-daemon.power-saver {
color: @green;
}
/* Mail */
#custom-mail {
color: @lavender;
}
#custom-mail.unread {
color: @red;
}
/* Disk */
#disk {
color: @flamingo;
}
/* GPU */
#custom-gpu {
color: @green;
}
/* Weather */
#custom-weather {
color: @sky;
}
/* Privacy */
#privacy {
background-color: transparent;
padding: 0;
}
#privacy-item {
min-height: 24px;
padding: 4px 8px;
color: @base;
background-color: #000000;
border-radius: 16px;
}
#privacy-item.screenshare {
background-color: #000000;
}
#privacy-item.audio-in {
background-color: #000000;
}
#privacy-item.audio-out {
background-color: #000000;
}
/* Tray */
#tray {
color: @text;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
color: @red;
}