Waybar config

This commit is contained in:
fwastring 2025-10-10 16:31:26 +02:00
parent 3c7a01f264
commit e8d8704b70
6 changed files with 232 additions and 59 deletions

View file

@ -54,6 +54,17 @@ in
./../../moduler/programs/waybar ./../../moduler/programs/waybar
inputs.catppuccin.homeModules.catppuccin inputs.catppuccin.homeModules.catppuccin
]; ];
waybar = {
enable = true;
# configPath = ./../../moduler/programs/waybar/waybar-laptop.jsonc;
};
gtk = {
enable = true;
iconTheme = {
name = "oomox-gruvbox-dark";
package = pkgs.gruvbox-dark-icons-gtk;
};
};
catppuccin = { catppuccin = {
librewolf = { librewolf = {
enable = true; enable = true;
@ -73,11 +84,11 @@ in
}; };
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
boot.extraModulePackages = [ # boot.extraModulePackages = [
(btusb.overrideAttrs (_: { # (btusb.overrideAttrs (_: {
patches = [ ../../moduler/btusb-add-mt7925.patch ]; # patches = [ ../../moduler/btusb-add-mt7925.patch ];
})) # }))
]; # ];
networking.hostName = myhostname; networking.hostName = myhostname;

View file

@ -19,12 +19,11 @@ in
hyprland-qtutils hyprland-qtutils
waypipe waypipe
wmenu wmenu
playerctl playerctl
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [
font-awesome font-awesome
]; ];
services = { services = {
@ -149,9 +148,9 @@ in
}; };
decoration = { decoration = {
rounding = 0; rounding = 10;
active_opacity = 0.9; active_opacity = 0.8;
inactive_opacity = 0.8; inactive_opacity = 0.7;
fullscreen_opacity = 0.9; fullscreen_opacity = 0.9;
blur = { blur = {
@ -275,7 +274,7 @@ in
# Screencapture # Screencapture
"$mod SHIFT, s, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png" "$mod SHIFT, s, exec, ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy -t image/png"
# special # special
"SUPER+SHIFT, code:201, exec, confetti" "SUPER+SHIFT, code:201, exec, confetti"
]; ];
@ -284,6 +283,15 @@ in
"$mod, mouse:273, resizewindow" "$mod, mouse:273, resizewindow"
]; ];
windowrulev2 = [
"float, class:^(org.pulseaudio.pavucontrol)$"
"size 500 400, class:^(org.pulseaudio.pavucontrol)"
"move onscreen cursor -250 0, class:^(org.pulseaudio.pavucontrol)"
"float, title:^(Bluetooth Devices)$"
"size 500 400, title:^(Bluetooth Devices)"
"move onscreen cursor -250 0, title:^(Bluetooth Devices)"
];
env = [ env = [
"NIXOS_OZONE_WL,1" "NIXOS_OZONE_WL,1"
"_JAVA_AWT_WM_NONREPARENTING,1" "_JAVA_AWT_WM_NONREPARENTING,1"

View file

@ -1,4 +1,5 @@
{ {
lib,
config, config,
inputs, inputs,
pkgs, pkgs,
@ -6,18 +7,32 @@
}: }:
let let
in in
with lib;
{ {
programs = { options = {
waybar = { waybar = {
enable = true; enable = mkEnableOption "enables waybar";
systemd = { configPath = lib.mkOption {
enable = true; type = lib.types.path;
default = ./waybar.jsonc;
description = "The path to the waybar config";
}; };
}; };
}; };
xdg.configFile."waybar/config.jsonc".source = ./waybar.jsonc; config = mkIf config.waybar.enable {
xdg.configFile."waybar/style.css".source = ./waybar.css; programs = {
waybar = {
enable = true;
systemd = {
enable = true;
};
};
};
xdg.configFile."waybar/config.jsonc".source = config.waybar.configPath;
xdg.configFile."waybar/style.css".source = ./waybar.css;
};
# catppuccin.waybar = { # catppuccin.waybar = {
# enable = true; # enable = true;
# flavor = "latte"; # flavor = "latte";

View file

@ -0,0 +1,77 @@
{
"layer": "top",
"position": "top",
"margin-top": 10,
"margin-left": 14,
"margin-right": 14,
"spacing": 12,
"modules-left": [
"hyprland/workspaces"
],
"modules-right": [
"mpris",
"bluetooth",
"pulseaudio",
"upower",
"clock"
],
"mpris": {
"player": "Feishin",
"format": "{player_icon} {title} — {artist}",
"format-paused": " {player_icon} {title}",
"format-stopped": "",
"player-icons": {
"default": "",
"Feishin": ""
},
"max-length": 45,
"interval": 1,
"tooltip": true,
"tooltip-format": "{player} — {status}\n{artist}\n{title}\n{album}",
"on-click": "playerctl -p Feishin play-pause",
"on-scroll-up": "playerctl -p Feishin next",
"on-scroll-down": "playerctl -p Feishin previous"
},
"bluetooth": {
"format": " {status}",
"format-connected": " {device_alias}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"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": "pgrep .blueman-manage && pkill .blueman-manage || blueman-manager &"
},
"upower": {
"icon-size": 20,
"hide-if-empty": true,
"tooltip": true,
"tooltip-spacing": 20
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon}  {volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"",
""
]
},
"on-click": "pgrep pavucontrol && pkill pavucontrol || pavucontrol &"
},
"clock": {
"format": "{:%c}",
"locale": "sv_SE.UTF-8",
"tooltip": true,
"tooltip-format": "{:%A, %d %B %Y}\n %H:%M:%S",
"interval": 1
}
}

View file

@ -15,33 +15,33 @@
/* -------- Base Styles -------- */ /* -------- Base Styles -------- */
* { * {
font-family: "FiraCode Nerd Font Bold", "Font Awesome 7 Free Regular", sans-serif; font-family: "FiraCode Nerd Font", "Font Awesome 7 Free";
font-size: 15px; font-size: 15px;
} }
window#waybar { window#waybar {
background: @mocha-base; /* background: @mocha-base; */
background: transparent;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
transition: background-color .35s ease, color .35s ease; transition: background-color .35s ease, color .35s ease;
padding: 4px 8px;
} }
window#waybar.hidden { opacity: 0.2; } window#waybar.hidden { opacity: 0.2; }
window#waybar.termite { background: @mocha-mantle; } window#waybar.termite { background: @mocha-base; }
window#waybar.chromium { background: @mocha-base; border: none; } window#waybar.chromium { background: @mocha-base; border: none; }
/* -------- Module “pill” look -------- */ /* -------- Module “pill” look -------- */
#workspaces, #clock, #mpris { #workspaces, #clock, #mpris, #pulseaudio, #bluetooth, #upower {
background: @mocha-mantle; background: @mocha-base;
border: 1px solid @mocha-surface2; border: none;
border-radius: 10px; border-radius: 5px;
padding: 3px 8px; padding: 3px 8px;
} }
/* consistent gaps between modules */ /* consistent gaps between modules */
.modules-left > widget, .modules-right > widget { .modules-left > widget, .modules-right > widget {
margin: 0 6px; margin: 0 15px;
} }
.modules-left > widget:first-child { margin-left: 0; } .modules-left > widget:first-child { margin-left: 0; }
.modules-right > widget:last-child { margin-right: 0; } .modules-right > widget:last-child { margin-right: 0; }
@ -73,8 +73,7 @@ button:active {
/* -------- Workspaces -------- */ /* -------- Workspaces -------- */
#workspaces { #workspaces {
padding: 4px 6px; background: @mocha-base;
background: @mocha-mantle;
} }
#workspaces button { #workspaces button {
@ -106,16 +105,38 @@ button:active {
color: @mocha-base; color: @mocha-base;
font-weight: 600; font-weight: 600;
letter-spacing: 0.2px; letter-spacing: 0.2px;
padding: 4px 10px;
} }
/* -------- Clock -------- */ /* -------- Mpris -------- */
#mpris { #mpris {
background: @mocha-peach; background: @mocha-peach;
color: @mocha-base; color: @mocha-base;
font-weight: 600; font-weight: 600;
letter-spacing: 0.2px; letter-spacing: 0.2px;
padding: 4px 10px; }
/* -------- Pavu -------- */
#pulseaudio {
background: @mocha-peach;
color: @mocha-base;
font-weight: 600;
letter-spacing: 0.2px;
}
/* -------- Bluetooth -------- */
#bluetooth {
background: @mocha-peach;
color: @mocha-base;
font-weight: 600;
letter-spacing: 0.2px;
}
/* -------- Upower -------- */
#bluetooth {
background: @mocha-peach;
color: @mocha-base;
font-weight: 600;
letter-spacing: 0.2px;
} }
/* -------- Helpers -------- */ /* -------- Helpers -------- */

