diff options
Diffstat (limited to 'modules/user/desktop')
| -rw-r--r-- | modules/user/desktop/swayfx.nix | 203 | ||||
| -rw-r--r-- | modules/user/desktop/waybar.css | 4 |
2 files changed, 110 insertions, 97 deletions
diff --git a/modules/user/desktop/swayfx.nix b/modules/user/desktop/swayfx.nix index 80a9a71..d9e3db6 100644 --- a/modules/user/desktop/swayfx.nix +++ b/modules/user/desktop/swayfx.nix @@ -14,115 +14,131 @@ slurp ]; - programs.waybar = { - enable = lib.mkDefault (config.desktop.windowManager == "swayfx"); - settings = { - main = { - modules-left = [ - "sway/workspaces" - "tray" - ]; - modules-center = [ "clock" ]; - modules-right = [ - "backlight" - "battery" - "wireplumber" - "cpu" - "memory" - "network" - ]; + programs = { + swaylock = { + enable = true; + settings = { + color = "000000"; + no-unlock-indicator = true; + }; + }; - backlight = { - format = "{icon}"; - format-icons = [ "" "" ]; - tooltip-format = "{percent}%"; - }; + waybar = { + enable = lib.mkDefault (config.desktop.windowManager == "swayfx"); + settings = { + main = { + modules-left = [ + "sway/workspaces" + "tray" + ]; + + modules-center = [ "clock" ]; + modules-right = [ + "backlight" + "battery" + "network" + "wireplumber" + "cpu" + "memory" + ]; - battery = { - format = "{icon}"; - format-critical = "{icon} ({capacity}%)"; - format-icons = [ "" "" "" "" ]; - format-time = "{H}h{m}m"; - format-warning = "{icon} ({capacity}%)"; - states = { - critical = 15; - warning = 25; + backlight = { + format = "{icon}"; + format-icons = [ "" "" ]; + tooltip-format = "{percent}%"; }; - tooltip-format = "{time} remaining, {health}% battery health"; - tooltip-format-critical = "plug yo shit in NOW!!"; - }; + battery = { + format = "{icon}"; + format-critical = "{icon} ({capacity}%)"; + format-icons = [ "" "" "" "" ]; + format-time = "{H}h{m}m"; + format-warning = "{icon} ({capacity}%)"; + states = { + critical = 15; + warning = 25; + }; - cpu.format = "{avg_frequency} GHz"; - clock = { - format = "{:%A, %b %d %Y - %H:%M %Z}"; - # i am the time god. fear me. - timezones = [ - "America/Toronto" - "America/Vancouver" - "America/Edmonton" - "America/Regina" - "America/Toronto" # duplicated so it appears in the list too - "America/Halifax" - "America/St_Johns" - "America/Sao_Paulo" - "Etc/UTC" - "Australia/Perth" - ]; + tooltip-format = "{time} remaining, {health}% battery health"; + tooltip-format-critical = "plug yo shit in NOW!!"; + }; - tooltip-format = "{tz_list}"; - }; + cpu.format = "{avg_frequency} GHz"; + clock = { + format = "{:%A, %b %d %Y - %H:%M %Z}"; + # i am the time god. fear me. + timezones = [ + "America/Toronto" + "America/Vancouver" + "America/Edmonton" + "America/Regina" + "America/Toronto" # duplicated so it appears in the list too + "America/Halifax" + "America/St_Johns" + "America/Sao_Paulo" + "Etc/UTC" + "Australia/Perth" + ]; - memory = { - format = "{used}/{total} GiB"; - states = { - critical = 90; - warning = 70; + tooltip-format = "{tz_list}"; }; - tooltip-format = "{percentage}% used"; - }; + memory = { + format = "{used}/{total} GiB"; + states = { + critical = 90; + warning = 70; + }; - network = { - format-disabled = ""; - format-disconnected = ""; - format-ethernet = " {ipaddr}/{cidr}"; - format-icons = [ "" "" "" "" ]; - format-wifi = "{essid} {icon}"; - interval = 1; - tooltip-format = "{ifname} tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}"; - tooltip-format-wifi = "{ifname} ({ipaddr}/{cidr}) {signalStrength}% tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}"; - }; + tooltip-format = "{percentage}% used"; + }; - position = "bottom"; - "sway/workspaces" = { - all-outputs = true; - disable-scroll = true; - format = ""; - persistent-workspaces = { - "1" = [ "DP-1" "eDP-1" ]; - "2" = [ "DP-2" "eDP-1" ]; - "3" = []; - "4" = []; - "5" = []; - "6" = []; - "7" = []; - "8" = []; - "9" = []; + network = { + format-disabled = ""; + format-disconnected = ""; + format-ethernet = " {ipaddr}/{cidr}"; + format-icons = [ "" "" "" "" ]; + format-wifi = "{icon}"; + interval = 1; + tooltip-format = "{ifname} tx: {bandwidthUpBytes} rx: {bandwidthDownBytes}"; + tooltip-format-wifi = '' + <b>Network:</b> {essid} + <b>{ifname}:</b> {ipaddr}/{cidr} + <b>tx:</b> {bandwidthUpBytes} + <b>rx:</b> {bandwidthDownBytes} + ''; }; - }; - wireplumber = { - format = "{icon}"; - format-icons = [ "" "" "" ]; - format-muted = ""; - on-click = "wpctl set-mute @DEFAULT_SINK@ toggle"; - tooltip-format = "{node_name} - {volume}%"; + position = "bottom"; + "sway/workspaces" = { + all-outputs = true; + disable-scroll = true; + format = ""; + persistent-workspaces = { + "1" = [ "DP-1" "eDP-1" ]; + "2" = [ "DP-2" "eDP-1" ]; + "3" = []; + "4" = []; + "5" = []; + "6" = []; + "7" = []; + "8" = []; + "9" = []; + }; + }; + + wireplumber = { + format = "{icon}"; + format-icons = [ "" "" "" ]; + format-muted = ""; + on-click = "wpctl set-mute @DEFAULT_SINK@ toggle"; + tooltip-format = "{node_name} - {volume}%"; + }; }; }; - }; - style = builtins.readFile ./waybar.css; + style = builtins.readFile ./waybar.css; + }; }; wayland.windowManager.sway = @@ -258,6 +274,7 @@ "${mod}+G" = "layout toggle split tabbed"; "${mod}+R" = "exec fuzzel"; "${mod}+Shift+S" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot.png"; + "${mod}+Alt+L" = "exec swaylock"; "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%+ -l 1"; "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_SINK@ 5%- -l 1"; "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_SINK@ toggle"; diff --git a/modules/user/desktop/waybar.css b/modules/user/desktop/waybar.css index 9aa4d1e..b00c4b3 100644 --- a/modules/user/desktop/waybar.css +++ b/modules/user/desktop/waybar.css @@ -94,7 +94,3 @@ tooltip label { #memory { box-shadow: inset 0 -2px #f6c177; } - -#network { - box-shadow: inset 0 -2px #c4a7e7; -} |
