mirror of
https://github.com/tomasriveral/nixos.git
synced 2026-08-12 18:30:46 +02:00
24 lines
414 B
Nix
24 lines
414 B
Nix
{
|
|
writeShellApplication,
|
|
hyprland,
|
|
jq,
|
|
...
|
|
}:
|
|
writeShellApplication {
|
|
name = "custom-killall";
|
|
runtimeInputs = [
|
|
hyprland
|
|
jq
|
|
];
|
|
text = ''
|
|
active_workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
|
|
|
|
hyprctl clients -j |
|
|
jq -r ".[]
|
|
| select(.workspace.id==''${active_workspace_id})
|
|
| select(.focusHistoryID!=0)
|
|
| .pid" |
|
|
xargs -r kill
|
|
'';
|
|
}
|