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A6SZ7CIP3F4LKAC ICWY2FLS75I6PRBQYSHNA5HJHGNL3CMWGI66XW7XMKJAVL3LYMJAC UBB7TTAXVPQQCOVHACKWXSPV2NPARSHREYJB6J3RSEDZZIXPFGOAC UQ5YMM34MV2YCANG5H6ZATSFR6RTBJM7MFJU2SY262CIH4DL6O3AC IR44XS6SXVQFVZOFSLBKRJ235ZEHYNVBJ5RZKX4BJTQBX4VBCCWQC }layer-rule {match namespace=r#"waybar|polybar|ashell|notifications|launcher"#shadow {offcolor "#${toString theme.colors.base09}33"draw-behind-window truesoftness 15offset x=0 y=0}
Mod+B { spawn-sh "niri msg action do-screen-transition --delay-ms 100 && notify-send bar_toggle && pkill -USR1 waybar"; }
// TODO: Adapt for ashell.// Mod+B { spawn-sh "niri msg action do-screen-transition --delay-ms 100 && notify-send bar_toggle && pkill -USR1 waybar"; }
Mod+Z { spawn-sh "niri msg action do-screen-transition --delay-ms 100 && notify-send zen_toggle && pkill -USR1 waybar && makoctl mode -t mute && makoctl mode -t do-not-disturb"; }
// TODO: Adapt for ashell.// Mod+Z { spawn-sh "niri msg action do-screen-transition --delay-ms 100 && notify-send zen_toggle && pkill -USR1 waybar && makoctl mode -t mute && makoctl mode -t do-not-disturb"; }
nu = "${getExe pkgs.nushell} -c";bash = "${getExe pkgs.bash} -c";kitty = "${getExe pkgs.kitty} --hold";btop = getExe pkgs.btop;in{programs.waybar.enable = true;hjem.extraModules = singleton {xdg.config.files."waybar/config.jsonc".text =# jsonc''{"layer": "top","height": 32,"margin-top": ${toString theme.margin.small},"margin-left": ${toString theme.margin.small},"margin-right": ${toString theme.margin.small},"margin-bottom": 0,"modules-left": ["niri/workspaces"],"modules-center": ["niri/window"],"modules-right": ["tray","pulseaudio","cpu","memory","disk","custom/gpu","battery","clock"],"niri/workspaces": {"current-only": true,"format": "{index}"},"niri/window": {"max-length": 50,"separate-outputs": true,"rewrite": {"(.*) (—|-) (Zen Browser|Brave)": " $1","(.*) - Discord": " $1","(.*) — nu": " $1"}},"tray": {"reverse-direction": true,"spacing": 5},"pulseaudio": {"format": "{format_source} {icon} {volume}%","format-muted": "{format_source} ","format-source": "","format-source-muted": "","format-icons": {"default": ["", "", ""]},"on-click": "${getExe pkgs.pwvucontrol}","on-click-right": "${getExe' pkgs.wireplumber "wpctl"} set-mute @DEFAULT_AUDIO_SINK@ toggle","tooltip": true,"tooltip-format": "Volume: {volume}%"},"cpu": {"format": " {usage}%","tooltip": true,"tooltip-format": "CPU Usage: {usage}%\nLoad: {load}","interval": 3,"on-click": "${kitty} ${nu} '${btop}'","states": {"warning": 70,"critical": 90}},"memory": {"format": " {used:0.1f}G/{total:0.1f}G","tooltip": true,"tooltip-format": "Memory: {used:0.1f}G/{total:0.1f}G ({percentage}%)\nAvailable: {avail:0.1f}G","interval": 3,"on-click": "${kitty} ${nu} '${btop}'","states": {"warning": 70,"critical": 90}},"disk": {"format": " {percentage_used}%","path": "/","tooltip": true,"tooltip-format": "Disk: {used}/{total} ({percentage_used}%)\nAvailable: {free}","interval": 600,"states": {"warning": 70,"critical": 90}},"custom/gpu": {"exec": "${bash} 'if command -v nvidia-smi >/dev/null; then nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits | head -1; elif command -v radeontop >/dev/null; then radeontop -d - -l 1 | grep -o \"gpu [0-9]*\" | cut -d\" \" -f2; else echo \"N/A\"; fi'","format": " {}%","interval": 5,"tooltip": true,"tooltip-format": "GPU Usage: {}%","on-click": "${kitty} ${nu} '${btop}'","states": {"warning": 70,"critical": 90}},
"battery": {"format": "{icon} {capacity}%","format-charging": " {capacity}%","format-plugged": " {capacity}%","format-icons": ["", "", "", "", "","", "", "", "", ""],"tooltip": true,"tooltip-format": "Battery: {capacity}%\nTime: {time}\nHealth: {health}%","states": {"warning": 30,"critical": 15}},
toml = pkgs.formats.toml { };
"clock": {"interval": 1,"format": " {:%Y-%m-%d | %H:%M:%S}","tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"}}'';
settings = with theme.withHash; {layer = "Bottom";enable_esc_key = true;
xdg.config.files."waybar/style.css".text =with theme.withHash; # css''* {border: none;border-radius: 0;font-family: "${theme.font.sans.name}";font-size: ${toString theme.font.size.normal}px;margin: 0;padding: 0;}
modules = {shutdown_cmd = "systemctl poweroff";suspend_cmd = "hyprlock --quiet & systemctl suspend";hibernate_cmd = "hyprlock --quiet & systemctl hibernate";reboot_cmd = "systemctl reboot";logout_cmd = "hyprlock --quiet --grace 60";
#waybar {background: rgba(${concatStringsSep ", " (map toString theme.withRgb.base00)}, 1.0);color: ${base07};border: ${toString theme.border.small}px solid transparent;border-radius: ${toString theme.radius.small}px;border-image: linear-gradient(225deg, ${base0B}, ${base09}) ${toString theme.border.small};border-image-slice: 1;}
left = [ ];center = [ "WindowTitle" ];right = ["Tray"["SystemInfo"]["Privacy""Settings""Tempo"]];};
#workspaces button {padding: 0 ${toString theme.padding.normal}px;border: ${toString theme.border.small}px solid transparent;border-radius: ${toString theme.radius.small}px;}#workspaces button.empty {color: ${base03};}#workspaces button.active {color: ${base07};background: rgba(${concatStringsSep ", " (map toString theme.withRgb.base00)}, 0.45) padding-box;}#tray, #pulseaudio, #cpu, #memory, #disk, #battery, #clock, #custom-gpu {margin: 0;margin-left: ${toString theme.margin.normal}px;padding: 0 ${toString theme.padding.normal}px;color: ${base07}; /* Use highest contrast text */}#clock {min-width: 125px;}#cpu, #memory, #disk, #custom-gpu {min-width: 42px;}
background_color = {base = base00;strong = base00;weak = base01;};primary_color.base = base01;secondary_color.base = base01;success_color.base = base0B;danger_color.base = base08;text_color.base = base07;};
'';};};polybarBase ={pkgs,lib,config,...}:letinherit (lib.lists) singleton;inherit (config) theme;in{hjem.extraModules = singleton {packages = singleton pkgs.polybar;xdg.config.files."polybar/config.ini".text =with theme; # ini''[colors]background = #282A2Ebackground-alt = #373B41foreground = #C5C8C6primary = #F0C674secondary = #8ABEB7alert = #A54242disabled = #707880[bar/example]width = 100%height = 24ptradius = ${toString radius.small}background = ''${colors.background}foreground = ''${colors.foreground}line-size = 3ptborder-size = 4ptborder-color = #00000000padding-left = 0padding-right = 1module-margin = 1separator = |separator-foreground = ''${colors.disabled}font-0 = ${font.sans.name};2modules-left = xworkspaces xwindowmodules-right = filesystem pulseaudio xkeyboard memory cpu wlan eth datecursor-click = pointercursor-scroll = ns-resizeenable-ipc = true; wm-restack = generic; wm-restack = bspwm; wm-restack = i3; override-redirect = true; This module is not active by default (to enable it, add it to one of the; modules-* list above).; Please note that only a single tray can exist at any time. If you launch; multiple bars with this module, only a single one will show it, the others; will produce a warning. Which bar gets the module is timing dependent and can; be quite random.; For more information, see the documentation page for this module:; https://polybar.readthedocs.io/en/stable/user/modules/tray.html[module/systray]type = internal/trayformat-margin = 8pttray-spacing = 16pt[module/xworkspaces]type = internal/xworkspaceslabel-active = %name%label-active-background = ''${colors.background-alt}label-active-underline= ''${colors.primary}label-active-padding = 1label-occupied = %name%label-occupied-padding = 1label-urgent = %name%label-urgent-background = ''${colors.alert}label-urgent-padding = 1label-empty = %name%label-empty-foreground = ''${colors.disabled}label-empty-padding = 1[module/xwindow]type = internal/xwindowlabel = %title:0:60:...%[module/filesystem]type = internal/fsinterval = 25mount-0 = /label-mounted = %{F#F0C674}%mountpoint%%{F-} %percentage_used%%label-unmounted = %mountpoint% not mountedlabel-unmounted-foreground = ''${colors.disabled}[module/pulseaudio]type = internal/pulseaudioformat-volume-prefix = "VOL "format-volume-prefix-foreground = ''${colors.primary}format-volume = <label-volume>label-volume = %percentage%%label-muted = mutedlabel-muted-foreground = ''${colors.disabled}[module/xkeyboard]type = internal/xkeyboardblacklist-0 = num locklabel-layout = %layout%label-layout-foreground = ''${colors.primary}label-indicator-padding = 2label-indicator-margin = 1label-indicator-foreground = ''${colors.background}label-indicator-background = ''${colors.secondary}[module/memory]type = internal/memoryinterval = 2format-prefix = "RAM "format-prefix-foreground = ''${colors.primary}label = %percentage_used:2%%[module/cpu]type = internal/cpuinterval = 2format-prefix = "CPU "format-prefix-foreground = ''${colors.primary}label = %percentage:2%%[network-base]type = internal/networkinterval = 5format-connected = <label-connected>format-disconnected = <label-disconnected>label-disconnected = %{F#F0C674}%ifname%%{F#707880} disconnected[module/wlan]inherit = network-baseinterface-type = wirelesslabel-connected = %{F#F0C674}%ifname%%{F-} %essid% %local_ip%[module/eth]inherit = network-baseinterface-type = wiredlabel-connected = %{F#F0C674}%ifname%%{F-} %local_ip%[module/date]type = internal/dateinterval = 1date = %H:%Mdate-alt = %Y-%m-%d %H:%M:%Slabel = %date%label-foreground = ''${colors.primary}[settings]screenchange-reload = truepseudo-transparency = true# [bar/plumjam]# height=50# width=100%'';};};ashellBase ={inputs,pkgs,lib,...}:letinherit (lib.lists) singleton;toml = pkgs.formats.toml { };settings = {modules = {shutdown_cmd = "systemctl poweroff";suspend_cmd = "hyprlock --quiet & systemctl suspend";hibernate_cmd = "hyprlock --quiet & systemctl hibernate";reboot_cmd = "systemctl reboot";logout_cmd = "hyprlock --quiet --grace 60";
"Temperature"];temperature.sensor = "coretemp Package id 0";