241 lines
No EOL
6.8 KiB
Nix
241 lines
No EOL
6.8 KiB
Nix
{ hostname, ...}: {
|
|
imports = [ ./scripts/waybar-scripts.nix ];
|
|
|
|
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",
|
|
"idle_inhibitor",
|
|
"pulseaudio",
|
|
"custom/tailscale",
|
|
"network",
|
|
"battery",
|
|
"clock"
|
|
],
|
|
|
|
"custom/tailscale": {
|
|
"format": "VPN ",
|
|
"exec": "echo '{\"class\": \"connected\"}'",
|
|
"exec-if": "",
|
|
"return-type": "json",
|
|
"interval": 5
|
|
}
|
|
|
|
"idle_inhibitor": {
|
|
"format": "{icon}",
|
|
"format-icons": {
|
|
"activated": "",
|
|
"deactivated": ""
|
|
}
|
|
},
|
|
|
|
"mpris": {
|
|
"format": "{player_icon} {dynamic}",
|
|
"format-paused": "{status_icon} <i>{dynamic}</i>",
|
|
"player-icons": { "default": "▶" },
|
|
"status-icons": { "paused": "⏸" },
|
|
},
|
|
|
|
"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 -e calcurse",
|
|
"on-click-middle": "mode",
|
|
"on-scroll-up": "shift_up",
|
|
"on-scroll-down": "shift_down"
|
|
}
|
|
},
|
|
|
|
"pulseaudio": {
|
|
"scroll-step": 1,
|
|
"format": "{icon} {format_source}",
|
|
"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": " ",
|
|
"format-icons": {
|
|
"headphone": "",
|
|
"headset": "",
|
|
"default": ["", "", ""]
|
|
},
|
|
"tooltip": false,
|
|
"on-click": "kitty -e pulsemixer",
|
|
},
|
|
|
|
"network": {
|
|
"format": "{ifname}",
|
|
"format-wifi": " {essid}",
|
|
"format-ethernet": " {ipaddr}",
|
|
"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",
|
|
"max-length": 50,
|
|
"on-click": "kitty --class=nmtui -e nmtui"
|
|
},
|
|
|
|
"battery": {
|
|
"tooltip": true,
|
|
"tooltip-format": "{time}",
|
|
"states": {
|
|
"warning": 35,
|
|
"critical": 20
|
|
},
|
|
"format": "{icon} {capacity}%",
|
|
"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,
|
|
#idle_inhibitor,
|
|
#window {
|
|
font-size: 16px;
|
|
padding: 0px 10px;
|
|
margin: 5px;
|
|
/* new stuff */
|
|
border-radius: 5px;
|
|
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,
|
|
#idle_inhibitor.activated,
|
|
#temperature.critical,
|
|
#memory.critical,
|
|
#battery.critical,
|
|
#network.disconnected {
|
|
background-color: #fe8019;
|
|
}
|
|
#battery.charging {
|
|
color: #98971a;
|
|
}
|
|
#battery.plugged {
|
|
color: #458588;
|
|
}
|
|
#pulseaudio.bluetooth {
|
|
color: #458588;
|
|
}
|
|
tooltip {
|
|
color: #e2cca9;
|
|
font-size: 14px;
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
} |