mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 20:25:38 +00:00
launch legendary game with fzf
This commit is contained in:
parent
350d7bb3cd
commit
aa8765b2a2
@ -15,6 +15,7 @@
|
|||||||
lutris
|
lutris
|
||||||
amdvlk
|
amdvlk
|
||||||
wineWowPackages.stable
|
wineWowPackages.stable
|
||||||
|
# vulkan-tools
|
||||||
|
|
||||||
# Required according to https://lutris.net/games/league-of-legends/
|
# Required according to https://lutris.net/games/league-of-legends/
|
||||||
openssl
|
openssl
|
||||||
@ -25,5 +26,7 @@
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = { QT_X11_NO_MITSHM = "1"; };
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
{ config, pkgs, lib, ... }: {
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let home-packages = config.home-manager.users.${config.user}.home.packages;
|
||||||
|
|
||||||
|
in {
|
||||||
|
|
||||||
options.gaming.legendary =
|
options.gaming.legendary =
|
||||||
lib.mkEnableOption "Legendary - Epic Games Launcher";
|
lib.mkEnableOption "Legendary - Epic Games Launcher";
|
||||||
@ -33,6 +37,21 @@
|
|||||||
".fdignore".text = ignorePatterns;
|
".fdignore".text = ignorePatterns;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.fish.functions =
|
||||||
|
lib.mkIf (builtins.elem pkgs.fzf home-packages) {
|
||||||
|
epic-games = {
|
||||||
|
body = ''
|
||||||
|
set game (legendary list 2>/dev/null \
|
||||||
|
| tail -n +3 \
|
||||||
|
| head -n -2 \
|
||||||
|
| sed -e 's/ (.*)$//' -e 's/ \* //' \
|
||||||
|
| awk '!/^ / { print $0; }' \
|
||||||
|
| fzf)
|
||||||
|
and legendary launch "$game" 2>/dev/null
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user