Compare commits
7 Commits
a8449df5d7
...
c67eb22321
| Author | SHA1 | Date | |
|---|---|---|---|
| c67eb22321 | |||
| c103df5675 | |||
| fa5f3d8a8c | |||
| a9b8634f98 | |||
| 9cf0ee9363 | |||
| 5f58e4da31 | |||
| bf4c5350f4 |
@ -1 +0,0 @@
|
|||||||
|
|
||||||
@ -1,86 +0,0 @@
|
|||||||
[
|
|
||||||
{
|
|
||||||
"include": [
|
|
||||||
"~/.config/waybar/monitor.json"
|
|
||||||
],
|
|
||||||
|
|
||||||
"layer": "top",
|
|
||||||
"position": "top",
|
|
||||||
"height": 40,
|
|
||||||
"spacing": 4,
|
|
||||||
|
|
||||||
"modules-left": [
|
|
||||||
"custom/launcher",
|
|
||||||
"user",
|
|
||||||
"hyprland/window"
|
|
||||||
],
|
|
||||||
|
|
||||||
"modules-center": [
|
|
||||||
"hyprland/workspaces"
|
|
||||||
],
|
|
||||||
|
|
||||||
"modules-right": [
|
|
||||||
"pulseaudio",
|
|
||||||
"network",
|
|
||||||
"cpu",
|
|
||||||
"memory",
|
|
||||||
"temperature",
|
|
||||||
"clock",
|
|
||||||
"tray"
|
|
||||||
],
|
|
||||||
|
|
||||||
"custom/launcher": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> ",
|
|
||||||
"interval": "once",
|
|
||||||
"tooltip": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"hyprland/workspaces": {
|
|
||||||
"all-outputs": false,
|
|
||||||
"format": "{name}",
|
|
||||||
"on-click": "activate",
|
|
||||||
"sort-by-coordinates": false,
|
|
||||||
"sort-by-name": true,
|
|
||||||
"sort-by-number": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"pulseaudio": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {volume}%",
|
|
||||||
"format-muted": "<span font=\"FontAwesome\"></span> ",
|
|
||||||
// "on-click": "alacritty -o font.size=12 -e ncpamixer -t o"
|
|
||||||
"on-click": "kitty ncpamixer -t o"
|
|
||||||
},
|
|
||||||
|
|
||||||
"network": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {ipaddr}",
|
|
||||||
"format-disconnected": "<span font=\"FontAwesome\"></span> ",
|
|
||||||
"interface": "enp8s0",
|
|
||||||
"tooltip-format": "{ifname} via {gwaddr}"
|
|
||||||
},
|
|
||||||
|
|
||||||
"cpu": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {load}%"
|
|
||||||
},
|
|
||||||
|
|
||||||
"memory": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {percentage}%"
|
|
||||||
},
|
|
||||||
|
|
||||||
"temperature": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {temperatureC}°C",
|
|
||||||
"thermal-zone": 3
|
|
||||||
},
|
|
||||||
|
|
||||||
"clock": {
|
|
||||||
"format": "<span font=\"FontAwesome\"></span> {:%H:%M}",
|
|
||||||
"timezone": "Europe/Berlin",
|
|
||||||
"tooltip-format": "<tt><small>{calendar}</small></tt>"
|
|
||||||
},
|
|
||||||
|
|
||||||
"tray": {
|
|
||||||
"icon-size": 20,
|
|
||||||
"show-passive-items": true,
|
|
||||||
"spacing": 5
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
/*TODO: Set this through nixos module programatically*/
|
|
||||||
/*@import url("colors/three-bears.css");*/
|
|
||||||
@import url("colors/foggy-lake.css");
|
|
||||||
|
|
||||||
/*Order is Top-Right-Bottom-Left for combined properties*/
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
font-family: JetBrainsMono Nerd Font Mono;
|
|
||||||
font-weight: bold;
|
|
||||||
color: @base;
|
|
||||||
background-color: rgba(239,241,245,0.6);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Square Widgets*/
|
|
||||||
#custom-launcher,
|
|
||||||
#workspaces button,
|
|
||||||
#tray {
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 5px 5px 5px 5px;
|
|
||||||
border-radius: 6px;
|
|
||||||
color: @base;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
color: @pink;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Tux Icon*/
|
|
||||||
#custom-launcher {
|
|
||||||
font-size: 18px;
|
|
||||||
padding-right: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Rectangle Widgets*/
|
|
||||||
#user,
|
|
||||||
#window,
|
|
||||||
#pulseaudio,
|
|
||||||
#network,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#temperature,
|
|
||||||
#clock {
|
|
||||||
padding: 0px 10px 0px 10px;
|
|
||||||
margin: 8px 5px 8px 5px;
|
|
||||||
border-radius: 6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*Colors*/
|
|
||||||
#custom-launcher { background-color: @flamingo; }
|
|
||||||
#user { background-color: @pink; }
|
|
||||||
#window { background-color: @mauve; }
|
|
||||||
#workspaces button { background-color: @red; }
|
|
||||||
#pulseaudio { background-color: @maroon; }
|
|
||||||
#network { background-color: @peach; }
|
|
||||||
#cpu { background-color: @yellow; }
|
|
||||||
#memory { background-color: @green; }
|
|
||||||
#temperature { background-color: @teal; }
|
|
||||||
#clock { background-color: @sky; }
|
|
||||||
#tray { background-color: @sapphire; }
|
|
||||||
@ -38,6 +38,12 @@ rec {
|
|||||||
google = false;
|
google = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
color = {
|
||||||
|
enable = true; # You can't disable this
|
||||||
|
lightScheme = "catppuccin-latte";
|
||||||
|
darkScheme = "catppuccin-mocha";
|
||||||
|
};
|
||||||
|
|
||||||
firefox = {
|
firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland = true;
|
wayland = true;
|
||||||
|
|||||||
29
home/modules/color/0_template.nix
Normal file
29
home/modules/color/0_template.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
rosewater = "";
|
||||||
|
flamingo = "";
|
||||||
|
pink = "";
|
||||||
|
mauve = "";
|
||||||
|
red = "";
|
||||||
|
maroon = "";
|
||||||
|
peach = "";
|
||||||
|
yellow = "";
|
||||||
|
green = "";
|
||||||
|
teal = "";
|
||||||
|
sky = "";
|
||||||
|
sapphire = "";
|
||||||
|
blue = "";
|
||||||
|
lavender = "";
|
||||||
|
|
||||||
|
text = "";
|
||||||
|
subtext1 = "";
|
||||||
|
subtext0 = "";
|
||||||
|
overlay2 = "";
|
||||||
|
overlay1 = "";
|
||||||
|
overlay0 = "";
|
||||||
|
surface2 = "";
|
||||||
|
surface1 = "";
|
||||||
|
surface0 = "";
|
||||||
|
base = "";
|
||||||
|
mantle = "";
|
||||||
|
crust = "";
|
||||||
|
}
|
||||||
29
home/modules/color/catppuccin-latte.nix
Normal file
29
home/modules/color/catppuccin-latte.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
rosewater = "dc8a78";
|
||||||
|
flamingo = "dd7878";
|
||||||
|
pink = "ea76cb";
|
||||||
|
mauve = "8839ef";
|
||||||
|
red = "d20f39";
|
||||||
|
maroon = "e64553";
|
||||||
|
peach = "fe640b";
|
||||||
|
yellow = "df8e1d";
|
||||||
|
green = "40a02b";
|
||||||
|
teal = "179299";
|
||||||
|
sky = "04a5e5";
|
||||||
|
sapphire = "209fb5";
|
||||||
|
blue = "1e66f5";
|
||||||
|
lavender = "7287fd";
|
||||||
|
|
||||||
|
text = "4c4f69";
|
||||||
|
subtext1 = "5c5f77";
|
||||||
|
subtext0 = "6c6f85";
|
||||||
|
overlay2 = "7c7f93";
|
||||||
|
overlay1 = "8c8fa1";
|
||||||
|
overlay0 = "9ca0b0";
|
||||||
|
surface2 = "acb0be";
|
||||||
|
surface1 = "bcc0cc";
|
||||||
|
surface0 = "ccd0da";
|
||||||
|
base = "eff1f5";
|
||||||
|
mantle = "e6e9ef";
|
||||||
|
crust = "dce0e8";
|
||||||
|
}
|
||||||
29
home/modules/color/catppuccin-mocha.nix
Normal file
29
home/modules/color/catppuccin-mocha.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
rosewater = "f5e0dc";
|
||||||
|
flamingo = "f2cdcd";
|
||||||
|
pink = "f5c2e7";
|
||||||
|
mauve = "cba6f7";
|
||||||
|
red = "f38ba8";
|
||||||
|
maroon = "eba0ac";
|
||||||
|
peach = "fab387";
|
||||||
|
yellow = "f9e2af";
|
||||||
|
green = "a6e3a1";
|
||||||
|
teal = "94e2d5";
|
||||||
|
sky = "89dceb";
|
||||||
|
sapphire = "74c7ec";
|
||||||
|
blue = "89b4fa";
|
||||||
|
lavender = "b4befe";
|
||||||
|
|
||||||
|
text = "cdd6f4";
|
||||||
|
subtext1 = "bac2de";
|
||||||
|
subtext0 = "a6adc8";
|
||||||
|
overlay2 = "9399b2";
|
||||||
|
overlay1 = "7f849c";
|
||||||
|
overlay0 = "6c7086";
|
||||||
|
surface2 = "585b70";
|
||||||
|
surface1 = "45475a";
|
||||||
|
surface0 = "313244";
|
||||||
|
base = "1e1e2e";
|
||||||
|
mantle = "181825";
|
||||||
|
crust = "11111b";
|
||||||
|
}
|
||||||
66
home/modules/color/default.nix
Normal file
66
home/modules/color/default.nix
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with mylib.modules; let
|
||||||
|
cfg = config.modules.color;
|
||||||
|
|
||||||
|
# Options and assignments will be generated from those keys
|
||||||
|
colorKeys = [
|
||||||
|
# Colors
|
||||||
|
"rosewater"
|
||||||
|
"flamingo"
|
||||||
|
"pink"
|
||||||
|
"mauve"
|
||||||
|
"red"
|
||||||
|
"maroon"
|
||||||
|
"peach"
|
||||||
|
"yellow"
|
||||||
|
"green"
|
||||||
|
"teal"
|
||||||
|
"sky"
|
||||||
|
"sapphire"
|
||||||
|
"blue"
|
||||||
|
"lavender"
|
||||||
|
|
||||||
|
# 50 shades of gray
|
||||||
|
"text"
|
||||||
|
"subtext1"
|
||||||
|
"subtext0"
|
||||||
|
"overlay2"
|
||||||
|
"overlay1"
|
||||||
|
"overlay0"
|
||||||
|
"surface2"
|
||||||
|
"surface1"
|
||||||
|
"surface0"
|
||||||
|
"base"
|
||||||
|
"mantle"
|
||||||
|
"crust"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
options.modules.color = import ./options.nix {inherit lib mylib colorKeys;};
|
||||||
|
|
||||||
|
config = let
|
||||||
|
lightDefs = import ./${cfg.lightScheme}.nix;
|
||||||
|
darkDefs = import ./${cfg.darkScheme}.nix;
|
||||||
|
|
||||||
|
mkLightColorAssignment = key: {${key} = lightDefs.${key};};
|
||||||
|
mkDarkColorAssignment = key: {${key} = darkDefs.${key};};
|
||||||
|
in
|
||||||
|
mkIf cfg.enable {
|
||||||
|
# This module sets its own options
|
||||||
|
# to the values specified in a colorscheme file.
|
||||||
|
modules.color.light = lib.pipe colorKeys [
|
||||||
|
(builtins.map mkLightColorAssignment)
|
||||||
|
lib.mergeAttrsList
|
||||||
|
];
|
||||||
|
|
||||||
|
modules.color.dark = lib.pipe colorKeys [
|
||||||
|
(builtins.map mkDarkColorAssignment)
|
||||||
|
lib.mergeAttrsList
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
58
home/modules/color/options.nix
Normal file
58
home/modules/color/options.nix
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mylib,
|
||||||
|
colorKeys,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with mylib.modules; let
|
||||||
|
mkColorOption = key: {
|
||||||
|
light.${key} = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The RGB hex color value for ${key} in the light scheme";
|
||||||
|
example = "EEEEEE";
|
||||||
|
};
|
||||||
|
dark.${key} = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The RGB hex color value for ${key} in the dark scheme";
|
||||||
|
example = "111111";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
(lib.pipe colorKeys [
|
||||||
|
(builtins.map mkColorOption)
|
||||||
|
lib.mergeAttrsList
|
||||||
|
])
|
||||||
|
// {
|
||||||
|
enable = mkEnableOption "Enable color schemes";
|
||||||
|
|
||||||
|
lightScheme = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The color scheme to use for light colors";
|
||||||
|
example = "catppuccin-latte";
|
||||||
|
default = "catppuccin-latte";
|
||||||
|
};
|
||||||
|
|
||||||
|
darkScheme = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
description = "The color scheme to use for dark colors";
|
||||||
|
example = "catppuccin-mocha";
|
||||||
|
default = "catppuccin-mocha";
|
||||||
|
};
|
||||||
|
|
||||||
|
keys = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
description = "The names of all possible colors";
|
||||||
|
default = colorKeys;
|
||||||
|
};
|
||||||
|
|
||||||
|
light = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
description = "Colors belonging to the selected light scheme";
|
||||||
|
};
|
||||||
|
|
||||||
|
dark = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
description = "Colors belonging to the selected dark scheme";
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
# My own HM modules
|
# My own HM modules
|
||||||
./chromium
|
./chromium
|
||||||
|
./color
|
||||||
./firefox
|
./firefox
|
||||||
./fish
|
./fish
|
||||||
./hyprland
|
./hyprland
|
||||||
|
|||||||
@ -62,6 +62,7 @@ with mylib.modules; {
|
|||||||
"kitty"
|
"kitty"
|
||||||
]
|
]
|
||||||
'';
|
'';
|
||||||
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
delayed = mkOption {
|
delayed = mkOption {
|
||||||
|
|||||||
@ -518,24 +518,29 @@ in {
|
|||||||
h = ["clang-format"];
|
h = ["clang-format"];
|
||||||
cpp = ["clang-format"];
|
cpp = ["clang-format"];
|
||||||
hpp = ["clang-format"];
|
hpp = ["clang-format"];
|
||||||
css = [["prettierd" "prettier"]];
|
css = ["prettierd" "prettier"];
|
||||||
html = [["prettierd" "prettier"]];
|
html = ["prettierd" "prettier"];
|
||||||
java = ["google-java-format"];
|
java = ["google-java-format"];
|
||||||
javascript = [["prettierd" "prettier"]];
|
javascript = ["prettierd" "prettier"];
|
||||||
lua = ["stylua"];
|
lua = ["stylua"];
|
||||||
markdown = [["prettierd" "prettier"]];
|
markdown = ["prettierd" "prettier"];
|
||||||
nix = ["alejandra"];
|
nix = ["alejandra"];
|
||||||
python = ["black"];
|
python = ["black"];
|
||||||
rust = ["rustfmt"];
|
rust = ["rustfmt"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
default_format_opts = {
|
||||||
|
lsp_format = "fallback";
|
||||||
|
stop_after_first = true;
|
||||||
|
};
|
||||||
|
|
||||||
format_on_save.__raw = ''
|
format_on_save.__raw = ''
|
||||||
function(bufnr)
|
function(bufnr)
|
||||||
-- Disable with a global or buffer-local variable
|
-- Disable with a global or buffer-local variable
|
||||||
if vim.g.disable_autoformat then
|
if vim.g.disable_autoformat then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
return { timeout_ms = 500, lsp_fallback = true }
|
return { timeout_ms = 500, lsp_format = "fallback", }
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
@ -1734,6 +1739,25 @@ in {
|
|||||||
height = 45;
|
height = 45;
|
||||||
winblend = 0;
|
winblend = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Hack to make toggleterm respect neotree:
|
||||||
|
# Open + close neotree once toggleterm is opened.
|
||||||
|
# Toggleterm will "glitch" when opening.
|
||||||
|
on_open.__raw = ''
|
||||||
|
function(...)
|
||||||
|
local name = vim.fn.bufname("neo-tree")
|
||||||
|
local winnr = vim.fn.bufwinnr(name)
|
||||||
|
|
||||||
|
if winnr ~= -1 then
|
||||||
|
vim.defer_fn(function()
|
||||||
|
local cmd = string.format("Neotree toggle")
|
||||||
|
vim.cmd(cmd)
|
||||||
|
vim.cmd(cmd)
|
||||||
|
vim.cmd("wincmd p")
|
||||||
|
end, 100)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,3 @@
|
|||||||
# TODO: Generate the config modularly, like with hyprland
|
|
||||||
# - It should especially be possible to set styling programatically, for themes
|
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
@ -10,70 +8,162 @@
|
|||||||
with lib;
|
with lib;
|
||||||
with mylib.modules; let
|
with mylib.modules; let
|
||||||
cfg = config.modules.waybar;
|
cfg = config.modules.waybar;
|
||||||
|
hyprcfg = config.modules.hyprland;
|
||||||
in {
|
in {
|
||||||
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
options.modules.waybar = import ./options.nix {inherit lib mylib;};
|
||||||
|
|
||||||
/*
|
|
||||||
config = let
|
|
||||||
# Taken from https://github.com/Ruixi-rebirth/flakes/blob/main/modules/programs/wayland/waybar/workspace-patch.nix
|
|
||||||
hyprctl = "${pkgs.hyprland}/bin/hyprctl";
|
|
||||||
workspaces-patch = pkgs.writeTextFile {
|
|
||||||
name = "waybar-hyprctl.diff";
|
|
||||||
text = ''
|
|
||||||
diff --git a/src/modules/wlr/workspace_manager.cpp b/src/modules/wlr/workspace_manager.cpp
|
|
||||||
index 6a496e6..a689be0 100644
|
|
||||||
--- a/src/modules/wlr/workspace_manager.cpp
|
|
||||||
+++ b/src/modules/wlr/workspace_manager.cpp
|
|
||||||
@@ -511,7 +511,9 @@ auto Workspace::handle_clicked(GdkEventButton *bt) -> bool {
|
|
||||||
if (action.empty())
|
|
||||||
return true;
|
|
||||||
else if (action == "activate") {
|
|
||||||
- zext_workspace_handle_v1_activate(workspace_handle_);
|
|
||||||
+ // zext_workspace_handle_v1_activate(workspace_handle_);
|
|
||||||
+ const std::string command = "${hyprctl} dispatch workspace " + name_;
|
|
||||||
+ system(command.c_str());
|
|
||||||
} else if (action == "close") {
|
|
||||||
zext_workspace_handle_v1_remove(workspace_handle_);
|
|
||||||
} else {
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
waybar-hyprland = pkgs.waybar.overrideAttrs (oldAttrs: {
|
|
||||||
mesonFlags = oldAttrs.mesonFlags ++ ["-Dexperimental=true"];
|
|
||||||
patches = (oldAttrs.patches or []) ++ [workspaces-patch];
|
|
||||||
});
|
|
||||||
in
|
|
||||||
*/
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# package = waybar-hyprland;
|
systemd.enable = true;
|
||||||
package = pkgs.waybar;
|
|
||||||
|
|
||||||
systemd = {
|
settings = {
|
||||||
enable = false; # Gets started by hyprland
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 40;
|
||||||
|
spacing = 4;
|
||||||
|
output = ["${cfg.monitor}"];
|
||||||
|
|
||||||
|
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
||||||
|
modules-center = ["hyprland/workspaces"];
|
||||||
|
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
||||||
|
|
||||||
|
"custom/launcher" = {
|
||||||
|
format = "<span font='FontAwesome'></span> ";
|
||||||
|
interval = "once";
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
all-outputs = false;
|
||||||
|
format = "{name}";
|
||||||
|
on-click = "activate";
|
||||||
|
sort-by-coordinates = false;
|
||||||
|
sort-by-name = true;
|
||||||
|
sort-by-number = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio" = {
|
||||||
|
format = "<span font='FontAwesome'></span> {volume}%";
|
||||||
|
format-muted = "<span font='FontAwesome'></span> ";
|
||||||
|
on-click = "kitty ncpamixer -t o";
|
||||||
|
};
|
||||||
|
|
||||||
|
"network" = {
|
||||||
|
format = "<span font='FontAwesome'></span> {ipaddr}";
|
||||||
|
format-disconnected = "<span font='FontAwesome'></span> ";
|
||||||
|
interface = "enp8s0";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr}";
|
||||||
|
};
|
||||||
|
|
||||||
|
cpu = {
|
||||||
|
format = "<span font='FontAwesome'></span> {load}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
memory = {
|
||||||
|
format = "<span font='FontAwesome'></span> {percentage}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
temperature = {
|
||||||
|
format = "<span font='FontAwesome'></span> {temperatureC}°C";
|
||||||
|
thermal-zone = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
clock = {
|
||||||
|
format = "<span font='FontAwesome'></span> {:%H:%M}";
|
||||||
|
timezone = "Europe/Berlin";
|
||||||
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||||
|
};
|
||||||
|
|
||||||
|
tray = {
|
||||||
|
icon-size = 20;
|
||||||
|
show-passive-items = true;
|
||||||
|
spacing = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
style =
|
||||||
|
(builtins.readFile ./colors/${hyprcfg.theme}.css)
|
||||||
|
+ ''
|
||||||
|
/*Order is Top-Right-Bottom-Left for combined properties*/
|
||||||
|
window#waybar {
|
||||||
|
font-family: JetBrainsMono Nerd Font Mono;
|
||||||
|
font-weight: bold;
|
||||||
|
color: @base;
|
||||||
|
background-color: rgba(239, 241, 245, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Square Widgets*/
|
||||||
|
#custom-launcher,
|
||||||
|
#workspaces button,
|
||||||
|
#tray {
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
margin: 5px 5px 5px 5px;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: @base;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
color: @pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Tux Icon*/
|
||||||
|
#custom-launcher {
|
||||||
|
font-size: 18px;
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Rectangle Widgets*/
|
||||||
|
#user,
|
||||||
|
#window,
|
||||||
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#temperature,
|
||||||
|
#clock {
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
margin: 8px 5px 8px 5px;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*Colors*/
|
||||||
|
#custom-launcher {
|
||||||
|
background-color: @flamingo;
|
||||||
|
}
|
||||||
|
#user {
|
||||||
|
background-color: @pink;
|
||||||
|
}
|
||||||
|
#window {
|
||||||
|
background-color: @mauve;
|
||||||
|
}
|
||||||
|
#workspaces button {
|
||||||
|
background-color: @red;
|
||||||
|
}
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: @maroon;
|
||||||
|
}
|
||||||
|
#network {
|
||||||
|
background-color: @peach;
|
||||||
|
}
|
||||||
|
#cpu {
|
||||||
|
background-color: @yellow;
|
||||||
|
}
|
||||||
|
#memory {
|
||||||
|
background-color: @green;
|
||||||
|
}
|
||||||
|
#temperature {
|
||||||
|
background-color: @teal;
|
||||||
|
}
|
||||||
|
#clock {
|
||||||
|
background-color: @sky;
|
||||||
|
}
|
||||||
|
#tray {
|
||||||
|
background-color: @sapphire;
|
||||||
|
}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
modules.hyprland.autostart.immediate = let
|
|
||||||
waybar-reload = pkgs.writeScript "waybar-reload" ''
|
|
||||||
#! ${pkgs.bash}/bin/bash
|
|
||||||
|
|
||||||
trap "${pkgs.procps}/bin/pkill waybar" EXIT
|
|
||||||
|
|
||||||
while true; do
|
|
||||||
${pkgs.waybar}/bin/waybar -c $HOME/NixFlake/config/waybar/config.json -s $HOME/NixFlake/config/waybar/style.css &
|
|
||||||
${pkgs.inotifyTools}/bin/inotifywait -e create,modify $HOME/NixFlake/config/waybar/config.json $HOME/NixFlake/config/waybar/style.css
|
|
||||||
${pkgs.procps}/bin/pkill waybar
|
|
||||||
done
|
|
||||||
'';
|
|
||||||
in [
|
|
||||||
"${waybar-reload}"
|
|
||||||
];
|
|
||||||
|
|
||||||
home.file.".config/waybar/monitor.json".text = ''
|
|
||||||
{
|
|
||||||
"output": "${cfg.monitor}"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user