From adb09135cee65660f2e29c869b952f96ecdbd568 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Mon, 9 Jun 2025 19:23:11 +0100 Subject: [PATCH] Add aura farming Signed-off-by: Nikolaos Karaolidis --- hosts/himalia/hardware/keybinds.nix | 28 +++++++++++++++---- hosts/himalia/hardware/scripts/farm-aura.sh | 11 ++++++++ .../hardware/{ => scripts}/touchpad-helper.sh | 0 3 files changed, 33 insertions(+), 6 deletions(-) create mode 100755 hosts/himalia/hardware/scripts/farm-aura.sh rename hosts/himalia/hardware/{ => scripts}/touchpad-helper.sh (100%) diff --git a/hosts/himalia/hardware/keybinds.nix b/hosts/himalia/hardware/keybinds.nix index 329eaba..6bbce15 100644 --- a/hosts/himalia/hardware/keybinds.nix +++ b/hosts/himalia/hardware/keybinds.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ lib, pkgs, ... }: { home-manager.sharedModules = [ { @@ -14,16 +14,32 @@ bindl = let - touchpadHelper = pkgs.writeShellApplication { - name = "touchpad-helper"; - runtimeInputs = with pkgs; [ hyprland ]; - text = builtins.readFile ./touchpad-helper.sh; - }; + touchpadHelper = lib.meta.getExe ( + pkgs.writeShellApplication { + name = "touchpad-helper"; + runtimeInputs = with pkgs; [ hyprland ]; + text = builtins.readFile ./scripts/touchpad-helper.sh; + } + ); in [ ", XF86Launch4, exec, ${asusctl} profile -n" ", XF86TouchpadToggle, exec, ${touchpadHelper} asuf1209:00-2808:0219-touchpad" ]; + + bind = + let + farmAura = lib.meta.getExe ( + pkgs.writeShellApplication { + name = "farm-aura"; + runtimeInputs = with pkgs; [ genact ]; + text = builtins.readFile ./scripts/farm-aura.sh; + } + ); + in + [ + ", XF86Launch3, exec, uwsm app -- $term ${farmAura}" + ]; }; } ]; diff --git a/hosts/himalia/hardware/scripts/farm-aura.sh b/hosts/himalia/hardware/scripts/farm-aura.sh new file mode 100755 index 0000000..eaaa431 --- /dev/null +++ b/hosts/himalia/hardware/scripts/farm-aura.sh @@ -0,0 +1,11 @@ +SESSION_NAME="aura-farm-$$" + +tmux new-session -d -s "$SESSION_NAME" "genact -s 25" +tmux set-hook -t "$SESSION_NAME" pane-exited "run-shell 'tmux kill-session -t $SESSION_NAME'" + +for _ in {1..4}; do + tmux split-window -t "$SESSION_NAME" -h "genact -s 25" +done + +tmux select-layout -t "$SESSION_NAME" tiled +tmux attach-session -t "$SESSION_NAME" diff --git a/hosts/himalia/hardware/touchpad-helper.sh b/hosts/himalia/hardware/scripts/touchpad-helper.sh similarity index 100% rename from hosts/himalia/hardware/touchpad-helper.sh rename to hosts/himalia/hardware/scripts/touchpad-helper.sh