Compare commits
1 Commits
bba55dc973
...
main
Author | SHA1 | Date | |
---|---|---|---|
c0d1341448
|
@ -7,7 +7,7 @@
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkDefault mkForce getExe;
|
||||
inherit (lib) mkIf mkEnableOption mkForce getExe;
|
||||
inherit (osConfig.networking) hostName;
|
||||
|
||||
cfg = config.desktop.niri;
|
||||
@ -131,7 +131,7 @@ in {
|
||||
};
|
||||
targets.tray.Unit.Description = "Home Manager System Tray"; # workaround for udiskie
|
||||
services = let
|
||||
mkGraphicalService = config: graphicalService // config;
|
||||
mkGraphicalService = config: lib.attrsets.recursiveUpdate graphicalService config;
|
||||
graphicalService = {
|
||||
Install.WantedBy = ["niri.service"];
|
||||
Unit = {
|
||||
@ -148,33 +148,25 @@ in {
|
||||
in
|
||||
lib.mkMerge [
|
||||
{
|
||||
udiskie = mkGraphicalService {};
|
||||
waybar = mkGraphicalService {};
|
||||
copyq = mkGraphicalService {Service.Environment = mkForce "QT_QPA_PLATFORM=wayland";};
|
||||
network-manager-applet = mkGraphicalService {};
|
||||
copyq = mkGraphicalService {
|
||||
Service =
|
||||
graphicalService.Service
|
||||
udiskie = mkGraphicalService {};
|
||||
walker = mkGraphicalService {};
|
||||
waybar = mkGraphicalService {};
|
||||
wpaperd =
|
||||
mkGraphicalService {}
|
||||
// {
|
||||
Environment = mkForce "QT_QPA_PLATFORM=wayland";
|
||||
};
|
||||
Service.TimeoutStopSec = mkForce "1";
|
||||
Service.Restart = mkForce "always";
|
||||
};
|
||||
xwayland-satellite = mkGraphicalService {
|
||||
Service =
|
||||
graphicalService.Service
|
||||
// {
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = getExe pkgs.xwayland-satellite + " :123";
|
||||
};
|
||||
};
|
||||
wpaperd = mkGraphicalService {
|
||||
Service =
|
||||
mkDefault graphicalService.Service;
|
||||
};
|
||||
walker = mkGraphicalService {};
|
||||
# gnome-polkit-agent = mkGraphicalService {
|
||||
# Service =
|
||||
# graphicalService.Service
|
||||
# // {
|
||||
# Service = {
|
||||
# Type = "simple";
|
||||
# ExecStart = pkgs.polkit_gnome + "/libexec/polkit-gnome-authentication-agent-1";
|
||||
# };
|
||||
@ -182,9 +174,7 @@ in {
|
||||
}
|
||||
(lib.mkIf (hostName == "morphius") {
|
||||
lisgd = mkGraphicalService {
|
||||
Service =
|
||||
graphicalService.Service
|
||||
// {
|
||||
Service = {
|
||||
# Group = "input";
|
||||
Type = "simple";
|
||||
ExecStart =
|
||||
|
@ -6,44 +6,30 @@
|
||||
launcher,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf getExe;
|
||||
inherit (config.lib.stylix) colors;
|
||||
inherit (osConfig.networking) hostName;
|
||||
|
||||
ifLaptop = mkIf (hostName != "dunamis");
|
||||
ifLaptop = lib.mkIf (osConfig.networking.hostName != "dunamis");
|
||||
in {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
settings.bar-0 = {
|
||||
# layer = "top";
|
||||
settings.bottom = {
|
||||
position = "bottom";
|
||||
height = 33;
|
||||
spacing = 0;
|
||||
# margin-left = 3;
|
||||
# margin-right = 3;
|
||||
margin-left = 36 + 3;
|
||||
margin-right = 36 + 3;
|
||||
margin-bottom = 3;
|
||||
# margin-left = 36 + 3;
|
||||
# margin-right = 36 + 3;
|
||||
# margin-bottom = 3;
|
||||
modules-left = [
|
||||
"custom/launcher"
|
||||
"clock"
|
||||
"wlr/taskbar"
|
||||
"privacy"
|
||||
];
|
||||
modules-center = [
|
||||
# "clock"
|
||||
"niri/language"
|
||||
"niri/workspaces"
|
||||
"idle_inhibitor"
|
||||
# "privacy"
|
||||
];
|
||||
modules-right = [
|
||||
"wireplumber"
|
||||
(ifLaptop "group/laptop")
|
||||
"tray"
|
||||
"custom/notification"
|
||||
"niri/workspaces"
|
||||
"niri/language"
|
||||
];
|
||||
"niri/workspaces" = {
|
||||
format = "{index}";
|
||||
@ -61,7 +47,7 @@ in {
|
||||
"power-profiles-daemon"
|
||||
];
|
||||
};
|
||||
"backlight" = {
|
||||
backlight = {
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
@ -73,18 +59,18 @@ in {
|
||||
""
|
||||
];
|
||||
};
|
||||
"idle_inhibitor" = {
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
"tray" = {
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 6;
|
||||
};
|
||||
"clock" = {
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%R}";
|
||||
tooltip = true;
|
||||
@ -103,25 +89,29 @@ in {
|
||||
format-alt = "{icon} {time}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
mpris = {
|
||||
format = "{player_icon} {dynamic}";
|
||||
format-paused = "{status_icon} <i>{dynamic}</i>";
|
||||
playing-len = 30;
|
||||
playing-paused = 30;
|
||||
player-icons = {
|
||||
default = "▶";
|
||||
mpv = "🎵";
|
||||
memory = {
|
||||
format = "{used:0.1f}G ";
|
||||
tooltip-format = ''
|
||||
RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%)
|
||||
Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)'';
|
||||
};
|
||||
status-icons = {paused = "⏸";};
|
||||
network = {
|
||||
format = "{bandwidthDownBits} | {bandwidthUpBits} ";
|
||||
interval = 3;
|
||||
tooltip = false;
|
||||
};
|
||||
"upower" = {
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
interval = 3;
|
||||
};
|
||||
upower = {
|
||||
icon-size = 16;
|
||||
format = "{percentage}";
|
||||
hide-if-empty = true;
|
||||
tooltip = true;
|
||||
tooltip-spacing = 20;
|
||||
};
|
||||
"power-profiles-daemon" = {
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
@ -132,12 +122,12 @@ in {
|
||||
power-saver = "";
|
||||
};
|
||||
};
|
||||
"wireplumber" = {
|
||||
wireplumber = {
|
||||
scroll-step = 3;
|
||||
format = "{volume}% {icon}";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
on-click = getExe pkgs.pwvucontrol;
|
||||
on-click = lib.getExe pkgs.pwvucontrol;
|
||||
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||
};
|
||||
"custom/launcher" = {
|
||||
@ -177,7 +167,172 @@ in {
|
||||
};
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon} {name}";
|
||||
icon-size = 16;
|
||||
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||||
tooltip-format = "{title}";
|
||||
on-click = "activate";
|
||||
};
|
||||
};
|
||||
settings.top = {
|
||||
position = "top";
|
||||
height = 33;
|
||||
spacing = 0;
|
||||
# margin-left = 36 + 3;
|
||||
# margin-right = 36 + 3;
|
||||
# margin-top = 3;
|
||||
modules-left = [
|
||||
"custom/notification"
|
||||
"tray"
|
||||
];
|
||||
modules-center = ["clock"];
|
||||
modules-right = [
|
||||
"privacy"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"wireplumber"
|
||||
(ifLaptop "group/laptop")
|
||||
# "tray"
|
||||
"idle_inhibitor"
|
||||
];
|
||||
"niri/workspaces" = {
|
||||
format = "{index}";
|
||||
};
|
||||
"niri/language" = {
|
||||
format = "{}";
|
||||
format-en = "🇺🇸";
|
||||
format-uk = "🇺🇦";
|
||||
};
|
||||
"group/laptop" = {
|
||||
orientation = "inherit";
|
||||
modules = [
|
||||
"backlight"
|
||||
"battery"
|
||||
"power-profiles-daemon"
|
||||
];
|
||||
};
|
||||
backlight = {
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "";
|
||||
deactivated = "";
|
||||
};
|
||||
};
|
||||
tray = {
|
||||
icon-size = 16;
|
||||
spacing = 6;
|
||||
};
|
||||
clock = {
|
||||
interval = 1;
|
||||
format = "{:%R}";
|
||||
tooltip = true;
|
||||
tooltip-format = "{:%B %d, %A}";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-full = "{capacity}% ";
|
||||
format-charging = "{capacity}% ";
|
||||
format-plugged = "{capacity}% ";
|
||||
format-alt = "{icon} {time}";
|
||||
format-icons = ["" "" "" "" "" "" "" "" "" ""];
|
||||
};
|
||||
memory = {
|
||||
format = "{used:0.1f}G ";
|
||||
tooltip-format = ''
|
||||
RAM: {used:0.1f}G/{total:0.1f}G ({percentage}%)
|
||||
Swap: {swapUsed:0.1f}G/{swapTotal:0.1f}G ({swapPercentage}%)'';
|
||||
};
|
||||
network = {
|
||||
format = "{bandwidthDownBits} | {bandwidthUpBits} ";
|
||||
interval = 3;
|
||||
tooltip = false;
|
||||
};
|
||||
cpu = {
|
||||
format = "{usage}% ";
|
||||
interval = 3;
|
||||
};
|
||||
upower = {
|
||||
icon-size = 16;
|
||||
format = "{percentage}";
|
||||
hide-if-empty = true;
|
||||
tooltip = true;
|
||||
tooltip-spacing = 20;
|
||||
};
|
||||
power-profiles-daemon = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}\nDriver: {driver}";
|
||||
tooltip = true;
|
||||
format-icons = {
|
||||
default = "";
|
||||
performance = "";
|
||||
balanced = "";
|
||||
power-saver = "";
|
||||
};
|
||||
};
|
||||
wireplumber = {
|
||||
scroll-step = 3;
|
||||
format = "{volume}% {icon}";
|
||||
format-muted = "";
|
||||
format-icons = ["" "" ""];
|
||||
on-click = lib.getExe pkgs.pwvucontrol;
|
||||
on-click-right = "wpctl set-mute @DEFAULT_SINK@ toggle";
|
||||
};
|
||||
"custom/launcher" = {
|
||||
format = "";
|
||||
on-click = launcher;
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = "";
|
||||
none = "";
|
||||
dnd-notification = "";
|
||||
dnd-none = "";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
"privacy" = {
|
||||
icon-spacing = 0;
|
||||
icon-size = 16;
|
||||
transition-duration = 250;
|
||||
screenshare = {
|
||||
type = "screenshare";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
};
|
||||
audio-in = {
|
||||
type = "audio-in";
|
||||
tooltip = true;
|
||||
tooltip-icon-size = 24;
|
||||
};
|
||||
};
|
||||
"wlr/taskbar" = {
|
||||
format = "{icon} {name}";
|
||||
icon-size = 18;
|
||||
icon-theme = "${config.dconf.settings."org/gnome/desktop/interface".icon-theme}";
|
||||
tooltip-format = "{title}";
|
||||
@ -185,8 +340,10 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: broken padding on taskbar button
|
||||
style = ''
|
||||
# TODO: figure out magic waybar css styling (does it pick up `~/.config/gtk-3.0/gtk.css` ?)
|
||||
style =
|
||||
# css
|
||||
''
|
||||
@define-color base00 #${colors.base00}; @define-color base08 #${colors.base08};
|
||||
@define-color base01 #${colors.base01}; @define-color base09 #${colors.base09};
|
||||
@define-color base02 #${colors.base02}; @define-color base0A #${colors.base0A};
|
||||
@ -197,11 +354,10 @@ in {
|
||||
@define-color base07 #${colors.base07}; @define-color base0F #${colors.base0F};
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
font-family: ${config.stylix.fonts.sansSerif.name}, Symbols Nerd Font, FontAwesome;
|
||||
/* all: unset; */
|
||||
font-family: Symbols Nerd Font, FontAwesome, ${config.stylix.fonts.sansSerif.name};
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
min-width: 1em;
|
||||
}
|
||||
|
||||
.modules-left, .modules-center, .modules-right, window#waybar {
|
||||
@ -210,6 +366,19 @@ in {
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* for leftmost modules */
|
||||
.modules-left, .modules-center, .modules-right {
|
||||
padding-left: 3px;
|
||||
background-color: @base00;
|
||||
color: @base05;
|
||||
}
|
||||
window#bottom.modules-center {
|
||||
background-color: transparent
|
||||
}
|
||||
tooltip {
|
||||
background: @base01;
|
||||
border: 1px solid @base0D;
|
||||
@ -234,29 +403,29 @@ in {
|
||||
#backlight,
|
||||
#battery,
|
||||
#clock,
|
||||
#cpu,
|
||||
#custom-launcher,
|
||||
#custom-notification,
|
||||
#idle_inhibitor,
|
||||
#language,
|
||||
#memory,
|
||||
#network,
|
||||
#power-profiles-daemon,
|
||||
#privacy,
|
||||
#privacy-item,
|
||||
#taskbar button,
|
||||
#taskbar,
|
||||
#tray button,
|
||||
#tray,
|
||||
#wireplumber,
|
||||
#workspaces button,
|
||||
#workspaces {
|
||||
all: unset;
|
||||
border-radius: 9px;
|
||||
background-color: @base01;
|
||||
margin: 3px 3px 3px 0;
|
||||
padding: 0 0.42em;
|
||||
}
|
||||
|
||||
/* #clock, */
|
||||
#custom-launcher,
|
||||
#language,
|
||||
#wireplumber {
|
||||
margin: 3px;
|
||||
min-width: 1em;
|
||||
}
|
||||
|
||||
#backlight,
|
||||
@ -268,6 +437,10 @@ in {
|
||||
#wireplumber {
|
||||
padding: 0 0.5em;
|
||||
}
|
||||
#custom-notification,
|
||||
#power-profiles-daemon {
|
||||
min-width: 1em;
|
||||
}
|
||||
|
||||
#privacy,
|
||||
#taskbar,
|
||||
@ -283,9 +456,14 @@ in {
|
||||
padding: 0 0.3em;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
padding-left: 0;
|
||||
}
|
||||
#taskbar button,
|
||||
#tray button,
|
||||
#workspaces button {
|
||||
border-radius: 6px;
|
||||
min-width: 0.4em;
|
||||
min-width: 0.8em;
|
||||
}
|
||||
|
||||
#battery.critical:not(.charging) {
|
||||
@ -315,6 +493,12 @@ in {
|
||||
margin: 3px 0 3px 3px;
|
||||
}
|
||||
|
||||
#taskbar button,
|
||||
#tray button {
|
||||
padding: 0 0.4em;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
#workspaces button.active,
|
||||
#taskbar button.active {
|
||||
background-color: @base02;
|
||||
@ -332,12 +516,6 @@ in {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#taskbar button,
|
||||
#tray button {
|
||||
min-width: 0.4em;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: @base08;
|
||||
|
@ -1,27 +1,26 @@
|
||||
{
|
||||
# perSystem,
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
lockscreen,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
lib.attrsets.recursiveUpdate {
|
||||
blueman-applet.enable = osConfig.services.blueman.enable;
|
||||
swaync = import ./swaync;
|
||||
copyq.enable = true;
|
||||
gammastep.enable = true;
|
||||
gnome-keyring.enable = true;
|
||||
hypridle.enable = true;
|
||||
kanshi = import ./kanshi;
|
||||
network-manager-applet.enable = true;
|
||||
playerctld.enable = true;
|
||||
swaync = import ./swaync;
|
||||
swayosd.enable = true;
|
||||
udiskie.enable = true;
|
||||
wpaperd.enable = true;
|
||||
copyq = {
|
||||
enable = true;
|
||||
# package = perSystem.nixpkgs-stable.copyq;
|
||||
};
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
components = ["secrets"];
|
||||
};
|
||||
}
|
||||
{
|
||||
gammastep = {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
latitude = 49.6;
|
||||
longitude = 36.1;
|
||||
@ -31,19 +30,8 @@
|
||||
night = 3000;
|
||||
};
|
||||
};
|
||||
swayosd = {
|
||||
enable = true;
|
||||
topMargin = 0.8;
|
||||
};
|
||||
udiskie = {
|
||||
enable = true;
|
||||
automount = false;
|
||||
notify = true;
|
||||
tray = "auto";
|
||||
};
|
||||
hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
gnome-keyring.components = ["secrets"];
|
||||
hypridle.settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
lock_cmd = "pidof ${lockscreen} || ${lockscreen}";
|
||||
@ -60,5 +48,10 @@
|
||||
}
|
||||
];
|
||||
};
|
||||
swayosd.topMargin = 0.8;
|
||||
udiskie = {
|
||||
automount = false;
|
||||
notify = true;
|
||||
tray = "auto";
|
||||
};
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
control-center-layer = "overlay";
|
||||
|
||||
# Notification settings
|
||||
positionX = "right";
|
||||
positionX = "left";
|
||||
positionY = "top";
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
@ -27,7 +27,7 @@
|
||||
notification-window-width = 400;
|
||||
|
||||
# Control center settings
|
||||
control-center-positionX = "right";
|
||||
control-center-positionX = "left";
|
||||
control-center-positionY = "top";
|
||||
control-center-width = 500;
|
||||
control-center-exclusive-zone = true;
|
||||
|
Reference in New Issue
Block a user