nix/home-manager/hosts/nixos-laptop/desktops/hyprland/gruvbox/waybar/waybar-conf2.nix

238 lines
6.7 KiB
Nix
Raw Normal View History

2023-08-28 05:08:58 +02:00
{ hostname, ...}: {
home.file = {
# https://yewtu.be/watch?v=tWQB1NDDA9c
# https://github.com/DN-debug/waybar-examples
2023-08-28 08:32:21 +02:00
2023-08-28 05:34:37 +02:00
# Inspiration:
# https://github.com/Pipshag/dotfiles_gruvbox
# Font Search:
# https://www.nerdfonts.com/cheat-sheet
2023-08-28 08:32:21 +02:00
# Online CSS testing
# https://www.w3schools.com/css/tryit.asp?filename=trycss_border_round
2023-08-28 05:08:58 +02:00
# Waybar configuration
".config/waybar/config.jsonc" = {
enable = true;
executable = false;
text = ''
{
"layer": "top",
"position": "top",
"modules-left": [
"wlr/workspaces",
],
"modules-center": [
],
"modules-right": [
"mpris",
2023-08-28 11:54:08 +02:00
"idle_inhibotor",
2023-08-28 05:08:58 +02:00
"pulseaudio",
"network",
"battery",
2023-08-28 08:32:21 +02:00
"clock"
2023-08-28 05:08:58 +02:00
],
2023-08-28 11:33:35 +02:00
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
2023-08-28 11:35:46 +02:00
},
2023-08-28 11:33:35 +02:00
2023-08-28 05:08:58 +02:00
"mpris": {
"format": "{player_icon} {dynamic}",
"format-paused": "{status_icon} <i>{dynamic}</i>",
2023-08-28 05:34:37 +02:00
"player-icons": { "default": "" },
2023-08-28 10:25:52 +02:00
"status-icons": { "paused": "" },
2023-08-28 05:08:58 +02:00
},
"wlr/workspaces": {
"on-click": "activate"
},
"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,
2023-08-28 11:13:36 +02:00
"format": "{icon} {format_source}",
2023-08-28 11:33:35 +02:00
"format-bluetooth": "<span foreground='#f2594b'>{volume}% {icon} {format_source}</span>",
"format-bluetooth-muted": " ",
"format-muted": "󰝟 {format_source}",
"format-source": " <span foreground='#f2594b'></span>",
"format-source-muted": " ",
2023-08-28 05:08:58 +02:00
"format-icons": {
"headphone": "",
"headset": "",
"default": ["󰕿", "󰖀", "󰕾"]
},
"tooltip": false,
2023-08-28 11:06:40 +02:00
"on-click": "pulsemixer",
2023-08-28 05:08:58 +02:00
},
"network": {
2023-08-28 11:06:40 +02:00
"format": "{ifname}",
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"format-disconnected": "", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} ",
"tooltip-format-wifi": "{essid} ({signalStrength}%) ",
"tooltip-format-ethernet": "{ifname} ",
"tooltip-format-disconnected": "Disconnected",
2023-08-28 11:07:53 +02:00
"max-length": 50,
2023-08-28 05:08:58 +02:00
"on-click": "kitty --class=nmtui -e nmtui"
},
"battery": {
"tooltip": true,
"tooltip-format": "{time}",
"states": {
"warning": 35,
"critical": 20
},
2023-08-28 11:15:42 +02:00
"format": "{icon} {capacity}%",
"format-charging": "󰂄 {capacity}%",
2023-08-28 11:13:36 +02:00
"format-plugged": " {capacity}%",
2023-08-28 05:08:58 +02:00
"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;
2023-08-28 10:56:57 +02:00
font-size: 16px;
2023-08-28 05:08:58 +02:00
}
#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,
2023-08-28 10:56:57 +02:00
#clock,
2023-08-28 11:01:33 +02:00
#waybar-idle-inhibotor,
2023-08-28 05:08:58 +02:00
#window {
2023-08-28 10:25:52 +02:00
font-size: 16px;
2023-08-28 11:10:37 +02:00
padding: 0px 10px;
2023-08-28 10:25:52 +02:00
margin: 5px;
2023-08-28 05:34:37 +02:00
/* new stuff */
2023-08-28 11:10:53 +02:00
border-radius: 5px;
2023-08-28 05:34:37 +02:00
color: rgba(50, 48, 47, 0.8);
background-color: #e2cca9;
font-weight: bold;
2023-08-28 05:08:58 +02:00
}
/*
* Warning plugins state
*/
#memory.warning,
#cpu.warning,
#battery.warning {
2023-08-28 05:34:37 +02:00
background-color: #e9b143;
2023-08-28 05:08:58 +02:00
}
/*
* Critical plugins state
*/
#cpu.critical,
#temperature.critical,
#memory.critical,
#battery.critical,
#network.disconnected {
2023-08-28 05:34:37 +02:00
background-color: #f2594b;
2023-08-28 05:08:58 +02:00
}
2023-08-28 10:56:57 +02:00
/*#clock {
* color: #e2cca9;
* font-size: 14px;
* font-weight: bold;
2023-08-28 11:00:15 +02:00
*}
*/
2023-08-28 11:01:33 +02:00
2023-08-28 05:08:58 +02:00
#battery.charging {
color: #b0b846;
}
#battery.plugged {
color: #80aa9e;
}
#pulseaudio.bluetooth {
color: #80aa9e;
}
tooltip {
color: #e2cca9;
font-size: 14px;
}
'';
};
};
}