diff --git a/depot/users/kat/sway/waybar/default.nix b/depot/users/kat/sway/waybar/default.nix index 9b3d03fa..ddcf6672 100644 --- a/depot/users/kat/sway/waybar/default.nix +++ b/depot/users/kat/sway/waybar/default.nix @@ -14,7 +14,7 @@ in }; settings = [{ modules-left = [ "sway/workspaces" "sway/mode" "sway/window" ]; - modules-center = ["clock" ]; # "clock" "custom/weather" + modules-center = ["clock" "clock#arc" "clock#miku" "clock#hex" ]; # "clock" "custom/weather" modules-right = [ "pulseaudio" "cpu" @@ -34,7 +34,7 @@ in modules = { "sway/workspaces" = { format = "{name}"; }; "sway/window" = { - format = "{}"; + format = " {}"; max-length = 50; }; #"custom/weather" = { @@ -44,14 +44,18 @@ in # exec = # "${pkgs.kat-weather}/bin/kat-weather ${witch.secrets.profiles.sway.city} ${witch.secrets.profiles.sway.api_key}"; #}; + tray = { + icon-size = 12; + spacing = 2; + }; "custom/gpg-status" = { - format = "{}"; + format = " {}"; interval = 300; return-type = "json"; exec = "${pkgs.kat-gpg-status}/bin/kat-gpg-status"; }; "custom/konawall" = { - format = "{}"; + format = "  {}"; interval = "once"; return-type = "json"; exec = "${pkgs.konawall-toggle}/bin/konawall-status"; @@ -59,23 +63,23 @@ in on-click = "${pkgs.konawall-toggle}/bin/konawall-toggle"; on-click-right = "systemctl --user restart konawall"; }; - cpu = { format = "CPU {usage}%"; }; + cpu = { format = " {usage}%"; }; #mpd = { # format = " {albumArtist} - {title}"; # format-stopped = "ﱙ"; # format-paused = " Paused"; # title-len = 16; #}; - memory = { format = "MEM {percentage}%"; }; + memory = { format = " {percentage}%"; }; temperature = { - format = "TMP {temperatureC}°C"; + format = " {temperatureC}°C"; hwmon-path = "/sys/devices/pci0000:00/0000:00:18.3/hwmon/hwmon2/temp2_input"; }; idle_inhibitor = { format = "{icon}"; format-icons = { - activated = "CAF"; - deactivated = "SLP"; + activated = ""; + deactivated = ""; }; }; backlight = { @@ -90,26 +94,34 @@ in warning = 30; critical = 15; }; - format = "BAT {capacity}%"; - format-charging = "CHRG {capacity}%"; - format-plugged = "PI {capacity}%"; - format-alt = "BAT {time}"; + format = "{icon} {capacity}%"; + format-charging = " {capacity}%"; + format-plugged = " {capacity}%"; + format-alt = "{icon} {time}"; format-icons = [ "" "" "" "" "" ]; }; pulseaudio = { - format = "VOL {volume}%"; + format = "{icon} {volume}%"; + format-muted = "婢"; on-click = "foot pulsemixer"; + format-icons = { + default = [ + "" + "" + "" + ]; + }; }; network = { - format-wifi = "WIFI"; - format-ethernet = "NET {ifname}"; - format-linked = "NET {ifname} (NO IP)"; - format-disconnected = "NET DC"; + format-wifi = "直"; + format-ethernet = " {ifname}"; + format-linked = " {ifname} (NO IP)"; + format-disconnected = " DC"; format-alt = "{ifname}: {ipaddr}/{cidr}"; tooltip-format-wifi = "{essid} ({signalStrength}%)"; }; clock = { - format = "{:%a, %F %T %Z}"; + format = "{:%a, %F %T}"; tooltip = true; tooltip-format = "{:%A, %F %T %z (%Z)}"; timezones = [ @@ -120,6 +132,24 @@ in ]; interval = 1; }; + "clock#arc" = { + format = "♡-{:%H}"; + tooltip = true; + timezone = "America/Vancouver"; + tooltip-format = "{:%A, %F %R %z (%Z)}"; + }; + "clock#miku" = { + format = "♡+{:%H}"; + tooltip = true; + timezone = "Pacific/Auckland"; + tooltip-format = "{:%A, %F %R %z (%Z)}"; + }; + "clock#hex" = { + format = "♡+{:%H}"; + tooltip = true; + timezone = "Europe/Berlin"; + tooltip-format = "{:%A, %F %R %z (%Z)}"; + }; }; }]; }; diff --git a/depot/users/kat/sway/waybar/waybar.css.nix b/depot/users/kat/sway/waybar/waybar.css.nix index b0c561e1..f9b588cf 100644 --- a/depot/users/kat/sway/waybar/waybar.css.nix +++ b/depot/users/kat/sway/waybar/waybar.css.nix @@ -1,17 +1,24 @@ { hextorgba, base16, font }: -'' +let + bcolor = color: '' + color: ${color}; + border-color: ${color}; + ''; +in '' * { border: none; border-radius: 0; + background: none; font-family: "${font.name}"; font-size: ${font.size_css}; - min-height: 14px; + min-height: 12px; text-shadow: none; box-shadow: none; } #mode { + color: ${base16.base06}; padding-left: 4px; padding-right: 4px; } @@ -22,51 +29,64 @@ padding-left: 8px; padding-right: 8px; transition: none; - background: ${base16.base02}; - border-left: 1px solid ${base16.base06}; - border-right: 1px solid ${base16.base06}; + border-bottom: 2px solid transparent; color: ${base16.base07}; - border-bottom: 1px solid ${base16.base06}; } - window#waybar { + .modules-left, .modules-center, .modules-right { + margin: 2px 8px; background: ${hextorgba base16.base00 0.75}; - border-bottom: 1px solid ${base16.base06}; + border-radius: 6px; + } + + .modules-left { + padding: 0 8px; + } + + .modules-center, .modules-right { + padding: 0 4px; + } + + tooltip { + padding: 2px; + background: ${hextorgba base16.base00 0.75}; + border-radius: 6px; + } + + tooltip label { + color: ${base16.base07}; } #tray { - margin-left: 8px; + margin: 0 8px; } #window { color: ${base16.base06}; - padding: 0 8px; - margin: 0 8px; } - #workspaces { - margin: 0 8px; + #workspaces button:first-child { + margin-left: 0; + } + + #window { + margin-left: 8px; + } + + window#waybar.empty { + margin-left: 0px; } #workspaces button { color: ${base16.base06}; - background: ${base16.base02}; font-size: 16px; - border-right: 1px dashed ${base16.base06}; - border-bottom: 1px solid ${base16.base06}; - } - - #workspaces button:first-child { - border-left: 1px solid ${base16.base05}; - } - - #workspaces button:last-child { - border-right: 1px solid ${base16.base05}; + border-bottom: 2px solid ${base16.base06}; + margin: 0 2px; } #workspaces button.focused { - color: ${base16.base07}; - background: ${base16.base0D} + color: ${base16.base0D}; + border-bottom: 2px solid ${base16.base0D}; } #workspaces button:hover { @@ -77,19 +97,23 @@ color: ${base16.base0D}; } - #custom-konawall.enabled { color: ${base16.base0E} } - #custom-konawall.disabled { color: ${base16.base0D} } - #idle_inhibitor.activated { color: ${base16.base0E} } - #idle_inhibitor.deactivated { color: ${base16.base0D} } - #custom-gpg-status.enabled { color: ${base16.base0B} } - #custom-gpg-status.disabled { color: ${base16.base08} } - #network { color: ${base16.base0C} } - #custom-weather { color: ${base16.base00} } - #pulseaudio { color: ${base16.base06} } - #temperature { color: ${base16.base0B} } - #battery { color: ${base16.base0C} } - #backlight { color: ${base16.base0D} } - #cpu { color: ${base16.base08} } - #memory { color: ${base16.base09} } - #clock { color: ${base16.base05} } + #clock.arc { ${bcolor base16.base0D} } + #clock.miku { ${bcolor base16.base0C} } + #clock.hex { ${bcolor base16.base0E} } + #custom-konawall.enabled { ${bcolor base16.base0E} } + #custom-konawall.disabled { ${bcolor base16.base0D} } + #idle_inhibitor.activated { ${bcolor base16.base0E} } + #idle_inhibitor.deactivated { ${bcolor base16.base0D} } + #custom-gpg-status.enabled { ${bcolor base16.base0B} } + #custom-gpg-status.disabled { ${bcolor base16.base08} } + #network { ${bcolor base16.base0C} } + #custom-weather { ${bcolor base16.base00} } + #pulseaudio { ${bcolor base16.base06} } + #temperature { ${bcolor base16.base0B} } + #pulseaudio.muted { ${bcolor base16.base03} } + #battery { ${bcolor base16.base0C} } + #backlight { ${bcolor base16.base0D} } + #cpu { ${bcolor base16.base08} } + #memory { ${bcolor base16.base09} } + #clock { ${bcolor base16.base07} } '' diff --git a/pkgs/kat-gpg-status/kat-gpg-status.sh b/pkgs/kat-gpg-status/kat-gpg-status.sh index 9ee3b6d7..ce8b983d 100644 --- a/pkgs/kat-gpg-status/kat-gpg-status.sh +++ b/pkgs/kat-gpg-status/kat-gpg-status.sh @@ -4,9 +4,9 @@ set -o pipefail if gpg --card-status &> /dev/null; then user="$(gpg --card-status | grep 'Login data' | awk '{print $NF}')"; - status='{"text": "PGP +", "alt": "User: '"$user"'", "class": "enabled"}' + status='{"text": "", "alt": "User: '"$user"'", "class": "enabled"}' else - status='{"text": "PGP -", "alt": "No card is connected.", "class": "disabled"}' + status='{"text": "", "alt": "No card is connected.", "class": "disabled"}' fi echo $status diff --git a/pkgs/konawall-toggle/status.sh b/pkgs/konawall-toggle/status.sh index 2d458cc8..0c44b438 100644 --- a/pkgs/konawall-toggle/status.sh +++ b/pkgs/konawall-toggle/status.sh @@ -5,9 +5,9 @@ set -o pipefail sleep 0.5s if systemctl --user is-active konawall-rotation.timer --quiet; then - status='{"text": "ROT", "alt": "Konawall is enabled.", "class": "enabled"}' + status='{"text": "", "alt": "Konawall is enabled.", "class": "enabled"}' else - status='{"text": "STA", "alt": "Konawall is disabled.", "class": "disable"}' + status='{"text": "", "alt": "Konawall is disabled.", "class": "disable"}' fi echo $status