mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 05:18:12 +09:00
vicinae
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -19,115 +18,6 @@ let
|
|||||||
rev = "cc3256f4aaf2c8e7d16fb000b1ee251af54085db";
|
rev = "cc3256f4aaf2c8e7d16fb000b1ee251af54085db";
|
||||||
hash = "sha256-emQ/FqKqMq3YI5bLx8gBZg/ZE72OG9Ilh71ggq78WdQ=";
|
hash = "sha256-emQ/FqKqMq3YI5bLx8gBZg/ZE72OG9Ilh71ggq78WdQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemWidgets = [
|
|
||||||
"network"
|
|
||||||
"bluetooth"
|
|
||||||
"network-connection"
|
|
||||||
"spacer"
|
|
||||||
"cpu"
|
|
||||||
"cpu-graph"
|
|
||||||
"ram"
|
|
||||||
];
|
|
||||||
labwcSystemWidgets = [
|
|
||||||
"network"
|
|
||||||
"bluetooth"
|
|
||||||
"network-connection"
|
|
||||||
"spacer"
|
|
||||||
"cpu"
|
|
||||||
"ram"
|
|
||||||
];
|
|
||||||
centerWidgets = [
|
|
||||||
"app-launcher"
|
|
||||||
"workspaces"
|
|
||||||
];
|
|
||||||
endWidgets = [
|
|
||||||
"notifications"
|
|
||||||
"tray"
|
|
||||||
"spacer"
|
|
||||||
"battery"
|
|
||||||
"input-volume"
|
|
||||||
"output-volume"
|
|
||||||
"privacy"
|
|
||||||
"brightness"
|
|
||||||
"clock"
|
|
||||||
"control-center"
|
|
||||||
];
|
|
||||||
|
|
||||||
labwcSettings = lib.recursiveUpdate config.programs.noctalia.settings {
|
|
||||||
bar.main = {
|
|
||||||
position = "bottom";
|
|
||||||
thickness = 51;
|
|
||||||
margin_ends = 0;
|
|
||||||
start = [ "taskbar" ];
|
|
||||||
center = centerWidgets;
|
|
||||||
end =
|
|
||||||
labwcSystemWidgets
|
|
||||||
++ [
|
|
||||||
"moons/codexbar-usage:usage"
|
|
||||||
"spacer"
|
|
||||||
]
|
|
||||||
++ endWidgets;
|
|
||||||
};
|
|
||||||
|
|
||||||
dock = {
|
|
||||||
enabled = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
widget = {
|
|
||||||
network.show_label = false;
|
|
||||||
taskbar = {
|
|
||||||
type = "taskbar";
|
|
||||||
scale = 1.5;
|
|
||||||
pinned = [
|
|
||||||
"org.gnome.Nautilus"
|
|
||||||
"org.gnome.TextEditor"
|
|
||||||
"com.mitchellh.ghostty"
|
|
||||||
"google-chrome"
|
|
||||||
"code"
|
|
||||||
"dev.zed.Zed"
|
|
||||||
"codex"
|
|
||||||
"vesktop"
|
|
||||||
];
|
|
||||||
show_all_outputs = true;
|
|
||||||
group_by_workspace = false;
|
|
||||||
show_window_title = false;
|
|
||||||
pinned_opacity = 0.60;
|
|
||||||
inactive_opacity = 1.0;
|
|
||||||
};
|
|
||||||
input-volume.show_label = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
labwcRawConfig = (pkgs.formats.toml { }).generate "noctalia-labwc-config.toml" labwcSettings;
|
|
||||||
labwcConfig = pkgs.runCommand "noctalia-labwc-config" { } ''
|
|
||||||
${lib.getExe config.programs.noctalia.package} config validate ${labwcRawConfig}
|
|
||||||
cp ${labwcRawConfig} $out
|
|
||||||
'';
|
|
||||||
|
|
||||||
mkSessionService = target: environment: {
|
|
||||||
Unit = {
|
|
||||||
Description = "Noctalia Wayland desktop shell";
|
|
||||||
Documentation = [ "https://docs.noctalia.dev/" ];
|
|
||||||
PartOf = [ target ];
|
|
||||||
After = [ target ];
|
|
||||||
};
|
|
||||||
|
|
||||||
Service = {
|
|
||||||
ExecStart = lib.getExe config.programs.noctalia.package;
|
|
||||||
Restart = "on-failure";
|
|
||||||
# A compositor restart closes Noctalia's Wayland connection. Back off
|
|
||||||
# long enough for labwc's session target to be stopped and recreated,
|
|
||||||
# instead of exhausting systemd's start limit before the new Wayland
|
|
||||||
# socket is available.
|
|
||||||
RestartSec = 5;
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs (environment != [ ]) {
|
|
||||||
Environment = environment;
|
|
||||||
};
|
|
||||||
|
|
||||||
Install.WantedBy = [ target ];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
@@ -151,8 +41,7 @@ in
|
|||||||
programs.noctalia = {
|
programs.noctalia = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Session-specific services below let labwc select its own config home.
|
systemd.enable = true;
|
||||||
systemd.enable = false;
|
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
theme = {
|
theme = {
|
||||||
@@ -178,14 +67,35 @@ in
|
|||||||
bar.main = {
|
bar.main = {
|
||||||
margin_ends = 15;
|
margin_ends = 15;
|
||||||
position = "top";
|
position = "top";
|
||||||
start = systemWidgets;
|
start = [
|
||||||
center = centerWidgets;
|
"network"
|
||||||
|
"bluetooth"
|
||||||
|
"network-connection"
|
||||||
|
"spacer"
|
||||||
|
"cpu"
|
||||||
|
"cpu-graph"
|
||||||
|
"ram"
|
||||||
|
"spacer"
|
||||||
|
"taskbar"
|
||||||
|
];
|
||||||
|
center = [
|
||||||
|
"app-launcher"
|
||||||
|
"workspaces"
|
||||||
|
];
|
||||||
end = [
|
end = [
|
||||||
"media"
|
|
||||||
"moons/codexbar-usage:usage"
|
"moons/codexbar-usage:usage"
|
||||||
"spacer"
|
"spacer"
|
||||||
]
|
"notifications"
|
||||||
++ endWidgets;
|
"tray"
|
||||||
|
"spacer"
|
||||||
|
"battery"
|
||||||
|
"input-volume"
|
||||||
|
"output-volume"
|
||||||
|
"privacy"
|
||||||
|
"brightness"
|
||||||
|
"clock"
|
||||||
|
"control-center"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = {
|
plugins = {
|
||||||
@@ -196,7 +106,7 @@ in
|
|||||||
app-launcher = {
|
app-launcher = {
|
||||||
type = "custom_button";
|
type = "custom_button";
|
||||||
glyph = "apps";
|
glyph = "apps";
|
||||||
command = "vicinae toggle";
|
actions.left = "vicinae toggle";
|
||||||
tooltip = "Applications";
|
tooltip = "Applications";
|
||||||
};
|
};
|
||||||
cpu = {
|
cpu = {
|
||||||
@@ -229,6 +139,7 @@ in
|
|||||||
input-volume = {
|
input-volume = {
|
||||||
type = "volume";
|
type = "volume";
|
||||||
device = "input";
|
device = "input";
|
||||||
|
show_label = false;
|
||||||
};
|
};
|
||||||
output-volume = {
|
output-volume = {
|
||||||
type = "volume";
|
type = "volume";
|
||||||
@@ -243,7 +154,7 @@ in
|
|||||||
network-connection = {
|
network-connection = {
|
||||||
type = "custom_button";
|
type = "custom_button";
|
||||||
glyph = "access-point";
|
glyph = "access-point";
|
||||||
command = "nm-connection-editor";
|
actions.left = "nm-connection-editor";
|
||||||
};
|
};
|
||||||
tray = {
|
tray = {
|
||||||
type = "tray";
|
type = "tray";
|
||||||
@@ -253,6 +164,25 @@ in
|
|||||||
type = "workspaces";
|
type = "workspaces";
|
||||||
hide_when_empty = true;
|
hide_when_empty = true;
|
||||||
};
|
};
|
||||||
|
taskbar = {
|
||||||
|
type = "taskbar";
|
||||||
|
scale = 1;
|
||||||
|
pinned = [
|
||||||
|
"org.gnome.Nautilus"
|
||||||
|
"org.gnome.TextEditor"
|
||||||
|
"com.mitchellh.ghostty"
|
||||||
|
"google-chrome"
|
||||||
|
"code"
|
||||||
|
"dev.zed.Zed"
|
||||||
|
"codex-desktop.desktop"
|
||||||
|
"vesktop"
|
||||||
|
];
|
||||||
|
show_all_outputs = true;
|
||||||
|
group_by_workspace = false;
|
||||||
|
show_window_title = false;
|
||||||
|
pinned_opacity = 0.60;
|
||||||
|
inactive_opacity = 1.0;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
shell = {
|
shell = {
|
||||||
@@ -299,16 +229,4 @@ in
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services =
|
|
||||||
lib.optionalAttrs config.my.applications.niri.enable {
|
|
||||||
noctalia-niri = mkSessionService "niri.service" [ ];
|
|
||||||
}
|
|
||||||
// lib.optionalAttrs config.my.applications.labwc.enable {
|
|
||||||
noctalia-labwc = mkSessionService "labwc-session.target" [
|
|
||||||
"NOCTALIA_CONFIG_HOME=%h/.config/noctalia-labwc"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile."noctalia-labwc/noctalia/config.toml".source = labwcConfig;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
_: {
|
||||||
|
homebrew.casks = [ "vicinae" ];
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
_: {
|
_: {
|
||||||
programs.vicinae = {
|
programs.vicinae = {
|
||||||
|
package = null;
|
||||||
|
|
||||||
launchd = {
|
launchd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ let
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.vicinae = {
|
programs.vicinae = {
|
||||||
|
|
||||||
|
package = pkgs.vicinae;
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user