290 lines
No EOL
5.9 KiB
Nix
290 lines
No EOL
5.9 KiB
Nix
{ hostname, ...}: {
|
|
home.file = {
|
|
# https://yewtu.be/watch?v=tWQB1NDDA9c
|
|
# https://github.com/DN-debug/waybar-examples
|
|
# Waybar configuration
|
|
".config/waybar/config.jsonc" = {
|
|
enable = true;
|
|
executable = false;
|
|
text = ''
|
|
|
|
{
|
|
"layer": "top",
|
|
"position": "top",
|
|
"modules-left": [
|
|
"hyprland/workspaces",
|
|
"hyprland/submap",
|
|
"hyprland/window"
|
|
],
|
|
"modules-center": [
|
|
"clock"
|
|
],
|
|
"modules-right": [
|
|
"pulseaudio",
|
|
"network",
|
|
"cpu",
|
|
"memory",
|
|
"backlight",
|
|
"battery",
|
|
"tray"
|
|
],
|
|
|
|
"hyprland/workspaces": {
|
|
"disable-scroll": false
|
|
},
|
|
|
|
"clock": {
|
|
"format": "{:%H:%M}",
|
|
"format-alt": "{:%A, %d %b, %Y}",
|
|
"tooltip-format": "<tt><small>{calendar}</small></tt>",
|
|
"calendar": {
|
|
"mode" : "month",
|
|
"mode-mon-col" : 3,
|
|
"weeks-pos" : "left",
|
|
"on-scroll" : 1,
|
|
"format": {
|
|
"months": "<span color='#e2cca9'><b>{}</b></span>",
|
|
"days": "<span color='#e2cca9'><b>{}</b></span>",
|
|
"weeks": "<span color='#b0b846'><b>W{}</b></span>",
|
|
"weekdays": "<span color='#e9b143'><b>{}</b></span>",
|
|
"today": "<span color='#f28534'><b><u>{}</u></b></span>"
|
|
}
|
|
},
|
|
"actions": {
|
|
"on-click-right": "kitty --class=calcurse -e calcurse",
|
|
"on-click-middle": "mode",
|
|
"on-scroll-up": "shift_up",
|
|
"on-scroll-down": "shift_down"
|
|
}
|
|
},
|
|
|
|
"pulseaudio": {
|
|
"scroll-step": 1,
|
|
"format": "{volume}% {icon} {format_source}",
|
|
"format-bluetooth": "{volume}% {icon} {format_source}",
|
|
"format-bluetooth-muted": "<span foreground='#f2594b'> {format_source}</span>",
|
|
"format-muted": "<span foreground='#f2594b'></span> {format_source}",
|
|
"format-source": " ",
|
|
"format-source-muted": " <span foreground='#f2594b'></span>",
|
|
"format-icons": {
|
|
"headphone": "",
|
|
"headset": "",
|
|
"default": ["", "", ""]
|
|
},
|
|
"tooltip": false,
|
|
"on-click": "pavucontrol --class=pavu",
|
|
},
|
|
|
|
"network": {
|
|
"format-wifi": "",
|
|
"format-ethernet": "",
|
|
"format-linked": "",
|
|
"format-disconnected": "⚠",
|
|
"tooltip-format": "{essid}\n{ipaddr}/{cidr}",
|
|
"tooltip": true,
|
|
"on-click": "kitty --class=nmtui -e nmtui"
|
|
},
|
|
|
|
"cpu": {
|
|
"format": "{usage}% ",
|
|
"states": {
|
|
"warning": 60,
|
|
"critical": 80
|
|
},
|
|
"tooltip": false,
|
|
"on-click": "kitty --class=btop -e btop"
|
|
},
|
|
|
|
"memory": {
|
|
"tooltip": true,
|
|
"format": "{}% ",
|
|
"states": {
|
|
"warning": 60,
|
|
"critical": 80
|
|
},
|
|
"tooltip-format": "RAM: {used}GB/{total}GB\nSwap: {swapUsed}GB/{swapAvail}GB"
|
|
},
|
|
|
|
"temperature": {
|
|
"tooltip": false,
|
|
"critical-threshold": 80,
|
|
"format": "{temperatureC}°{icon}",
|
|
"format-icons": ["", "", ""]
|
|
},
|
|
|
|
"backlight": {
|
|
"tooltip": false,
|
|
"format": "{percent}% {icon}",
|
|
"format-icons": [""]
|
|
},
|
|
|
|
"battery": {
|
|
"tooltip": true,
|
|
"tooltip-format": "{time}",
|
|
"states": {
|
|
"warning": 35,
|
|
"critical": 20
|
|
},
|
|
"format": "{capacity}% {icon}",
|
|
"format-charging": "{capacity}% ",
|
|
"format-plugged": "{capacity}% ",
|
|
"format-icons": ["", "", "", "", ""]
|
|
},
|
|
|
|
"tray": {
|
|
"tooltip": false,
|
|
"spacing": 5
|
|
},
|
|
|
|
'';
|
|
};
|
|
# Waybar theming
|
|
".config/waybar/style.css" = {
|
|
enable = true;
|
|
executable = false;
|
|
text = ''
|
|
* {
|
|
border: none;
|
|
border-radius: 0;
|
|
font-family: my-queue;
|
|
}
|
|
|
|
#waybar {
|
|
background-color: rgba(50, 48, 47, 0.8);
|
|
}
|
|
|
|
#workspaces button {
|
|
color: #e2cca9;
|
|
background-color: #32302f;
|
|
font-size: 13px;
|
|
}
|
|
|
|
#workspaces button:hover,
|
|
#workspaces button.focused:hover,
|
|
#workspaces button.visible:hover {
|
|
color: #32302f;
|
|
background-color: #e9b143;
|
|
}
|
|
|
|
#workspaces button.focused {
|
|
background-color: #3c3836;
|
|
box-shadow: inset 0 -3px #f28534;
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
color: #32302f;
|
|
background-color: #f2594b;
|
|
}
|
|
|
|
#workspaces button.visible {
|
|
background-color: #3c3836;
|
|
}
|
|
|
|
/*
|
|
* Arrows
|
|
*/
|
|
#custom-arrow-light-on-bg-left {
|
|
font-size: 15px;
|
|
color: #3c3836;
|
|
background-color: transparent;
|
|
}
|
|
|
|
#custom-arrow-dark-on-bg-right {
|
|
font-size: 15px;
|
|
color: #32302f;
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
#custom-arrow-light-on-dark-left,
|
|
#custom-arrow-light-on-dark-right {
|
|
font-size: 15px;
|
|
color: #3c3836;
|
|
background: #32302f;
|
|
}
|
|
|
|
#custom-arrow-dark-on-light-left,
|
|
#custom-arrow-dark-on-light-right {
|
|
font-size: 15px;
|
|
color: #32302f;
|
|
background: #3c3836;
|
|
}
|
|
|
|
/*
|
|
* General background
|
|
*/
|
|
#network,
|
|
#memory,
|
|
#backlight,
|
|
#language,
|
|
#custom-weather {
|
|
color: #e2cca9;
|
|
font-size: 13px;
|
|
background-color: #32302f;
|
|
padding: 0 3 0 3;
|
|
}
|
|
|
|
#cpu,
|
|
#pulseaudio,
|
|
#temperature,
|
|
#battery,
|
|
#tray,
|
|
#custom-crypto {
|
|
color: #e2cca9;
|
|
font-size: 13px;
|
|
background-color: #3c3836;
|
|
padding: 0 3 0 3;
|
|
}
|
|
|
|
/*
|
|
* Warning plugins state
|
|
*/
|
|
#memory.warning,
|
|
#cpu.warning,
|
|
#battery.warning {
|
|
color: #e9b143;
|
|
}
|
|
|
|
/*
|
|
* Critical plugins state
|
|
*/
|
|
#cpu.critical,
|
|
#temperature.critical,
|
|
#memory.critical,
|
|
#battery.critical,
|
|
#network.disconnected {
|
|
color: #f2594b;
|
|
}
|
|
|
|
#mode {
|
|
color: #32302f;
|
|
font-size: 13px;
|
|
background-color: #f2594b;
|
|
}
|
|
|
|
#clock {
|
|
color: #e2cca9;
|
|
font-size: 13px;
|
|
}
|
|
|
|
#battery.charging {
|
|
color: #b0b846;
|
|
}
|
|
|
|
#battery.plugged {
|
|
color: #80aa9e;
|
|
}
|
|
|
|
#pulseaudio.bluetooth {
|
|
color: #80aa9e;
|
|
}
|
|
|
|
tooltip {
|
|
color: #e2cca9;
|
|
font-size: 13px;
|
|
background-color: #32302f;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
} |