From c84b650fea7d8529d8cf321d7e72cbdde6cc7c3c Mon Sep 17 00:00:00 2001 From: kat witch Date: Tue, 21 Dec 2021 22:09:59 +0000 Subject: [PATCH] Restyle --- config/profiles/hardware/ryzen.nix | 1 + config/users/kat/sway/konawall.nix | 2 +- config/users/kat/sway/waybar/default.nix | 97 ++++++++++++----- config/users/kat/sway/waybar/waybar.sass | 133 ++++++++++------------- 4 files changed, 132 insertions(+), 101 deletions(-) diff --git a/config/profiles/hardware/ryzen.nix b/config/profiles/hardware/ryzen.nix index 064c1109..ec7acfd4 100644 --- a/config/profiles/hardware/ryzen.nix +++ b/config/profiles/hardware/ryzen.nix @@ -13,6 +13,7 @@ }; waybarExtend2 = { config, ... }: { config = { + modules."temperature#icon".hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input"; modules.temperature.hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input"; }; }; diff --git a/config/users/kat/sway/konawall.nix b/config/users/kat/sway/konawall.nix index d808050f..79e9d44e 100644 --- a/config/users/kat/sway/konawall.nix +++ b/config/users/kat/sway/konawall.nix @@ -10,7 +10,7 @@ with lib; commonTags = [ "width:>=1600" ]; tagList = map (toList) [ (["score:>=50" - "touhou"] ++ optional (nixos.networking.hostName == "koishi") "rating:s") + "touhou" "rating:s"]) #++ optional (nixos.networking.hostName == "koishi") "rating:s") ]; }; } diff --git a/config/users/kat/sway/waybar/default.nix b/config/users/kat/sway/waybar/default.nix index ac927cf9..0674ef94 100644 --- a/config/users/kat/sway/waybar/default.nix +++ b/config/users/kat/sway/waybar/default.nix @@ -9,15 +9,35 @@ enable = true; systemd.enable = true; settings = [{ - modules-center = [ "clock#s" "clock#arc" "clock#hex" "clock#miku" "clock" ]; - modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; + modules-left = [ + "sway/workspaces" + "sway/mode" + "sway/window#icon" + "sway/window" + ]; + modules-center = [ + "custom/arc-h" + "clock#arc" + "custom/hex-h" + "clock#hex" + "custom/miku-h" + "clock#miku" + "clock#original" + ]; modules-right = [ + "pulseaudio#icon" "pulseaudio" + "custom/mail-icon" "custom/mail" + "custom/cpu-icon" "cpu" + "custom/memory-icon" "memory" + "temperature#icon" "temperature" + "battery#icon" "battery" + "backlight#icon" "backlight" "network" "idle_inhibitor" @@ -27,10 +47,9 @@ ]; modules = { - "sway/workspaces" = { format = "{name}"; }; - "sway/window" = { - format = " {}"; - }; + "sway/workspaces".format = "{name}"; + "sway/window#icon".format = ""; + "sway/window".format = "{}"; tray = { icon-size = 12; spacing = 2; @@ -54,18 +73,25 @@ on-click-right = "systemctl --user restart konawall"; signal = 8; }; + "custom/mail-icon".format = ""; "custom/mail" = { - format = " {}"; + format = "{}"; interval = 30; exec = "${pkgs.notmuch-arc}/bin/notmuch count tag:flagged OR tag:inbox AND NOT tag:killed"; }; - cpu = { format = " {usage}%"; }; - memory = { format = " {percentage}%"; }; - temperature = { - format = "{icon} {temperatureC}°C"; + "custom/cpu-icon".format = ""; + cpu.format = "{usage}%"; + "custom/memory-icon".format = ""; + memory.format = "{percentage}%"; + "temperature#icon" = { + format = "{icon}"; format-icons = ["" "" ""]; critical-threshold = 80; }; + temperature = { + format = "{temperatureC}°C"; + critical-threshold = 80; + }; idle_inhibitor = { format = "{icon}"; format-icons = { @@ -73,20 +99,30 @@ deactivated = ""; }; }; + "battery#icon" = { + states = { + good = 90; + warning = 30; + critical = 15; + }; + format = "{icon}"; + format-charging = ""; + format-plugged = ""; + format-icons = [ "" "" "" "" "" ]; + }; battery = { states = { good = 90; warning = 30; critical = 15; }; - format = "{icon} {capacity}%"; - format-charging = " {capacity}%"; - format-plugged = " {capacity}%"; - format-alt = "{icon} {time}"; - format-icons = [ "" "" "" "" "" ]; + format = "{capacity}%"; + format-charging = "{capacity}%"; + format-plugged = "{capacity}%"; + format-alt = "{time}"; }; - pulseaudio = { - format = "{icon} {volume}%"; + "pulseaudio#icon" = { + format = "{icon}"; format-muted = "婢"; on-click = "foot pulsemixer"; format-icons = { @@ -97,6 +133,10 @@ ]; }; }; + pulseaudio = { + format = "{volume}%"; + on-click = "foot pulsemixer"; + }; network = { format-wifi = "直"; format-ethernet = ""; @@ -105,7 +145,7 @@ format-alt = "{ifname}: {ipaddr}/{cidr}"; tooltip-format-wifi = "{essid} ({signalStrength}%)"; }; - clock = { + "clock#original" = { format = "{:%a, %F %T}"; tooltip = true; tooltip-format = "{:%A, %F %T %z (%Z)}"; @@ -114,26 +154,29 @@ ]; interval = 1; }; - "clock#s" = { - format = "-{:%H}"; - tooltip = true; - timezone = "America/Chicago"; - tooltip-format = "{:%A, %F %R %z (%Z)}"; + "custom/arc-h" = { + format = ""; + }; + "custom/hex-h" = { + format = ""; + }; + "custom/miku-h" = { + format = ""; }; "clock#arc" = { - format = "-{:%H}"; + format = "-{:%H}"; tooltip = true; timezone = "America/Vancouver"; tooltip-format = "{:%A, %F %R %z (%Z)}"; }; "clock#miku" = { - format = "+{:%H}"; + format = "+{:%H}"; tooltip = true; timezone = "Pacific/Auckland"; tooltip-format = "{:%A, %F %R %z (%Z)}"; }; "clock#hex" = { - format = "+{:%H}"; + format = "+{:%H}"; tooltip = true; timezone = "Europe/Berlin"; tooltip-format = "{:%A, %F %R %z (%Z)}"; diff --git a/config/users/kat/sway/waybar/waybar.sass b/config/users/kat/sway/waybar/waybar.sass index 2c7de0a6..fb1f2140 100644 --- a/config/users/kat/sway/waybar/waybar.sass +++ b/config/users/kat/sway/waybar/waybar.sass @@ -1,5 +1,5 @@ %extend_1 - padding: 0 8px + padding: 0 6px transition: none color: $base00 @@ -13,112 +13,125 @@ text-shadow: none box-shadow: none +window#waybar + background: $base00t + tooltip background: $base00t - border-radius: 1em label color: $base07 #mode + background: $base01 color: $base06 padding: 0 4px #clock @extend %extend_1 - background: $base00t + background: $base01 color: $base07 - &.s - background: $base0Ft - &.arc - background: $base0Bt +#custom-arc-h + @extend %extend_1 + background: $base0B - &.miku - background: $base0Ct +#custom-miku-h + @extend %extend_1 + background: $base0C - &.hex - background: $base0Et +#custom-hex-h + @extend %extend_1 + background: $base0E -#memory +#cpu, #memory, #temperature, #pulseaudio, #backlight, #battery, #custom-mail, #clock.arc, #clock.hex, #clock.miku + background: $base01 + padding: 0 6px + margin-right: 4px + +#network, #custom-gpg-status, #custom-konawall, #idle_inhibitor + margin: 0 4px + +#temperature.icon, #pulseaudio.icon, #battery.icon, #backlight.icon, #custom-cpu-icon, #custom-memory-icon, #custom-mail-icon, #custom-arc-h, #custom-hex-h, #custom-miku-h, #clock.original, #tray + margin-left: 4px + margin-right: 0px + +#custom-memory-icon @extend %extend_1 - background: $base09t + background: $base09 -#cpu +#custom-cpu-icon @extend %extend_1 - background: $base08t + background: $base08 -#temperature +#temperature.icon @extend %extend_1 - background: $base0Bt + background: $base0B -#pulseaudio +#pulseaudio.icon @extend %extend_1 - background: $base06t + background: $base06 &.muted - background: $base03t + background: $base03 #network @extend %extend_1 - background: $base0Ct + background: $base0C #mpd @extend %extend_1 -#backlight +#backlight.icon @extend %extend_1 - background: $base0Dt + background: $base0D -#battery +#battery.icon @extend %extend_1 - background: $base0Ct + background: $base0C -#custom-mail +#custom-mail-icon @extend %extend_1 - background: $base0Ft + background: $base0F #custom-konawall @extend %extend_1 &.enabled - background: $base0Et + background: $base0E &.disabled - background: $base0Dt + background: $base0D #custom-gpg-status @extend %extend_1 &.enabled - background: $base0Bt + background: $base0B &.disabled - background: $base08t + background: $base08 #idle_inhibitor @extend %extend_1 &.activated - background: $base0Et + background: $base0E &.deactivated - background: $base0Dt + background: $base0D #tray @extend %extend_1 - background: $base00t - border-top-right-radius: 1em - border-bottom-right-radius: 1em + background: $base01 padding: 0 10px 0 8px menu background: $base00t - border-radius: 1em color: $base07 .modules-left - margin: 2px 4px - border-radius: 1em + margin: 0 4px + #window + margin-right: 0px widget label - margin: 0 4px - border-radius: 1em + margin: 0 &:first-child margin-left: 0 @@ -127,43 +140,17 @@ tooltip margin-right: 0 .modules-center - margin: 2px 4px - border-radius: 1em - widget - &:first-child label - border-top-left-radius: 1em - border-bottom-left-radius: 1em - - &:last-child label - border-top-right-radius: 1em - border-bottom-right-radius: 1em + margin: 0 4px .modules-right - margin: 2px 4px - border-radius: 1em - widget - &:first-child * - border-top-left-radius: 1em - border-bottom-left-radius: 1em - - &:last-child * - border-top-right-radius: 1em - border-bottom-right-radius: 1em + margin: 0 4px #workspaces - background: $base00t + background: $base01 padding: 0 - border-radius: 1em + margin-right: 8px button color: $base06 - &:first-child - border-top-left-radius: 1em - border-bottom-left-radius: 1em - - &:last-child - border-top-right-radius: 1em - border-bottom-right-radius: 1em - &.focused color: $base07 background: $base0D @@ -176,8 +163,8 @@ tooltip color: $base0C #window - background: $base00t - padding: 0 8px + background: $base01 + padding: 0 4px color: $base06 border-bottom: 2px solid transparent