| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- { pkgs, lib, ... }:
- {
- imports = [
- ./style.nix
- ];
-
- programs.waybar = {
- enable = true;
- settings = {
- main = {
- layer = "top";
- position = "bottom";
- height = 16;
- spacing = 0;
- modules-left = [
- "sway/workspaces"
- "sway/mode"
- "mpris"
- ];
- modules-center = [
- "custom/clock"
- ];
- modules-right = [
- "tray"
- "custom/cap-left"
- "pulseaudio"
- "bluetooth"
- "network"
- "battery"
- "custom/cap-right"
- ];
- "sway/mode" = {
- format = "transform";
- };
- "custom/clock" = {
- format = "{}";
- exec = ''
- formatted_date=$(LC_TIME=nb_NO.UTF-8 date +"%H:%M %A, %d %b" | tr '[:upper:]' '[:lower:]' | sed 's/\.//g')
- printf '{"text": "%s"}\n' "$formatted_date"
- '';
- return-type = "json";
- restart-interval = 1;
- };
- tray = {
- spacing = 8;
- };
- battery = {
- format = "{icon}";
- tooltip-format = "{capacity}%";
- format-icons = {
- default = [
- "battery_android_0"
- "battery_android_1"
- "battery_android_2"
- "battery_android_3"
- "battery_android_4"
- "battery_android_5"
- "battery_android_6"
- "battery_android_full"
- ];
- charging = [
- "battery_charging_full_2"
- "battery_charging_20_2"
- "battery_charging_30_2"
- "battery_charging_50_2"
- "battery_charging_60_2"
- "battery_charging_80_2"
- ];
- };
- };
- network = {
- format-wifi = "{icon}";
- format-icons = [
- "signal_wifi_0_bar"
- "network_wifi_1_bar"
- "network_wifi_2_bar"
- "network_wifi_3_bar"
- "network_wifi"
- "signal_wifi_4_bar"
- ];
- format-ethernet = "lan";
- format-disconnected = "signal_wifi_off";
- format-disabled = "signal_wifi_off";
- tooltip-format = "{essid}\n{ipaddr}";
- on-click = "eww open --toggle network";
- };
- pulseaudio = {
- format = "{icon}";
- tooltip-format = "{volume}%";
- format-icons = {
- default = [
- ""
- ""
- ""
- ];
- };
- };
- mpris = {
- format = "{artist} - {title}";
- format-paused = "{artist} - {title}";
- max-length = 25;
- };
- bluetooth = {
- format = "{icon}";
- format-on = "bluetooth";
- format-off = "bluetooth_disabled";
- format-disabled = "bluetooth_disabled";
- format-connected = "bluetooth_connected";
- tooltip-format-connected = "{device_enumerate}";
- tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
- };
- "custom/cap-left" = {
- format = " ";
- tooltip = false;
- };
- "custom/cap-right" = {
- format = " ";
- tooltip = false;
- };
- };
- };
- };
- }
|