more shenanigans

This commit is contained in:
Kopatz
2024-06-03 23:06:56 +02:00
parent 1d410ace0b
commit 1226b41379
9 changed files with 294 additions and 45 deletions

26
home-manager/dunst.nix Normal file
View File

@@ -0,0 +1,26 @@
{ lib, osConfig, pkgs, ... }:
let enable = osConfig.custom.graphical.i3.enable || osConfig.custom.graphical.hyprland.enable;
in {
config = lib.mkIf enable {
services.dunst = {
enable = true;
settings = {
global = {
width = "(0,1000)";
height = "1000";
offset = "0x0";
origin = "bottom-center";
transparency = -1;
frame_color = "#1a1c1b";
font = lib.mkDefault "Monospace 8";
};
urgency_normal = {
background = lib.mkDefault "#1a1c1b";
foreground = lib.mkDefault "#eceff1";
timeout = 10;
};
};
};
};
}

View File

@@ -282,25 +282,5 @@ in {
submap = reset
'';
};
services.dunst = {
enable = true;
settings = {
global = {
width = "(0,1000)";
height = "1000";
offset = "0x0";
origin = "bottom-center";
transparency = -1;
frame_color = "#1a1c1b";
font = "Monospace 8";
};
urgency_normal = {
background = "#1a1c1b";
foreground = "#eceff1";
timeout = 10;
};
};
};
};
}

View File

