Files
NubNix/home-manager/20_waybar/04_workspace.nix
2025-11-13 14:15:48 +00:00

56 lines
1.3 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, ... }:
{
home.file.".config/waybar/scripts/workspaces/workspace-1.sh".text = ''
#!/bin/bash
# workspace-1.sh highlight workspace 1 if active
active=$(hyprctl activeworkspace -j | jq '.id')
if [ "$active" -eq 1 ]; then
echo "[<span foreground='#fab387'></span>]"
else
echo "[А]"
fi
'';
home.file.".config/waybar/scripts/workspaces/workspace-2.sh".text = ''
#!/bin/bash
# workspace-2.sh highlight workspace 2 if active
active=$(hyprctl activeworkspace -j | jq '.id')
if [ "$active" -eq 2 ]; then
echo "[<span foreground='#fab387'></span>]"
else
echo "[Б]"
fi
'';
home.file.".config/waybar/scripts/workspaces/workspace-3.sh".text = ''
#!/bin/bash
# workspace-3.sh highlight workspace 3 if active
active=$(hyprctl activeworkspace -j | jq '.id')
if [ "$active" -eq 3 ]; then
echo "[<span foreground='#fab387'></span>]"
else
echo "[В]"
fi
'';
home.file.".config/waybar/scripts/workspaces/workspace-4.sh".text = ''
#!/bin/bash
# workspace-4.sh highlight workspace 4 if active
active=$(hyprctl activeworkspace -j | jq '.id')
if [ "$active" -eq 4 ]; then
echo "[<span foreground='#fab387'></span>]"
else
echo "[Г]"
fi
'';
}