From 4e59f2d8ca56c175a56c63a3ec4e06cee09cd7d0 Mon Sep 17 00:00:00 2001 From: blake Date: Thu, 30 Oct 2025 22:36:04 -0500 Subject: [PATCH] add waybar and librewolf --- hosts/nixos/yveltal/configuration.nix | 2 + users/blake/dots/librewolf/default.nix | 10 + users/blake/dots/waybar/default.nix | 291 +++++++++++++++++++++++++ 3 files changed, 303 insertions(+) create mode 100644 users/blake/dots/librewolf/default.nix create mode 100644 users/blake/dots/waybar/default.nix diff --git a/hosts/nixos/yveltal/configuration.nix b/hosts/nixos/yveltal/configuration.nix index 285a472..2e720ba 100644 --- a/hosts/nixos/yveltal/configuration.nix +++ b/hosts/nixos/yveltal/configuration.nix @@ -6,6 +6,8 @@ ./hardware-configuration.nix ../../nixos ../../../modules/desktop/hypr + ../../../modules/desktop/waybar + ../../../modules/desktop/librewolf ../../../modules/desktop/greetd ../../../users/blake ../../../modules/system diff --git a/users/blake/dots/librewolf/default.nix b/users/blake/dots/librewolf/default.nix new file mode 100644 index 0000000..66bda24 --- /dev/null +++ b/users/blake/dots/librewolf/default.nix @@ -0,0 +1,10 @@ +{ + pkgs, + config, + ... +}: { + # just using the normal lfrc + programs.librewolf = { + enable = true; + }; +} diff --git a/users/blake/dots/waybar/default.nix b/users/blake/dots/waybar/default.nix new file mode 100644 index 0000000..9a3f8c1 --- /dev/null +++ b/users/blake/dots/waybar/default.nix @@ -0,0 +1,291 @@ +{ + pkgs, + config, + ... +}: { + # just using the normal lfrc + programs.waybar = { + enable = true; + + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 25; + margin-top = 0; + + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ + "tray" + "temperature" + "backlight" + "wireplumber" + "battery" + "bluetooth" + "network" + "idle_inhibitor" + "clock" + ]; + + "hyprland/workspaces" = { + format = "{icon}"; + "on-scroll-up" = "hyprctl dispatch workspace e+1"; + "on-scroll-down" = "hyprctl dispatch workspace e-1"; + }; + + "hyprland/window" = { + "max-length" = 200; + "separate-outputs" = false; + }; + + tray = { + "icon-size" = 17; + spacing = 10; + }; + + clock = { + format = "{:%Y/%m/%d %a %H:%M}"; + interval = 30; + "on-click" = "thunderbird -calendar"; + "on-scroll" = 1; + + calendar = { + mode = "month"; + "mode-mon-col" = 3; + "weeks-pos" = ""; + "on-scroll" = 1; + "on-click-right" = "mode"; + format = { + months = "{}"; + days = "{}"; + weeks = "W{}"; + weekdays = "{}"; + today = "{}"; + }; + }; + + actions = { + "on-click-right" = "mode"; + "on-scroll-up" = "shift_up"; + "on-scroll-down" = "shift_down"; + }; + + "tooltip-format" = "{calendar}"; + }; + + backlight = { + device = "intel_backlight"; + format = "{icon} {percent}%"; + "format-icons" = [ "☼" "☼" "☀" "☀" ]; + interval = 60; + }; + + temperature = { + "hwmon-path" = [ "/sys/class/hwmon/hwmon3/temp1_input" ]; + "critical-threshold" = 70; + format = ""; + "format-critical" = " {temperatureC}°C"; + }; + + battery = { + bat = "BAT0"; + states = { + full = 99; + good = 80; + normal = 50; + warning = 30; + critical = 10; + }; + format = "{icon} {capacity}%"; + "format-charging" = " {capacity}%"; + "format-icons" = [ "" "" "" "" "" ]; + interval = 30; + }; + + network = { + "format-wifi" = ""; + "format-ethernet" = "󰈀"; + "format-disconnected" = "󰖪"; + "tooltip-format-wifi" = + "{ifname} / {essid}\n\n {ipaddr}\n\n 󰘊 {signalStrength}% / 󰥛 {frequency}\n\n 󰕒 {bandwidthUpBits} / 󰇚 {bandwidthDownBits}"; + "tooltip-format-ethernet" = + "{ifname} / {gwaddr}\n\n {ipaddr}\n\n 󰕒 {bandwidthUpBits} / 󰇚 {bandwidthDownBits}"; + "tooltip-format-disconnected" = "Disconnected"; + interval = 5; + "on-click" = "kitty nmtui"; + }; + + wireplumber = { + format = " {volume}%"; + "format-muted" = "󰝟 Mute"; + "max-volume" = 150; + "on-scroll-up" = "wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 1%+"; + "on-scroll-down" = "wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-"; + "on-click-right" = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + "on-click" = "kitty pulsemixer"; + }; + + bluetooth = { + "format-on" = "󰂯"; + "format-off" = "󰂲"; + "format-connected" = "󰂯 {device_alias}"; + "format-connected-battery" = "󰥉 {device_alias} ({device_battery_percentage}%)"; + "tooltip-format-off" = "Controller Powered Off"; + "tooltip-format" = + "{controller_alias}\t{controller_address}\n\n{num_connections} connected"; + "tooltip-format-connected" = + "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}"; + "tooltip-format-enumerate-connected" = + "{device_alias}\t{device_address}"; + "tooltip-format-enumerate-connected-battery" = + "{device_alias}\t{device_address}\t{device_battery_percentage}%"; + "on-click" = "kitty bluetuith --no-warning"; + "on-click-right" = + "if bluetoothctl show|grep -q 'Powered: yes';then bluetoothctl power off;else bluetoothctl power on;fi"; + }; + + idle_inhibitor = { + what = "idle"; + format = "{icon}"; + "format-icons" = { + activated = ""; + deactivated = ""; + }; + }; + }; + }; + + style = '' + * { + border: none; + font-family: "UbuntuMono Nerd Font"; + font-size: 17px; + } + + .modules-left { + border-radius: 9px; + background-color: rgba(50, 50, 50, 0.5); + padding: 0px 0px 0px 0px; + } + + .modules-right { + border-radius: 9px; + background-color: rgba(50, 50, 50, 0.5); + padding: 0px 5px 0px 0px; + } + + /* --- window bar --- */ + + /* window title bar */ + window#waybar { + border-radius: 9px; + background-color: rgba(47, 23, 48, 0.70); + color: #ffffff; + } + + /* hide window title when empty*/ + window#waybar.empty #window { + background-color: transparent; + color: transparent; + } + + /* change title bar background color when empty */ + window#waybar.empty { + background-color: rgba(47, 23, 48, 0.70); + } + + /* --- left modules --- */ + + /* workspace buttons */ + #workspaces button { + box-shadow: inset 0 -3px transparent; + padding: 0px 11px 0px 11px; + min-width: 1px; + color: #888888; + } + + #workspaces button:hover { + box-shadow: inherit; + text-shadow: inherit; + background: rgba(50, 50, 50, 0.55); + color: #888888; + } + + #workspaces button.active, + #workspaces button.visible { + padding: 0px 11px 0px 11px; + background-color: rgba(50, 50, 50, 0.55); + color: #e2c7c7; + } + + /* --- right modules --- */ + + #tray { + margin: 0px 10px 0px 5px; + } + + #clock { + margin: 0px 3px 0px 13px; + } + + #idle_inhibitor, + #network, + #bluetooth, + #battery, + #wireplumber, + #backlight, + #temperature { + background-color: transparent; + color: #ffffff; + padding: 0px 10px 0px 10px; + } + + + #bluetooth { + background-color: transparent; + color: #ffffff; + padding: 0px 4px 0px 10px; + } + + /* --- indicators --- */ + + /* blink red */ + #temperature.critical, + #battery.critical:not(.charging) { + background-color: transparent; + animation-name: blink; + animation-duration: 0.75s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + } + + /* turn red */ + #network.disconnected, + #wireplumber.muted, + #bluetooth.off { + color: #ff5555; + } + + /* --- animations --- */ + + @keyframes blink { + to { + background-color: transparent; + color: #ff5555; + } + } + + ''; + }; + + # install it to userspace + home.packages = with pkgs; [ + pulsemixer + brightnessctl + bluetuith + bluez + nerdfonts + ]; +}