{ hostname, ...}: {
home.file = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true;
executable = false;
text = ''
{
"position": "top",
# "modules-left": ["sway/workspaces"],
# "modules-center": ["custom/spotify"],
"modules-right": ["network", "custom/vpn", "pulseaudio", "battery", "clock"],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon}",
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": [],
"7": [],
"8": [],
"9": [],
"10": []
},
"format-icons": {
"default": "",
"urgent": "",
"focused": "",
}
},
"custom/vpn": {
"format": "{}",
"interval": 1,
"exec": "/home/loki/bin/waybar-vpn.sh"
},
"custom/spotify": {
"format": " {}",
"interval": 1,
"exec-if": "pgrep spotify",
"on-click": "playerctl -p spotify play-pause",
"on-scroll-up": "playerctl -p spotify previous",
"on-scroll-down": "playerctl -p spotify next",
"tooltip": false,
"escape": true,
"max-length": 60,
"exec": "/home/loki/bin/spotify.sh"
},
"clock": {
"format": " {:%a %d %H:%M}",
"tooltip-format": "{:%Y %B}\n{calendar}",
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "{icon} {capacity}%",
"format-warning": "{icon} {capacity}%",
"format-critical": "{icon} {capacity}%",
"format-charging": " {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{icon} {time}",
"format-full": " {capacity}%",
"format-icons": ["", "", "", "", ""],
"tooltip-format": "{time}"
},
"network": {
"format-wifi": " {essid}",
"format-ethernet": " Disconnected",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": " Disconnected",
"tooltip-format-wifi": "Signal Strenght: {signalStrength}%",
},
"pulseaudio": {
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"format": "{icon} {volume}%",
"format-muted": " Muted",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
},
}
'';
};
# Waybar theming
".config/waybar/style.css" = {
enable = true;
executable = false;
text = ''
* {
font-family: "JetBrainsMono Nerd Font";
font-size: 17px;
/* font-weight: bold; */
border-radius: 0px;
}
window#waybar {
background-color: #45403d;
border-radius: 10px;
}
.modules-right {
font-size: 10px;
margin-right: 0.5rem;
}
.modules-left {
margin-left: 0.5rem;
}
tooltip {
background: #45403d;
border-radius: 10px;
}
tooltip label {
color: #ebdbb2;
background-color: #45403d;
border-radius: 10px;
}
tooltip * {
border-radius: 10px;
}
#workspaces button {
margin: 0;
color: #d4be98;
font-weight: bolder;
font-style: normal;
margin: 0.2rem 0.1rem;
border-radius: 20px;
}
button:hover {
box-shadow: inherit;
text-shadow: inherit;
background: inherit;
}
#workspaces button.active {
color: #ebdbb2;
background-color: #7daea3;
text-shadow: 0 0 5px rgba(0, 0, 0, 0.818);
transition: all 0.1s ease-in-out;
}
#clock,
#custom-weather {
font-family: "GE Inspira";
font-weight: bolder;
text-shadow: 0 0 5px rgb(0, 0, 0);
color: #d4be98;
}
#clock {
padding: 0 0 0 1.5em;
}
#custom-weather {
padding: 0 1.5em 0 0.5em;
}
#memory {
color: #a9b665;
padding: 0 0.3em;
}
#pulseaudio {
margin: 0;
padding: 0 0.5em 0 0.4em;
color: #d8a657;
}
#backlight {
margin: 0;
padding: 0 0.5em 0 0.4em;
color: #d8a657;
}
#cpu {
margin: 0;
padding: 0 0.1em 0 0.1em;
color: #a9b665;
}
#network {
margin: 0;
padding: 0 0.4em 0 0.5em;
color: #d8a657;
}
#custom-cycle_wall {
margin: 0;
padding: 0 0.5em;
color: #d3869b;
}
#language {
margin: 0;
padding: 0 0.1em;
color: #d3869b;
}
#tray {
margin: 0;
padding: 0 0.2em;
color: #d3869b;
}
#battery {
margin: 0;
padding: 0 0.5em 0 0.4em;
color: #a9b665;
}
'';
};
};
}