View file

@ -1,29 +1,70 @@
{ {
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"margin-top": 10,
"modules-left": ["hyprland/workspaces"], "margin-left": 14,
"modules-right": ["mpris","clock"], "margin-right": 14,
"mpris": { "spacing": 12,
"player": "Feishin", "modules-left": [
"format": "{player_icon} {artist} — {title}", "hyprland/workspaces"
"format-paused": "{player_icon} {title}", ],
"format-stopped": "", "modules-right": [
"player-icons": { "default": "", "Feishin": "" }, "mpris",
"max-length": 45, "bluetooth",
"interval": 1, "pulseaudio",
"tooltip": true, "clock"
"tooltip-format": "{player} — {status}\n{artist}\n{title}\n{album}", ],
"on-click": "playerctl -p Feishin play-pause", "mpris": {
"on-scroll-up": "playerctl -p Feishin next", "player": "Feishin",
"on-scroll-down": "playerctl -p Feishin previous" "format": "{player_icon} {title} — {artist}",
}, "format-paused": " {player_icon} {title}",
"format-stopped": "",
"clock": { "player-icons": {
"format": "{:%c}", "default": "",
"locale": "sv_SE.UTF-8", "Feishin": ""
"tooltip": true, },
"tooltip-format": "{:%A, %d %B %Y}\n %H:%M:%S", "max-length": 45,
"interval": 1 "interval": 1,
} "tooltip": true,
"tooltip-format": "{player} — {status}\n{artist}\n{title}\n{album}",
"on-click": "playerctl -p Feishin play-pause",
"on-scroll-up": "playerctl -p Feishin next",
"on-scroll-down": "playerctl -p Feishin previous"
},
"bluetooth": {
"format": " {status}",
"format-connected": " {device_alias}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%",
"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": "pgrep .blueman-manage && pkill .blueman-manage || blueman-manager &"
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon}  {volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [
"",
""
]
},
"on-click": "pgrep pavucontrol && pkill pavucontrol || pavucontrol &"
},
"clock": {
"format": "{:%c}",
"locale": "sv_SE.UTF-8",
"tooltip": true,
"tooltip-format": "{:%A, %d %B %Y}\n %H:%M:%S",
"interval": 1
}
} }