From 80b6850f364b87a25ed71be1b822da5b48bfdb85 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 12 Jan 2024 22:16:53 -0600 Subject: [PATCH] home | waybar - porting old waybar config in --- home/gui/sway.nix | 113 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 111 insertions(+), 2 deletions(-) diff --git a/home/gui/sway.nix b/home/gui/sway.nix index e8a0995..d9df3c7 100644 --- a/home/gui/sway.nix +++ b/home/gui/sway.nix @@ -17,7 +17,116 @@ enable = true; settings = { mainBar = { - layer = "top"; + ipc = true; + position = "bottom"; + height = 10; + spacing = 0; + modules-left = ["sway/workspaces" "sway/mode" "wlr/workspaces" "custom/mycal"]; + modules-center = []; + modules-right = ["idle_inhibitor" "custom/mytimew" "pulseaudio" "custom/mymusic" "bluetooth" "network" "backlight" "battery" "battery#bat2" "tray" "custom/mycal" "clock"]; + bluetooth = { + format-alt = "bt: {status}"; + format-on = "bt"; + format-connected = "^bt"; + format-off = "!bt"; + format-disabled = "xbt"; + on-click = "blueberry"; + tooltip-format = "{status}"; + }; + backlight = { + device = "intel_backlight"; + format = "{icon} {percent}%"; + format-alt-click = "click-right"; + on-scroll-down = "light -A 1"; + on-scroll-up = "light -U 1"; + }; + "custom/mytimew" = { + exec = "~/bin/timebar"; + interval = 30; + on-click = "alacritty -e ~/bin/ttmenu"; + }; + "custom/mycal" = { + exec = "~/bin/show-next-event"; + interval = 300; + on-click = "~/bin/mynewterm -e ikhal"; + }; + "custom/mymusic" = { + exec = "~/bin/show-playing"; + interval = 5; + }; + "sway/window" = { + icon-size = 10; + }; + "sway/mode" = { + format = "{}"; + }; + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = ""; + }; + }; + tray = { + icon-size = 16; + spacing = 10; + }; + clock = { + tooltip-format = "{:%Y %B %d}\n{calendar}"; + format = "{:%I:%M %p}"; + format-alt = "{:%Y-%m-%d}"; + on-click = "~/bin/mynewterm -e ikhal"; + }; + cpu = { + format = "cpu: {usage}%"; + tooltip = false; + }; + memory = { + format = "mem: {}%"; + }; + temperature = { + critical-threshold = 80; + format = "{temperatureC}°C {icon}"; + }; + battery = { + states = { + good = 75; + warning = 20; + critical = 10; + }; + format = "{capacity}% {time}"; + format-charging = "c:{capacity}% {time}"; + format-plugged = "p:{capacity}% {time}"; + format-discharging = "d:{capacity}% {time}"; + format-alt = "{time} {icon}"; + }; + "battery#bat2" = { + bat = "BAT2"; + }; + network = { + format-wifi = "{essid} ({signalStrength}%)"; + format-ethernet = "{ipaddr}/{cidr}"; + tooltip-format = "{ifname} via {gwaddr}"; + format-linked = "{ifname} (No IP)"; + format-disconnected = "Disconnected"; + format-alt = "{ifname}: {ipaddr}/{cidr}"; + }; + pulseaudio = { + format = "v:{volume}%"; + format-bluetooth = "{volume}% {icon} {format_source}"; + format-bluetooth-muted = " {icon} {format_source}"; + format-muted = "muted"; + format-source = "v:{volume}% "; + format-source-muted = ""; + format-icons = { + headphone = "hp"; + hands-free = "hf"; + headset = "hs"; + phone = "p"; + }; + on-click = "pavucontrol"; + }; +/* layer = "top"; position = "bottom"; height = 10; spacing = 0; @@ -38,7 +147,7 @@ "custom/mymusic" = { exec = "~/bin/show-playing"; interval = 5; - }; + }; */ }; }; style =