about summary refs log tree commit diff
path: root/home/profiles/waybar.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-05-28 13:53:08 -0700
committerFranck Cuny <franck@fcuny.net>2023-05-28 13:53:08 -0700
commitd530804cb725f329b1faf3ce488b430fa36039bb (patch)
tree6e64558a545e057b9e9c7cec017ea113108e095b /home/profiles/waybar.nix
parenthome/waybar: change the style to be a bit more readable (diff)
downloadworld-d530804cb725f329b1faf3ce488b430fa36039bb.tar.gz
font: switch to Roboto for system font and JetBrain for monospace
Diffstat (limited to '')
-rw-r--r--home/profiles/waybar.nix42
1 files changed, 3 insertions, 39 deletions
diff --git a/home/profiles/waybar.nix b/home/profiles/waybar.nix
index 12ad6fb..a7e1ff0 100644
--- a/home/profiles/waybar.nix
+++ b/home/profiles/waybar.nix
@@ -1,32 +1,4 @@
 { config, lib, pkgs, ... }:
-let
-  # waybar-systemd = pkgs.writeShellApplication {
-  #   name = "waybar-systemd.sh";
-  #   runtimeInputs = [ ];
-  #   text = ''
-  #     failed_user="$(systemctl --plain --no-legend --user list-units --state=failed | awk '{ print $1 }')"
-  #     failed_system="$(systemctl --plain --no-legend list-units --state=failed | awk '{ print $1 }')"
-
-  #     failed_systemd_count="$(echo -n "$failed_system" | grep -c '^')"
-  #     failed_user_count="$(echo -n "$failed_user" | grep -c '^')"
-
-  #     text=$(( failed_systemd_count + failed_user_count ))
-
-  #     if [ "$text" -eq 0 ]; then
-  #         printf '{"text": ""}\n'
-  #     else
-  #         tooltip=""
-
-  #         [ -n "$failed_system" ] && tooltip="Failed system services:\n\n${failed_system}\n\n${tooltip}"
-  #         [ -n "$failed_user" ]   && tooltip="Failed user services:\n\n${failed_user}\n\n${tooltip}"
-
-  #         tooltip="$(printf  "%s" "$tooltip" | perl -pe 's/\n/\\n/g' | perl -pe 's/(?:\\n)+$//')"
-
-  #         printf '{"text": "%s", "tooltip": "%s" }\n' "$text" "$tooltip"
-  #     fi
-  #   '';
-  # };
-in
 {
   programs.waybar = {
     enable = true;
@@ -54,15 +26,10 @@ in
           warning = 30;
           critical = 15;
         };
-        format = "ac:{capacity}%";
+        format = "bat:{capacity}%";
         tooltip = true;
         tooltip-format = "{timeTo} ({capacity}%)";
       };
-      # "custom/systemd" = {
-      #   exec = "${waybarSystemd}/bin/waybar-systemd";
-      #   return-type = "json";
-      #   interval = 10;
-      # };
       pulseaudio = {
         format = "vol:{volume}%";
         format-bluetooth = "bt:{volume}%";
@@ -85,7 +52,7 @@ in
     * {
       border-radius: 0;
       border: none;
-      font-family: Source Code Pro;
+      font-family: "Roboto Mono, Font Awesome 5 Free, Font Awesome 5 Brands, Arial, sans-serif";
       font-size: 15px;
       color: #C5C8C6;
       min-height: 24px;
@@ -96,7 +63,7 @@ in
     }
     #window {
       font-weight: bold;
-      font-family: Source Code Pro;
+      font-family: "Roboto Mono, Font Awesome 5 Free, Font Awesome 5 Brands, Arial, sans-serif";
     }
     #workspaces button {
       padding: 0 5px;
@@ -116,9 +83,6 @@ in
       padding: 0 6px;
       margin: 0 3px;
     }
-    #battery.discharging {
-      color: #f0c674;
-    }
     #battery.warning {
       border-bottom: 2px solid #efc673;
     }