nix/hosts/nixos-laptop/home-manager/waybar-conf.nix

217 lines
6.5 KiB
Nix
Raw Normal View History

2023-08-15 11:25:29 +02:00
{ hostname, ...}: {
2023-08-14 14:57:17 +02:00
home.file = {
2023-08-14 08:04:03 +02:00
# https://yewtu.be/watch?v=tWQB1NDDA9c
# Waybar configuration
2023-08-14 15:06:52 +02:00
".config/waybar/config.jsonc" = {
2023-08-14 08:04:03 +02:00
enable = true;
executable = false;
2023-08-15 13:49:57 +02:00
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": "<span foreground='#E5B4E2'> </span><span font='OperatorMonoSSm Nerd Font weight=325 Italic'>{}</span>",
"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": "<span foreground='#C6AAE8'> </span>{:%a %d %H:%M}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "<span size='13000' foreground='#B1E3AD'>{icon}</span> {capacity}%",
"format-warning": "<span size='13000' foreground='#B1E3AD'>{icon}</span> {capacity}%",
"format-critical": "<span size='13000' foreground='#E38C8F'>{icon}</span> {capacity}%",
"format-charging": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-plugged": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-alt": "<span size='13000' foreground='#B1E3AD'>{icon}</span> {time}",
"format-full": "<span size='13000' foreground='#B1E3AD'> </span>{capacity}%",
"format-icons": ["", "", "", "", ""],
"tooltip-format": "{time}"
},
"network": {
"format-wifi": "<span size='13000' foreground='#F2CECF'> </span>{essid}",
"format-ethernet": "<span size='13000' foreground='#F2CECF'>󰤭</span> Disconnected",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "<span size='13000' foreground='#F2CECF'> </span>Disconnected",
"tooltip-format-wifi": "Signal Strenght: {signalStrength}%",
},
"pulseaudio": {
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
"format": "<span size='13000' foreground='#EBDDAA'>{icon}</span> {volume}%",
"format-muted": "<span size='14000' foreground='#EBDDAA'></span> Muted",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
},
}
'';
2023-08-14 14:57:37 +02:00
};
2023-08-14 08:04:03 +02:00
# Waybar theming
2023-08-14 15:06:52 +02:00
".config/waybar/style.css" = {
2023-08-14 08:04:03 +02:00
enable = true;
executable = false;
2023-08-15 13:49:57 +02:00
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;
}
'';
2023-08-14 08:04:03 +02:00
};
2023-08-14 14:57:17 +02:00
};
2023-08-14 08:04:03 +02:00
}