aboutsummaryrefslogtreecommitdiff
path: root/modules/user/desktop/components
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/desktop/components')
-rw-r--r--modules/user/desktop/components/default.nix6
-rw-r--r--modules/user/desktop/components/waybar/default.nix154
-rw-r--r--modules/user/desktop/components/waybar/style-blue.css96
3 files changed, 256 insertions, 0 deletions
diff --git a/modules/user/desktop/components/default.nix b/modules/user/desktop/components/default.nix
new file mode 100644
index 0000000..6457798
--- /dev/null
+++ b/modules/user/desktop/components/default.nix
@@ -0,0 +1,6 @@
+{
+ imports = [
+ ./waybar
+ #./wofi
+ ];
+}
diff --git a/modules/user/desktop/components/waybar/default.nix b/modules/user/desktop/components/waybar/default.nix
new file mode 100644
index 0000000..02747c4
--- /dev/null
+++ b/modules/user/desktop/components/waybar/default.nix
@@ -0,0 +1,154 @@
+{
+ config,
+ lib,
+ options,
+ ...
+}:
+{
+ options.desktop.components.waybar.enable = lib.mkEnableOption "waybar";
+ config.programs.waybar = {
+ enable = config.desktop.components.waybar.enable;
+ settings = {
+ main = {
+ modules-left = [
+ "sway/workspaces"
+ "tray"
+ ];
+
+ modules-center = [ "clock" ];
+ modules-right = [
+ "backlight"
+ "battery"
+ "network"
+ "wireplumber"
+ "cpu"
+ "memory"
+ ];
+
+ backlight = {
+ format = "{icon}";
+ format-icons = [
+ ""
+ "󰖨"
+ ];
+
+ tooltip-format = "{percent}%";
+ };
+
+ battery = {
+ format = "{icon}";
+ format-critical = "{icon} ({capacity}%)";
+ format-icons = [
+ ""
+ ""
+ ""
+ ""
+ ];
+
+ format-time = "{H}h{m}m";
+ format-warning = "{icon} ({capacity}%)";
+ states = {
+ critical = 15;
+ warning = 25;
+ };
+
+ tooltip-format = "{time} remaining, {health}% battery health";
+ tooltip-format-critical = "plug yo shit in NOW!!";
+ };
+
+ 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 = "{tz_list}";
+ };
+
+ memory = {
+ format = "{used}/{total} GiB";
+ states = {
+ critical = 90;
+ warning = 70;
+ };
+
+ tooltip-format = "{percentage}% used";
+ };
+
+ 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}
+ '';
+ };
+
+ 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 ./style-${config.desktop.accent}.css;
+ };
+}
diff --git a/modules/user/desktop/components/waybar/style-blue.css b/modules/user/desktop/components/waybar/style-blue.css
new file mode 100644
index 0000000..b00c4b3
--- /dev/null
+++ b/modules/user/desktop/components/waybar/style-blue.css
@@ -0,0 +1,96 @@
+* {
+ border: none;
+ border-radius: 0;
+ font-family: 'FiraCode Nerd Font Mono';
+ min-height: 0;
+}
+
+window#waybar {
+ background: none;
+ color: #e0def4;
+}
+
+tooltip {
+ background: rgba(38, 35, 58, 0.8);
+ border-radius: 10px;
+}
+
+tooltip label {
+ color: #e0def4;
+}
+
+#workspaces button {
+ background: none;
+ box-shadow: none;
+ color: #6e6a86;
+ padding: 0;
+}
+
+#workspaces button.empty {
+ color: #403d52;
+}
+
+#workspaces button.visible {
+ color: #908caa;
+}
+
+#workspaces button.focused {
+ color: #ebbcba;
+}
+
+#workspaces button.urgent {
+ color: #eb6f92;
+}
+
+#workspaces button:hover {
+ color: #e0def4;
+ text-shadow: inherit;
+}
+
+.module {
+ padding: 0 8px;
+ padding-top: 2px;
+}
+
+.modules-left, .modules-center, .modules-right {
+ background: rgba(25, 23, 36, 0.8);
+ border-top-left-radius: 10px;
+ border-top-right-radius: 10px;
+}
+
+.modules-left {
+ margin-left: 8px;
+ margin-right: 4px;
+}
+
+.modules-right {
+ margin-left: 4px;
+ margin-right: 8px;
+}
+
+@keyframes blink {
+ to {
+ color: #e0def4;
+ }
+}
+
+#battery.charging {
+ color: #9ccfd8;
+}
+
+#battery.critical:not(.charging) {
+ animation-direction: alternate;
+ animation-duration: 0.5s;
+ animation-iteration-count: infinite;
+ animation-name: blink;
+ animation-timing-function: steps(2);
+ color: #eb6f92;
+}
+
+#cpu {
+ box-shadow: inset 0 -2px #ebbcba;
+}
+
+#memory {
+ box-shadow: inset 0 -2px #f6c177;
+}