@@ -1,4 +1,4 @@
{ pkgs, config, ...}: {
{ pkgs, config, ... }: {
home.file.".config/i3" = {
enable = true;
recursive = true;
@@ -19,4 +19,196 @@
source = ../.config/wallpapers;
target = ".config/wallpapers";
};
services.polybar = {
enable = true;
package = pkgs.polybar.override {
pulseSupport = true;
i3Support = true;
};
script = "polybar &";
config = {
"bar/main" = {
monitor = "\${env:MONITOR:}";
bottom = true;
width = "100%";
height = "22pt";
radius = 0;
# offset-y = -5;
# offset-y = "5%";
# dpi = 96;
background = config.stylix.base16Scheme.base01;
foreground = config.stylix.base16Scheme.base05;
line-size = "3pt";
font-0 = "Noto Sans:size=11;1";
font-1 = "Hack-Regular.ttf: Hack:style=Regular";
font-2 = "Noto Sans CJK JP:style=Regular";
border-top-size = 0;
border-right-size = 0;
border-left-size = 0;
border-bottom-size = 0; # "4pt";
border-color = config.stylix.base16Scheme.base00;
padding-left = 2;
padding-right = 2;
module-margin = 1;
modules-left = "i3";
modules-center = "xwindow";
modules-right = "network memory cpu pulseaudio date tray";
cursor-click = "pointer";
cursor-scroll = "ns-resize";
enable-ipc = true;
#tray-position = "right";
# wm-restack = "generic";
# wm-restack = "bspwm";
# wm-restack = "i3";
# override-redirect = true;
};
"module/i3" = let padding = 2;
in {
type = "internal/i3";
pin-workspaces = true;
show-urgent = true;
strip-wsnumbers = true;
index-sort = true;
enable-click = true;
wrapping-scroll = true;
fuzzy-match = true;
format = "<label-state> <label-mode>";
label-focused = "%name%";
label-focused-foreground = config.stylix.base16Scheme.base01;
label-focused-background = config.stylix.base16Scheme.base05;
label-focused-underline = config.stylix.base16Scheme.base03;
label-focused-padding = padding;
label-unfocused = "%name%";
label-unfocused-padding = padding;
label-visible = "%name%";
label-visible-underline = config.stylix.base16Scheme.base01;
label-visible-padding = padding;
label-urgent = "%name%";
label-urgent-foreground = config.stylix.base16Scheme.base00;
label-urgent-background = config.stylix.base16Scheme.base08;
label-urgent-underline = config.stylix.base16Scheme.base0F;
label-urgent-padding = padding;
};
"module/xworkspaces" = {
type = "internal/xworkspaces";
label-active = "%name%";
label-active-background = config.stylix.base16Scheme.base05;
label-active-foreground = config.stylix.base16Scheme.base01;
label-active-underline = config.stylix.base16Scheme.base03;
label-active-padding = 1;
label-occupied = "%name%";
label-occupied-padding = 1;
label-urgent = "%name%";
label-urgent-background = config.stylix.base16Scheme.base08;
label-urgent-padding = 1;
label-empty = "%name%";
label-empty-foreground = config.stylix.base16Scheme.base06;
label-empty-padding = 1;
};
"module/xwindow" = {
type = "internal/xwindow";
label = "%title:0:60:...%";
};
# "module/filesystem" = {
# type = "internal/fs";
# interval = 25;
# mount-0 = "/";
# label-mounted = "%{F#F0C674}%mountpoint%%{F-} %percentage_used%%";
# label-unmounted = "%mountpoint% not mounted";
# label-unmounted-foreground = colors.disabled;
# };
"module/network" = {
type = "internal/network";
interface-type = "wired";
interval = 3;
accumulate-stats = true;
format-connected = "<label-connected>";
format-connected-foreground = config.stylix.base16Scheme.base0B;
format-disconnected = "<label-disconnected>";
format-diconnected-foreground = config.stylix.base16Scheme.base08;
label-connected = "%ifname% %netspeed%";
label-disconnected = "";
};
"module/pulseaudio" = {
type = "internal/pulseaudio";
# format-volume-prefix = "VOL ";
# format-volume-prefix-foreground = colors.primary;
format-volume = "<ramp-volume> <label-volume>";
# format-volume-background = colors.background;
# label-volume-background = colors.background;
format-volume-foreground = config.stylix.base16Scheme.base09;
label-volume = "%percentage%%";
label-muted = "sound ---";
label-muted-foreground = config.stylix.base16Scheme.base09;
#ramp-volume-0 = "";
#ramp-volume-1 = "󰕾";
#ramp-volume-2 = "";
ramp-volume-0 = "sound";
ramp-volume-1 = "sound";
ramp-volume-2 = "sound";
click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
};
# "module/xkeyboard" = {
# type = "internal/xkeyboard";
# blacklist-0 = "num lock";
# label-layout = "%layout%";
# label-layout-foreground = colors.primary;
# label-indicator-padding = 2;
# label-indicator-margin = 1;
# label-indicator-foreground = colors.background;
# label-indicator-background = colors.secondary;
# };
"module/memory" = {
type = "internal/memory";
interval = 2;
format-prefix = "RAM ";
format-prefix-foreground = config.stylix.base16Scheme.base0C;
label = "%percentage_used:2%%";
};
"module/cpu" = {
type = "internal/cpu";
interval = 2;
format-prefix = "CPU ";
format-prefix-foreground = config.stylix.base16Scheme.base0D;
label = "%percentage:2%%";
};
# "network-base" = {
# type = "internal/network";
# interval = 5;
# format-connected = "<label-connected>";
# format-disconnected = "<label-disconnected>";
# label-disconnected = "%{F#F0C674}%ifname%%{F#707880} disconnected";
# };
# "module/wlan" = {
# "inherit" = "network-base";
# interface-type = "wireless";
# label-connected = "%{F#F0C674}%ifname%%{F-} %essid% %local_ip%";
# };
#"module/eth" = {
# "inherit" = "network-base";
# interface-type = "wired";
# label-connected = "%{F#F0C674}%ifname%%{F-} %local_ip%";
#};
"module/date" = {
type = "internal/date";
interval = 1;
date = "%d %b %l:%M %p";
date-alt = "%Y-%m-%d %H:%M:%S";
label = "%date%";
label-foreground = config.stylix.base16Scheme.base06;
# format-background = colors.background;
};
"module/tray" = {
type = "internal/tray";
format-margin = "8px";
tray-spacing = "8px";
};
"settings" = {
screenchange-reload = true;
pseudo-transparency = false;
};
};
};
}