2023-08-31 13:55:14 +02:00
|
|
|
{ ...}: {
|
2023-08-31 14:09:12 +02:00
|
|
|
imports = [ ../waybar/scripts.nix ];
|
2023-08-28 12:35:59 +02:00
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
home.file = {
|
|
|
|
# https://yewtu.be/watch?v=tWQB1NDDA9c
|
|
|
|
# https://github.com/DN-debug/waybar-examples
|
2023-08-29 05:08:37 +02:00
|
|
|
|
|
|
|
# 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
|
|
|
|
|
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": [
|
2023-08-30 12:27:35 +02:00
|
|
|
"custom/wlogout",
|
2023-08-30 13:09:29 +02:00
|
|
|
"idle_inhibitor",
|
2023-08-30 12:57:51 +02:00
|
|
|
"clock",
|
2023-08-30 13:09:29 +02:00
|
|
|
"mpris",
|
2023-08-28 05:08:58 +02:00
|
|
|
],
|
|
|
|
"modules-center": [
|
2023-08-30 12:57:51 +02:00
|
|
|
"wlr/workspaces",
|
2023-08-28 05:08:58 +02:00
|
|
|
],
|
|
|
|
"modules-right": [
|
|
|
|
"pulseaudio",
|
2023-08-29 05:08:37 +02:00
|
|
|
"custom/tailscale",
|
2023-08-28 05:08:58 +02:00
|
|
|
"network",
|
|
|
|
"battery",
|
|
|
|
],
|
|
|
|
|
2023-08-30 12:19:37 +02:00
|
|
|
"custom/wlogout": {
|
2023-08-30 12:26:32 +02:00
|
|
|
"format": "",
|
2023-08-30 12:22:58 +02:00
|
|
|
"on-click": "wlogout"
|
2023-08-30 12:21:31 +02:00
|
|
|
},
|
2023-08-30 12:19:37 +02:00
|
|
|
|
2023-08-29 05:08:37 +02:00
|
|
|
"custom/tailscale": {
|
|
|
|
"format": "{icon} {}",
|
|
|
|
"exec": "$HOME/.config/waybar/scripts/tailscale.sh",
|
|
|
|
"exec-if": "pgrep tailscaled",
|
|
|
|
"return-type": "json",
|
|
|
|
"interval": 5,
|
|
|
|
"format-icons": {
|
|
|
|
"Running": "",
|
|
|
|
"Stopped": "",
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"idle_inhibitor": {
|
|
|
|
"format": "{icon}",
|
|
|
|
"format-icons": {
|
|
|
|
"activated": "",
|
|
|
|
"deactivated": ""
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
"mpris": {
|
|
|
|
"format": "{player_icon} {dynamic}",
|
|
|
|
"format-paused": "{status_icon} <i>{dynamic}</i>",
|
2023-08-29 05:08:37 +02:00
|
|
|
"player-icons": { "default": "▶" },
|
|
|
|
"status-icons": { "paused": "⏸" },
|
2023-08-28 05:08:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
"wlr/workspaces": {
|
2023-08-30 13:43:59 +02:00
|
|
|
"on-click": "activate",
|
2023-08-28 05:08:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
"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": {
|
2023-08-30 17:22:02 +02:00
|
|
|
"on-click-right": "kitty -e calcurse",
|
2023-08-28 05:08:58 +02:00
|
|
|
"on-click-middle": "mode",
|
|
|
|
"on-scroll-up": "shift_up",
|
|
|
|
"on-scroll-down": "shift_down"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
"pulseaudio": {
|
|
|
|
"scroll-step": 1,
|
2023-08-29 05:08:37 +02:00
|
|
|
"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": " ",
|
2023-08-28 05:08:58 +02:00
|
|
|
"format-icons": {
|
|
|
|
"headphone": "",
|
|
|
|
"headset": "",
|
|
|
|
"default": ["", "", ""]
|
|
|
|
},
|
|
|
|
"tooltip": false,
|
2023-08-29 05:08:37 +02:00
|
|
|
"on-click": "kitty -e pulsemixer",
|
2023-08-28 05:08:58 +02:00
|
|
|
},
|
|
|
|
|
|
|
|
"network": {
|
2023-08-29 05:08:37 +02:00
|
|
|
"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,
|
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-29 05:08:37 +02:00
|
|
|
"format": "{icon} {capacity}%",
|
|
|
|
"format-charging": " {capacity}%",
|
2023-08-29 11:02:02 +02:00
|
|
|
"format-plugged": " {capacity}%",
|
2023-08-28 05:08:58 +02:00
|
|
|
"format-icons": ["", "", "", "", ""]
|
|
|
|
},
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
2023-08-31 13:55:14 +02:00
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
# Waybar theming
|
|
|
|
".config/waybar/style.css" = {
|
|
|
|
enable = true;
|
|
|
|
executable = false;
|
|
|
|
text = ''
|
|
|
|
* {
|
|
|
|
border: none;
|
|
|
|
border-radius: 0;
|
2023-08-30 14:42:36 +02:00
|
|
|
font-family: JetbrainsMono Regular;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#waybar {
|
2023-08-31 14:42:01 +02:00
|
|
|
background-color: #1d202111;
|
2023-08-30 13:24:52 +02:00
|
|
|
padding: 15px;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
2023-08-30 12:37:56 +02:00
|
|
|
#workspaces button.visible,
|
2023-08-28 05:08:58 +02:00
|
|
|
#workspaces button {
|
2023-08-30 13:55:53 +02:00
|
|
|
font-size: 1px;
|
2023-08-30 13:47:42 +02:00
|
|
|
border-radius: 50px;
|
2023-08-30 13:57:59 +02:00
|
|
|
padding: 0px 5px;
|
|
|
|
margin: 5px;
|
2023-08-30 12:56:35 +02:00
|
|
|
color: rgba(0, 0, 0, 0);
|
2023-08-30 12:34:47 +02:00
|
|
|
background-color: #3c3836;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
2023-08-30 13:01:38 +02:00
|
|
|
#workspaces button.active {
|
|
|
|
padding: 0px 15px;
|
|
|
|
background-color: #a89984;
|
|
|
|
}
|
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
#workspaces button:hover,
|
2023-08-30 13:17:22 +02:00
|
|
|
#workspaces button.focused:hover,
|
|
|
|
#workspaces button.visible:hover {
|
2023-08-30 13:16:32 +02:00
|
|
|
background-color: #d5c4a1;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button.urgent {
|
2023-08-30 13:34:00 +02:00
|
|
|
background-color: #cc241d;
|
2023-08-30 12:49:53 +02:00
|
|
|
}
|
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
/*
|
|
|
|
* General background
|
|
|
|
*/
|
|
|
|
#network,
|
|
|
|
#mpris,
|
|
|
|
#memory,
|
|
|
|
#backlight,
|
|
|
|
#cpu,
|
|
|
|
#pulseaudio,
|
|
|
|
#temperature,
|
|
|
|
#battery,
|
|
|
|
#tray,
|
|
|
|
#submap,
|
2023-08-29 05:08:37 +02:00
|
|
|
#clock,
|
|
|
|
#idle_inhibitor,
|
|
|
|
#custom-tailscale,
|
2023-08-30 12:21:31 +02:00
|
|
|
#custom-wlogout,
|
2023-08-28 05:08:58 +02:00
|
|
|
#window {
|
2023-08-29 05:08:37 +02:00
|
|
|
font-size: 16px;
|
|
|
|
padding: 0px 10px;
|
|
|
|
margin: 5px;
|
|
|
|
border-radius: 5px;
|
|
|
|
color: rgba(50, 48, 47, 0.8);
|
2023-08-30 12:26:32 +02:00
|
|
|
background-color: #a89984;
|
2023-08-29 05:08:37 +02:00
|
|
|
font-weight: bold;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
2023-08-30 13:59:59 +02:00
|
|
|
/*
|
|
|
|
* General background
|
|
|
|
*/
|
|
|
|
#network button:hover,
|
|
|
|
#mpris button:hover,
|
|
|
|
#memory button:hover,
|
|
|
|
#backlight button:hover,
|
|
|
|
#cpu button:hover,
|
|
|
|
#pulseaudio button:hover,
|
|
|
|
#temperature button:hover,
|
|
|
|
#battery button:hover,
|
|
|
|
#tray button:hover,
|
|
|
|
#submap button:hover,
|
|
|
|
#clock button:hover,
|
|
|
|
#idle_inhibitor button:hover,
|
|
|
|
#custom-tailscale button:hover,
|
|
|
|
#custom-wlogout button:hover,
|
|
|
|
#window button:hover{
|
|
|
|
background-color: #d5c4a1;
|
|
|
|
}
|
|
|
|
|
2023-08-28 05:08:58 +02:00
|
|
|
/*
|
|
|
|
* Warning plugins state
|
|
|
|
*/
|
|
|
|
#battery.warning {
|
2023-08-29 05:08:37 +02:00
|
|
|
background-color: #e9b143;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Critical plugins state
|
|
|
|
*/
|
2023-08-29 05:08:37 +02:00
|
|
|
#idle_inhibitor.activated,
|
2023-08-28 05:08:58 +02:00
|
|
|
#battery.critical,
|
2023-08-29 05:08:37 +02:00
|
|
|
#custom-tailscale.Stopped,
|
2023-08-28 05:08:58 +02:00
|
|
|
#network.disconnected {
|
2023-08-30 13:32:32 +02:00
|
|
|
color: #e2cca9;
|
2023-08-30 13:34:00 +02:00
|
|
|
background-color: #cc241d;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
#battery.charging {
|
2023-08-30 13:32:32 +02:00
|
|
|
background-color: #98971a;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
#battery.plugged {
|
2023-08-30 13:32:32 +02:00
|
|
|
background-color: #458588;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
#pulseaudio.bluetooth {
|
2023-08-30 13:32:32 +02:00
|
|
|
background-color: #458588;
|
2023-08-28 05:08:58 +02:00
|
|
|
}
|
|
|
|
tooltip {
|
|
|
|
color: #e2cca9;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
2023-08-29 11:02:02 +02:00
|
|
|
}
|