Personal utility scripts packaged as a Nix flake. Extracted from ndots for reuse across machines.
Originally, these lived inline as Nix '' strings. Moving them to standalone scripts makes them easier to edit, test, and reuse.
- NixOS / Linux — Hyprland-focused utilities
- macOS — Yabai window manager helpers, Aerospace helpers
- Universal — Cross-platform where possible
{
inputs.utils.url = "github:niksingh710/utils";
# In your configuration
home.packages = [ inputs.utils.packages.${pkgs.system}.focus ];
}
nix run github:niksingh710/utils#fast
nix run github:niksingh710/utils#volume -- up
nix run github:niksingh710/utils#walogram
| Script |
Description |
focus |
Directional focus (tiled/floating aware) |
move |
Directional move with HYPR_MOVE_VAL tuning |
fullscreen |
Cycle: tiled → maximized → fullscreen → tiled |
zoom |
Zoom in/out/reset |
toggle-group |
Toggle window grouping |
fast |
Disable animations/rounding for snappiness |
lid-down |
Handle laptop lid close |
quick-term |
Drop-down terminal (Yakuake-style) |
monitor |
Auto-assign workspaces to monitors |
| Script |
Description |
Platform |
volume |
Volume up/down/mute/mic-mute |
Linux |
brightness |
Screen brightness control |
Linux |
icpu |
CPU info |
Linux |
Rofi Menus (Linux)
| Script |
Description |
powermenu-rofi |
Shutdown/reboot/suspend menu |
menus |
Audio sink/source, bluetooth, network, emoji |
clients |
Window list — focus or pull |
| Script |
Description |
walogram |
Generate Telegram theme from Stylix colors |
cat |
bat wrapper with sane defaults |
myip |
Local/global IP with -l/-g flags |
img-annotate |
Clipboard → Swappy annotation |
waybar-utils |
Screen recording widget |
",XF86AudioRaiseVolume,exec,${inputs.utils.packages.${pkgs.system}.volume} up"
",XF86AudioLowerVolume,exec,${inputs.utils.packages.${pkgs.system}.volume} down"
"$mod,h,exec,${inputs.utils.packages.${pkgs.system}.focus} l"
"$mod,j,exec,${inputs.utils.packages.${pkgs.system}.focus} d"
# modules/darwin/yabai/skhd.nix
${mod} - h : ${lib.getExe pkgs.putils.yabai-cycle-focus} west
${mod} - j : ${lib.getExe pkgs.putils.yabai-cycle-focus} south
{ pkgs, lib, inputs, config, ... }:
let
walogram = inputs.utils.packages.${pkgs.system}.walogram.override {
image = config.stylix.image;
colors = with config.lib.stylix.colors; ''
color0="#${base00}"
color1="#${base01}"
...
'';
};
in
{
home.packages = [ pkgs.materialgram ];
home.activation.tg-theme = lib.hm.dag.entryAfter [ "" ]
''run ${lib.getExe walogram}'';
}
inputs.utils.packages.${pkgs.system}.clients.override {
rofi-theme-str = ''
* { background: #1e1e1e; }
'';
}
git clone https://github.com/niksingh710/utils
cd utils
nix develop # enters shell with pre-commit hooks
Pre-commit runs nixfmt-rfc-style on all .nix files.