yep, more dotfiles

replace swaybar with waybar

wiro.world 075751f4 aecf3ad7

verified
Changed files
+189 -4
home-manager
+1
home-manager/fragments/default.nix
···
./thunderbird.nix
./tools.nix
./vscodium.nix
+
./waybar.nix
./xdg-mime.nix
./zellij
];
-2
home-manager/fragments/sway.nix
···
inherit (self.outputs) homeManagerModules;
cfg = config.local.fragment.sway;
-
-
theme = config.lib.stylix.colors;
cfg-sway = config.wayland.windowManager.sway.config;
workspacesRange = lib.zipListsWith (key-idx: workspace-idx: { inherit key-idx workspace-idx; }) [ 1 2 3 4 5 6 7 8 9 0 ] (lib.range 1 10);
+6 -2
home-manager/fragments/swaybar.nix
···
}:
let
-
cfg = config.local.fragment.sway;
+
cfg = config.local.fragment.swaybar;
integrated-keyboard-id = "1:1:AT_Translated_Set_2_keyboard";
integrated-keyboard-id-bis = "1:1:kanata";
···
swaymsg = lib.getExe' pkgs.sway "swaymsg";
in
{
+
options.local.fragment.swaybar.enable = lib.mkEnableOption ''
+
Swaybar related
+
'';
+
config = lib.mkIf cfg.enable {
programs.i3status-rust = {
enable = true;
···
icons = "awesome6";
settings.icon_format = " <span font_family='FontAwesome6'>{icon}</span> ";
-
+
blocks = [
{
block = "custom";
+181
home-manager/fragments/waybar.nix
···
+
{ config
+
, lib
+
, pkgs
+
, ...
+
}:
+
+
let
+
cfg = config.local.fragment.waybar;
+
+
integrated-keyboard-id = "1:1:AT_Translated_Set_2_keyboard";
+
integrated-keyboard-id-bis = "1:1:kanata";
+
+
swaymsg = lib.getExe' pkgs.sway "swaymsg";
+
in
+
{
+
options.local.fragment.waybar.enable = lib.mkEnableOption ''
+
Waybar related
+
'';
+
+
config = lib.mkIf cfg.enable {
+
stylix.targets.waybar = {
+
font = "sansSerif";
+
+
backgound = "alpha(white, 0)";
+
+
# addCss = true;
+
# enableCenterBackColors = true;
+
# enableRightBackColors = true;
+
};
+
+
programs.waybar = {
+
enable = true;
+
+
settings.main = {
+
mode = "hide";
+
ipc = true;
+
position = "bottom";
+
+
modules-left = [
+
"sway/workspaces"
+
"sway/mode"
+
];
+
+
modules-center = [ ];
+
+
modules-right = [
+
"pulseaudio"
+
"sway/language"
+
"battery"
+
"clock"
+
"tray"
+
];
+
+
"sway/workspaces" = {
+
disable-scroll = true;
+
format = "{name}:{icon}";
+
format-icons = {
+
default = "";
+
+
"1" = "";
+
"2" = "";
+
"3" = "";
+
"4" = "";
+
"10" = "";
+
};
+
};
+
+
tray.spacing = 10;
+
+
clock = {
+
# format = "";
+
tooltip-format = ''
+
<big>{:%Y %B}</big>
+
<tt><small>{calendar}</small></tt>
+
'';
+
};
+
+
battery = {
+
states = {
+
good = 95;
+
warning = 30;
+
critical = 15;
+
};
+
format = "{capacity}% {icon}";
+
format-full = "{capacity}% {icon}";
+
format-charging = "{capacity}% ";
+
format-plugged = "{capacity}% ";
+
format-icons = [ "" "" "" "" "" ];
+
};
+
+
pulseaudio = {
+
scroll-step = 5;
+
+
format = "{volume}% {icon} {format_source}";
+
format-bluetooth = "{volume}% {icon} {format_source}";
+
format-bluetooth-muted = " {icon} {format_source}";
+
format-muted = " {format_source}";
+
format-source = "{volume}% ";
+
format-source-muted = "";
+
format-icons = {
+
headset = "";
+
headphone = "";
+
hands-free = "";
+
phone = "";
+
portable = "";
+
car = "";
+
default = [ "" "" "" ];
+
};
+
on-click = "pavucontrol";
+
};
+
};
+
+
style = ''
+
/* Apply transparency to the bar (handled above by Stylix) */
+
/* window { background: alpha(white, 0); } */
+
+
/* Apply margin to all module groups */
+
.modules-left,
+
.modules-center,
+
.modules-right {
+
margin: .5rem .8rem;
+
}
+
+
/* Apply padding to all modules */
+
.modules-right widget .module {
+
padding: 0 1rem;
+
}
+
+
/* Round first and last child of right modules */
+
.modules-right widget:first-child .module {
+
border-top-left-radius: 5px;
+
border-bottom-left-radius: 5px;
+
}
+
.modules-right widget:last-child .module {
+
border-top-right-radius: 5px;
+
border-bottom-right-radius: 5px;
+
}
+
+
/* Create a distinction between the tray and the other modules. The tray is supposedly in the last place */
+
.modules-right widget:nth-last-child(2) .module {
+
border-top-right-radius: 5px;
+
border-bottom-right-radius: 5px;
+
}
+
.modules-right widget:nth-last-child(1) .module {
+
/* tray background color */
+
background-color: @base03;
+
+
margin-left: 1rem;
+
border-radius: 5px;
+
}
+
+
/* Round first and last child of left modules */
+
#workspaces button:first-child {
+
border-top-left-radius: 5px;
+
border-bottom-left-radius: 5px;
+
}
+
#workspaces button:last-child {
+
border-top-right-radius: 5px;
+
border-bottom-right-radius: 5px;
+
}
+
+
#workspaces button {
+
color: @base07;
+
background-color: @base03;
+
}
+
#workspaces button:hover {
+
color: @base07;
+
background-color: @base03;
+
}
+
'';
+
};
+
+
wayland.windowManager.sway.config.bars = [{
+
command = lib.getExe pkgs.waybar;
+
+
mode = "hide";
+
hiddenState = "hide";
+
}];
+
};
+
}
+
+1
home-manager/profiles/desktop.nix
···
thunderbird.enable = true;
tools.enable = true;
vscodium.enable = true;
+
waybar.enable = true;
xdg-mime.enable = true;
zellij.enable = true;
};