theming
This commit is contained in:
parent
448372de7a
commit
ffa3121602
11 changed files with 243 additions and 38 deletions
|
@ -9,6 +9,7 @@
|
|||
../common/fuzzel.nix
|
||||
../common/wob.nix
|
||||
../common/wl-clipboard.nix
|
||||
./waybar.nix
|
||||
];
|
||||
|
||||
services.cliphist = {
|
||||
|
@ -58,12 +59,7 @@
|
|||
input = {
|
||||
"*".xkb_layout = osConfig.services.xserver.xkb.layout;
|
||||
};
|
||||
bars = [
|
||||
{
|
||||
workspaceNumbers = false;
|
||||
statusCommand = "${lib.getExe pkgs.i3status}";
|
||||
}
|
||||
];
|
||||
bars = []; # i use waybar instead
|
||||
window = {
|
||||
titlebar = false;
|
||||
};
|
||||
|
|
16
home/programs/desktop/sway/waybar-workspace.patch
Normal file
16
home/programs/desktop/sway/waybar-workspace.patch
Normal file
|
@ -0,0 +1,16 @@
|
|||
diff --git a/src/modules/sway/workspaces.cpp b/src/modules/sway/workspaces.cpp
|
||||
index 8f273300..faed503c 100644
|
||||
--- a/src/modules/sway/workspaces.cpp
|
||||
+++ b/src/modules/sway/workspaces.cpp
|
||||
@@ -343,9 +343,9 @@ auto Workspaces::update() -> void {
|
||||
fmt::arg("output", (*it)["output"].asString()));
|
||||
}
|
||||
if (!config_["disable-markup"].asBool()) {
|
||||
- static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(output);
|
||||
+ static_cast<Gtk::Label *>(button.get_children()[0])->set_markup(trimWorkspaceName(output));
|
||||
} else {
|
||||
- button.set_label(output);
|
||||
+ button.set_label(trimWorkspaceName(output));
|
||||
}
|
||||
onButtonReady(*it, button);
|
||||
}
|
62
home/programs/desktop/sway/waybar.nix
Normal file
62
home/programs/desktop/sway/waybar.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{pkgs, ...}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (final: prev: {
|
||||
patches = prev.patches ++ [./waybar-workspace.patch];
|
||||
});
|
||||
settings = [
|
||||
{
|
||||
height = 24;
|
||||
spacing = 4;
|
||||
position = "top";
|
||||
modules-left = [
|
||||
"sway/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
"sway/window"
|
||||
];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"clock"
|
||||
];
|
||||
"sway/workspaces" = {
|
||||
format = "{icon}";
|
||||
};
|
||||
clock = {
|
||||
format = "{:%a %H:%M}";
|
||||
tooltip-format = "<big>{:%a %Y-%m-%d %H:%M}</big>\n<small>{calendar}</small>";
|
||||
};
|
||||
}
|
||||
];
|
||||
style = ''
|
||||
* {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
button {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#workspaces button.visible {
|
||||
box-shadow: inset 0 -3px black;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
box-shadow: inset 0 -3px blue;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding: 0 10px;
|
||||
}
|
||||
'';
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-session.target";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue