mirror of
https://git.sr.ht/~neverness/ultima
synced 2025-05-13 05:55:16 +00:00
waybar icons separate
This commit is contained in:
parent
72803dedce
commit
cd29fa3580
5 changed files with 190 additions and 200 deletions
machines
modules/home/wm/misc/waybar
|
@ -25,6 +25,7 @@ in
|
|||
};
|
||||
gui = {
|
||||
chromium = on;
|
||||
keepass = on;
|
||||
minecraft = off;
|
||||
mpv = on;
|
||||
obs = off;
|
||||
|
|
|
@ -13,9 +13,6 @@ in
|
|||
libreoffice-fresh
|
||||
komikku
|
||||
|
||||
gnome-secrets
|
||||
keepassxc
|
||||
|
||||
wineWow64Packages.stagingFull
|
||||
mindustry-wayland
|
||||
srb2
|
||||
|
|
|
@ -5,10 +5,7 @@ in
|
|||
{
|
||||
imports = umport {
|
||||
path = ./.;
|
||||
exclude = [
|
||||
./default.nix
|
||||
./pkgs
|
||||
];
|
||||
exclude = [ ./default.nix ];
|
||||
};
|
||||
module = {
|
||||
programs = {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
x,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
|
@ -8,8 +7,8 @@
|
|||
with lib;
|
||||
with x;
|
||||
let
|
||||
inherit (pkgs) libnotify;
|
||||
cfg = config.module.wm.misc.waybar;
|
||||
inherit (config.lib.stylix.colors) base0C;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
|
@ -19,203 +18,161 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.waybar =
|
||||
with config.lib.stylix.colors;
|
||||
on
|
||||
// {
|
||||
style = import ./style.nix { inherit config; };
|
||||
settings = {
|
||||
mainBar =
|
||||
let
|
||||
Tool = {
|
||||
tooltip = false;
|
||||
};
|
||||
wm_icons = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
"7" = "七";
|
||||
"8" = "八";
|
||||
"9" = "九";
|
||||
"10" = "十";
|
||||
};
|
||||
bat_icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
light_icons = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
in
|
||||
{
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
height = 1;
|
||||
modules-left = [
|
||||
"custom/separator"
|
||||
"custom/launcher"
|
||||
"custom/separator"
|
||||
"pulseaudio"
|
||||
"custom/separator"
|
||||
"backlight"
|
||||
"custom/separator"
|
||||
"network"
|
||||
"custom/separator"
|
||||
];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"custom/separator"
|
||||
"tray"
|
||||
"custom/separator"
|
||||
"hyprland/language"
|
||||
"custom/separator"
|
||||
"clock#date"
|
||||
"custom/separator"
|
||||
"clock#time"
|
||||
"custom/separator"
|
||||
"battery"
|
||||
"custom/separator"
|
||||
];
|
||||
"custom/separator" = Tool // {
|
||||
format = " ";
|
||||
};
|
||||
programs.waybar = on // {
|
||||
style = import ./style.nix { inherit config; };
|
||||
settings = {
|
||||
mainBar =
|
||||
let
|
||||
ico = import ./icons;
|
||||
Tool.tooltip = false;
|
||||
wm_icons = ico.wm;
|
||||
bat_icons = ico.bat;
|
||||
light_icons = ico.light;
|
||||
in
|
||||
{
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
height = 1;
|
||||
modules-left = [
|
||||
"custom/separator"
|
||||
"custom/launcher"
|
||||
"custom/separator"
|
||||
"pulseaudio"
|
||||
"custom/separator"
|
||||
"backlight"
|
||||
"custom/separator"
|
||||
"network"
|
||||
"custom/separator"
|
||||
];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"custom/separator"
|
||||
"tray"
|
||||
"custom/separator"
|
||||
"hyprland/language"
|
||||
"custom/separator"
|
||||
"clock#date"
|
||||
"custom/separator"
|
||||
"clock#time"
|
||||
"custom/separator"
|
||||
"battery"
|
||||
"custom/separator"
|
||||
];
|
||||
"custom/separator" = Tool // {
|
||||
format = " ";
|
||||
};
|
||||
|
||||
# left modules
|
||||
"custom/launcher" = Tool // {
|
||||
format = "<span color='#${base0C}' font='17'></span> {}";
|
||||
on-click = ''tofi-drun -c ~/.config/tofi/horizontal | xargs hyprctl dispatch exec -- '';
|
||||
on-click-right = "tofi-drun | xargs hyprctl dispatch exec -- ";
|
||||
};
|
||||
"pulseaudio" = Tool // {
|
||||
format = "{icon} {volume}%";
|
||||
format-icons = {
|
||||
default = [
|
||||
""
|
||||
" "
|
||||
" "
|
||||
];
|
||||
headphone = [ "" ];
|
||||
headset = [ "" ];
|
||||
};
|
||||
format-muted = " muted";
|
||||
scroll-step = 3;
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
"backlight" = Tool // {
|
||||
device = "intel_backlight";
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = light_icons;
|
||||
scroll-step = 1;
|
||||
on-click = ''light -S 70'';
|
||||
on-click-right = ''light -S 100'';
|
||||
};
|
||||
"network" = Tool // {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
# left modules
|
||||
"custom/launcher" = Tool // {
|
||||
format = "<span color='#${base0C}' font='17'></span> {}";
|
||||
on-click = ''tofi-drun -c ~/.config/tofi/horizontal | xargs hyprctl dispatch exec -- '';
|
||||
on-click-right = "tofi-drun | xargs hyprctl dispatch exec -- ";
|
||||
};
|
||||
"pulseaudio" = Tool // {
|
||||
format = "{icon} {volume}%";
|
||||
format-icons = {
|
||||
default = [
|
||||
""
|
||||
" "
|
||||
" "
|
||||
];
|
||||
format-wifi = "{icon} CON";
|
||||
format-ethernet = " ETH";
|
||||
format-disconnected = "⚠ ERR";
|
||||
on-click = "kitty nmtui";
|
||||
interval = 5;
|
||||
headphone = [ "" ];
|
||||
headset = [ "" ];
|
||||
};
|
||||
format-muted = " muted";
|
||||
scroll-step = 3;
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
on-click-right = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
};
|
||||
"backlight" = Tool // {
|
||||
device = "intel_backlight";
|
||||
format = "{icon} {percent}%";
|
||||
format-icons = light_icons;
|
||||
scroll-step = 1;
|
||||
on-click = ''light -S 70'';
|
||||
on-click-right = ''light -S 100'';
|
||||
};
|
||||
"network" = Tool // {
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
format-wifi = "{icon} CON";
|
||||
format-ethernet = " ETH";
|
||||
format-disconnected = "⚠️ ERR";
|
||||
on-click = "kitty nmtui";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
# center modules
|
||||
"hyprland/workspaces" = Tool // {
|
||||
disable-scroll = false;
|
||||
on-click = "activate";
|
||||
format = "{icon}";
|
||||
format-icons = wm_icons;
|
||||
persistent-workspaces."*" = [
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
];
|
||||
};
|
||||
"sway/workspaces" = Tool // {
|
||||
disable-scroll = false;
|
||||
on-click = "activate";
|
||||
format = "{icon}";
|
||||
format-icons = wm_icons;
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
"6" = [ ];
|
||||
"7" = [ ];
|
||||
};
|
||||
};
|
||||
|
||||
# right modules
|
||||
"tray" = Tool // {
|
||||
icon-size = 18;
|
||||
show-passive-items = true;
|
||||
spacing = 8;
|
||||
};
|
||||
"hyprland/language" =
|
||||
let
|
||||
keyboard = "at-translated-set-2-keyboard";
|
||||
in
|
||||
Tool
|
||||
// {
|
||||
format = "{} ";
|
||||
format-en = "EN";
|
||||
format-ru = "RU";
|
||||
keyboard-name = keyboard;
|
||||
on-click = "hyprctl switchxkblayout ${keyboard} next";
|
||||
};
|
||||
"clock#date" = Tool // {
|
||||
format = "{:%e.%m} ";
|
||||
interval = 1;
|
||||
};
|
||||
"clock#time" = Tool // {
|
||||
format = "{:%H:%M} ";
|
||||
interval = 1;
|
||||
};
|
||||
"battery" = Tool // {
|
||||
format = "{capacity}% {icon}";
|
||||
format-alt = "{time} {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-charging-alt = "{capacity}% ";
|
||||
format-icons = bat_icons;
|
||||
states = {
|
||||
critical = 15;
|
||||
warning = 30;
|
||||
};
|
||||
# center modules
|
||||
"hyprland/workspaces" = Tool // {
|
||||
disable-scroll = false;
|
||||
on-click = "activate";
|
||||
format = "{icon}";
|
||||
format-icons = wm_icons;
|
||||
persistent-workspaces."*" = [
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
];
|
||||
};
|
||||
"sway/workspaces" = Tool // {
|
||||
disable-scroll = false;
|
||||
on-click = "activate";
|
||||
format = "{icon}";
|
||||
format-icons = wm_icons;
|
||||
persistent-workspaces = {
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
"6" = [ ];
|
||||
"7" = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
# right modules
|
||||
"tray" = Tool // {
|
||||
icon-size = 18;
|
||||
show-passive-items = true;
|
||||
spacing = 8;
|
||||
};
|
||||
"hyprland/language" = Tool // rec {
|
||||
format = "{} ";
|
||||
format-en = "EN";
|
||||
format-ru = "RU";
|
||||
keyboard-name = "at-translated-set-2-keyboard";
|
||||
on-click = "hyprctl switchxkblayout ${keyboard-name} next";
|
||||
};
|
||||
"clock#date" = Tool // {
|
||||
format = "{:%d.%m} ";
|
||||
interval = 1;
|
||||
};
|
||||
"clock#time" = Tool // {
|
||||
format = "{:%H:%M} ";
|
||||
interval = 1;
|
||||
};
|
||||
"battery" = Tool // {
|
||||
format = "{capacity}% {icon}";
|
||||
format-alt = "{time} {icon}";
|
||||
format-charging = "{capacity}% ";
|
||||
format-charging-alt = "{capacity}% ";
|
||||
format-full = "{capacity}% ";
|
||||
format-icons = bat_icons;
|
||||
states = {
|
||||
critical = 15;
|
||||
warning = 30;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
38
modules/home/wm/misc/waybar/icons/default.nix
Normal file
38
modules/home/wm/misc/waybar/icons/default.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
wm = {
|
||||
"1" = "一";
|
||||
"2" = "二";
|
||||
"3" = "三";
|
||||
"4" = "四";
|
||||
"5" = "五";
|
||||
"6" = "六";
|
||||
"7" = "七";
|
||||
"8" = "八";
|
||||
"9" = "九";
|
||||
"10" = "十";
|
||||
};
|
||||
bat = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
light = [
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
" "
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue