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G746QCMXNC5C3BAC X4ZFOU74NCNVUCNV2EJLKOTNXQK6EFX7MYOH7W4ZI45QD7SKTRPQC A7KUAOWFTB3DK3GMSUNOWXFOISMPNNG5XXM2GXCNG4JZ4GZH3I7QC 7HAYHRJM7SXHXAG4D63PWVLKQXME3HET6HBECYA6SZ7CIP3F4LKAC 4I26WBI2OTXMVOZABBYSFW24WLXDDR424PTM27TGRB7JSSZNYVJAC UBB7TTAXVPQQCOVHACKWXSPV2NPARSHREYJB6J3RSEDZZIXPFGOAC IR44XS6SXVQFVZOFSLBKRJ235ZEHYNVBJ5RZKX4BJTQBX4VBCCWQC CT5KAAO5HXLWNE3TAZUZESTTXFM3XZQMIVCMPW7HDQTUWNPGQTIAC 2SNUQGBMWREC2GNQV5CUFNCVCS3EYF7EIKEJ6S3WQMVQ63LVOA3QC FE72BKQZWYINBMZYVMBWQIDL773TEFBALY7BWBSKBMMADSVCXKGQC {flake-file.inputs = {ashell = {url = "github:malpenzibo/ashell";inputs.nixpkgs.follows = "os";};};flake.modules.nixos.waybar = {programs.waybar.enable = true;};flake.modules.hjem.waybar =
letwaybarBase =
mkIf (isDesktop && isLinux && enable) {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,
{programs.waybar.enable = true;
"modules-left": ["niri/workspaces"],"modules-center": ["niri/window"],"modules-right": ["tray","pulseaudio","cpu","memory","disk","custom/gpu","battery","clock"],
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}"},
"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}%"},
"pulseaudio": {"format": "{format_source} {icon} {volume}%","format-muted": "{format_source} ","format-source": "","format-source-muted": "","format-icons": {"default": ["", "", ""]
"cpu": {"format": " {usage}%","tooltip": true,"tooltip-format": "CPU Usage: {usage}%\nLoad: {load}","interval": 3,"on-click": "${kitty} ${nu} '${btop}'","states": {"warning": 70,"critical": 90}
"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}},
"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}},
"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}},
"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}},
"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
"clock": {"interval": 1,"format": " {:%Y-%m-%d | %H:%M:%S}","tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
"clock": {"interval": 1,"format": " {:%Y-%m-%d | %H:%M:%S}","tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
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;
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;}
#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;}
#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;}
#window {color: ${base07};}
#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 {padding: 0 ${toString theme.padding.normal}px;border: ${toString theme.border.small}px solid transparent;border-radius: ${toString theme.radius.small}px;}
#workspaces button.active {color: ${base07};background: rgba(${concatStringsSep ", " (map toString theme.withRgb.base00)}, 0.45) padding-box;}
#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 */}
#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 */}
#battery.critical:not(.charging) #cpu.critical, #memory.critical, #disk.critical, #custom-gpu.critical {color: ${base08};}
#battery.critical:not(.charging) #cpu.critical, #memory.critical, #disk.critical, #custom-gpu.critical {color: ${base08};}
enable = false;inmkIf (isDesktop && isLinux && enable) {packages = [ pkgs.polybar ];
xdg.config.files."polybar/config.ini".text =with theme; # ini''[colors]background = #282A2Ebackground-alt = #373B41foreground = #C5C8C6primary = #F0C674secondary = #8ABEB7alert = #A54242disabled = #707880
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}
; 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/tray
; 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/tray
format-margin = 8pttray-spacing = 16pt
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/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%%
[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
[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%
mkIf (isDesktop && isLinux && enable) {packages = singleton inputs.ashell.packages.${pkgs.stdenv.hostPlatform.system}.default;
{hjem.extraModules = singleton {packages = singleton inputs.ashell.packages.${pkgs.stdenv.hostPlatform.system}.default;xdg.config.files."ashell/config.toml".source = toml.generate "ashell.toml" settings;};};in{flake-file.inputs = {ashell = {url = "github:malpenzibo/ashell";
xdg.config.files."git/credentials".text = # ini''[credential]helper=cache --timeout 21600helper=oauthhelper=oauth -devicehelper=!gh auth git-credential[credential "https://git.plumj.am"]oauthClientId=a4792ccc-144e-407e-86c9-5e7d8d9c3269oauthAuthURL=/login/oauth/authorizeoauthTokenURL=/login/oauth/access_token'';
xdg.config.files."git/credentials".text = # ini''[credential]helper=cache --timeout 21600helper=oauthhelper=oauth -devicehelper=!gh auth git-credential[credential "https://git.plumj.am"]oauthClientId=a4792ccc-144e-407e-86c9-5e7d8d9c3269oauthAuthURL=/login/oauth/authorizeoauthTokenURL=/login/oauth/access_token'';};