diff --git a/configuration.nix b/configuration.nix
index 090f703..1e2d8b4 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -59,9 +59,9 @@
nixpkgs.config.allowUnfree = true;
environment.sessionVariables = {
- # Tells Electron apps to use Wayland
- NIXOS_OZONE_WL = "1";
- NIXOS_CONFIG_PATH = "/etc/nixos";
+ # Tells Electron apps to use Wayland
+ NIXOS_OZONE_WL = "1";
+ NIXOS_CONFIG_PATH = "/etc/nixos";
};
# List packages installed in system profile. To search, run:
diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix
index 56bad2b..673abe1 100644
--- a/home/hyprland/default.nix
+++ b/home/hyprland/default.nix
@@ -4,6 +4,7 @@
{
imports = [
./hyprcursor
+ ./waybar
];
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
diff --git a/home/hyprland/waybar/config/config.jsonc b/home/hyprland/waybar/config/config.jsonc
new file mode 100644
index 0000000..8b233ac
--- /dev/null
+++ b/home/hyprland/waybar/config/config.jsonc
@@ -0,0 +1,120 @@
+{
+ "layer": "top",
+ // Waybar at top layer
+ "position": "top",
+ // Waybar position (top|bottom|left|right)
+ // "width": 1280, // Waybar width
+ // Choose the order of the modules
+ "modules-left": [
+ "hyprland/workspaces",
+ "custom/music"
+ ],
+ "modules-center": [
+ "hyprland/window"
+ ],
+ "modules-right": [
+ "wireplumber",
+ "backlight",
+ "clock",
+ "tray",
+ "custom/notification",
+ "custom/lock",
+ "custom/power"
+ ],
+ "hyprland/workspaces": {
+ "disable-scroll": false,
+ "sort-by-name": true,
+ "format": " {id} ",
+ "format-icons": {
+ "default": ""
+ }
+ },
+ "hyprland/window": {},
+ "tray": {
+ "icon-size": 21,
+ "spacing": 10
+ },
+ "custom/music": {
+ "format": " {}",
+ "escape": true,
+ "interval": 5,
+ "tooltip": false,
+ "exec": "playerctl metadata --format='{{ title }}'",
+ "on-click": "playerctl play-pause",
+ "max-length": 50
+ },
+ "clock": {
+ "timezone": "Europe/Oslo",
+ "tooltip-format": "{:%Y %B}\n{calendar}",
+ "format": " {:%H:%M %d/%m}",
+ "calendar": {
+ "mode": "month",
+ "weeks-pos": "left",
+ "format": {
+ "months": "{}",
+ "days": "{}",
+ "weeks": "W{}",
+ "weekdays": "{}",
+ "today": "{}"
+ }
+ }
+ },
+ "backlight": {
+ "device": "intel_backlight",
+ "format": "{icon}",
+ "format-icons": [
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ ""
+ ]
+ },
+ "wireplumber": {
+ // "scroll-step": 1, // %, can be a float
+ "format": "{icon} {volume}%",
+ "format-muted": "",
+ "format-icons": {
+ "default": [
+ "",
+ " ",
+ " "
+ ]
+ },
+ "on-click": "pavucontrol"
+ },
+ "custom/lock": {
+ "tooltip": false,
+ "on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
+ "format": ""
+ },
+ "custom/power": {
+ "tooltip": false,
+ "on-click": "wlogout &",
+ "format": " "
+ },
+ "custom/notification": {
+ "tooltip": false,
+ "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 swaync-client",
+ "exec": "swaync-client -swb",
+ "on-click": "swaync-client -t -sw",
+ "on-click-right": "swaync-client -d -sw",
+ "escape": true
+ }
+}
diff --git a/home/hyprland/waybar/config/mocha.css b/home/hyprland/waybar/config/mocha.css
new file mode 100644
index 0000000..98e218a
--- /dev/null
+++ b/home/hyprland/waybar/config/mocha.css
@@ -0,0 +1,37 @@
+/*
+*
+* Catppuccin Mocha palette
+* Maintainer: rubyowo
+*
+*/
+
+@define-color base #1e1e2e;
+@define-color mantle #181825;
+@define-color crust #11111b;
+
+@define-color text #cdd6f4;
+@define-color subtext0 #a6adc8;
+@define-color subtext1 #bac2de;
+
+@define-color surface0 #313244;
+@define-color surface1 #45475a;
+@define-color surface2 #585b70;
+
+@define-color overlay0 #6c7086;
+@define-color overlay1 #7f849c;
+@define-color overlay2 #9399b2;
+
+@define-color blue #89b4fa;
+@define-color lavender #b4befe;
+@define-color sapphire #74c7ec;
+@define-color sky #89dceb;
+@define-color teal #94e2d5;
+@define-color green #a6e3a1;
+@define-color yellow #f9e2af;
+@define-color peach #fab387;
+@define-color maroon #eba0ac;
+@define-color red #f38ba8;
+@define-color mauve #cba6f7;
+@define-color pink #f5c2e7;
+@define-color flamingo #f2cdcd;
+@define-color rosewater #f5e0dc;
diff --git a/home/hyprland/waybar/config/style.css b/home/hyprland/waybar/config/style.css
new file mode 100644
index 0000000..8a14e51
--- /dev/null
+++ b/home/hyprland/waybar/config/style.css
@@ -0,0 +1,100 @@
+@import "mocha.css";
+
+* {
+ font-family: FantasqueSansMono Nerd Font;
+ font-size: 17px;
+ min-height: 0;
+}
+
+#waybar {
+ background: transparent;
+ color: @text;
+ margin: 5px 5px;
+}
+
+#workspaces {
+ border-radius: 1rem;
+ margin: 5px;
+ background-color: @surface0;
+ margin-left: 1rem;
+}
+
+#workspaces button {
+ color: @lavender;
+ border-radius: 1rem;
+ padding: 0.4rem;
+}
+
+#workspaces button.active {
+ color: @sky;
+ border-radius: 1rem;
+}
+
+#workspaces button:hover {
+ color: @sapphire;
+ border-radius: 1rem;
+}
+
+#window,
+#custom-notification,
+#custom-music,
+#tray,
+#backlight,
+#clock,
+#wireplumber,
+#custom-lock,
+#custom-power {
+ background-color: @surface0;
+ padding: 0.5rem 1rem;
+ margin: 5px 0;
+}
+
+#clock {
+ color: @blue;
+}
+
+#backlight {
+ color: @yellow;
+}
+
+#backlight {
+ border-radius: 0;
+}
+
+#wireplumber {
+ color: @maroon;
+ border-radius: 1rem 0px 0px 1rem;
+ margin-left: 1rem;
+}
+
+#custom-music {
+ color: @mauve;
+ border-radius: 1rem;
+}
+
+#window {
+ color: @mauve;
+ border-radius: 1rem;
+}
+
+#custom-lock {
+ border-radius: 1rem 0px 0px 1rem;
+ color: @lavender;
+}
+
+#custom-power {
+ margin-right: 1rem;
+ border-radius: 0px 1rem 1rem 0px;
+ color: @red;
+}
+
+#custom-notification {
+ margin-right: 1rem;
+ border-radius: 0px 1rem 1rem 0px;
+ color: @sapphire;
+}
+
+#tray {
+ margin-right: 1rem;
+ border-radius: 1rem;
+}
diff --git a/home/hyprland/waybar/default.nix b/home/hyprland/waybar/default.nix
new file mode 100644
index 0000000..00dc87e
--- /dev/null
+++ b/home/hyprland/waybar/default.nix
@@ -0,0 +1,8 @@
+{...}:
+
+{
+ home.file.".config/waybar" = {
+ source = ./config;
+ recursive = true;
+ };
+}
diff --git a/rebuild b/rebuild
index 1594919..72fa4e9 100755
--- a/rebuild
+++ b/rebuild
@@ -2,5 +2,5 @@
# Rebuild and switch the environment if successful
git add .
-./fmt
+sudo ./fmt
sudo nixos-rebuild switch --flake .#
diff --git a/test b/test
new file mode 100755
index 0000000..409a0d1
--- /dev/null
+++ b/test
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+
+# Rebuild and switch the environment if successful
+git add .
+sudo ./fmt
+sudo nixos-rebuild test --flake .#