diff --git a/user/modules/hyprland.nix b/user/modules/hyprland.nix index ec71db8..4d801a9 100644 --- a/user/modules/hyprland.nix +++ b/user/modules/hyprland.nix @@ -5,7 +5,6 @@ }: { imports = [ inputs.hyprland.homeManagerModules.default - # ./waybar ./ironbar ./wofi.nix ]; @@ -29,7 +28,6 @@ }; exec-once = [ "hyprctl setcursor Adwaita 24" - "waybar" "swaync" ]; bind = diff --git a/user/modules/waybar/default.nix b/user/modules/waybar/default.nix deleted file mode 100644 index 20cc504..0000000 --- a/user/modules/waybar/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (lib) mkMerge; - - theme = builtins.readFile ./styles/catppuccin.css; - style = builtins.readFile ./styles/style.css; - notificationsStyle = builtins.readFile ./styles/notifications.css; - powerStyle = builtins.readFile ./styles/power.css; - statsStyle = builtins.readFile ./styles/stats.css; - workspacesStyle = builtins.readFile ./styles/workspaces.css; - - custom-modules = import ./modules/custom-modules.nix {inherit config lib pkgs;}; - default-modules = import ./modules/default-modules.nix {inherit lib pkgs;}; - group-modules = import ./modules/group-modules.nix; - hyprland-modules = import ./modules/hyprland-modules.nix {inherit config lib;}; - - allModules = mkMerge [ - custom-modules - default-modules - group-modules - hyprland-modules - ]; -in { - programs.waybar = { - enable = true; - style = "${theme}${style}${notificationsStyle}${powerStyle}${statsStyle}${workspacesStyle}"; - settings = { - mainBar = mkMerge [ - { - name = "main"; - "margin-top" = 10; - "margin-left" = 10; - "margin-right" = 10; - layer = "top"; - # Choose the order of the modules - "modules-left" = [ - "group/power" - "hyprland/workspaces" - ]; - "modules-center" = [ - "clock" - ]; - "modules-right" = [ - "group/tray-drawer" - "group/stats-drawer" - "group/notifications" - "hyprland/submap" - "custom/weather" - ]; - } - allModules - ]; - }; - }; -} diff --git a/user/modules/waybar/modules/custom-modules.nix b/user/modules/waybar/modules/custom-modules.nix deleted file mode 100644 index f954291..0000000 --- a/user/modules/waybar/modules/custom-modules.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ config -, lib -, pkgs -, ... -}: -let - inherit (lib) getExe getExe'; - - githubHelper = pkgs.writeShellScriptBin "githubHelper" /* bash */ '' - #!/usr/bin/env bash - - NOTIFICATIONS="$(${getExe pkgs.gh} api notifications)" - COUNT="$(echo "$NOTIFICATIONS" | ${getExe pkgs.jq} 'length')" - - echo '{"text":'"$COUNT"',"tooltip":"'"$COUNT"' Notifications","class":""}' - ''; -in -{ - "custom/ellipses" = { - "format" = ""; - "tooltip" = false; - }; - - "custom/github" = { - "format" = " {}"; - "return-type" = "json"; - "interval" = 60; - "exec" = "${getExe githubHelper}"; - "on-click" = "${getExe' pkgs.coreutils "sleep"} 0.1 && ${getExe' pkgs.xdg-utils "xdg-open"} https://github.com/notifications"; - }; - - "custom/lock" = { - "format" = "󰍁"; - "tooltip" = false; - "on-click" = "${getExe config.programs.swaylock.package}"; - }; - - "custom/media" = { - "format" = "{icon} {}"; - "return-type" = "json"; - "max-length" = 40; - "format-icons" = { - "spotify" = ""; - "default" = "🎜"; - }; - "escape" = true; - "exec" = "$HOME/.config/waybar/mediaplayer.py 2> /dev/null"; - }; - - "custom/notification" = { - "tooltip" = true; - "format" = "{icon} {}"; - "format-icons" = { - "notification" = ""; - "none" = ""; - "dnd-notification" = ""; - "dnd-none" = ""; - "inhibited-notification" = ""; - "inhibited-none" = ""; - "dnd-inhibited-notification" = ""; - "dnd-inhibited-none" = ""; - }; - "return-type" = "json"; - "exec-if" = "which ${getExe' pkgs.swaynotificationcenter "swaync-client"}"; - "exec" = "${getExe' pkgs.swaynotificationcenter "swaync-client"} -swb"; - "on-click" = "${getExe' pkgs.coreutils "sleep"} 0.1 && ${getExe' pkgs.swaynotificationcenter "swaync-client"} -t -sw"; - "on-click-right" = "${getExe' pkgs.coreutils "sleep"} 0.1 && ${getExe' pkgs.swaynotificationcenter "swaync-client"} -d -sw"; - "escape" = true; - }; - - "custom/power" = { - "format" = ""; - "tooltip" = false; - "on-click" = "shutdown now"; - }; - - "custom/reboot" = { - "format" = "󰜉"; - "tooltip" = false; - "on-click" = "reboot"; - }; - - "custom/separator-right" = { - "format" = ""; - "tooltip" = false; - }; - - "custom/separator-left" = { - "format" = ""; - "tooltip" = false; - }; - - "custom/weather" = { - "exec" = "${getExe pkgs.wttrbar} --location $(${getExe pkgs.jq} -r '.wttr | (.location)' ~/weather_config.json) --fahrenheit --main-indicator temp_F"; - "return-type" = "json"; - "format" = "{}"; - "tooltip" = true; - "interval" = 3600; - }; - - "custom/wlogout" = { - "format" = ""; - "interval" = "once"; - "tooltip" = false; - "on-click" = "${getExe' pkgs.coreutils "sleep"} 0.1 && ${getExe pkgs.wlogout} -c 5 -r 5 -p layer-shell"; - }; -} diff --git a/user/modules/waybar/modules/default-modules.nix b/user/modules/waybar/modules/default-modules.nix deleted file mode 100644 index 44a3422..0000000 --- a/user/modules/waybar/modules/default-modules.nix +++ /dev/null @@ -1,166 +0,0 @@ -{ - lib, - pkgs, - ... -}: let - inherit (lib) getExe getExe'; -in { - "clock" = { - "tooltip-format" = "{:%Y %B}\n{calendar}"; - "format" = "{:%A, %b %d %I:%M %p }"; - "format-alt" = "{:%Y-%m-%d}"; - }; - - "cpu" = { - "format" = " {usage}%"; - "tooltip" = true; - }; - - "disk" = { - "format" = " {percentage_used}%"; - }; - - "idle_inhibitor" = { - "format" = "{icon} "; - "format-icons" = { - "activated" = "󰅶"; - "deactivated" = "󰛊"; - }; - }; - - "keyboard-state" = { - "numlock" = true; - "capslock" = true; - "format" = "{icon} {name}"; - "format-icons" = { - "locked" = ""; - "unlocked" = ""; - }; - }; - - "memory" = { - "format" = "󰍛 {}%"; - }; - - "mpris" = { - "format" = "{player_icon} {status_icon} {dynamic}"; - "format-paused" = "{player_icon} {status_icon} {dynamic}"; - "max-length" = 45; - "player-icons" = { - "chromium" = ""; - "default" = ""; - "firefox" = ""; - "mopidy" = ""; - "mpv" = ""; - "spotify" = ""; - }; - "status-icons" = { - "paused" = ""; - "playing" = ""; - "stopped" = ""; - }; - }; - - "mpd" = { - "format" = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% "; - "format-disconnected" = "Disconnected "; - "format-stopped" = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; - "unknown-tag" = "N/A"; - "interval" = 2; - "consume-icons" = { - "on" = " "; - }; - "random-icons" = { - "off" = " "; - "on" = " "; - }; - "repeat-icons" = { - "on" = " "; - }; - "single-icons" = { - "on" = "1 "; - }; - "state-icons" = { - "paused" = ""; - "playing" = ""; - }; - "tooltip-format" = "MPD (connected)"; - "tooltip-format-disconnected" = "MPD (disconnected)"; - }; - - "network" = { - "interval" = 1; - "format-wifi" = " 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}"; - "format-ethernet" = "󰈀 󰜮 {bandwidthDownBytes} 󰜷 {bandwidthUpBytes}"; - "tooltip-format" = " {ifname} via {gwaddr}"; - "format-linked" = "󰈁 {ifname} (No IP)"; - "format-disconnected" = " Disconnected"; - "format-alt" = "{ifname}: {ipaddr}/{cidr}"; - }; - - "pulseaudio" = { - "format" = "{volume}% {icon}"; - "format-bluetooth" = "{volume}% {icon}"; - "format-muted" = ""; - "format-icons" = { - "headphone" = ""; - "hands-free" = ""; - "headset" = ""; - "phone" = ""; - "portable" = ""; - "car" = ""; - "default" = [ - "" - "" - ]; - }; - "scroll-step" = 1; - "on-click" = "pavucontrol"; - "ignored-sinks" = [ - "Easy Effects Sink" - ]; - }; - - "pulseaudio/slider" = { - "min" = 0; - "max" = 100; - "orientation" = "horizontal"; - }; - - "temperature" = { - "hwmon-path-abs" = "/sys/devices/pci0000:00/0000:00:18.3/hwmon"; - "input-filename" = "temp3_input"; - "critical-threshold" = 80; - "format-critical" = "{temperatureC}°C {icon}"; - "format" = "{icon} {temperatureC}°C"; - "format-icons" = [ - "" - "" - "" - ]; - "interval" = "5"; - }; - - "tray" = { - "spacing" = 10; - }; - - "user" = { - "format" = "{user}"; - "interval" = 60; - "height" = 30; - "width" = 30; - "icon" = true; - }; - - "wireplumber" = { - "format" = "{volume}% {icon}"; - "format-muted" = ""; - "on-click" = "${getExe' pkgs.coreutils "sleep"} 0.1 && ${getExe pkgs.helvum}"; - "format-icons" = [ - "" - "" - "" - ]; - }; -} diff --git a/user/modules/waybar/modules/group-modules.nix b/user/modules/waybar/modules/group-modules.nix deleted file mode 100644 index e9db523..0000000 --- a/user/modules/waybar/modules/group-modules.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ - "group/audio" = { - "orientation" = "horizontal"; - "drawer" = { - "transition-duration" = 500; - "transition-left-to-right" = false; - }; - "modules" = [ - "pulseaudio" - "pulseaudio/slider" - ]; - }; - - "group/power" = { - "orientation" = "horizontal"; - "drawer" = { - "transition-duration" = 500; - "children-class" = "not-power"; - "transition-left-to-right" = false; - }; - "modules" = [ - "custom/wlogout" - # "custom/quit" - # "custom/lock" - # "custom/reboot" - ]; - }; - - "group/notifications" = { - "orientation" = "horizontal"; - "modules" = [ - "idle_inhibitor" - "custom/notification" - "custom/github" - "group/audio" - ]; - }; - - "group/tray" = { - "orientation" = "horizontal"; - "modules" = [ - "tray" - ]; - }; - - "group/stats" = { - "orientation" = "horizontal"; - "modules" = [ - "network" - "cpu" - "memory" - "disk" - "temperature" - ]; - }; - - "group/stats-drawer" = { - "orientation" = "horizontal"; - "drawer" = { - "transition-duration" = 500; - "transition-left-to-right" = false; - }; - "modules" = [ - "custom/separator-right" - "network" - "cpu" - "memory" - "disk" - "temperature" - ]; - }; - - "group/tray-drawer" = { - "orientation" = "horizontal"; - "drawer" = { - "transition-duration" = 500; - "transition-left-to-right" = true; - }; - "modules" = [ - "custom/separator-right" - "tray" - ]; - }; -} diff --git a/user/modules/waybar/modules/hyprland-modules.nix b/user/modules/waybar/modules/hyprland-modules.nix deleted file mode 100644 index 1bb5386..0000000 --- a/user/modules/waybar/modules/hyprland-modules.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ - config, - lib, - ... -}: let - inherit (lib) getExe'; -in { - "custom/quit" = { - "format" = "󰗼"; - "tooltip" = false; - "on-click" = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch exit"; - }; - - "hyprland/submap" = { - "format" = "✌️ {}"; - "max-length" = 8; - "tooltip" = false; - }; - - "hyprland/window" = { - "format" = "{}"; - "separate-outputs" = true; - }; - - "hyprland/workspaces" = { - "all-outputs" = false; - "active-only" = "false"; - "on-scroll-up" = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch workspace e+1"; - "on-scroll-down" = "${getExe' config.wayland.windowManager.hyprland.package "hyprctl"} dispatch workspace e-1"; - "format" = "{icon} {windows}"; - "format-icons" = { - "1" = "󰎤"; - "2" = "󰎧"; - "3" = "󰎪"; - "4" = "󰎭"; - "5" = "󰎱"; - "6" = "󰎳"; - "7" = "󰎶"; - "8" = "󰎹"; - "9" = "󰎼"; - "10" = "󰽽"; - "urgent" = "󱨇"; - "default" = ""; - "empty" = "󱓼"; - }; - "persistent-workspaces" = { - "*" = [ - 2 - 3 - 4 - 5 - 6 - 7 - 8 - ]; - "DP-3" = [ - 1 - ]; - }; - # "format-window-separator" = "->"; - "window-rewrite-default" = ""; - "window-rewrite" = { - "class<1Password>" = "󰢁"; - "class" = "󰈎"; - "class" = "󰊤"; - "class" = ""; - "class" = ""; - "class" = "󰒱"; - "class" = "󰨞"; - "code-url-handler" = "󰨞"; - "class" = "󰙯"; - "class" = "󰈹"; - "class title<.*github.*>" = ""; - "class title<.*twitch|youtube|plex|tntdrama|bally sports.*>" = ""; - "class" = ""; - "class" = ""; - "class" = "󱂷"; - "class" = "󰄄"; - "class" = ""; - "class<.pitivi-wrapped>" = "󱄢"; - "class" = ""; - "class" = ""; - "class" = "󰢹"; - "class" = "󰕼"; - "class" = "󰉋"; - "class" = "󰉋"; - "class" = ""; - "title" = ""; - "class" = "󰽉"; - "class" = ""; - "class" = "󱎏"; - "class" = "󱎐"; - }; - }; -} diff --git a/user/modules/waybar/modules/wlr-modules.nix b/user/modules/waybar/modules/wlr-modules.nix deleted file mode 100644 index 5bda91a..0000000 --- a/user/modules/waybar/modules/wlr-modules.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - "wlr/workspaces" = { - "all-outputs" = false; - "active-only" = "false"; - "on-click" = "activate"; - "format" = "{icon}"; - "format-icons" = { - "1" = ""; - "2" = ""; - "3" = ""; - "4" = ""; - "5" = ""; - "6" = ""; - "7" = ""; - "8" = "󰢹"; - "urgent" = ""; - "default" = ""; - }; - "persistent_workspaces" = { - "1" = [ - "DP-3" - ]; - "2" = [ - "DP-1" - ]; - "3" = [ - "DP-1" - ]; - "4" = [ - "DP-1" - ]; - "5" = [ - "DP-1" - ]; - "6" = [ - "DP-1" - ]; - "7" = [ - "DP-1" - ]; - "8" = [ - "DP-1" - ]; - }; - }; -} diff --git a/user/modules/waybar/styles/catppuccin.css b/user/modules/waybar/styles/catppuccin.css deleted file mode 100644 index e662b6a..0000000 --- a/user/modules/waybar/styles/catppuccin.css +++ /dev/null @@ -1,36 +0,0 @@ -/* -* -* Catppuccin Macchiato palette -* -*/ - -@define-color base #24273a; -@define-color mantle #1e2030; -@define-color crust #181926; - -@define-color text #cad3f5; -@define-color subtext0 #b8c0e0; -@define-color subtext1 #a5adcb; - -@define-color surface0 #363a4f; -@define-color surface1 #494d64; -@define-color surface2 #5b6078; - -@define-color overlay0 #6e738d; -@define-color overlay1 #8087a2; -@define-color overlay2 #939ab7; - -@define-color blue #8aadf4; -@define-color lavender #b7bdf8; -@define-color sapphire #7dc4e4; -@define-color sky #91d7e3; -@define-color teal #8bd5ca; -@define-color green #a6da95; -@define-color yellow #eed49f; -@define-color peach #f5a97f; -@define-color maroon #ee99a0; -@define-color red #ed8796; -@define-color mauve #c6a0f6; -@define-color pink #f5bde6; -@define-color flamingo #f0c6c6; -@define-color rosewater #f4dbd6; diff --git a/user/modules/waybar/styles/notifications.css b/user/modules/waybar/styles/notifications.css deleted file mode 100644 index 1fc9e51..0000000 --- a/user/modules/waybar/styles/notifications.css +++ /dev/null @@ -1,82 +0,0 @@ -#notifications { - margin: 0.4em; - padding-left: 5px; - padding-right: 5px; - color: @peach; - font-weight: bold; - background-color: @surface0; - border: 2px solid @surface1; -} -#custom-notification, -#custom-updates, -#custom-github, -#idle_inhibitor, -#wireplumber, -#pulseaudio - { - padding: 0 0.5em; -} - -#custom-updates.updated { - padding-left: 0; - padding-right: 1em; -} - -/* Unique colors for modules */ - -#custom-pipewire { - color: @green; -} - -#custom-github { - color: @blue; -} - -#custom-updates { - color: @red; -} - -#custom-pipewire.muted, -#pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; -} - -#keyboard-state { - padding: 0 0px; - min-width: 16px; - color: @mauve; -} - -#keyboard-state > label { - padding: 0 5px; -} - -#keyboard-state > label.locked { - background: rgba(0, 0, 0, 0.2); -} - -#pulseaudio-slider { - padding: 0 12px; -} - -#pulseaudio-slider slider { - min-height: 0px; - min-width: 0px; - opacity: 0; - background-image: none; - border: none; - box-shadow: none; -} -#pulseaudio-slider trough { - min-height: 10px; - min-width: 80px; - border-radius: 5px; - background-color: @base; -} -#pulseaudio-slider highlight { - min-width: 10px; - border-radius: 5px; - background-color: @green; -} - diff --git a/user/modules/waybar/styles/power.css b/user/modules/waybar/styles/power.css deleted file mode 100644 index bcd483f..0000000 --- a/user/modules/waybar/styles/power.css +++ /dev/null @@ -1,14 +0,0 @@ -/* Custom styling for the logout icon on end */ -#custom-wlogout { - font-size: 1.75em; - padding: 0 0.5em; - color: @blue; -} - -#power { - margin-right: 0.25em; -} - -#power .not-power { - color: @red; -} diff --git a/user/modules/waybar/styles/stats.css b/user/modules/waybar/styles/stats.css deleted file mode 100644 index 456ea66..0000000 --- a/user/modules/waybar/styles/stats.css +++ /dev/null @@ -1,43 +0,0 @@ -#stats, -#stats-drawer { - margin: 0.4em; - padding-left: 5px; - padding-right: 5px; - color: @peach; - font-weight: bold; - background-color: @surface0; - border: 2px solid @surface1; -} -#battery, -#cpu, -#memory, -#temperature, -#disk, -#network { - padding: 0 0.5em; -} - -/* Unique colors for modules */ -#cpu { - color: @red; -} - -#memory { - color: @yellow; -} -#temperature { - color: @green; -} - -#network { - color: @blue; -} - -#network.disconnected { - background-color: #f53c3c; -} - -#temperature.critical { - background-color: #eb4d4b; -} - diff --git a/user/modules/waybar/styles/style.css b/user/modules/waybar/styles/style.css deleted file mode 100644 index fd8e1c9..0000000 --- a/user/modules/waybar/styles/style.css +++ /dev/null @@ -1,77 +0,0 @@ -/** -* Global configuration for theme -* */ -* { - font-family: FiraCode Nerd Font; - font-size: 16px; - border-radius: 0.75em; -} - -window#waybar { - border: 2px solid @surface1; - background: @theme_base_color; - box-shadow: 1px 1px 10px 10px @mantle; - color: @theme_text_color; - transition-property: background-color; - transition-duration: 0.5s; -} - -window#waybar.hidden { - opacity: 0.2; -} - -tooltip { - background: @base; - border: 1px solid @blue; -} - -tooltip label { - color: white; -} - -label:focus { - background-color: #000000; -} - -button { - /* Use box-shadow instead of border so the text isn't offset */ - box-shadow: inset 0 -3px transparent; - /* Avoid rounded borders under each button name */ - border: none; - border-radius: 0; -} - -/* Remove border from parent waybar */ -box { - border: none; -} - -/* Add spacing for right side modules */ -#tray, -#user, -#custom-weather, -#keyboard-state, -#mpd { - padding: 0 1em; -} - -#clock { - font-size: 16px; - font-weight: 900; - padding: 0 1em; -} - -#custom-separator-right, -#custom-separator-left { - font-size: 20px; - padding-left: 1em; - padding-right: 1em; - color: @text; -} - -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} diff --git a/user/modules/waybar/styles/workspaces.css b/user/modules/waybar/styles/workspaces.css deleted file mode 100644 index 83372c2..0000000 --- a/user/modules/waybar/styles/workspaces.css +++ /dev/null @@ -1,42 +0,0 @@ -#workspaces { - margin: 0.4em; - padding-left: 5px; - padding-right: 5px; - color: @peach; - font-weight: bold; - background-color: @surface0; - border: 2px solid @surface1; -} - -#workspaces label { - font-family: MonaspiceNe Nerd Font; - font-size: 20px; -} - -#workspaces button { - padding: 0 0.5em; - background-color: @surface0; - color: @text; - margin: 0.2em; -} - -#workspaces button.empty { - /* background-color: @surface2; */ - color: @overlay0; -} - -#workspaces button.visible { - /* background-color: @surface2; */ - color: @blue; -} - -#workspaces button.active { - /* background-color: @surface2; */ - color: @green; -} - -#workspaces button.urgent { - box-shadow: 2px 2px 2px 2px; - border-radius: 1em; - color: @red; -}