{ hostname, ...}: {
home.file = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# https://github.com/DN-debug/waybar-examples
# Inspiration:
# https://github.com/Pipshag/dotfiles_gruvbox
# Font Search:
# https://www.nerdfonts.com/cheat-sheet
# Online CSS testing
# https://www.w3schools.com/css/tryit.asp?filename=trycss_border_round
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true;
executable = false;
text = ''
{
"layer": "top",
"position": "top",
"modules-left": [
"wlr/workspaces",
],
"modules-center": [
],
"modules-right": [
"mpris",
"waybar-idle-inhibotor",
"pulseaudio",
"network",
"battery",
"clock"
],
"mpris": {
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} {dynamic}",
"player-icons": { "default": "▶" },
"status-icons": { "paused": "⏸" },
},
"wlr/workspaces": {
"on-click": "activate"
},
"clock": {
"format": " {:%H:%M}",
"format-alt": " {:%A, %d %b, %Y}",
"tooltip-format": "{calendar}",
"calendar": {
"mode" : "month",
"mode-mon-col" : 3,
"weeks-pos" : "left",
"on-scroll" : 1,
"format": {
"months": "{}",
"days": "{}",
"weeks": "W{}",
"weekdays": "{}",
"today": "{}"
}
},
"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": " {format_source}",
"format-muted": " {format_source}",
"format-source": " ",
"format-source-muted": " ",
"format-icons": {
"headphone": "",
"headset": "",
"default": ["", "", ""]
},
"tooltip": false,
"on-click": "pulsemixer --class=pulsemixer",
},
"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"
},
"battery": {
"tooltip": true,
"tooltip-format": "{time}",
"states": {
"warning": 35,
"critical": 20
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-icons": ["", "", "", "", ""]
},
}
'';
};
# 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);
padding: 5px;
}
#workspaces button {
color: #e2cca9;
font-size: 16px;
}
#workspaces button:hover,
#workspaces button.focused:hover,
#workspaces button.visible:hover {
color: #32302f;
background-color: #e9b143;
}
#workspaces button.active {
box-shadow: inset 0 -3px #f28534;
}
#workspaces button.urgent {
color: #32302f;
background-color: #f2594b;
}
#workspaces button.visible {
}
/*
* General background
*/
#network,
#mpris,
#memory,
#backlight,
#cpu,
#pulseaudio,
#temperature,
#battery,
#tray,
#submap,
#clock,
#waybar-idle-inhibotor,
#window {
font-size: 16px;
padding: 5px;
margin: 5px;
/* new stuff */
border-radius: 30px;
color: rgba(50, 48, 47, 0.8);
background-color: #e2cca9;
font-weight: bold;
}
/*
* Warning plugins state
*/
#memory.warning,
#cpu.warning,
#battery.warning {
background-color: #e9b143;
}
/*
* Critical plugins state
*/
#cpu.critical,
#temperature.critical,
#memory.critical,
#battery.critical,
#network.disconnected {
background-color: #f2594b;
}
/*#clock {
* color: #e2cca9;
* font-size: 14px;
* font-weight: bold;
*}
*/
#battery.charging {
color: #b0b846;
}
#battery.plugged {
color: #80aa9e;
}
#pulseaudio.bluetooth {
color: #80aa9e;
}
tooltip {
color: #e2cca9;
font-size: 14px;
}
'';
};
};
}