☄ Enter waybar
Moved waybar config into NixOS configuration. Added test script to check config without switching
This commit is contained in:
parent
a2f141a290
commit
a65404bb8c
@ -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:
|
||||
|
@ -4,6 +4,7 @@
|
||||
{
|
||||
imports = [
|
||||
./hyprcursor
|
||||
./waybar
|
||||
];
|
||||
|
||||
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
|
||||
|
120
home/hyprland/waybar/config/config.jsonc
Normal file
120
home/hyprland/waybar/config/config.jsonc
Normal file
@ -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": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": " {:%H:%M %d/%m}",
|
||||
"calendar": {
|
||||
"mode": "month",
|
||||
"weeks-pos": "left",
|
||||
"format": {
|
||||
"months": "<span color='#ffead3'><b>{}</b></span>",
|
||||
"days": "<span color='#ecc6d9'><b>{}</b></span>",
|
||||
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
|
||||
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
|
||||
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "<span foreground='red'><sup></sup></span>",
|
||||
"none": "",
|
||||
"dnd-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"dnd-none": "",
|
||||
"inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"inhibited-none": "",
|
||||
"dnd-inhibited-notification": "<span foreground='red'><sup></sup></span>",
|
||||
"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
|
||||
}
|
||||
}
|
37
home/hyprland/waybar/config/mocha.css
Normal file
37
home/hyprland/waybar/config/mocha.css
Normal file
@ -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;
|
100
home/hyprland/waybar/config/style.css
Normal file
100
home/hyprland/waybar/config/style.css
Normal file
@ -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;
|
||||
}
|
8
home/hyprland/waybar/default.nix
Normal file
8
home/hyprland/waybar/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{...}:
|
||||
|
||||
{
|
||||
home.file.".config/waybar" = {
|
||||
source = ./config;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
2
rebuild
2
rebuild
@ -2,5 +2,5 @@
|
||||
|
||||
# Rebuild and switch the environment if successful
|
||||
git add .
|
||||
./fmt
|
||||
sudo ./fmt
|
||||
sudo nixos-rebuild switch --flake .#
|
||||
|
Loading…
x
Reference in New Issue
Block a user