Flake: Fix shells
This commit is contained in:
@ -12,7 +12,8 @@
|
||||
width = "400";
|
||||
scale = "0";
|
||||
origin = "top-right";
|
||||
offset = "${config.colorScheme.colors.gaps-bar}x${config.colorScheme.colors.gaps-screen}";
|
||||
offset =
|
||||
"${config.colorScheme.colors.gaps-bar}x${config.colorScheme.colors.gaps-screen}";
|
||||
notification_limit = "0";
|
||||
progress_bar = "true";
|
||||
progress_bar_height = "10";
|
||||
|
@ -1,20 +1,25 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
jsonOutput = name: { pre ? "", text ? "", tooltip ? "", alt ? "", class ? "", percentage ? "" }: "${pkgs.writeShellScriptBin "waybar-${name}" ''
|
||||
set -euo pipefail
|
||||
${pre}
|
||||
${pkgs.jq}/bin/jq -cn \
|
||||
--arg text "${text}" \
|
||||
--arg tooltip "${tooltip}" \
|
||||
--arg alt "${alt}" \
|
||||
--arg class "${class}" \
|
||||
--arg percentage "${percentage}" \
|
||||
'{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
|
||||
''}/bin/waybar-${name}";
|
||||
jsonOutput = name:
|
||||
{ pre ? "", text ? "", tooltip ? "", alt ? "", class ? "", percentage ? ""
|
||||
}:
|
||||
"${
|
||||
pkgs.writeShellScriptBin "waybar-${name}" ''
|
||||
set -euo pipefail
|
||||
${pre}
|
||||
${pkgs.jq}/bin/jq -cn \
|
||||
--arg text "${text}" \
|
||||
--arg tooltip "${tooltip}" \
|
||||
--arg alt "${alt}" \
|
||||
--arg class "${class}" \
|
||||
--arg percentage "${percentage}" \
|
||||
'{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}'
|
||||
''
|
||||
}/bin/waybar-${name}";
|
||||
in {
|
||||
config = lib.mkIf (config.homecfg.wm == "Wayland") {
|
||||
|
||||
home.packages = [pkgs.custom.amdgpu_top pkgs.jq];
|
||||
home.packages = [ pkgs.custom.amdgpu_top pkgs.jq ];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
@ -105,11 +110,8 @@ in {
|
||||
settings = [{
|
||||
"layer" = "top";
|
||||
"position" = "right";
|
||||
modules-left = [
|
||||
"hyprland/workspaces"
|
||||
];
|
||||
modules-center = [
|
||||
];
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ ];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"backlight"
|
||||
@ -133,21 +135,21 @@ in {
|
||||
"focused" = "";
|
||||
};
|
||||
"persistent-workspaces" = {
|
||||
"1" = [];
|
||||
"2" = [];
|
||||
"3" = [];
|
||||
"4" = [];
|
||||
"5" = [];
|
||||
"6" = [];
|
||||
"7" = [];
|
||||
"8" = [];
|
||||
"9" = [];
|
||||
"10" = [];
|
||||
"1" = [ ];
|
||||
"2" = [ ];
|
||||
"3" = [ ];
|
||||
"4" = [ ];
|
||||
"5" = [ ];
|
||||
"6" = [ ];
|
||||
"7" = [ ];
|
||||
"8" = [ ];
|
||||
"9" = [ ];
|
||||
"10" = [ ];
|
||||
};
|
||||
"on-scroll-up" = "hyprctl dispatch workspace r-1";
|
||||
"on-scroll-down" = "hyprctl dispatch workspace r+1";
|
||||
};
|
||||
|
||||
|
||||
"backlight" = {
|
||||
"device" = "amd_backlight";
|
||||
"on-scroll-up" = "light -A 5";
|
||||
@ -163,7 +165,8 @@ in {
|
||||
"on-click" = "amixer -D pulse sset Master toggle -q";
|
||||
};
|
||||
"battery" = {
|
||||
"interval" = 30; "states" = {
|
||||
"interval" = 30;
|
||||
"states" = {
|
||||
"warning" = 20;
|
||||
"critical" = 10;
|
||||
};
|
||||
@ -174,32 +177,41 @@ in {
|
||||
};
|
||||
"clock" = {
|
||||
"interval" = 30;
|
||||
"format" = "{:<b>%H</b>\n%M}";
|
||||
"tooltip-format" = "<big><b>{:%d/%m/%Y}</b></big>\n<tt><small>{calendar}</small></tt>";
|
||||
"calendar" = {
|
||||
"months"= "";
|
||||
};
|
||||
"format" = ''
|
||||
{:<b>%H</b>
|
||||
%M}'';
|
||||
"tooltip-format" = ''
|
||||
<big><b>{:%d/%m/%Y}</b></big>
|
||||
<tt><small>{calendar}</small></tt>'';
|
||||
"calendar" = { "months" = ""; };
|
||||
};
|
||||
"memory" = {
|
||||
"interval" = 5;
|
||||
"format" = "\n{icon}";
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
|
||||
"format" = ''
|
||||
|
||||
{icon}'';
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
|
||||
"states" = { "warning" = 85; };
|
||||
};
|
||||
"cpu" = {
|
||||
"interval" = 1;
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
|
||||
"format" = "\n{icon}";
|
||||
"format" = ''
|
||||
|
||||
{icon}'';
|
||||
};
|
||||
"custom/gpu" = {
|
||||
"exec" = jsonOutput "gpu" {
|
||||
tooltip = ''...'';
|
||||
percentage = ''$(amdgpu_top -J -n 1 | jq -r '.devices[0].GRBM2."Command Processor - Graphics".value')'';
|
||||
"exec" = jsonOutput "gpu" {
|
||||
tooltip = "...";
|
||||
percentage = ''
|
||||
$(amdgpu_top -J -n 1 | jq -r '.devices[0].GRBM2."Command Processor - Graphics".value')'';
|
||||
};
|
||||
"return-type" = "json";
|
||||
"interval" = 5;
|
||||
"format-icons" = [ "" "" "" "" "" "" "" "" "" ];
|
||||
"format" = "\n{icon}";
|
||||
"format" = ''
|
||||
|
||||
{icon}'';
|
||||
};
|
||||
"network" = {
|
||||
"format-disconnected" = "";
|
||||
|
@ -1,9 +1,9 @@
|
||||
{ config, ... }: {
|
||||
imports = [ ./sorahiro_soft.nix ];
|
||||
{ config, ... }: {
|
||||
imports = [ ./sorahiro_soft.nix ];
|
||||
|
||||
colorScheme.colors.border-radius = "#8";
|
||||
colorScheme.colors.border-width = "#2";
|
||||
colorScheme.colors.gaps-screen = "#8";
|
||||
colorScheme.colors.gaps-window = "#4";
|
||||
colorScheme.colors.gaps-bar = "#32";
|
||||
colorScheme.colors.border-radius = "#8";
|
||||
colorScheme.colors.border-width = "#2";
|
||||
colorScheme.colors.gaps-screen = "#8";
|
||||
colorScheme.colors.gaps-window = "#4";
|
||||
colorScheme.colors.gaps-bar = "#32";
|
||||
}
|
||||
|
Reference in New Issue
Block a user