Add Waybar config

This commit is contained in:
Harzo 2023-05-25 22:09:55 +02:00
parent 7295441a5c
commit a977071370
2 changed files with 230 additions and 0 deletions

110
.config/waybar/config.jsonc Normal file
View File

@ -0,0 +1,110 @@
{
"layer": "top",
"position": "top",
"height": 30,
"spacing": 4,
"modules-left": [
"clock",
"custom/weather",
"custom/pacman",
"idle_inhibitor"
],
"modules-center": [
"wlr/workspaces"
],
"modules-right": [
"pulseaudio",
"network",
"tray"
],
"hyprland/window": {
"format": "{}",
"separate-outputs": true,
"max-length": 50
},
"wlr/workspaces": {
"format": "{icon}",
"on-click": "activate",
"format-icons": {
"urgent": "",
"active": "",
"default": ""
},
"sort-by-number": true,
"active-only": false,
"all-outputs": false,
"persistent_workspaces": {
"1": ["HDMI-A-1"],
"2": ["HDMI-A-1"],
"3": ["HDMI-A-1"],
"4": ["HDMI-A-1"],
"5": ["HDMI-A-1"],
"11": ["DP-3"],
"12": ["DP-3"],
"13": ["DP-3"],
"14": ["DP-3"],
"15": ["DP-3"]
}
},
"tray": {
"icon-size": 16,
"spacing": 4
},
"clock": {
"interval": 1,
"timezone": "Europe/Warsaw",
"tooltip-format": false,
"format-alt": "󰥔 {:%T 󰸗 %F}",
"format": "󰥔 {:%H:%M 󰸗 %e %b}",
"on-click-right": "thunderbird -calendar"
},
"network": {
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "󰈀 {ifname}",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "⚠ Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"on-click-middle": "nm-connection-editor"
},
"pulseaudio": {
"format": "{icon} {volume}%{format_source}",
"format-bluetooth": " {icon} {volume}%{format_source}",
"format-bluetooth-muted": " 󰝟{format_source}",
"format-muted": "󰝟 {format_source}",
"format-source": "  {volume}%",
"format-source-muted": " ",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "󰋎",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "ponymix toggle",
"on-click-middle": "ponymix -t source toggle",
"on-click-right": "pavucontrol"
},
"custom/pacman": {
"format": "󰏗 {}",
"interval": "3600",
"return-type": "json",
"exec": "$HOME/.local/bin/scripts/checkupdates",
"exec-if": "exit 0",
"signal": 12,
"on-click": "foot paru; pkill waybar; waybar &"
},
"custom/weather": {
"exec": "curl -s 'https://wttr.in/?format=1' | sed 's/ \\+/ /g'",
"interval": 3600
},
"idle_inhibitor": {
"format": "<small>{icon}</small>",
"format-icons": {
"activated": "",
"deactivated": ""
}
}
}

120
.config/waybar/style.css Normal file
View File

@ -0,0 +1,120 @@
@keyframes blink-warning {
70% {
color: @light;
}
to {
color: @light;
background-color: @warning;
}
}
@keyframes blink-critical {
70% {
color: @light;
}
to {
color: @light;
background-color: @critical;
}
}
@define-color bg #2e3440;
@define-color light #d8dee9;
@define-color warning #ebcb8b;
@define-color critical #bf616a;
@define-color nord_bg #434c5e;
@define-color nord_bg_blue #546484;
@define-color nord_light #d8dee9;
@define-color nord_light_font #d8dee9;
@define-color nord_dark_font #434c5e;
* {
border: none;
border-radius: 0;
min-height: 0;
margin: 0.1em;
outline: none;
}
tooltip {
font-family: "Inter Nerd Font";
font-weight: bold;
border-radius: 5px;
}
#waybar {
background: @bg;
color: @light;
font-family: "Fira Sans", "Inter Nerd Font";
font-size: 14px;
font-weight: bold;
}
#workspaces button {
font-weight: bold; /* Somewhy the bar-wide setting is ignored*/
padding: 0;
opacity: 0.75;
background: none;
font-size: 1em;
color: #d8dee9;
}
#battery,
#clock,
#cpu,
#memory,
#network,
#pulseaudio,
#temperature,
#tray,
#backlight,
#language,
#custom-pacman,
#custom-weather,
#idle_inhibitor {
padding-left: 0.6em;
padding-right: 0.6em;
border-radius: 5px
}
#clock,
#custom-weather {
color: @nord_light_font;
background: @nord_bg_blue;
}
#custom-pacman,
#pulseaudio,
#network,
#tray,
#idle_inhibitor {
color: @nord_light_font;
background: @nord_bg;
}
#idle_inhibitor.activated,
#custom-pacman.urgent {
color: @nord_dark_font;
background: @nord_light;
}
#custom-pacman.warning {
color: @nord_dark_font;
background: @warning;
}
#workspaces button.persistent {
opacity: 0.3;
}
#workspaces button.active {
opacity: 1;
}
#workspaces button.urgent {
color: @warning;
opacity: 1;
}